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

Settings for LocalVlm. 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 LocalVlmSettings

Construction

LocalVlmSettings 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_vlm_settings
settings.some_field = new_value # mutate fields directly
# SDK-wide default (applies to all documents)
SdkSettings.local_vlm_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_vlm_settings = other_settings is rejected.

Properties

batch_size

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

Number of zone images to include per VLM call.

Type: int

Default: 8


classification_strategy

@property
def classification_strategy(self) -> VlmClassificationStrategy
@classification_strategy.setter
def classification_strategy(self, value: VlmClassificationStrategy) -> None

Strategy for how zones are sent to the VLM for classification.

Type: VlmClassificationStrategy

Default: VlmClassificationStrategy.MultiZone


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).

Type: int

Default: 8192


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. GPU backends are runtime-provisioned (NAT-519), never linked.

Type: int

Default: 0


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. Qwen-VL grounding tasks want at least 1024.

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 VLM 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


max_tokens

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

Maximum tokens in response (-1 = engine default)

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 GGUF multimodal projector (mmproj) matching the model.

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 text model (e.g. a Qwen VLM). Model provisioning through the resource downloader is a follow-up; until then the path must point at an existing file.

Type: str

Default: string.Empty


send_full_page_reference

@property
def send_full_page_reference(self) -> bool
@send_full_page_reference.setter
def send_full_page_reference(self, value: bool) -> None

Whether to send the full page image as reference context alongside cropped zones.

Type: bool

Default: false


system_prompt

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

Optional custom system prompt for zone classification. When empty, the module uses a default prompt based on the ClassificationStrategy.

Type: str

Default: string.Empty


temperature

@property
def temperature(self) -> float
@temperature.setter
def temperature(self, value: float) -> None

Temperature for response generation (0.0 = deterministic, 1.0 = creative). Defaults to 0.0 because zone classification and verbatim text extraction are deterministic tasks — randomness only adds run-to-run noise.

Type: float

Default: 0.0


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