Skip to content

Commit 59778f0

Browse files
allozaurngxson
andauthored
ui: Restructure repo to use tools/ui folder and ui / UI / llama-ui / LLAMA_UI naming (ggml-org#23064)
* webui: Move static build output from `tools/server/public` to `build/ui` directory * refactor: Move to `tools/ui` * refactor: rename CMake variables and preprocessor defines - Rename LLAMA_BUILD_WEBUI -> LLAMA_BUILD_UI (old kept as deprecated) - Rename LLAMA_USE_PREBUILT_WEBUI -> LLAMA_USE_PREBUILT_UI (old kept as deprecated) - Backward compat: old vars auto-forward to new ones with DEPRECATION warning - Rename internal vars: WEBUI_SOURCE -> UI_SOURCE, WEBUI_SOURCE_DIR -> UI_SOURCE_DIR, etc. - Rename HF bucket: LLAMA_WEBUI_HF_BUCKET -> LLAMA_UI_HF_BUCKET - Emit both LLAMA_BUILD_WEBUI and LLAMA_BUILD_UI preprocessor defines - Emit both LLAMA_WEBUI_DEFAULT_ENABLED and LLAMA_UI_DEFAULT_ENABLED * refactor: rename CLI flags (--webui -> --ui) with backward compat - Add --ui/--no-ui (old --webui/--no-webui kept as deprecated aliases) - Add --ui-config (old --webui-config kept as deprecated alias) - Add --ui-config-file (old --webui-config-file kept as deprecated alias) - Add --ui-mcp-proxy/--no-ui-mcp-proxy (old --webui-mcp-proxy kept as deprecated) - Add new env vars: LLAMA_ARG_UI, LLAMA_ARG_UI_CONFIG, LLAMA_ARG_UI_CONFIG_FILE, LLAMA_ARG_UI_MCP_PROXY - C++ struct fields: params.ui, params.ui_config_json, params.ui_mcp_proxy added alongside old fields - Backward compat: old fields synced to new ones in g_params_to_internals * refactor: update C++ server internals with backward compat - Rename json_webui_settings -> json_ui_settings (both kept in server_context_meta) - Rename params.webui usage -> params.ui (both synced, old still works) - JSON API emits both "ui"/"ui_settings" and "webui"/"webui_settings" keys - Server routes use params.ui_mcp_proxy || params.webui_mcp_proxy - Preprocessor guards use #if defined(LLAMA_BUILD_UI) || defined(LLAMA_BUILD_WEBUI) * refactor: rename CI/CD workflows, artifacts, and build script - Rename webui-build.yml -> ui-build.yml; artifact webui-build -> ui-build - Rename webui-publish.yml -> ui-publish.yml; var HF_BUCKET_WEBUI_STATIC_OUTPUT -> HF_BUCKET_UI_STATIC_OUTPUT - Rename server-webui.yml -> server-ui.yml; job webui-build/checks -> ui-build/checks - Update server.yml: job/artifact refs webui-build -> ui-build - Update release.yml: all webui-build/publish refs -> ui-build/publish; HF_TOKEN_WEBUI_STATIC_OUTPUT -> HF_TOKEN_UI_STATIC_OUTPUT - Update server-self-hosted.yml: webui-build -> ui-build - Update build-self-hosted.yml: HF_WEBUI_VERSION -> HF_UI_VERSION - Rename webui-download.cmake -> ui-download.cmake (internal refs updated) - Update labeler.yml: server/webui -> server/ui path label * docs: update CODEOWNERS and server README docs - Update CODEOWNERS: team ggml-org/llama-webui -> ggml-org/llama-ui, path /tools/server/webui/ -> /tools/ui/ - Update server README.md: CLI tables show --ui flags with deprecated --webui aliases - Update server README-dev.md: "WebUI" -> "UI", paths updated to tools/ui/ * fix: Small fixes for UI build * fix: CMake.txt syntax * chore: Formatting * fix: `.editorconfig` for llama-ui * chore: Formatting * refactor: Use `APP_NAME` in Error route * refactor: Cleanup * refactor: Single migration service * make llama-ui a linkable target * fix: UI Build output * fix: Missing change * fix: separate llama-ui npm build output into build/tools/ui/dist subfolder + use cmake npm build instead of downloading ui-build.yml artifacts in CI * refactor: UI workflows cleanup --------- Co-authored-by: Xuan Son Nguyen <son@huggingface.co>
1 parent 49d1701 commit 59778f0

565 files changed

Lines changed: 1614 additions & 698 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ insert_final_newline = unset
4545
trim_trailing_whitespace = unset
4646
insert_final_newline = unset
4747

48-
[tools/server/webui/**]
48+
[tools/ui/**]
4949
indent_style = unset
5050
indent_size = unset
5151
end_of_line = unset

.github/labeler.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ android:
7373
- changed-files:
7474
- any-glob-to-any-file:
7575
- examples/llama.android/**
76-
server/webui:
76+
server/ui:
7777
- changed-files:
7878
- any-glob-to-any-file:
79-
- tools/server/webui/**
79+
- tools/ui/**
8080
server:
8181
- changed-files:
8282
- any-glob-to-any-file:

.github/workflows/build-self-hosted.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ jobs:
6868
- name: Determine tag name
6969
id: tag
7070
uses: ./.github/actions/get-tag-name
71+
env:
72+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
7173

7274
ggml-ci-nvidia-cuda:
7375
needs: determine-tag
@@ -81,7 +83,7 @@ jobs:
8183
- name: Test
8284
id: ggml-ci
8385
env:
84-
HF_WEBUI_VERSION: ${{ needs.determine-tag.outputs.tag_name }}
86+
HF_UI_VERSION: ${{ needs.determine-tag.outputs.tag_name }}
8587
run: |
8688
nvidia-smi
8789
GG_BUILD_CUDA=1 bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp
@@ -98,7 +100,7 @@ jobs:
98100
- name: Test
99101
id: ggml-ci
100102
env:
101-
HF_WEBUI_VERSION: ${{ needs.determine-tag.outputs.tag_name }}
103+
HF_UI_VERSION: ${{ needs.determine-tag.outputs.tag_name }}
102104
run: |
103105
vulkaninfo --summary
104106
GG_BUILD_VULKAN=1 GGML_VK_DISABLE_COOPMAT2=1 bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp
@@ -115,7 +117,7 @@ jobs:
115117
- name: Test
116118
id: ggml-ci
117119
env:
118-
HF_WEBUI_VERSION: ${{ needs.determine-tag.outputs.tag_name }}
120+
HF_UI_VERSION: ${{ needs.determine-tag.outputs.tag_name }}
119121
run: |
120122
vulkaninfo --summary
121123
GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp
@@ -205,7 +207,7 @@ jobs:
205207
- name: Test
206208
id: ggml-ci
207209
env:
208-
HF_WEBUI_VERSION: ${{ needs.determine-tag.outputs.tag_name }}
210+
HF_UI_VERSION: ${{ needs.determine-tag.outputs.tag_name }}
209211
run: |
210212
GG_BUILD_METAL=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp
211213
@@ -234,7 +236,7 @@ jobs:
234236
- name: Test
235237
id: ggml-ci
236238
env:
237-
HF_WEBUI_VERSION: ${{ needs.determine-tag.outputs.tag_name }}
239+
HF_UI_VERSION: ${{ needs.determine-tag.outputs.tag_name }}
238240
run: |
239241
GG_BUILD_WEBGPU=1 GG_BUILD_WEBGPU_DAWN_PREFIX="$GITHUB_WORKSPACE/dawn" \
240242
bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp
@@ -251,7 +253,7 @@ jobs:
251253
- name: Test
252254
id: ggml-ci
253255
env:
254-
HF_WEBUI_VERSION: ${{ needs.determine-tag.outputs.tag_name }}
256+
HF_UI_VERSION: ${{ needs.determine-tag.outputs.tag_name }}
255257
run: |
256258
vulkaninfo --summary
257259
GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp
@@ -270,7 +272,7 @@ jobs:
270272
- name: Test
271273
id: ggml-ci
272274
env:
273-
HF_WEBUI_VERSION: ${{ needs.determine-tag.outputs.tag_name }}
275+
HF_UI_VERSION: ${{ needs.determine-tag.outputs.tag_name }}
274276
run: |
275277
vulkaninfo --summary
276278
GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp
@@ -291,7 +293,7 @@ jobs:
291293
MSYSTEM: UCRT64
292294
CHERE_INVOKING: 1
293295
PATH: C:\msys64\ucrt64\bin;C:\msys64\usr\bin;C:\Windows\System32;${{ env.PATH }}
294-
HF_WEBUI_VERSION: ${{ needs.determine-tag.outputs.tag_name }}
296+
HF_UI_VERSION: ${{ needs.determine-tag.outputs.tag_name }}
295297
run: |
296298
vulkaninfo --summary
297299
# Skip python related tests with GG_BUILD_LOW_PERF=1 since Windows MSYS2 UCRT64 currently fails to create
@@ -332,7 +334,7 @@ jobs:
332334
- name: Test
333335
id: ggml-ci
334336
env:
335-
HF_WEBUI_VERSION: ${{ needs.determine-tag.outputs.tag_name }}
337+
HF_UI_VERSION: ${{ needs.determine-tag.outputs.tag_name }}
336338
run: |
337339
source ./openvino_toolkit/setupvars.sh
338340
GG_BUILD_OPENVINO=1 GGML_OPENVINO_DEVICE=GPU GG_BUILD_LOW_PERF=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt

0 commit comments

Comments
 (0)