Skip to content

Commit a8a7175

Browse files
authored
Merge branch 'ggml-org:master' into flash_decoding_improvement
2 parents 656fc8e + d6c95b0 commit a8a7175

File tree

82 files changed

+5916
-1103
lines changed

Some content is hidden

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

82 files changed

+5916
-1103
lines changed

.github/workflows/build.yml

Lines changed: 47 additions & 5 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
@@ -710,12 +712,11 @@ jobs:
710712
-DLLAMA_BUILD_SERVER=OFF \
711713
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
712714
cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)
713-
sudo cmake --install build --config Release
714715
715716
- name: xcodebuild for swift package
716717
id: xcodebuild
717718
run: |
718-
xcodebuild -scheme llama-Package -destination "${{ matrix.destination }}"
719+
./build-xcframework.sh
719720
720721
windows-msys2:
721722
runs-on: windows-latest
@@ -1203,6 +1204,11 @@ jobs:
12031204
id: checkout
12041205
uses: actions/checkout@v4
12051206

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+
12061212
- name: Install
12071213
id: depends
12081214
run: |
@@ -1232,8 +1238,10 @@ jobs:
12321238
cmake -G "Unix Makefiles" -B build -S . `
12331239
-DCMAKE_C_COMPILER="${env:HIP_PATH}\bin\clang.exe" `
12341240
-DCMAKE_CXX_COMPILER="${env:HIP_PATH}\bin\clang++.exe" `
1241+
-DCMAKE_CXX_FLAGS="-Irocwmma/library/include/" `
12351242
-DCMAKE_BUILD_TYPE=Release `
12361243
-DGGML_HIP=ON `
1244+
-DGGML_HIP_ROCWMMA_FATTN=ON `
12371245
-DGGML_RPC=ON
12381246
cmake --build build -j ${env:NUMBER_OF_PROCESSORS}
12391247
@@ -1252,6 +1260,11 @@ jobs:
12521260
with:
12531261
fetch-depth: 0
12541262

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+
12551268
- name: ccache
12561269
uses: hendrikmuhs/[email protected]
12571270
with:
@@ -1281,8 +1294,10 @@ jobs:
12811294
cmake -G "Unix Makefiles" -B build -S . `
12821295
-DCMAKE_C_COMPILER="${env:HIP_PATH}\bin\clang.exe" `
12831296
-DCMAKE_CXX_COMPILER="${env:HIP_PATH}\bin\clang++.exe" `
1297+
-DCMAKE_CXX_FLAGS="-Irocwmma/library/include/" `
12841298
-DCMAKE_BUILD_TYPE=Release `
12851299
-DAMDGPU_TARGETS=${{ matrix.gpu_target }} `
1300+
-DGGML_HIP_ROCWMMA_FATTN=ON `
12861301
-DGGML_HIP=ON `
12871302
-DGGML_RPC=ON
12881303
cmake --build build -j ${env:NUMBER_OF_PROCESSORS}
@@ -1321,6 +1336,8 @@ jobs:
13211336
steps:
13221337
- name: Checkout code
13231338
uses: actions/checkout@v4
1339+
with:
1340+
fetch-depth: 0
13241341

13251342
- name: Build
13261343
id: cmake_build
@@ -1336,15 +1353,40 @@ jobs:
13361353
-DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
13371354
-DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=ggml
13381355
cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) -- CODE_SIGNING_ALLOWED=NO
1339-
sudo cmake --install build --config Release
13401356
13411357
- name: xcodebuild for swift package
13421358
id: xcodebuild
13431359
run: |
1344-
xcodebuild -scheme llama-Package -destination 'generic/platform=iOS'
1360+
./build-xcframework.sh
13451361
13461362
- name: Build Xcode project
1347-
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' build
1363+
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
1364+
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
13481390

13491391
android-build:
13501392
runs-on: ubuntu-latest

Package.swift

Lines changed: 0 additions & 19 deletions
This file was deleted.

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

Sources/llama/llama.h

Lines changed: 0 additions & 4 deletions
This file was deleted.

Sources/llama/module.modulemap

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)