-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
server : (web ui) Various improvements, now use vite as bundler #10599
Conversation
Do I need to do any extra steps? I pulled your branch and run cd build
make -j && ./bin/llama-server -m ../models/qwen2.5-32b-instruct/ggml-model-q8_0.gguf
...
0.01.190.151 I srv init: initializing slots, n_slots = 1
0.01.190.163 I slot init: id 0 | task -1 | new slot n_ctx_slot = 4096
0.01.190.233 I main: model loaded
0.01.190.255 I main: chat template, built_in: 1, chat_example: '<|im_start|>system
You are a helpful assistant<|im_end|>
<|im_start|>user
Hello<|im_end|>
<|im_start|>assistant
Hi there<|im_end|>
<|im_start|>user
How are you?<|im_end|>
<|im_start|>assistant
'
0.01.190.257 I main: server is listening on http://127.0.0.1:8080 - starting the main loop
0.01.190.259 I srv update_slots: all slots are idle But it renders like this in the browser: If I go back to |
@ggerganov Could you try
|
I had the same issue as @ggerganov. Running However, just reconfiguring cmake is not enough to fix it. That should be fixed, or it is going to be very confusing. |
Yes, |
I think I have found a fix, after playing around a bit more with Makefile's |
The CMake build still requires to run |
I added a pre-build step to remove the generated |
Many thanks for the new awesome front-end 🙏
Unfortunately, this change causes I don't know if it's correct to write here this comment or should I open an issue? |
I don't observe the same behavior on my side (running
|
It does rebuild I imagine that the reason it doesn't work like that in the first place is because we needed to support the |
…ganov#10599) * hide buttons in dropdown menu * use npm as deps manager and vite as bundler * fix build * fix build (2) * fix responsive on mobile * fix more problems on mobile * sync build * (test) add CI step for verifying build * fix ci * force rebuild .hpp files * cmake: clean up generated files pre build
…ganov#10599) * hide buttons in dropdown menu * use npm as deps manager and vite as bundler * fix build * fix build (2) * fix responsive on mobile * fix more problems on mobile * sync build * (test) add CI step for verifying build * fix ci * force rebuild .hpp files * cmake: clean up generated files pre build
Motivation
The new web UI has received significantly more positive feedback than anticipated, prompting consideration for further enhancements.
Currently, we operate without a bundler, running code directly from
index.html
and 3rd party libraries fromdeps.sh
. However, this approach has limitations, particularly with daisyui component compatibility. It also leave a big binary size with many redundant parts inside.Given that many llama.cpp contributors have a lower-level programming background, here's a brief overview of the current UI tech stack and why we need to use them:
.html
file, eliminating runtime dependencies.Improvements
Key updates in this PR:
server/webui
usingnpm
for dependency management (withdeps.sh
script removed)server/README.md
). Outputindex.html
size is just under 500kb, which is smaller than the old approach withdeps.sh
(Remind: this newindex.html
contains everything needed)For binary size, this PR recudes 1MB of the final compiled binary compared to
master
:|