Use Your Own Local Model¶
Register a GGUF file already on disk so Tryll can load it without a Hugging Face download.
Temporary workflow
Registering a local model currently requires editing data/models.json at server startup. In the future there would be implemented dedicated RegisterModel() client API for handling this.
Prerequisites
- A
.gguffile on the server machine, e.g.C:\models\my-model-q4_k_m.gguf. - Write access to the server's
data/models.json. - The server configured for
LlamaCpp— see Connect and Manage a Session.
Steps¶
-
Add an entry to
data/models.jsonwith alocal_pathfield instead of (or in addition to) Hugging Face source fields. The key fields arenameplus onevariantsentry withengine = "llama-cpp", alocal_pathdirectory, and thefilesinside it:{ "name": "My Local Model", "variants": [ { "engine": "llama-cpp", "local_path": "C:/models", "files": ["my-model-q4_k_m.gguf"], "kv_cache_type": "q8_0" } ] }Notes:
nameis how clients will refer to the model. Choose something short and stable.- Language models carry no
model_typefield — it is omitted and language is the implicit default. (Only non-language entries setmodel_type, e.g."embedding","stt","tts","vad".) local_pathis a directory (not the file itself), absolute or relative to the server executable's working directory;fileslists the GGUF file name(s) inside it. Forward slashes are fine on Windows. Omitlocal_pathand usehuggingface_repoinstead to have the server download the files.kv_cache_typeis optional. Default isq8_0; usef16for maximum fidelity orq4_0to halve KV memory on large contexts.- There is no
tool_call_formatfield. Tool calling is driven by the model's own chat template — see Tool Calling.
For the full schema see Model Management.
-
Restart the server.
models.jsonis read at startup; Tryll does not currently watch the file. The first server log line after restart should list your model alongside the existing catalog entries. -
Verify via
ListModels. From a client:Call
UTryllSubsystem::ListModels(Blueprint: Tryll|Models → List Models). Bind On List Models Complete to iterateTArray<FTryllModelInfo>.Your new entry should appear with
ModelStatus.Local, meaning the file is present on disk and can be loaded. If you seeAbsent, Tryll could not find the file — re-checklocal_path. -
Reference the model from a graph. Pass the
nameyou chose asmodel_nameon anyGenerateorToolCallnode, or as the agent'sdefault_model_name: -
(Optional) pin it. Load the model eagerly so the first turn does not pay the load cost:
See Pin and Unpin Models for the trade-offs.
Verify it worked¶
Create an agent using the model and send one message. A successful load shows up server-side as:
[info] Loading model "My Local Model" from C:/models/my-model-q4_k_m.gguf
[info] Model loaded: ctx=4096 vocab=128256 dtype=q8_0
Common pitfalls¶
Absentstatus.local_pathis wrong or the file is not readable by the server process. Try opening it as the same user account that runs the server.- Model loads but refuses prompts / produces garbage. Usually the chat template embedded in the GGUF is missing or wrong for the model. Tryll renders prompts through the model's own chat template (see Tool Calling for how tool calls ride on it), so re-export the GGUF with a correct template, or pick a different quantisation of the same weights.
- Out-of-memory on load. Either use a smaller quant (e.g. Q4_K_M
instead of Q8_0), switch
kv_cache_typetoq4_0, or use a smaller context window atCreateSessiontime (not yet user-facing — currently fixed at model default).