Compare commits

...

2 Commits

Author SHA1 Message Date
ed160b8280 gpt4all stuff 2025-02-05 22:57:25 -05:00
c95bed4536 update gpt4all models and config 2025-02-05 22:11:22 -05:00
2 changed files with 12 additions and 16 deletions

View File

@@ -174,11 +174,11 @@
]
},
"locked": {
"lastModified": 1738722444,
"narHash": "sha256-DHVyKCiIQVDqjYoVU2j7UaLNIlOnpB9sP1cPRNRpqvY=",
"lastModified": 1738808867,
"narHash": "sha256-m5rbY/ck0NAlfSBxo++vl7EZn8fkZ02H3kGGc7q883c=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "347fb01821c3cd8d54e563d244a599c1e27a393d",
"rev": "ae46f37fb727030ddc2ef65a675b751484c90032",
"type": "github"
},
"original": {
@@ -242,11 +242,11 @@
]
},
"locked": {
"lastModified": 1738782903,
"narHash": "sha256-xxclr3MHrE8hjQbHBlwONgCkYY8UHhjoA1jjB6pLvC0=",
"lastModified": 1738804720,
"narHash": "sha256-3bAR5ALk5AoFt4BlsQRdjSV6VVH6lbgtYdElb0A+qDc=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "876ab3f1dc42bb52c250453d73130a6d07322b51",
"rev": "7868f1c54b7f8e09be194aaa0934791596df1ea1",
"type": "github"
},
"original": {

View File

@@ -7,12 +7,12 @@
let
models = [
{
name = "Qwen2.5-14B-Instruct-IQ4_XS.gguf";
name = "DeepSeek-R1-Distill-Qwen-14B-Q4_0.gguf";
context_length = 32768;
gen_length = 8192;
source = pkgs.fetchurl {
url = "https://huggingface.co/bartowski/Qwen2.5-14B-Instruct-GGUF/resolve/main/Qwen2.5-14B-Instruct-IQ4_XS.gguf?download=true";
sha256 = "+AHt49no0qQ48MoNsqGJV4FeJ3Cf2hSZqTMjNUIHaO4=";
url = "https://huggingface.co/bartowski/DeepSeek-R1-Distill-Qwen-14B-GGUF/resolve/main/DeepSeek-R1-Distill-Qwen-14B-Q4_0.gguf?download=true";
sha256 = "906b3382f2680f4ce845459b4a122e904002b075238080307586bcffcde49eef";
};
}
];
@@ -28,10 +28,8 @@ let
# compile flags
[
"-O3"
"-ffast-math"
"-march=native"
"-mtune=native"
"-fno-finite-math-only" # https://github.com/ggerganov/llama.cpp/pull/7154#issuecomment-2143844461
]
);
in
@@ -45,7 +43,7 @@ in
{
".config/nomic.ai/GPT4All.ini".text =
let
system_prompt = "You are an expert LLM who works step-by-step from first principles to derive an answer to the user's prompt. For each step, title the step and begin showing your work, then decide if your work is comprehensive and if you're ready to provide your final answer. Make sure to exhaust ALL POSSIBILITIES before answering. INTERNAL REASONING STEPS ARE NOT SHOWN TO THE USER, ONLY A \"Final Answer\" SECTION WILL BE SHOWN TO THE USER. USE AS MANY REASONING STEPS AS POSSIBLE. EXPLORE ALTERNATE ANSWERS AND CONSIDER THAT YOUR ANSWER OR ANY ASSUMPTIONS MAY BE WRONG. IDENTIFY POSSIBLE ERRORS IN YOUR REASONING AND WHERE SUCH ERRORS MAY BE. FULLY TEST ALL OTHER POSSIBILITIES. YOU CAN BE WRONG. SHOW YOUR WORK WHEN RE-EXAMINING. FULLY COMPLETE THE PROBLEM BEFORE FINALIZING YOUR ANSWER, DO NOT LEAVE PLACEHOLDER INFORMATION IN YOUR ANSWER.";
system_prompt = "";
in
''
[General]
@@ -72,12 +70,10 @@ in
filename=${model.name}
maxLength=${builtins.toString model.gen_length}
promptBatchSize=256
promptTemplate=<|im_start|>user\n%1<|im_end|>\n<|im_start|>assistant\n
systemPrompt="<|im_start|>system\n${
systemMessage="${
# replace newlines with the string "\n" for gpt4all to properly parse
builtins.replaceStrings [ "\n" ] [ "\\n" ] system_prompt
}<|im_end|>
\n"
}\n"
'') models
))
+ ''