Parameters
Contents
[
Hide
]
Every preset in Aspose.LLM for .NET exposes nine independent parameter bags — small POCO classes that group related settings. Tune any bag before calling AsposeLLMApi.Create(preset) to change how the engine loads and runs the model.
This section covers each bag in detail: the public fields, their types and defaults, and the typical reasons to change them.
At a glance
| Bag | What it controls | Frequently changed for |
|---|---|---|
| Model source | Where the model file comes from | Local files, Hugging Face repos, custom caches |
| Model inference | How the model loads into memory | GPU offload, tensor split, memory mapping |
| Context | Runtime context and batch sizes | Context length, flash attention, KV cache quantization |
| Chat | Session-level conversation settings | System prompt, max tokens, cache cleanup |
| Sampler | Token sampling behavior | Temperature, penalties, DRY, Mirostat |
| Engine | Engine-wide defaults | Cache path, debug logging, default threads |
| Binary manager | Native binary deployment | Release tag, preferred acceleration backend |
| Multimodal context | mtmd (vision) context | GPU offload for projector, verbosity |
PresetCoreBase exposes nine properties, but only eight parameter class types — the MmprojSourceParameters property for the vision projector uses the same ModelSourceParameters type as BaseModelSourceParameters. Both are covered on the Model source page.
General guidance
- Start with a built-in preset. Presets ship with carefully chosen defaults for each model family. Override only fields you have a concrete reason to change.
- Every field is a public get/set property. Mutations on the preset before
Createtake effect; afterCreate, the engine has already read the preset and further changes are ignored. - Every bag is lazy-initialized on
PresetCoreBase. Accessing any property gives you an instance even if you never set it — safe to writepreset.ContextParameters.ContextSize = 8192without a null check. - Null means “use native default” on nullable fields. Set an explicit value only when you want to override.
Sections
- Model source — model file resolution order and cache layout.
- Model inference — model-load knobs (GPU, memory, tensor split).
- Context —
llama.cppcontext parameters. - Chat — session-level conversation settings.
- Sampler — sampler knobs.
- Engine — engine-wide defaults.
- Binary manager — native binary deployment.
- Multimodal context —
mtmdcontext for vision.
What’s next
- Presets — how
PresetCoreBasecomposes the eight bags. - Custom preset — override patterns for the most common scenarios.
- Supported presets — built-in presets with their default parameter values.