Add llama.cpp

This commit is contained in:
Tristan D. 2024-05-03 22:40:09 +02:00
parent 03cae63b3d
commit 8b66d95775
Signed by: tristan
SSH key fingerprint: SHA256:3RU4RLOoM8oAjFU19f1W6t8uouZbA7GWkaSW6rjp1k8
4 changed files with 101 additions and 15 deletions

100
flake.lock generated
View file

@ -339,6 +339,24 @@
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1712014858,
"narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9126214d0a59633752a136528f5f3b9aa8565b7d",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
},
"locked": {
"lastModified": 1701473968,
"narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=",
@ -353,7 +371,7 @@
"type": "github"
}
},
"flake-parts_3": {
"flake-parts_4": {
"inputs": {
"nixpkgs-lib": [
"nixtheplanet",
@ -504,8 +522,8 @@
},
"hercules-ci-effects": {
"inputs": {
"flake-parts": "flake-parts_3",
"nixpkgs": "nixpkgs_6"
"flake-parts": "flake-parts_4",
"nixpkgs": "nixpkgs_7"
},
"locked": {
"lastModified": 1701009247,
@ -610,6 +628,25 @@
"type": "github"
}
},
"llama-cpp": {
"inputs": {
"flake-parts": "flake-parts_2",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1714766591,
"narHash": "sha256-STLvYz4CfjDkm8flkT38lZYhln7J+RPoWIPhDfnr+g0=",
"ref": "refs/heads/master",
"rev": "7d14916c95f79784f38d52812b0a5ff6ed071eed",
"revCount": 2785,
"type": "git",
"url": "https://git.vlt81.de/tristan/llama.cpp.git"
},
"original": {
"type": "git",
"url": "https://git.vlt81.de/tristan/llama.cpp.git"
}
},
"niri": {
"inputs": {
"crane": [
@ -728,7 +765,7 @@
},
"nix-index-database": {
"inputs": {
"nixpkgs": "nixpkgs_2"
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1713067146,
@ -768,7 +805,7 @@
"inputs": {
"flake-compat": "flake-compat_3",
"flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_3"
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1714253190,
@ -808,7 +845,7 @@
},
"nixinate": {
"inputs": {
"nixpkgs": "nixpkgs_4"
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1702325609,
@ -855,6 +892,24 @@
}
},
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1711703276,
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib_2": {
"locked": {
"dir": "lib",
"lastModified": 1701253981,
@ -921,6 +976,22 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1714076141,
"narHash": "sha256-Drmja/f5MRHZCskS6mvzFqxEaZMeciScCTFxWVLqWEY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7bb2ccd8cdc44c91edba16c48d2c8f331fb3d856",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1712791164,
"narHash": "sha256-3sbWO1mbpWsLepZGbWaMovSO7ndZeFqDSdX0hZ9nVyw=",
@ -936,7 +1007,7 @@
"type": "github"
}
},
"nixpkgs_3": {
"nixpkgs_4": {
"locked": {
"lastModified": 1711001935,
"narHash": "sha256-URtGpHue7HHZK0mrHnSf8wJ6OmMKYSsoLmJybrOLFSQ=",
@ -952,7 +1023,7 @@
"type": "github"
}
},
"nixpkgs_4": {
"nixpkgs_5": {
"locked": {
"lastModified": 1653060744,
"narHash": "sha256-kfRusllRumpt33J1hPV+CeCCylCXEU7e0gn2/cIM7cY=",
@ -968,7 +1039,7 @@
"type": "github"
}
},
"nixpkgs_5": {
"nixpkgs_6": {
"locked": {
"lastModified": 1714253743,
"narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=",
@ -984,7 +1055,7 @@
"type": "github"
}
},
"nixpkgs_6": {
"nixpkgs_7": {
"locked": {
"lastModified": 1697723726,
"narHash": "sha256-SaTWPkI8a5xSHX/rrKzUe+/uVNy6zCGMXgoeMb7T9rg=",
@ -1000,7 +1071,7 @@
"type": "github"
}
},
"nixpkgs_7": {
"nixpkgs_8": {
"locked": {
"lastModified": 1703255338,
"narHash": "sha256-Z6wfYJQKmDN9xciTwU3cOiOk+NElxdZwy/FiHctCzjU=",
@ -1018,9 +1089,9 @@
},
"nixtheplanet": {
"inputs": {
"flake-parts": "flake-parts_2",
"flake-parts": "flake-parts_3",
"hercules-ci-effects": "hercules-ci-effects",
"nixpkgs": "nixpkgs_7",
"nixpkgs": "nixpkgs_8",
"osx-kvm": "osx-kvm"
},
"locked": {
@ -1143,13 +1214,14 @@
"emacs-overlay": "emacs-overlay",
"envfs": "envfs",
"home-manager": "home-manager_2",
"llama-cpp": "llama-cpp",
"nix-alien": "nix-alien",
"nix-index-database": "nix-index-database_2",
"nix-ld-rs": "nix-ld-rs",
"nix-wallpaper": "nix-wallpaper",
"nixinate": "nixinate",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_5",
"nixpkgs": "nixpkgs_6",
"nixpkgs-unstable": "nixpkgs-unstable",
"nixtheplanet": "nixtheplanet",
"nur": "nur",

View file

@ -54,6 +54,9 @@
inputs.nixpkgs.follows = "nixpkgs";
};
nix-ld-rs.url = "github:nix-community/nix-ld-rs";
llama-cpp = {
url = "git+https://git.vlt81.de/tristan/llama.cpp.git";
};
};
outputs =
@ -71,6 +74,7 @@
, disko
, chaotic
, envfs
, llama-cpp
, ...
} @ inputs:
let

11
home-mods/ai/default.nix Normal file
View file

@ -0,0 +1,11 @@
{ pkgs
, lib
, inputs
, system
, ...
}: {
home.packages = [ inputs.llama-cpp.packages.${system}.rocm ];
home.sessionVariables = {
HSA_OVERRIDE_GFX_VERSION = "10.3.0";
};
}

View file

@ -4,7 +4,6 @@
, inputs
, ...
}: {
programs.corectrl = {
enable = true;
gpuOverclock.enable = true;