Table of Contents

Property MaximumCompletionTokens

Namespace
LMKit.Extraction.Ocr
Assembly
LM-Kit.NET.dll

MaximumCompletionTokens

Gets or sets the maximum number of tokens permitted for the OCR transcription output.

public int MaximumCompletionTokens { get; set; }

Property Value

int

The default value is 8192 tokens. Setting this value to -1 disables the token limit.

Examples

var ocr = new VlmOcr(model) { MaximumCompletionTokens = 2048 }; // constrain output

Remarks

A token can vary in size from a single character to part of a word or even a complete phrase. On average, one token corresponds to approximately 4 characters of standard text.

For OCR workloads, a higher default is used to accommodate pages with dense text content: real-world corpora carry pages (dense tables, multi-column text) whose transcription exceeds 4,000 tokens, and a truncated transcription reads as missing content.

Share