Skip to content

Commit

Permalink
CI: Use pre-built Llamafile
Browse files Browse the repository at this point in the history
  • Loading branch information
ariya committed Mar 4, 2024
1 parent 91ca2ce commit b6398ea
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions .github/actions/prepare-llm/action.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
name: Prepare llama.cpp and Phi 2
description: Build llama.cpp and load Phi 2
name: Prepare Phi 2
description: Download Phi 2 and launch it
runs:
using: "composite"
steps:
- name: Get and build llama.cpp
shell: bash
run: |
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
make server
- name: Download Phi 2 model
shell: bash
run: curl -OL https://huggingface.co/TheBloke/dolphin-2_6-phi-2-GGUF/resolve/main/dolphin-2_6-phi-2.Q3_K_M.gguf

- name: Run llama.cpp with Phi 2
- name: Setup binfmt with APE
shell: bash
run: ./llama.cpp/server --host 0.0.0.0 -m ./dolphin-2_6-phi-2.Q3_K_M.gguf &
run: |
sudo wget -O /usr/bin/ape https://cosmo.zip/pub/cosmos/bin/ape-$(uname -m).elf
sudo chmod +x /usr/bin/ape
sudo sh -c "echo ':APE:M::MZqFpD::/usr/bin/ape:' >/proc/sys/fs/binfmt_misc/register"
sudo sh -c "echo ':APE-jart:M::jartsr::/usr/bin/ape:' >/proc/sys/fs/binfmt_misc/register"
- name: Run Phi 2 with Llamafile
shell: bash
run: |
curl -OL https://github.com/Mozilla-Ocho/llamafile/releases/download/0.6.2/llamafile-0.6.2.zip
unzip llamafile-0.6.2.zip
./llamafile-0.6.2/bin/llamafile -m ./dolphin-2_6-phi-2.Q3_K_M.gguf &

0 comments on commit b6398ea

Please sign in to comment.