Skip to content

Koboldcpp Linux ARM64 #3

Koboldcpp Linux ARM64

Koboldcpp Linux ARM64 #3

name: Koboldcpp Linux ARM64
on: workflow_dispatch
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
NOAVX2: 1
jobs:
linux-arm:
runs-on: ubuntu-latest
steps:
- name: Clone
id: checkout
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref || github.ref_name }}
- name: Build Dependencies
id: depends1
run: |
sudo apt-get update
sudo apt-get install -y python3 python3-pip python3-dev build-essential \
libffi-dev libssl-dev libbz2-dev libreadline-dev libsqlite3-dev \
crossbuild-essential-arm64 qemu qemu-user qemu-user-static \
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
- name: Python Dependencies
id: depends2
run: |
pip install customtkinter pyinstaller tk
- name: Build with ARM NEON Support
id: build_binary
run: |
# Enable cross-compilation for ARM
export QEMU_LD_PREFIX=/usr/aarch64-linux-gnu
export CC=aarch64-linux-gnu-gcc
export CXX=aarch64-linux-gnu-g++
export AR=aarch64-linux-gnu-ar
export UNAME_M=aarch64
export UNAME_S=Linux
make LLAMA_PORTABLE=1
chmod +x './create_ver_file.sh'
. create_ver_file.sh
pyinstaller --noconfirm --onefile --collect-all customtkinter --collect-all psutil --add-data './koboldcpp_default.so:.' --add-data './kcpp_adapters:./kcpp_adapters' --add-data './koboldcpp.py:.' --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"
- name: Test
id: test
run: |
wget https://huggingface.co/concedo/koboldcpp/resolve/main/baby_llama.gguf
dist/koboldcpp-linux-arm64 --model baby_llama.gguf --benchmark --contextsize 512 --prompt 'Hi, my name is'
- name: Save artifact
uses: actions/upload-artifact@v3
with:
name: kcpp_linux_arm64_binary
path: dist/