Building a Custom Vision LLM for Document Processing at Scale

grab · Tech · 2025 · source Agentic: no · promotional bias: low · source-backed · extracted with prompt 0.5.4 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Southeast Asia document OCR and KIE

Grab needed accurate document OCR and key-information extraction for Southeast Asian eKYC and document-processing flows, but traditional OCR, proprietary vision LLMs, and open-source vision LLMs all failed different production constraints.

Constraints:

Architecture

Grab built a custom vision LLM pipeline around synthetic OCR data, the internal Documint labeling framework, full-parameter fine-tuning, and a final lightweight 1B vision-language model. Documint generates detection, orientation, OCR, and KIE labels from collected documents with human review. The final model combines the Qwen2-VL 2B vision encoder, Qwen2.5 0.5B language decoder, an adjusted projector, and a four-stage training process for SEA document processing.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  document-inputs[Document inputs] --> documint[Documint]
  documint --> human-reviewer[Human reviewer]
  human-reviewer --> curated-document-dataset[Curated document dataset]
  documint --> curated-document-dataset
  curated-document-dataset --> qwen2-vl-2b-baseline[Qwen2-VL 2B baseline]
  qwen2-vl-2b-baseline --> custom-1b-vision-llm[Custom 1B Vision LLM]
  synthetic-ocr-data-pipeline[Synthetic OCR data pipeline] --> custom-1b-vision-llm[Custom 1B Vision LLM]
  vision-encoder[Vision encoder] --> adjusted-projector[Adjusted projector]
  adjusted-projector --> language-decoder[Language decoder]
  vision-encoder --> custom-1b-vision-llm
  adjusted-projector --> custom-1b-vision-llm
  language-decoder --> custom-1b-vision-llm
  custom-1b-vision-llm --> document-processing-workflow[Document processing workflow]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Document inputs User-submitted documents such as ID cards, driver's licenses, and registration certificates. Documint
Synthetic OCR data pipeline Renders Southeast Asian language text into augmented training images. Custom 1B Vision LLM
Documint Internal auto-labeling and preprocessing framework for document understanding. Document inputs, Human reviewer, Curated document dataset
Human reviewer Refines automatically extracted labels to achieve high label accuracy. Documint, Curated document dataset
Curated document dataset Task-specific labeled document data for OCR and KIE fine-tuning. Documint, Qwen2-VL 2B baseline, Custom 1B Vision LLM
Qwen2-VL 2B baseline Base multimodal LLM selected for SEA language tokenizer coverage and dynamic resolution. Curated document dataset, Custom 1B Vision LLM
Vision encoder Image-understanding tower taken from Qwen2-VL 2B. Adjusted projector, Custom 1B Vision LLM
Adjusted projector Connects the vision encoder representation to the language decoder. Vision encoder, Language decoder, Custom 1B Vision LLM
Language decoder Compact Qwen2.5 0.5B decoder used in the custom lightweight model. Adjusted projector, Custom 1B Vision LLM
Custom 1B Vision LLM Specialized production model for document OCR and key-information extraction. Synthetic OCR data pipeline, Curated document dataset, Vision encoder, Adjusted projector, Language decoder, Document processing workflow
Document processing workflow Production OCR/KIE use cases such as eKYC document processing. Custom 1B Vision LLM

Data flow

Document images and synthetic SEA text images feed training and labeling pipelines. Documint detects document regions, corrects orientation, extracts unstructured OCR text, and produces KIE JSON labels. Grab first fine-tuned Qwen2-VL 2B, then built a 1B model by aligning the projector, enhancing the vision tower, training on language-specific visual data, and full-parameter fine-tuning on curated document data.

3 supporting quotes
“Documint has four main modules: * Detection module: Detect the region from the full picture. * Orientation module: Gives correction angle”article, stated
“Stage 1 - Continual pre-training: We first trained the vision components of the model using synthetic OCR datasets”article, stated
“Stage 4 - Task-centric fine-tuning: Lastly, we performed full-parameter fine-tuning on our custom 1B model using our curated document dataset.”article, stated

Why this architecture

Grab chose a specialized small vision LLM because document processing needed SEA-script accuracy and production latency. Full fine-tuning taught visual patterns that LoRA missed, while the custom 1B architecture kept the strong Qwen2-VL vision encoder but reduced deployment cost and latency with a compact decoder and staged training.

3 supporting quotes
“While open-source Vision LLMs often have extensive multi-lingual corpus coverage for the LLM decoder’s pre-training, they lack visual text in SEA languages”article, stated
“While the Qwen2VL-2B model was a success, the full fine-tuning pushed the limits of GPUs. To optimize resources used and to create a model perfectly tailored to our needs, we decided to build a lightweight Vision LLM (~1B parameters) from scratch.”article, stated
“The latency of our model far outperforms the 2B model, as well as traditional OCR models, as well as external APIs like chatGPT or Gemini.”article, stated

Models used: Qwen2-VL 2B · Qwen2.5 0.5B · miniCPM · Llama3.2 Vision · Pixtral 12B · GOT-OCR2.0 · NVLM 1.0 · ChatGPT · Gemini

Scale

Alternatives considered (roads not taken)

Traditional OCR systems

Rejected because: Traditional OCR struggled with the diversity of document templates.

“traditional Optical Character Recognition (OCR) systems, which struggled with the variety of document templates it had to process.”article, stated

Proprietary Vision LLM APIs

Rejected because: They had SEA-language weaknesses, hallucinations, errors, and unacceptable latency.

“powerful proprietary Large Language Models (LLMs) were an option, they often fell short in understanding SEA languages, produced errors, hallucinations, and had high latency.”article, stated

LoRA fine-tuning only

Rejected because: LoRA improved Latin-script documents but still struggled with Thai, Vietnamese, and dense unstructured layouts.

“However, the fine-tuned model still struggled with: * Documents containing non-Latin scripts like Thai and Vietnamese. * Unstructured layouts with small, dense text.”article, stated

Productionizing the fine-tuned 2B model unchanged

Rejected because: The 2B model pushed GPU limits, so Grab built a smaller 1B model optimized for training and deployment.

“While the Qwen2VL-2B model was a success, the full fine-tuning pushed the limits of GPUs. To optimize resources used”article, stated

Patterns

fine-tuning-adaptation (model-ops)

Grab moved from LoRA to full-parameter fine-tuning and then trained a custom 1B vision LLM for its document domain.

“Stage 4 - Task-centric fine-tuning: Lastly, we performed full-parameter fine-tuning on our custom 1B model using our curated document dataset.”article, stated

synthetic-data-generation (data)

Grab rendered SEA-language text into synthetic images with varied fonts, backgrounds, and augmentations.

“we used an in-house synthetic data pipeline to generate text images by rendering SEA text contents in various fonts, backgrounds and augmentations.”article, stated

data-quality-loop (data)

Documint-generated labels were refined by human reviewers to improve label accuracy.

“The data was further refined by a human reviewer to achieve high label accuracy.”article, stated

latency-optimization (operations)

The custom 1B model was built to reduce latency relative to the larger 2B model, traditional OCR, and external APIs.

“The latency of our model far outperforms the 2B model, as well as traditional OCR models, as well as external APIs like chatGPT or Gemini.”article, stated

Tradeoffs

Adaptation method

Chose full-parameter fine-tuning over LoRA-only fine-tuning.

Rationale: Full fine-tuning delivered the non-Latin OCR gains that LoRA did not.

“The fully fine-tuned Qwen2-VL 2B model delivered significant improvement, especially on documents that the LoRA model struggled with.”article, stated

Model architecture

Chose custom 1B model over serving the larger Qwen2-VL 2B model as-is.

Rationale: The 1B model kept comparable accuracy while improving latency and resource use.

“A smaller model (~1B) built from scratch and trained comprehensively can achieve near state-of-the-art results”article, stated

Image handling

Chose dynamic/native image resolution over fixed-size resized image inputs.

Rationale: Native resolution preserves text characters for OCR.

“Unlike models that require fixed-size image inputs, Qwen2-VL can process images in their native resolution. This is crucial for OCR tasks”article, stated

Label generation

Chose auto-labeling plus human review over raw automated labels alone.

Rationale: Human review improved the accuracy of labels used to train the specialized model.

“The data was further refined by a human reviewer to achieve high label accuracy.”article, stated

Gotchas (what bit them)

Open-source multimodal models lacked enough Southeast Asian visual-text coverage.

Root cause: Their language decoders may be multilingual, but their vision encoders and joint training underrepresent SEA scripts.

Resolution: Train vision components on synthetic SEA OCR data and fully fine-tune on task-specific documents.

“they lack visual text in SEA languages during vision encoder and joint training.”article, stated

LoRA fine-tuning did not solve non-Latin and dense-layout documents.

Root cause: Lightweight parameter updates were not enough for specialized visual OCR/KIE behavior.

Resolution: Use full-parameter fine-tuning and later staged training for the custom 1B model.

“Full fine-tuning is superior: For specialized, non-Latin script domains, full-parameter fine-tuning dramatically outperforms LoRA.”article, stated

External APIs had unacceptable tail latency for large-scale rollout.

Root cause: P99 latency could be several times P50 latency.

Resolution: Build and deploy a lightweight specialized model.

“external APIs was the P99 latency, which can easily be 3 to 4x the P50 latency, which would not be acceptable”article, stated

Evaluation

Grab benchmarked candidate vision LLMs on Grab document data, compared LoRA and full fine-tuning, reported field-level OCR/KIE accuracy by document type, and compared latency against 2B, traditional OCR, and external APIs.

Metrics: OCR field-level accuracy · Thai accuracy +70 percentage points · Vietnamese accuracy +40 percentage points · within 3 percentage-point accuracy gap across most document types · P50 latency · P99 latency

“We benchmarked Qwen2VL and miniCPM on Grab’s dataset. Our initial findings showed low accuracy”article, stated
“Table 1: OCR Field level accuracy between the baseline and Qwen2-VL 2B model.”article, stated

Outcomes

The case reports 70pp Thai and 40pp Vietnamese accuracy improvements, a ~1B parameter custom model, and expansion across Grab's eight-country Southeast Asia footprint.

“Thai document accuracy increased +70pp from baseline. * Vietnamese document accuracy rose +40pp from baseline.”article, stated
“Expanding across Southeast Asia: We’re extending support to all Grab markets, bringing our advanced document processing to Myanmar, Cambodia, and beyond.”article, stated