Skip to content

Commit 49b841d

Browse files
committed
Merge remote-tracking branch 'upstream/master' into codex/harden-vulkan-turbo4-v-cache
2 parents 60635b6 + 1c0f6db commit 49b841d

25 files changed

Lines changed: 674 additions & 460 deletions

File tree

.github/workflows/release.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,6 +1234,9 @@ jobs:
12341234
path: llama-${{ steps.tag.outputs.name }}-bin-${{ matrix.chip_type }}-openEuler-${{ matrix.arch }}${{ matrix.use_acl_graph == 'on' && '-aclgraph' || '' }}.tar.gz
12351235
name: llama-bin-${{ matrix.chip_type }}-openEuler-${{ matrix.arch }}${{ matrix.use_acl_graph == 'on' && '-aclgraph' || '' }}.tar.gz
12361236

1237+
ui-build:
1238+
uses: ./.github/workflows/ui-build.yml
1239+
12371240
release:
12381241
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
12391242

@@ -1259,6 +1262,7 @@ jobs:
12591262
- macOS-cpu
12601263
- ios-xcode-build
12611264
- openEuler-cann
1265+
- ui-build
12621266

12631267
outputs:
12641268
tag_name: ${{ steps.tag.outputs.name }}
@@ -1318,6 +1322,18 @@ jobs:
13181322
mv -v artifact/*.zip release
13191323
mv -v artifact/*.tar.gz release
13201324
1325+
- name: Download UI build
1326+
id: download_ui
1327+
uses: actions/download-artifact@v7
1328+
with:
1329+
name: ui-build
1330+
path: ./ui-dist
1331+
1332+
- name: Package UI
1333+
id: package_ui
1334+
run: |
1335+
tar -czvf release/llama-${{ steps.tag.outputs.name }}-ui.tar.gz --transform "s,^\.,llama-${{ steps.tag.outputs.name }}," -C ./ui-dist .
1336+
13211337
- name: Create release
13221338
id: create_release
13231339
uses: ggml-org/action-create-release@v1
@@ -1367,6 +1383,9 @@ jobs:
13671383
- [openEuler aarch64 (310p)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-310p-openEuler-aarch64.tar.gz)
13681384
- [openEuler aarch64 (910b, ACL Graph)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-910b-openEuler-aarch64-aclgraph.tar.gz)
13691385
1386+
**UI:**
1387+
- [UI](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-ui.tar.gz)
1388+
13701389
- name: Upload release
13711390
id: upload_release
13721391
uses: actions/github-script@v8

.github/workflows/server.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,13 @@ concurrency:
5454
cancel-in-progress: true
5555

5656
jobs:
57+
ui-build:
58+
name: Build Web UI
59+
uses: ./.github/workflows/ui-build.yml
60+
5761
server:
5862
runs-on: ubuntu-latest
63+
needs: ui-build
5964

6065
name: server (${{ matrix.wf_name }})
6166
strategy:
@@ -93,12 +98,11 @@ jobs:
9398
fetch-depth: 0
9499
ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }}
95100

96-
- name: Setup Node.js
97-
uses: actions/setup-node@v6
101+
- name: Download built UI
102+
uses: actions/download-artifact@v7
98103
with:
99-
node-version: "24"
100-
cache: "npm"
101-
cache-dependency-path: "tools/ui/package-lock.json"
104+
name: ui-build
105+
path: tools/ui/dist
102106

103107
- name: Build
104108
id: cmake_build

.github/workflows/ui-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
- name: Generate checksums
3333
run: |
34-
cd build/tools/ui/dist
34+
cd tools/ui/dist
3535
for f in *; do
3636
sha256sum "$f" | awk '{print $1, $2}' >> checksums.txt
3737
done
@@ -40,5 +40,5 @@ jobs:
4040
uses: actions/upload-artifact@v6
4141
with:
4242
name: ui-build
43-
path: build/tools/ui/dist/
43+
path: tools/ui/dist/
4444
retention-days: 1

.github/workflows/ui-publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
uses: actions/download-artifact@v7
3939
with:
4040
name: ui-build
41-
path: build/tools/ui/dist/
41+
path: tools/ui/dist/
4242

4343
- name: Install Hugging Face Hub CLI
4444
run: pip install -U huggingface_hub
@@ -49,12 +49,12 @@ jobs:
4949
- name: Sync built files to Hugging Face bucket (version tag)
5050
run: |
5151
# Upload the built files to the Hugging Face bucket under the release version
52-
hf buckets sync build/tools/ui/dist hf://buckets/ggml-org/${{ env.HF_BUCKET_NAME }}/${{ inputs.version_tag }} --delete --quiet
52+
hf buckets sync tools/ui/dist hf://buckets/ggml-org/${{ env.HF_BUCKET_NAME }}/${{ inputs.version_tag }} --delete --quiet
5353
5454
- name: Sync built files to Hugging Face bucket (latest)
5555
run: |
5656
# Also upload to the 'latest' directory for fallback downloads
57-
hf buckets sync build/tools/ui/dist hf://buckets/ggml-org/${{ env.HF_BUCKET_NAME }}/latest --delete --quiet
57+
hf buckets sync tools/ui/dist hf://buckets/ggml-org/${{ env.HF_BUCKET_NAME }}/latest --delete --quiet
5858
5959
- name: Verify upload
6060
run: |

CMakeLists.txt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,6 @@ option(LLAMA_BUILD_APP "llama: build the unified binary"
112112
option(LLAMA_BUILD_UI "llama: build the embedded Web UI for server" ON)
113113
option(LLAMA_USE_PREBUILT_UI "llama: use prebuilt UI from HF Bucket when available (requires LLAMA_BUILD_UI=ON)" ON)
114114

115-
# Backward compat: when old var is set but new one isn't, forward the value
116-
if(DEFINED LLAMA_BUILD_WEBUI)
117-
set(LLAMA_BUILD_UI ${LLAMA_BUILD_WEBUI})
118-
message(DEPRECATION "LLAMA_BUILD_WEBUI is deprecated, use LLAMA_BUILD_UI instead")
119-
endif()
120-
if(DEFINED LLAMA_USE_PREBUILT_WEBUI)
121-
set(LLAMA_USE_PREBUILT_UI ${LLAMA_USE_PREBUILT_WEBUI})
122-
message(DEPRECATION "LLAMA_USE_PREBUILT_WEBUI is deprecated, use LLAMA_USE_PREBUILT_UI instead")
123-
endif()
124-
125115
option(LLAMA_TOOLS_INSTALL "llama: install tools" ${LLAMA_TOOLS_INSTALL_DEFAULT})
126116
option(LLAMA_TESTS_INSTALL "llama: install tests" ON)
127117

common/common.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -617,11 +617,7 @@ struct common_params {
617617
std::map<std::string, std::string> default_template_kwargs;
618618

619619
// UI configs
620-
#ifdef LLAMA_UI_DEFAULT_ENABLED
621-
bool ui = LLAMA_UI_DEFAULT_ENABLED != 0;
622-
#else
623-
bool ui = true; // default to enabled when not set
624-
#endif
620+
bool ui = true;
625621

626622
// Deprecated: use ui, ui_mcp_proxy, ui_config_json instead
627623
bool webui = ui;

docs/backend/snapdragon/CMakeUserPresets.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
"name": "arm64-windows-snapdragon",
3434
"inherits": [ "base", "arm64-windows-llvm" ],
3535
"cacheVariables": {
36-
"CMAKE_C_FLAGS": "-march=armv8.7a+fp16 -fvectorize -ffp-model=fast -flto -D_GNU_SOURCE",
37-
"CMAKE_CXX_FLAGS": "-march=armv8.7a+fp16 -fvectorize -ffp-model=fast -flto -D_GNU_SOURCE",
36+
"CMAKE_C_FLAGS": "-march=armv8.7a+fp16+dotprod+i8mm -fvectorize -ffp-model=fast -flto -D_GNU_SOURCE",
37+
"CMAKE_CXX_FLAGS": "-march=armv8.7a+fp16+dotprod+i8mm -fvectorize -ffp-model=fast -flto -D_GNU_SOURCE",
3838
"CMAKE_C_FLAGS_RELEASE": "-O3 -DNDEBUG",
3939
"CMAKE_CXX_FLAGS_RELEASE": "-O3 -DNDEBUG",
4040
"CMAKE_C_FLAGS_RELWITHDEBINFO": "-O3 -DNDEBUG -g",

docs/backend/snapdragon/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Native Windows 11 arm64 builds has the following tools dependencies:
2424
- UCRT and Driver Kit
2525
- LLVM core libraries and Clang compiler (winget)
2626
- CMake, Git, Python (winget)
27-
- Hexagon SDK Community Edition 6.4 or later (see windows.md)
27+
- Hexagon SDK Community Edition 6.6 or later (see windows.md)
2828
- OpenCL SDK 2.3 or later (see windows.md)
2929

3030
Note: The rest of the **Windows** build process assumes that you're running natively in Powershell.
@@ -45,7 +45,7 @@ Preset CMake variables:
4545
GGML_HEXAGON="ON"
4646
GGML_OPENCL="ON"
4747
GGML_OPENMP="OFF"
48-
HEXAGON_SDK_ROOT="/opt/hexagon/6.4.0.2"
48+
HEXAGON_SDK_ROOT="/opt/hexagon/6.6.0.0"
4949
...
5050
-- Including OpenCL backend
5151
-- Including Hexagon backend

docs/backend/snapdragon/windows.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ c:\Qualcomm\OpenCL_SDK\2.3.2
2828

2929
Either use the trimmed down version (optimized for CI) from
3030

31-
https://github.com/snapdragon-toolchain/hexagon-sdk/releases/download/v6.4.0.2/hexagon-sdk-v6.4.0.2-arm64-wos.tar.xz
31+
https://github.com/snapdragon-toolchain/hexagon-sdk/releases/download/v6.6.0.0/hexagon-sdk-v6.6.0.0-arm64-wos.tar.xz
3232

3333
Or download the complete official version from
3434

35-
https://softwarecenter.qualcomm.com/catalog/item/Hexagon_SDK?version=6.4.0.2
35+
https://softwarecenter.qualcomm.com/catalog/item/Hexagon_SDK?version=6.6.0.0
3636

3737
Unzip/untar the archive into
3838
```
39-
c:\Qualcomm\Hexagon_SDK\6.4.0.2
39+
c:\Qualcomm\Hexagon_SDK\6.6.0.0
4040
```
4141

4242
## Install the latest Adreno GPU driver
@@ -123,10 +123,10 @@ The overall Hexagon backend build procedure for Windows on Snapdragon is the sam
123123
However, additional settings are required for generating and signing HTP Ops libraries.
124124
```
125125
> $env:OPENCL_SDK_ROOT="C:\Qualcomm\OpenCL_SDK\2.3.2"
126-
> $env:HEXAGON_SDK_ROOT="C:\Qualcomm\Hexagon_SDK\6.4.0.2"
127-
> $env:HEXAGON_TOOLS_ROOT="C:\Qualcomm\Hexagon_SDK\6.4.0.2\tools\HEXAGON_Tools\19.0.04"
126+
> $env:HEXAGON_SDK_ROOT="C:\Qualcomm\Hexagon_SDK\6.6.0.0"
127+
> $env:HEXAGON_TOOLS_ROOT="C:\Qualcomm\Hexagon_SDK\6.6.0.0\tools\HEXAGON_Tools\19.0.07"
128128
> $env:HEXAGON_HTP_CERT="c:\Users\MyUsers\Certs\ggml-htp-v1.pfx"
129-
> $env:WINDOWS_SDK_BIN="C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\arm64"
129+
> $env:WINDOWS_SDK_BIN="C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0"
130130
131131
> cmake --preset arm64-windows-snapdragon-release -B build-wos
132132
...

examples/model-conversion/scripts/embedding/run-original-model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def load_model_and_tokenizer(model_path, use_sentence_transformers=False, device
6464
print("Using SentenceTransformer to apply all numbered layers")
6565
model = SentenceTransformer(model_path)
6666
tokenizer = model.tokenizer
67-
config = model[0].auto_model.config
67+
config = model[0].auto_model.config # ty: ignore[unresolved-attribute]
6868
else:
6969
tokenizer = AutoTokenizer.from_pretrained(model_path)
7070
config = AutoConfig.from_pretrained(model_path, trust_remote_code=True)

0 commit comments

Comments
 (0)