Skip to content

Commit 8d5bb06

Browse files
committed
test aarch64 ci workflow
1 parent 409e393 commit 8d5bb06

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Koboldcpp Linux ARM64
2+
3+
on: workflow_dispatch
4+
env:
5+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
6+
NOAVX2: 1
7+
8+
jobs:
9+
linux-arm:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Clone
13+
id: checkout
14+
uses: actions/checkout@v3
15+
with:
16+
ref: ${{ github.head_ref || github.ref_name }}
17+
18+
- name: Build Dependencies
19+
id: depends1
20+
run: |
21+
sudo apt-get update
22+
sudo apt-get install -y python3 python3-pip python3-dev build-essential \
23+
libffi-dev libssl-dev libbz2-dev libreadline-dev libsqlite3-dev \
24+
crossbuild-essential-arm64 qemu qemu-user qemu-user-static \
25+
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
26+
27+
- name: Python Dependencies
28+
id: depends2
29+
run: |
30+
pip install customtkinter pyinstaller tk
31+
32+
- name: Build with ARM NEON Support
33+
id: build_binary
34+
run: |
35+
# Enable cross-compilation for ARM
36+
export QEMU_LD_PREFIX=/usr/aarch64-linux-gnu
37+
export CC=aarch64-linux-gnu-gcc
38+
export CXX=aarch64-linux-gnu-g++
39+
export AR=aarch64-linux-gnu-ar
40+
41+
make LLAMA_PORTABLE=1
42+
chmod +x './create_ver_file.sh'
43+
. create_ver_file.sh
44+
pyinstaller --noconfirm --onefile --collect-all customtkinter --collect-all psutil --add-data './koboldcpp_default.so:.' --add-data './ggml-metal-merged.metal:.' --add-data './kcpp_adapters:./kcpp_adapters' --add-data './klite.embd:.' --add-data './kcpp_docs.embd:.' --add-data './kcpp_sdui.embd:.' --add-data './taesd.embd:.' --add-data './taesd_xl.embd:.' --add-data './rwkv_vocab.embd:.' --add-data './rwkv_world_vocab.embd:.' --version-file './version.txt' --clean --console koboldcpp.py -n "koboldcpp-linux-arm64"
45+
46+
- name: Test
47+
id: test
48+
run: |
49+
wget https://huggingface.co/concedo/koboldcpp/resolve/main/baby_llama.gguf
50+
dist/koboldcpp-linux-arm64 --model baby_llama.gguf --benchmark --contextsize 512 --prompt 'Hi, my name is'
51+
52+
- name: Save artifact
53+
uses: actions/upload-artifact@v3
54+
with:
55+
name: kcpp_linux_arm64_binary
56+
path: dist/
57+

0 commit comments

Comments
 (0)