Audited on 2026-11-03 against the vendors' primary sources: model cards and raw files on
Hugging Face (generation_config.json, preprocessor_config.json), the vendors' own
client, parser and serve code on GitHub, the vLLM recipes and vLLM source by tag, PyPI
metadata, and the provider API references. Nothing here is inferred from a summary; a
value that could not be read from a primary source is marked unverified.
The official value is the default. A deliberate deviation is allowed only when the code
says why next to it (AGENTS.md R3, R5). Tests pinning the official values below live in
backend/tests/test_models_audit.py; when a vendor changes a value, update this file and
that test in the same commit.
The first pass left these open; each is now fixed against the source named, and pinned by
backend/tests/test_models_audit_open_items.py.
Model / provider
Item
Now
Source
PaddleOCR-VL-1.6
pipeline built without pipeline_version; runtime unpinned
pipeline_version="v1.6"; runtime installs paddleocr[doc-parser]>=3.6.0, and readiness checks the version (an older runtime is reinstalled instead of running v1/v1.5)
swapped like _convert_bbox; mineru-vl-utils 2.0.8 for vLLM and MLX (2.0.6/2.0.7 fix duplicate blocks and priorities; vLLM 0.21 stays inside >=0.19.1,<0.31)
mineru_client.py; GitHub releases; PyPI metadata
DeepSeek-OCR-2
one box per ref, 0-1000
every box of a ref (text on the first), 0-999 grid rescaled to 0-1000
run_dpsk_ocr2_image.py
LightOnOCR-3-1B
marker only at line start, lowercase; section → Text
vendor MARKER anywhere, any label; section → Section-header
lightonocr/grounding.py
LlamaIndex OCRia-1
agentic_plus, a pinned version or a custom prompt silently left OCRia-1
the setup panel says so and why; the custom-prompt warning states the vendor's rule
LlamaParse tiers guide
Modal
303 after 150 s not followed
followed with GET up to 20 hops, same host only (credentials never leave it)
Modal "web endpoint timeouts" guide
Vast.ai
training onstart ~10.7k characters; pagination next_token
mlx-vlm==0.7.1, the release the MLX paths were measured on
model_adapters measurements; mineru-vl-utils [mlx] extra
One deliberate deviation remains: requests keep max_tokens rather than vLLM's newer
max_completion_tokens, because mlx-vlm's chat schema only knows max_tokens
(mlx_vlm/server/schemas.py) and vLLM still accepts it.
Everything else matched the official sources: serve flags, prompts, pixel caps and
coordinate scales of MonkeyOCRv2, MinerU2.5 (native path), Unlimited-OCR-2, Qwen3-VL,
Xiaomi-OCR-0 and Surya; GLM-OCR SDK sampling; dots.mocr sampling; TeleOCR sampling and
layout resize; LlamaParse transport; the Vast, RunPod, Modal and mlx-vlm endpoints.
The tables below are the audit as run on 1344a3e (before section 1's fixes):
"Tabularium now" means that commit. MA = backend/app/services/model_adapters.py,
INF = backend/app/services/inference.py.
Each _chat_completion sends "temperature": 0 if temperature is None else temperature (greedy). Only the repeat-retry raises it, to min(0.2*(n+1),0.8) with top_p 0.95
No sampling_for and no recommended_generation on MonkeyOCRv2ParsingAdapter (MA:158-241), so no temperature is sent. The checkpoint generation_config.json has do_sample:true, temperature 0.6, top_k 20, top_p 0.95, so vLLM samples at T=0.6 on every layout, recognition and END2END call
Default path: the official MinerUClient.aio_two_step_extract runs through scripts/cloud/mineru_native_gateway.py. The direct OpenAI path (MA:269-461) is only used when it is explicitly selected and for diagnostics.
Aspect
Official value
Tabularium now (file:line)
Gap
Source URL
Checkpoint
2605 is the newest (HF lists 2509, Pro-2604, Pro-2605)
Gateway keeps client defaults unless the user overrides (mineru_native_gateway.py:52-78); recommended_generation is empty
none
mineru_client.py L36-86
Sampling (direct path)
as above, with temperature 0.0
sampling_for sends top_p 0.01, top_k 1, penalties, vllm_xargs.no_repeat_ngram_size=100, skip_special_tokens=False, but no temperature (MA:404-423). The server falls back to generation_config T=0.01
gap (low; top_k=1 makes it greedy in practice. The comment MA:403 says the values were "verified on MinerUSamplingParams" but leaves out temperature)
Default path: the official PaddleOCRVL pipeline (backend/app/services/paddle_official.py:23-43). Direct path: recognize() / table_grid() with adapter prompts.
Aspect
Official value
Tabularium now (file:line)
Gap
Source URL
Prompts
OCR:, Table Recognition:, Formula Recognition:, Chart Recognition:, Spotting:, Seal Recognition:
Recipe client: temperature=0.0. PaddleX vllm-server client: "temperature": 0 if temperature is None, max_completion_tokens default PADDLEOCR_VL_MAX_NEW_TOKENS=8192
sampling_for returns {} for text and {max_tokens:4096} for table (MA:1262-1268); no recommended_generation. No temperature is sent, and generation_config.json has none, so vLLM uses T=1.0
deviation-documented for table (MA:1263-1266, 12288 context); text undocumented
constants.py
Pipeline version
Recipe: "1.6 requires paddleocr[doc-parser]>=3.6.0 and pipeline_version="v1.6"" (default is v1.6 only in ≥3.6; latest paddleocr 3.7.0)
PaddleOCRVL(...) built withoutpipeline_version (paddle_official.py:34-40). Runtime installs unpinnedpaddleocr[doc-parser] (paddle_runtime.py:219) and treats any importable PaddleOCRVL as ready (paddle_runtime.py:129), so an older pre-existing runtime silently runs the v1/v1.5 pipeline against the 1.6 server
Default path: the official glmocr SDK in self-hosted mode (scripts/cloud/glmocr_native_gateway.py). Direct path: recognize() with adapter prompts.
Aspect
Official value
Tabularium now (file:line)
Gap
Source URL
Prompts (direct path)
"Prompt Limited": only Text Recognition:, Formula Recognition:, Table Recognition: (plus JSON-schema information extraction). No layout prompt exists
Invented prompts: layout "Return the document layout as a JSON array…", text "Transcribe all text in this image exactly…", table "Extract the table … in OTSL format…" (MA:987-991). Training uses the official ones (models/types.py:134-138), so inference and training disagree
json_result regions: label is mapped to {text, table, formula, image}; the original is kept in native_label (doc_title, paragraph_title, …). bbox_2d is 0-1000. Titles get #/## prefixes. header/footer/number/footnote/aside_text/reference are abandoned by default
parse_native_result reads only region["label"] (MA:1023), so doc_title/paragraph_title arrive as "text" and become Text, never Title. GLM_LABELS keys title, header, footer, page_number, seal, figure, reference never occur (models/glm_ocr.py:16-22)
Exact string: "...Formatting Rules:\n - Picture: …\n - Formula: …\n - Table: …\n - All Others …\n\n4. Constraints:\n - The output text …\n - All layout elements …\n\n5. Final Output: The entire output must be a single JSON object.\n" (4-space-indented bullets, single newlines, trailing \n)
"...Formatting Rules:\n\n- Picture: …\n\n- Formula: …" (blank line between bullets, no indent, no trailing \n) (MA:887-903). Not byte-identical
gap (medium): the model is prompted out of distribution
MIN_PIXELS 3136, MAX_PIXELS 11289600, IMAGE_FACTOR 28. The client runs fetch_image (smart_resize to multiples of 28) before sending
cap 11_289_600 via _fit_pixels (models/dots_ocr.py:77), without 28-multiple snapping
see next row
dots_mocr/utils/consts.py; image_utils.py L84-124
Bbox post-processing
post_process_cells: model coordinates are in the server-side smart_resize space ("server input width, also has smart_resize in server"), rescaled with smart_resize(input_h, input_w)
Divides by prepared.width/height (INF:1285-1291), not by the smart-resized size. Systematic scale error of up to ~14 px per axis
Recipe min_vllm_version: "0.16.0". deepseek_ocr2.py was added to vLLM by PR #33165 (2026-02-02). The raw file returns 404 at tags v0.12.0 and v0.15.0 and 200 at v0.16.0.
vllm_version="0.12.0" (models/deepseek_ocr.py:32). The docstring says "richiede vLLM >= 0.12.0" (services/model_adapters.py:1052-1053). cloud_manager installs exactly this pin (services/cloud_manager.py:1509-1512).
gap (blocking): vLLM 0.12.0 has no DeepseekOCR2 architecture
Same flags (models/deepseek_ocr.py:33-38; local services/model_adapters.py:1170-1181). Local adds --max-model-len 8192 --gpu-memory-utilization 0.85.
none (8192 = recipe context_length)
recipe above
Prompt
Recipe and README: <image>\n<\|grounding\|>Convert the document to markdown.; alternative <image>\nFree OCR.. In OpenAI chat the recipe sends an image_url part plus plain text, with no literal <image>.
"<\|grounding\|>Convert the document to markdown." with the image as an image_url part (services/model_adapters.py:1097)
max_tokens=8192 in every vendor script and in the recipe's offline example, with max_model_len=8192. The recipe's online "Free OCR." example uses 2048.
end2end_max_tokens = 4096 (services/model_adapters.py:1067). No comment explains it.
gap: dense pages truncated at 4096 (the official end2end budget is 8192, bounded by the 8192 context)
vendor config.py/run_dpsk_ocr2_*.py; recipe
Image preprocessing
BASE_SIZE=1024, IMAGE_SIZE=768, CROP_MODE=True, MIN_CROPS=2, MAX_CROPS=6, i.e. "(0-6)×768² + 1×1024²" (vLLM hardcodes the same constants)
Not exposed; no client resize by default (services/inference.py:239-264)
<\|ref\|>label<\|/ref\|><\|det\|>[[x1,y1,x2,y2], …]<\|/det\|>. The vendor parser eval()s a list of boxes and scales by /999.
The regex accepts exactly one [[a,b,c,d]] (services/model_adapters.py:1117-1123), so a ref carrying several boxes is dropped. Boxes are checked against 0-1000 (:1128). coordinate_system="unverified" (:1072).
gap (low): multi-box refs are lost. The 0-999 scale is ~0.1 % off and immaterial.
temperature=0.0 (recipe client, vLLM module docstring, SGLang client temperature: 0). generation_config.json has no temperature (only no_repeat_ngram_size 35, window 128, max_new_tokens 32768), so vLLM falls back to its default of 1.0.
Not sent.UnlimitedOcrAdapter has neither sampling_for nor recommended_generation (services/model_adapters.py:464-658). The comment at :575 says "Vedi recommended_generation sotto", but no such attribute exists.
vLLM: crop mode comes from the merged mm kwargs crop_mode (mm_kwargs.get("crop_mode", CROP_MODE)), and multi-image falls back to base. images_config: {"image_mode": …} is the SGLang request field from the HF README's SGLang section.
Sends "images_config": {"image_mode": …} to the vLLM server (services/model_adapters.py:617). vLLM does not read images_config, so the "base" setting (models/unlimited_ocr.py:102-105) is a silent no-op and every page runs in gundam.
gap (medium): the user setting has no effect on vLLM
gundam: base 1024 / image 640 / crop; base: 1024 / 1024 / no crop; up to 32 crops in vLLM
Not exposed; no client resize by default
none
HF README; vLLM module
Serving runtime / version
Recipe min_vllm_version: "0.25.0"; "supported since vLLM v0.25.0" (pip). The vllm/vllm-openai:unlimited-ocr image is still listed.
Docker image only (models/unlimited_ocr.py:44-47, services/model_adapters.py:624-639). The comment says the architecture "non è nella wheel pip stabile".
deviation-documented, but the rationale is stale (the pip wheel ≥0.25.0 now works)
HF HEAD 0480966 (2026-11-02). The diff against pinned c14071b is README-only (arXiv link and citation). The wheel's x-linked-etag is identical (576c71da…). generation_config.json is unchanged.
The wheel's METADATA (revision c14071b) requires torch==2.13.0, cuda-python>=13.0, flashinfer_python[cu13]==0.6.18, nvidia-cutlass-dsl[cu13]==4.6.2: a CUDA 13 driver
min_cuda_driver=13.0 (models/unlimited_ocr2.py): Vast offers below CUDA 13 are filtered out and the setup preflight refuses them
Recommended {"min_pixels": 512*32*32, "max_pixels": 2048*32*32} (models/qwen3_vl_8b.py:90). max is applied by default (services/inference.py:254-257), but min_pixels is applied only when the user overrides it (services/inference.py:258-261).
gap (medium-low): pages below 0.52 MP are not upscaled as the cookbook does
The vendor serves the 1B (Mistral3/Pixtral arch) from ocrbench/vllm-openai:v0.30.0-transformers5.16.1. Its Dockerfile says: "vLLM v0.30.0's pixtral.py imports PixtralRotaryEmbedding, which transformers 5.17 … renamed: pin 5.16.1". Also: "v0.27.1's compiled mode makes the model loop: use v0.30.0 or later". PyPI: vllm 0.30.0 requires transformers>=5.10.4 (no upper bound); latest transformers is 5.22.1.
vllm_version="0.30.0", no transformers_version (models/lightonocr3.py:22). A fresh env would resolve transformers ≥5.17 (resolver behaviour inferred from PyPI metadata, not executed).
gap (high): the server is likely to fail on import
Same three flags (models/lightonocr3.py:23-27, services/model_adapters.py:1762-1770). No --max-model-len, so the default 16384 from max_position_embeddings applies.
 with an optional +, 0-1000. The vendor MARKER accepts any label [A-Za-z_][\w-]*anywhere (not only at line start). The vendor LABELS list also includes section.
Regex ^!\[([a-z_]+)\+?\]… with MULTILINE (services/model_adapters.py:1731-1735): line-start only, lowercase only. section is not in the label map (models/lightonocr3.py:52-70), so it becomes Text.
"\nPlease output the text content from the image.", "\nThis is the image of a table. Please output the table in OTSL format.", "\nPlease write out the expression of the formula..."
Same text without the leading \n (model_adapters.py:1543-1547)
gap (low)
same
System prompt
DEFAULT_SYSTEM_PROMPT = "You are a helpful assistant."
Engine path: SamplingParams(extra_args={...}). OpenAI server path: vLLM reads custom args only from vllm_xargs; unknown top-level fields are logged as "present in the request but ignored"
OpenAI path sends top-level extra_args for every adapter except MinerU (domain/inference.py:325-335)
gap: on the Modal OpenAI server (modal_teleocr.py, where the processor is registered) the n-gram size is dropped
deviation-documented ("Keep the crop request budget conservative", model_adapters.py:1661-1662)
vllm_async_engine_client.py:105-106
skip_special_tokens
False on every request
not sent on the OpenAI path (default True)
unverified impact: layout tags <box:…><label:…> are plain text, not special tokens; not checked against the tokenizer
vllm_async_engine_client.py:115-118
Local vLLM serve command
Plugin plus logits processor required
serve_command passes --trust-remote-code ... --max-num-seqs 4 but no --logits-processors and no plugin install (model_adapters.py:1665-1675). --max-num-seqs 4 is not upstream
gap (local runtime)
TeleOCR_model.py
Modal serve
—
--logits-processors TeleOCR...:VllmV1NoRepeatNGramLogitsProcessor, python 3.11 (official is 3.10) (scripts/cloud/modal_teleocr.py:87-98)
Not pinned ("supports Qwen3_5ForConditionalGeneration")
0.25.1
deviation-documented (xiaomi_ocr.py:140-142)
INSTALL.md
Prompts (region)
text Extract the text in the image.; table Parse the table in the image into OTSL.; formula Identify the formula in the image and represent it using LATEX format.
The eval pipeline reruns repetitive regions with presence_penalty 1.5 (--retry-repetitive --retry-presence-penalty 1.5, postprocess/repetition_guard.py); the MCP path does not
--no-enforce-eager --max-num-seqs N --dtype bfloat16 --max-model-len 24576 --max-num-batched-tokens M --gpu-memory-utilization 0.85 --enable-prefix-caching --mm-processor-kwargs {"min_pixels":3136,"max_pixels":6291456} (+ MTP when the checkpoint has a head)
same minus --max-num-seqs / --max-num-batched-tokens (surya_ocr.py:220-227)
deviation-documented (surya_ocr.py:217-219)
surya/inference/backends/vllm.py l.182-226
MTP speculative
Auto-on only if config has num_nextn_predict_layers/mtp_num_hidden_layers > 0
not set
none: surya-ocr-2.5 config has mtp_num_hidden_layers: 0, so it is off upstream too
Caps thinking + output. Keep the default 65,536 or set ≥32,768; non-streaming direct-HTTP default cap 32,768
end2end 20,480 (inference.py:147); text crops 3,072 and table bands TABLE_MAX_TOKENS (inference.py:1328-1330) passed as maxOutputTokens (inference.py:990)
gap: with medium thinking, small caps can hit MAX_TOKENS before any answer text
processing_options.ocr_parameters.languages: array of ParsingLanguages enum, ISO-639-1-style: en, it, fr, de, ch_sim, ch_tra, rs_latin… (≈86 values)
Tesseract 3-letter set (eng, ita, chi_sim…; types.py:182-200); default ["eng"] (types.py:244; domain/inference.py:209). Only 3 of 130 codes (abq, ava, che) are in the enum
gap (high). The code comment (types.py:182) claims Tesseract codes are accepted, which contradicts the current reference
all used (scripts/cloud/modal_*.py e.g. modal_teleocr.py:74-84)
none
modal.com/docs
HTTP request limit
Web functions (incl. web_server) cap HTTP requests at 150 s, then return 303 to a result URL
client posts with allow_redirects=False (inference.py:848). A non-streamed response (DotsOcrAdapter.stream_response=False, model_adapters.py:863) longer than 150 s gets a 303 and fails as "non JSON"
gap (medium for dots on Modal; streaming adapters send headers early, so not affected)
imageName, gpuTypeIds[enum], volumeInGb, volumeMountPath, ports ["8888/http","22/tcp"], env{}, interruptible; supportPublicIp needed for SSH via portMappings on some clouds
same fields; no supportPublicIp/cloudType (cloud_manager.py:2110-2119)
sglang_runtime.py builds a uv venv from recipe.pip_extra for Unlimited-OCR-2 only (outside this group): unverified, not audited against SGLang docs. local/ssh/custom are generic OpenAI endpoints, so the vLLM rows apply.