Add A llama.cpp Model
llama.cpp models are pulled into ~/.llama.cpp/models/ from a curated GGUF manifest. Downloads are opt-in and idempotent.
Preconditions
llama-serverandhfare installed (Brewfile additions in the AI section).- You ran
chezmoi initat least once and chose a value fordownloadLlamaCppModels. Clear that key from~/.config/chezmoi/chezmoi.tomland re-runchezmoi initto change it. - You identified a GGUF Hugging Face repo and the exact
.gguffilename to download.
Where The List Lives
Schema
Pipe-delimited, one model per line:
<hf-repo-id>|<hf-file>
hf-repo-id— Hugging Face repo id containing GGUF weights.hf-file— GGUF filename to place under~/.llama.cpp/models/.
Lines starting with # and blank lines are ignored. Chezmoi template conditionals work natively if a future model should render only for a specific profile; the orchestrator pipes the manifest through chezmoi execute-template.
Steps
-
Add or edit the entry in
home/readonly_dot_default-llama-cpp-models.tmpl. -
Add or edit the corresponding preset in
home/dot_config/llama.cpp/models.ini.tmpl. -
Apply:
chezmoi apply
The sync hook is:
It hashes both the manifest and the scripts/sync_llama_cpp_models.py helper so chezmoi apply re-runs on any change to either.
Verification
ls -la ~/.llama.cpp/models/
,llama-cpp serve
,llama-cpp status
Preview what the manifest renders to on this host:
chezmoi execute-template < ~/.local/share/chezmoi/home/readonly_dot_default-llama-cpp-models.tmpl
Rollback / Undo
- Remove the line from
home/readonly_dot_default-llama-cpp-models.tmpl. - Remove the matching preset from
home/dot_config/llama.cpp/models.ini.tmpl. - Re-apply:
chezmoi apply
- Optionally delete the on-disk weights:
rm -f ~/.llama.cpp/models/<model>.gguf