gpt4all more config stuff
This commit is contained in:
parent
b26a8b9d10
commit
b45a145f98
6
nix/etcnixos/flake.lock
generated
6
nix/etcnixos/flake.lock
generated
@ -332,11 +332,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1726798147,
|
||||
"narHash": "sha256-k/Ojv+MUDKUbj8JPd1MulJrf5BVz3jIUfrreMHbeTBE=",
|
||||
"lastModified": 1726830936,
|
||||
"narHash": "sha256-ARM4KG4uxsHfONxyT4kSmcPpZuWsnrxDvTgxuzT31XI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e88358265511d3a73b30dc6e4c15579844b35280",
|
||||
"rev": "039db25806f936e6a4ad3ab3efd0689a8cc7c23e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
18
nix/home-manager/flake.lock
generated
18
nix/home-manager/flake.lock
generated
@ -127,11 +127,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726785354,
|
||||
"narHash": "sha256-SLorVhoorZwjM1aS04bBX4fufEXIfkMdAGkj9bu2QAQ=",
|
||||
"lastModified": 1726823634,
|
||||
"narHash": "sha256-rU8Yy62KSLU8Q2J64F+50OJKORNdogxbXl2w4rFw13o=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "1786e2afdbc48e9038f7cff585069736e1d0ed44",
|
||||
"rev": "4803bf558bdf20cb067aceb8830b7ad70113f4e3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -201,11 +201,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1726798147,
|
||||
"narHash": "sha256-k/Ojv+MUDKUbj8JPd1MulJrf5BVz3jIUfrreMHbeTBE=",
|
||||
"lastModified": 1726836432,
|
||||
"narHash": "sha256-fk9P0RY2m7r3vAqqSRaR/MZoQJo6yg6vuv4h7D1I2/8=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e88358265511d3a73b30dc6e4c15579844b35280",
|
||||
"rev": "b3e9ef326d3d60dd97c262c6d16cc255175d4902",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -281,11 +281,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726712837,
|
||||
"narHash": "sha256-Ob7DNyHKtOQpWetmNj/V+OgMkGXh6Ep1dNa6AN/4sSI=",
|
||||
"lastModified": 1726799228,
|
||||
"narHash": "sha256-wn1leQyMAc/TrLRKcPc0GX6YtoziKQpc/MtZjPNiJ2Q=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "6283b1d6ca31fa320ecee82806123e773b2ff993",
|
||||
"rev": "ab150c7412db7bea5879ce2776718f53fba37aa2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
imports = [
|
||||
./no-gui.nix
|
||||
# ./progs/librewolf.nix
|
||||
./progs/gpt4all.nix
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfreePredicate =
|
||||
@ -17,120 +18,82 @@
|
||||
"factorio-alpha"
|
||||
];
|
||||
|
||||
home.packages =
|
||||
let
|
||||
#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.clangStdenv;
|
||||
}
|
||||
);
|
||||
in
|
||||
with pkgs;
|
||||
[
|
||||
#calculator
|
||||
gnome-calculator
|
||||
home.packages = with pkgs; [
|
||||
#calculator
|
||||
gnome-calculator
|
||||
|
||||
#productivity stuff
|
||||
libreoffice
|
||||
hunspell # spellcheck
|
||||
hunspellDicts.en_US # spellcheck dictionary
|
||||
#productivity stuff
|
||||
libreoffice
|
||||
hunspell # spellcheck
|
||||
hunspellDicts.en_US # spellcheck dictionary
|
||||
|
||||
#video and audio downloading
|
||||
parabolic
|
||||
#video and audio downloading
|
||||
parabolic
|
||||
|
||||
#soulseek client
|
||||
nicotine-plus
|
||||
#soulseek client
|
||||
nicotine-plus
|
||||
|
||||
#dark web browsing deep web browsing
|
||||
tor-browser
|
||||
#dark web browsing deep web browsing
|
||||
tor-browser
|
||||
|
||||
#audio editing
|
||||
audacity
|
||||
#audio editing
|
||||
audacity
|
||||
|
||||
#fonts
|
||||
noto-fonts
|
||||
noto-fonts-emoji
|
||||
liberation_ttf
|
||||
nerdfonts
|
||||
jetbrains-mono
|
||||
#fonts
|
||||
noto-fonts
|
||||
noto-fonts-emoji
|
||||
liberation_ttf
|
||||
nerdfonts
|
||||
jetbrains-mono
|
||||
|
||||
#for ebook reading
|
||||
foliate
|
||||
#for ebook reading
|
||||
foliate
|
||||
|
||||
#audio mixer (pavucontrol but for pipewire)
|
||||
pwvucontrol
|
||||
#audio mixer (pavucontrol but for pipewire)
|
||||
pwvucontrol
|
||||
|
||||
#minecraft launcher
|
||||
prismlauncher
|
||||
#minecraft launcher
|
||||
prismlauncher
|
||||
|
||||
mpv
|
||||
mumble
|
||||
system76-keyboard-configurator
|
||||
mission-center
|
||||
mpv
|
||||
mumble
|
||||
system76-keyboard-configurator
|
||||
mission-center
|
||||
|
||||
#jellyfin
|
||||
finamp # music player
|
||||
delfin # jellyfin client
|
||||
#jellyfin
|
||||
finamp # music player
|
||||
delfin # jellyfin client
|
||||
|
||||
signal-desktop
|
||||
signal-desktop
|
||||
|
||||
#accounting
|
||||
gnucash
|
||||
#accounting
|
||||
gnucash
|
||||
|
||||
imagemagick
|
||||
inkscape
|
||||
nomacs
|
||||
imagemagick
|
||||
inkscape
|
||||
nomacs
|
||||
|
||||
nautilus
|
||||
nautilus
|
||||
|
||||
lrcget
|
||||
lrcget
|
||||
|
||||
#openstreetmap contributing
|
||||
josm
|
||||
#openstreetmap contributing
|
||||
josm
|
||||
|
||||
gparted
|
||||
gnome-disk-utility
|
||||
gparted
|
||||
gnome-disk-utility
|
||||
|
||||
#small nicities
|
||||
wl-clipboard # wl-copy & wl-paste
|
||||
libnotify # notifications library
|
||||
xdg-utils # xdg utils
|
||||
#small nicities
|
||||
wl-clipboard # wl-copy & wl-paste
|
||||
libnotify # notifications library
|
||||
xdg-utils # xdg utils
|
||||
|
||||
puddletag
|
||||
puddletag
|
||||
|
||||
inputs.zen-browser.packages."${pkgs.system}".specific
|
||||
inputs.zen-browser.packages."${pkgs.system}".specific
|
||||
|
||||
(factorio.override (import ./secrets/factorio.nix))
|
||||
|
||||
(optimizeWithFlags
|
||||
(gpt4all.overrideAttrs {
|
||||
src = fetchFromGitHub {
|
||||
fetchSubmodules = true;
|
||||
owner = "nomic-ai";
|
||||
repo = "gpt4all";
|
||||
rev = "HEAD";
|
||||
sha256 = "lGvxTOBg7/UgrCqeAFNFFXD9VjpUk3IVCktdUYuF6Eo=";
|
||||
};
|
||||
patches = [ ./gpt4all-HEAD-embeddings-model.patch ];
|
||||
})
|
||||
[
|
||||
"-Ofast"
|
||||
"-march=native"
|
||||
"-mtune=native"
|
||||
"-fno-protect-parens"
|
||||
"-fno-finite-math-only" # https://github.com/ggerganov/llama.cpp/pull/7154#issuecomment-2143844461
|
||||
]
|
||||
)
|
||||
];
|
||||
(factorio.override (import ./secrets/factorio.nix))
|
||||
];
|
||||
|
||||
# make chromium-based stuff use wayland
|
||||
home.file.".config/chromium-flags.conf".text = "--ozone-platform-hint=auto";
|
||||
|
||||
82
nix/home-manager/progs/gpt4all.nix
Normal file
82
nix/home-manager/progs/gpt4all.nix
Normal file
@ -0,0 +1,82 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages =
|
||||
let
|
||||
#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.clangStdenv;
|
||||
}
|
||||
);
|
||||
in
|
||||
with pkgs;
|
||||
[
|
||||
(optimizeWithFlags
|
||||
(gpt4all.overrideAttrs {
|
||||
src = fetchFromGitHub {
|
||||
fetchSubmodules = true;
|
||||
owner = "nomic-ai";
|
||||
repo = "gpt4all";
|
||||
rev = "HEAD";
|
||||
sha256 = "lGvxTOBg7/UgrCqeAFNFFXD9VjpUk3IVCktdUYuF6Eo=";
|
||||
};
|
||||
patches = [ ./gpt4all-HEAD-embeddings-model.patch ];
|
||||
})
|
||||
[
|
||||
"-Ofast"
|
||||
"-march=native"
|
||||
"-mtune=native"
|
||||
"-fno-protect-parens"
|
||||
"-fno-finite-math-only" # https://github.com/ggerganov/llama.cpp/pull/7154#issuecomment-2143844461
|
||||
]
|
||||
)
|
||||
];
|
||||
home.file.".config/nomic.ai/GPT4All.ini" = {
|
||||
text =
|
||||
let
|
||||
system_prompt = "You are an expert AI assistant that explains your reasoning step by step. For each step, provide a title that describes what you're doing in that step, along with the content. Decide if you need another step or if you're ready to give the final answer. USE AS MANY REASONING STEPS AS POSSIBLE. AT LEAST 3. BE AWARE OF YOUR LIMITATIONS AS AN LLM AND WHAT YOU CAN AND CANNOT DO. EXPLORE ALTERNATE ANSWERS AND CONSIDER THAT YOUR ANSWER MAY BE WRONG. IDENTIFY POSSIBLE ERRORS IN YOUR REASONING AND WHERE SUCH ERRORS MAY BE. FULLY TEST ALL OTHER POSSIBILITIES. YOU CAN BE WRONG. WHEN YOU SAY YOU ARE RE-EXAMINING, ACTUALLY RE-EXAMINE, AND USE ANOTHER APPROACH TO DO SO. DO NOT JUST SAY YOU ARE RE-EXAMINING. SHOW ALL YOUR WORK. USE AT LEAST 3 METHODS TO DERIVE THE ANSWER. USE BEST PRACTICES. WORK FROM FIRST PRINCIPLES TO CREATE YOUR ANSWER.";
|
||||
in
|
||||
''
|
||||
[General]
|
||||
chatTheme=Dark
|
||||
height=940
|
||||
suggestionMode=Off
|
||||
threadCount=8
|
||||
uniqueId=7096f2d2-448d-4272-a132-d37e77f8a781
|
||||
userDefaultModel=Qwen2.5-7B-Instruct-Q6_K_L.gguf
|
||||
width=1472
|
||||
x=0
|
||||
y=0
|
||||
|
||||
[download]
|
||||
lastVersionStarted=3.3.0-dev0
|
||||
|
||||
[model-Qwen2.5-7B-Instruct-Q6_K_L.gguf]
|
||||
contextLength=32768
|
||||
filename=Qwen2.5-7B-Instruct-Q6_K_L.gguf
|
||||
maxLength=32768
|
||||
promptBatchSize=512
|
||||
promptTemplate=<|im_start|>user\n%1<|im_end|>\n<|im_start|>assistant\n
|
||||
systemPrompt="<|im_start|>system\n${system_prompt}<|im_end|>"
|
||||
|
||||
[network]
|
||||
isActive=true
|
||||
usageStatsActive=true
|
||||
'';
|
||||
};
|
||||
|
||||
home.file.".local/share/nomic.ai/GPT4All/Qwen2.5-7B-Instruct-Q6_K_L.gguf" = {
|
||||
source = pkgs.fetchurl {
|
||||
url = "https://huggingface.co/bartowski/Qwen2.5-7B-Instruct-GGUF/resolve/main/Qwen2.5-7B-Instruct-Q6_K_L.gguf?download=true";
|
||||
sha256 = "thEXN06T/UVGfzdB83jlgpG7kuTzZtz1ZUAdupAnErM=";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user