Last active
July 26, 2024 17:40
-
-
Save cgmb/be113c04cd740425f637aa33c3e4ea33 to your computer and use it in GitHub Desktop.
How to build llama.cpp on Debian
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Build llama.cpp on Debian 13 or Ubuntu 23.10 and later | |
# Tested with `docker run -it --device=/dev/dri --device=/dev/kfd --security-opt seccomp=unconfined --volume $HOME:/mnt/home debian:sid` | |
apt -y update | |
apt -y upgrade | |
apt -y install git hipcc libhipblas-dev librocblas-dev cmake build-essential | |
git clone https://github.com/ggerganov/llama.cpp.git | |
cd llama.cpp/ | |
git checkout b2110 | |
CC=clang-15 CXX=clang++-15 cmake -H. -Bbuild -DLLAMA_HIPBLAS=ON -DAMDGPU_TARGETS="gfx803;gfx900;gfx906;gfx908;gfx90a;gfx1010;gfx1030" -DCMAKE_BUILD_TYPE=Release | |
make -j16 -C build | |
build/bin/main -ngl 32 --color -c 2048 --temp 0.7 --repeat_penalty 1.1 -n -1 -m ~/Downloads/dolphin-2.2.1-mistral-7b.Q5_K_M.gguf --prompt "Once upon a time" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@userbox020, you need to
apt-get install -y hipcc libhipblas-dev librocblas-dev
and use a newer OS and compiler. I suggestFROM ubuntu:mantic
andCLANG_VERSION=15
. The necessary packages are not available for Debian Bullseye or clang-11. Those are too old.