add mistralrs
This commit is contained in:
parent
4a6d2eaa86
commit
f80ba290a0
6
etcnixos/flake.lock
generated
6
etcnixos/flake.lock
generated
@ -315,11 +315,11 @@
|
|||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742631601,
|
"lastModified": 1742806253,
|
||||||
"narHash": "sha256-yJ3OOAmsGAxSl0bTmKUp3+cEYtSS+V6hUPK2rYhIPr8=",
|
"narHash": "sha256-zvQ4GsCJT6MTOzPKLmlFyM+lxo0JGQ0cSFaZSACmWfY=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "380ed15bcd6440606c6856db44a99140d422b46f",
|
"rev": "ecaa2d911e77c265c2a5bac8b583c40b0f151726",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@ -46,21 +46,6 @@
|
|||||||
homeDirectory = "/home/${username}";
|
homeDirectory = "/home/${username}";
|
||||||
hostname = nixpkgs.lib.strings.removeSuffix "\n" (builtins.readFile /etc/hostname);
|
hostname = nixpkgs.lib.strings.removeSuffix "\n" (builtins.readFile /etc/hostname);
|
||||||
|
|
||||||
# stolen from: https://stackoverflow.com/a/42398526
|
|
||||||
optimizeWithFlags =
|
|
||||||
pkg: flags:
|
|
||||||
pkgs.lib.overrideDerivation pkg (
|
|
||||||
old:
|
|
||||||
let
|
|
||||||
newflags = pkgs.lib.foldl' (acc: x: "${acc} ${x}") "" flags;
|
|
||||||
oldflags = if (pkgs.lib.hasAttr "NIX_CFLAGS_COMPILE" old) then "${old.NIX_CFLAGS_COMPILE}" else "";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
NIX_CFLAGS_COMPILE = "${oldflags} ${newflags}";
|
|
||||||
stdenv = pkgs.clang19Stdenv;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
pkgs' =
|
pkgs' =
|
||||||
(import nixpkgs {
|
(import nixpkgs {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
@ -75,6 +60,13 @@
|
|||||||
url = "https://github.com/NixOS/nixpkgs/pull/67576.diff";
|
url = "https://github.com/NixOS/nixpkgs/pull/67576.diff";
|
||||||
sha256 = "02fk89563m2xfrl7kl9s1hh4bcppwrmd60j542kyl64nd2cvp9ss";
|
sha256 = "02fk89563m2xfrl7kl9s1hh4bcppwrmd60j542kyl64nd2cvp9ss";
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# mistral-rs 0.5.0
|
||||||
|
# https://github.com/NixOS/nixpkgs/pull/392645
|
||||||
|
(builtins.fetchurl {
|
||||||
|
url = "https://github.com/NixOS/nixpkgs/pull/392645.diff";
|
||||||
|
sha256 = "1sc65jfx5ngsa4zkfnybg6ma65g2wgzd6ac1gajxwqni5470i5rq";
|
||||||
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
pkgs = import pkgs' {
|
pkgs = import pkgs' {
|
||||||
|
|||||||
@ -172,6 +172,9 @@
|
|||||||
|
|
||||||
# java assembler
|
# java assembler
|
||||||
jasmin
|
jasmin
|
||||||
|
|
||||||
|
# rust-written LLM inference
|
||||||
|
mistral-rs
|
||||||
];
|
];
|
||||||
|
|
||||||
# https://github.com/flamegraph-rs/flamegraph
|
# https://github.com/flamegraph-rs/flamegraph
|
||||||
|
|||||||
@ -31,19 +31,12 @@ let
|
|||||||
];
|
];
|
||||||
|
|
||||||
gpt4all_package = (
|
gpt4all_package = (
|
||||||
optimizeWithFlags
|
pkgs.gpt4all.overrideAttrs (old: {
|
||||||
(pkgs.gpt4all.overrideAttrs (old: {
|
patches = old.patches ++ [
|
||||||
patches = old.patches ++ [
|
./disable-settings-err.patch
|
||||||
./disable-settings-err.patch
|
./disable-version-check.patch
|
||||||
./disable-version-check.patch
|
];
|
||||||
];
|
})
|
||||||
}))
|
|
||||||
# compile flags
|
|
||||||
[
|
|
||||||
"-O3"
|
|
||||||
"-march=native"
|
|
||||||
"-mtune=native"
|
|
||||||
]
|
|
||||||
);
|
);
|
||||||
|
|
||||||
system_prompt = "You are a helpful and harmless assistant. You should think step-by-step. Explore multiple trains of thought and methods (to completion) in order to derive the correct answer.";
|
system_prompt = "You are a helpful and harmless assistant. You should think step-by-step. Explore multiple trains of thought and methods (to completion) in order to derive the correct answer.";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user