LocalAiProcessingSettings
Settings for LocalAiProcessing. Values fall back through three levels: document → SDK → built-in default. Writes target the document only when set on a document’s settings, otherwise the SDK globally when set on SdkSettings.
using Nutrient;The SDK creates this class through factory methods or other SDK objects.
Properties
ContextTokens
public int ContextTokens { get; set; }Context size in tokens; 0 uses the engine default (4096). The context holds the document text, the schema and the reply together, and a single dense page with source locations already needs about 20,000 tokens, so the default value is 32768. Documents larger than the context are split into page windows automatically.
Type: int
GpuLayers
public int GpuLayers { get; set; }Model layers to offload to GPU; 0 is pure CPU. The default value is 99, which offloads all available layers. Metal is built in on macOS; the CUDA backend is runtime-provisioned on Linux x64.
Type: int
ImageMinTokens
public int ImageMinTokens { get; set; }Minimum image tokens for dynamic-resolution vision models; 0 uses the model default. Only relevant when page images are attached to the schema request.
Type: int
MaxConcurrency
public int MaxConcurrency { get; set; }Maximum number of concurrent calls. Sizes the in-process context pool: the model weights are shared, each extra context costs only its KV/compute buffers and runs one more call in parallel (callers beyond the pool block for a free context).
Type: int
MmprojPath
public string MmprojPath { get; set; }Filesystem path to the matching multimodal projector (mmproj) GGUF. Set it together with ModelPath; the in-process binding requires it even for text-only prompts.
Type: string
ModelPath
public string ModelPath { get; set; }Filesystem path to the GGUF model used for structured extraction. Set it together with MmprojPath to use a custom model. When both are empty, structured extraction downloads the default local model on first use (the same model the vision-parse step uses).
Type: string
Threads
public int Threads { get; set; }Inference threads; 0 uses the engine default.
Type: int
Resource management
public void Dispose()LocalAiProcessingSettings implements IDisposable. Call Dispose() or use a C# using declaration to release its native handle right away. If you don’t, the handle is released when the object is garbage collected.