-
-
Save jonz-secops/8aa2327b723f5f0461cd54c57f4d7a65 to your computer and use it in GitHub Desktop.
How to build llama.cpp on fedora
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 Fedora 40 and later | |
# Tested with `docker run -it --device=/dev/dri --device=/dev/kfd --security-opt seccomp=unconfined --volume $HOME:/mnt/home fedora:40` | |
dnf -y update | |
dnf -y install hipcc rocm-hip-devel rocblas-devel hipblas-devel git cmake g++ lld clang-tools-extra llvm | |
git clone https://github.com/ggerganov/llama.cpp.git | |
cd llama.cpp/ | |
git checkout b2110 | |
CC=clang CXX=clang++ cmake -H. -Bbuild -DLLAMA_HIPBLAS=ON -DAMDGPU_TARGETS="gfx1030;gfx1100;gfx1101;gfx1102" -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