aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.lock12
-rw-r--r--flake.nix10
2 files changed, 11 insertions, 11 deletions
diff --git a/flake.lock b/flake.lock
index 33164e0..1006455 100644
--- a/flake.lock
+++ b/flake.lock
@@ -5,11 +5,11 @@
"systems": "systems"
},
"locked": {
- "lastModified": 1685518550,
- "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
+ "lastModified": 1687709756,
+ "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
"owner": "numtide",
"repo": "flake-utils",
- "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
+ "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7",
"type": "github"
},
"original": {
@@ -20,11 +20,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1685931219,
- "narHash": "sha256-8EWeOZ6LKQfgAjB/USffUSELPRjw88A+xTcXnOUvO5M=",
+ "lastModified": 1688918189,
+ "narHash": "sha256-f8ZlJ67LgEUDnN7ZsAyd1/Fyby1VdOXWg4XY/irSGrQ=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "7409480d5c8584a1a83c422530419efe4afb0d19",
+ "rev": "408c0e8c15a1c9cf5c3226931b6f283c9867c484",
"type": "github"
},
"original": {
diff --git a/flake.nix b/flake.nix
index cebb47b..a595530 100644
--- a/flake.nix
+++ b/flake.nix
@@ -26,7 +26,7 @@
[ ];
pkgs = import nixpkgs { inherit system; };
llama-python =
- pkgs.python310.withPackages (ps: with ps; [ numpy sentencepiece ]);
+ pkgs.python310.withPackages (ps: with ps; [ numpy sentencepiece pip ]);
in {
packages.default = pkgs.stdenv.mkDerivation {
name = "llama.cpp";
@@ -38,7 +38,7 @@
"";
nativeBuildInputs = with pkgs; [ cmake ];
buildInputs = osSpecific;
- cmakeFlags = [ "-DLLAMA_BUILD_SERVER=ON" ] ++ (optionals isM1 [
+ cmakeFlags = [ "-DLLAMA_BUILD_SERVER=ON" "-DLLAMA_LTO=ON" "-DLLAMA_SANITIZE_THREAD=OFF -DLAMMA_SANITIZE_ADRRESS=ON" "-DLLAMA_SANITIZE_UNDEFINED=ON" ] ++ (optionals isM1 [
"-DCMAKE_C_FLAGS=-D__ARM_FEATURE_DOTPROD=1"
"-DLLAMA_METAL=ON"
]);
@@ -48,9 +48,9 @@
mv $out/bin/main $out/bin/llama
mv $out/bin/server $out/bin/llama-server
- echo "#!${llama-python}/bin/python" > $out/bin/convert.py
- cat ${./convert.py} >> $out/bin/convert.py
- chmod +x $out/bin/convert.py
+ echo "#!${llama-python}/bin/python" > $out/bin/llama-convert.py
+ cat ${./convert.py} >> $out/bin/llama-convert.py
+ chmod +x $out/bin/llama-convert.py
'';
meta.mainProgram = "llama";
};