diff options
author | Ben Sima <ben@bsima.me> | 2024-04-02 00:08:24 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2024-04-02 00:11:33 -0400 |
commit | d7383136dc434a35f7c7efa65343dd0bafea5256 (patch) | |
tree | 44fabbb11dde4122854a5d18ccd138dfb4c83a53 /Biz/Bild/Deps/llama-cpp.nix | |
parent | 6040b2ceae7e6f4a0d41052663bf7826d1e52b4a (diff) |
Add llama-cpp from nixos-23.11
Removes my custom llama-cpp build and instead pulls in the upstream build from
nixos-23.11.
Diffstat (limited to 'Biz/Bild/Deps/llama-cpp.nix')
-rw-r--r-- | Biz/Bild/Deps/llama-cpp.nix | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/Biz/Bild/Deps/llama-cpp.nix b/Biz/Bild/Deps/llama-cpp.nix deleted file mode 100644 index 2e2aae7..0000000 --- a/Biz/Bild/Deps/llama-cpp.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ stdenv, sources, python3, cmake, pkgconfig, openmpi, cudaPackages }: -let llama-python = python3.withPackages (ps: with ps; [ numpy sentencepiece ]); -in stdenv.mkDerivation { - name = "llama.cpp"; - version = sources.llama-cpp.rev; - - src = sources.llama-cpp; - - postPatch = '' - substituteInPlace ./ggml-metal.m \ - --replace '[bundle pathForResource:@"ggml-metal" ofType:@"metal"];' "@\"$out/bin/ggml-metal.metal\";" - substituteInPlace ./*.py --replace '/usr/bin/env python' '${llama-python}/bin/python' - ''; - - nativeBuildInputs = [ cmake pkgconfig ]; - buildInputs = [ openmpi cudaPackages.cudatoolkit ]; - - cmakeFlags = [ - "-DLLAMA_BUILD_SERVER=ON" - "-DLLAMA_MPI=ON" - "-DBUILD_SHARED_LIBS=ON" - "-DCMAKE_SKIP_BUILD_RPATH=ON" - "-DLLAMA_CUBLAS=ON" - ]; - - postInstall = '' - mv $out/bin/main $out/bin/llama - mv $out/bin/server $out/bin/llama-server - ''; - - meta.mainProgram = "llama"; -} |