ModelFilePath
Contents
[
Hide
]
ModelFilePath is the highest-priority source for the model file. When set to a non-empty path, the engine loads directly from disk and skips all download logic.
Quick reference
| Type | string? |
| Default | null |
| Priority | 1 (highest; wins over AsposeModelId and Hugging Face fields) |
| Category | Model source |
| Field on | ModelSourceParameters.ModelFilePath |
What it does
nullor empty — skip this priority level; fall through toAsposeModelId, then Hugging Face fields.- A path — load the GGUF from that file. No download.
The file must be accessible and readable by the process.
When to change it
| Scenario | Value |
|---|---|
| Default (use Hugging Face or Aspose catalog) | null |
| Air-gapped deployment with pre-downloaded model | Absolute path |
| Custom local GGUF | Path to the file |
| Testing a model before mirroring to Hugging Face | Local path |
Example
var preset = new Qwen25Preset();
preset.BaseModelSourceParameters.ModelFilePath =
@"C:\models\Qwen2.5-7B-Instruct-Q4_K_M.gguf";
// Bypass the Hugging Face values on the preset.
using var api = AsposeLLMApi.Create(preset);
Interactions
AsposeModelId— priority 2; ignored whenModelFilePathis set.HuggingFaceRepoId+HuggingFaceFileName— priority 3; ignored whenModelFilePathis set.EngineParameters.ModelCachePath— cache is not used when loading from an explicitModelFilePath.
What’s next
- Model source hub — resolution order overview.
- Bring your own GGUF — full custom-model workflow.
- Offline deployment — air-gapped setup.