diff --git a/.github/workflows/kcpp-build-release-arm64.yaml b/.github/workflows/kcpp-build-release-arm64.yaml new file mode 100644 index 000000000..fb5c98a13 --- /dev/null +++ b/.github/workflows/kcpp-build-release-arm64.yaml @@ -0,0 +1,57 @@ +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 + + 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 './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" + + - 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/ +