Skip to content

Commit aa26baf

Browse files
authored
Merge branch 'ggml-org:master' into master
2 parents 62a0352 + 7ab3643 commit aa26baf

Some content is hidden

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

52 files changed

+2464
-1214
lines changed

.github/workflows/build.yml

Lines changed: 44 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,7 @@ jobs:
467467
run: |
468468
cmake -B build -S . \
469469
-DCMAKE_HIP_COMPILER="$(hipconfig -l)/clang" \
470+
-DGGML_HIP_ROCWMMA_FATTN=ON \
470471
-DGGML_HIP=ON
471472
cmake --build build --config Release -j $(nproc)
472473
@@ -476,6 +477,7 @@ jobs:
476477
cmake -B build2 -S . \
477478
-DCMAKE_C_COMPILER=hipcc \
478479
-DCMAKE_CXX_COMPILER=hipcc \
480+
-DGGML_HIP_ROCWMMA_FATTN=ON \
479481
-DGGML_HIP=ON
480482
cmake --build build2 --config Release -j $(nproc)
481483
@@ -716,31 +718,6 @@ jobs:
716718
run: |
717719
./build-xcframework.sh
718720
719-
- name: Determine tag name
720-
id: tag
721-
shell: bash
722-
run: |
723-
BUILD_NUMBER="$(git rev-list --count HEAD)"
724-
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
725-
if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
726-
echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT
727-
else
728-
SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
729-
echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT
730-
fi
731-
732-
- name: Pack artifacts
733-
id: pack_artifacts
734-
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
735-
run: |
736-
zip -r llama-${{ steps.tag.outputs.name }}-xcframework.zip build-apple/llama.xcframework
737-
738-
- name: Upload artifacts
739-
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
740-
uses: actions/upload-artifact@v4
741-
with:
742-
path: llama-${{ steps.tag.outputs.name }}-xcframework.zip
743-
744721
windows-msys2:
745722
runs-on: windows-latest
746723

@@ -1227,6 +1204,11 @@ jobs:
12271204
id: checkout
12281205
uses: actions/checkout@v4
12291206

1207+
- name: Clone rocWMMA repository
1208+
id: clone_rocwmma
1209+
run: |
1210+
git clone https://github.com/rocm/rocwmma --branch rocm-6.2.4 --depth 1
1211+
12301212
- name: Install
12311213
id: depends
12321214
run: |
@@ -1256,8 +1238,10 @@ jobs:
12561238
cmake -G "Unix Makefiles" -B build -S . `
12571239
-DCMAKE_C_COMPILER="${env:HIP_PATH}\bin\clang.exe" `
12581240
-DCMAKE_CXX_COMPILER="${env:HIP_PATH}\bin\clang++.exe" `
1241+
-DCMAKE_CXX_FLAGS="-I$($PWD.Path.Replace('\', '/'))/rocwmma/library/include/" `
12591242
-DCMAKE_BUILD_TYPE=Release `
12601243
-DGGML_HIP=ON `
1244+
-DGGML_HIP_ROCWMMA_FATTN=ON `
12611245
-DGGML_RPC=ON
12621246
cmake --build build -j ${env:NUMBER_OF_PROCESSORS}
12631247
@@ -1276,6 +1260,11 @@ jobs:
12761260
with:
12771261
fetch-depth: 0
12781262

1263+
- name: Clone rocWMMA repository
1264+
id: clone_rocwmma
1265+
run: |
1266+
git clone https://github.com/rocm/rocwmma --branch rocm-6.2.4 --depth 1
1267+
12791268
- name: ccache
12801269
uses: hendrikmuhs/[email protected]
12811270
with:
@@ -1305,8 +1294,10 @@ jobs:
13051294
cmake -G "Unix Makefiles" -B build -S . `
13061295
-DCMAKE_C_COMPILER="${env:HIP_PATH}\bin\clang.exe" `
13071296
-DCMAKE_CXX_COMPILER="${env:HIP_PATH}\bin\clang++.exe" `
1297+
-DCMAKE_CXX_FLAGS="-I$($PWD.Path.Replace('\', '/'))/rocwmma/library/include/" `
13081298
-DCMAKE_BUILD_TYPE=Release `
13091299
-DAMDGPU_TARGETS=${{ matrix.gpu_target }} `
1300+
-DGGML_HIP_ROCWMMA_FATTN=ON `
13101301
-DGGML_HIP=ON `
13111302
-DGGML_RPC=ON
13121303
cmake --build build -j ${env:NUMBER_OF_PROCESSORS}
@@ -1345,6 +1336,8 @@ jobs:
13451336
steps:
13461337
- name: Checkout code
13471338
uses: actions/checkout@v4
1339+
with:
1340+
fetch-depth: 0
13481341

13491342
- name: Build
13501343
id: cmake_build
@@ -1369,6 +1362,32 @@ jobs:
13691362
- name: Build Xcode project
13701363
run: xcodebuild -project examples/llama.swiftui/llama.swiftui.xcodeproj -scheme llama.swiftui -sdk iphoneos CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= -destination 'generic/platform=iOS' FRAMEWORK_FOLDER_PATH=./build-ios build
13711364

1365+
- name: Determine tag name
1366+
id: tag
1367+
shell: bash
1368+
run: |
1369+
BUILD_NUMBER="$(git rev-list --count HEAD)"
1370+
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
1371+
if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
1372+
echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT
1373+
else
1374+
SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
1375+
echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT
1376+
fi
1377+
1378+
- name: Pack artifacts
1379+
id: pack_artifacts
1380+
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
1381+
run: |
1382+
zip -r llama-${{ steps.tag.outputs.name }}-xcframework.zip build-apple/llama.xcframework
1383+
1384+
- name: Upload artifacts
1385+
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
1386+
uses: actions/upload-artifact@v4
1387+
with:
1388+
path: llama-${{ steps.tag.outputs.name }}-xcframework.zip
1389+
name: llama-${{ steps.tag.outputs.name }}-xcframework
1390+
13721391
android-build:
13731392
runs-on: ubuntu-latest
13741393

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Inference of Meta's [LLaMA](https://arxiv.org/abs/2302.13971) model (and others)
2525

2626
- **How to use [MTLResidencySet](https://developer.apple.com/documentation/metal/mtlresidencyset?language=objc) to keep the GPU memory active?** https://github.com/ggml-org/llama.cpp/pull/11427
2727
- **VS Code extension for FIM completions:** https://github.com/ggml-org/llama.vscode
28-
- Universal tool call support in `llama-server`: https://github.com/ggml-org/llama.cpp/pull/9639
28+
- Universal [tool call support](./docs/function-calling.md) in `llama-server` https://github.com/ggml-org/llama.cpp/pull/9639
2929
- Vim/Neovim plugin for FIM completions: https://github.com/ggml-org/llama.vim
3030
- Introducing GGUF-my-LoRA https://github.com/ggml-org/llama.cpp/discussions/10123
3131
- Hugging Face Inference Endpoints now support GGUF out of the box! https://github.com/ggml-org/llama.cpp/discussions/9669
@@ -157,6 +157,7 @@ Instructions for adding support for new models: [HOWTO-add-model.md](docs/develo
157157
- Guile Scheme: [guile_llama_cpp](https://savannah.nongnu.org/projects/guile-llama-cpp)
158158
- Swift [srgtuszy/llama-cpp-swift](https://github.com/srgtuszy/llama-cpp-swift)
159159
- Swift [ShenghaiWang/SwiftLlama](https://github.com/ShenghaiWang/SwiftLlama)
160+
- Delphi [Embarcadero/llama-cpp-delphi](https://github.com/Embarcadero/llama-cpp-delphi)
160161

161162
</details>
162163

ci/run.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,10 @@ function gg_run_open_llama_7b_v2 {
352352

353353
(time ./bin/llama-imatrix --model ${model_f16} -f ${wiki_test} -t 1 -ngl 99 -c 2048 -b 512 --chunks 4 ) 2>&1 | tee -a $OUT/${ci}-imatrix.log
354354

355-
(time ./bin/llama-save-load-state--model ${model_q4_0} -ngl 10 -c 0 ) 2>&1 | tee -a $OUT/${ci}-save-load-state.log
356-
(time ./bin/llama-save-load-state--model ${model_q4_0} -ngl 10 -c 0 -fa ) 2>&1 | tee -a $OUT/${ci}-save-load-state.log
357-
(time ./bin/llama-save-load-state--model ${model_q4_0} -ngl 99 -c 0 ) 2>&1 | tee -a $OUT/${ci}-save-load-state.log
358-
(time ./bin/llama-save-load-state--model ${model_q4_0} -ngl 99 -c 0 -fa ) 2>&1 | tee -a $OUT/${ci}-save-load-state.log
355+
(time ./bin/llama-save-load-state --model ${model_q4_0} -ngl 10 -c 0 ) 2>&1 | tee -a $OUT/${ci}-save-load-state.log
356+
(time ./bin/llama-save-load-state --model ${model_q4_0} -ngl 10 -c 0 -fa ) 2>&1 | tee -a $OUT/${ci}-save-load-state.log
357+
(time ./bin/llama-save-load-state --model ${model_q4_0} -ngl 99 -c 0 ) 2>&1 | tee -a $OUT/${ci}-save-load-state.log
358+
(time ./bin/llama-save-load-state --model ${model_q4_0} -ngl 99 -c 0 -fa ) 2>&1 | tee -a $OUT/${ci}-save-load-state.log
359359

360360
function check_ppl {
361361
qnt="$1"

0 commit comments

Comments
 (0)