This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /api/python/settings/vision/advanced/local-ai-processing-settings.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. 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.

Tags: Vision, Advanced

from nutrient_sdk import LocalAiProcessingSettings

Construction

LocalAiProcessingSettings is accessed through a Document instance for per-document overrides, or via SdkSettings for SDK-wide defaults.

# Per-document override
with Document.open("input.pdf") as doc:
settings = doc.settings.local_ai_processing_settings
settings.some_field = new_value # mutate fields directly
# SDK-wide default (applies to all documents)
SdkSettings.local_ai_processing_settings.some_field = new_value

Settings are configured by writing to fields on the returned object. The settings property itself cannot be reassigned — doc.settings.local_ai_processing_settings = other_settings is rejected.

Properties

context_tokens

@property
def context_tokens(self) -> int
@context_tokens.setter
def context_tokens(self, value: int) -> None

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

Default: 32768


gpu_layers

@property
def gpu_layers(self) -> int
@gpu_layers.setter
def gpu_layers(self, value: int) -> None

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

Default: 99


image_min_tokens

@property
def image_min_tokens(self) -> int
@image_min_tokens.setter
def image_min_tokens(self, value: int) -> None

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

Default: 1024


max_concurrency

@property
def max_concurrency(self) -> int
@max_concurrency.setter
def max_concurrency(self, value: int) -> None

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

Default: 1


mmproj_path

@property
def mmproj_path(self) -> str
@mmproj_path.setter
def mmproj_path(self, value: str) -> None

Filesystem path to the matching multimodal projector (mmproj) GGUF. Set it together with model_path; the in-process binding requires it even for text-only prompts.

Type: str

Default: string.Empty


model_path

@property
def model_path(self) -> str
@model_path.setter
def model_path(self, value: str) -> None

Filesystem path to the GGUF model used for structured extraction. Set it together with mmproj_path 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: str

Default: string.Empty


threads

@property
def threads(self) -> int
@threads.setter
def threads(self, value: int) -> None

Inference threads; 0 uses the engine default.

Type: int

Default: 0