SenOCR-Vi

SenOCR-Vi 路 Research page 路 VietAlpha Lab


SenOCR-Vi INT8 is the efficiency-focused release of SenOCR-Vi, VietAlpha Lab's Vietnamese-specialized document OCR model. At less than half the size of the full-precision checkpoint, it is built for on-device OCR: smartphones, laptops and edge hardware, with no server round-trip.

Highlights

  • Built for the edge: a 1.56 GB checkpoint, 59% smaller than the 3.83 GB original, compact enough to fit in the memory of modern smartphones.
  • Efficient by design: a ~0.96B-parameter model that reads Vietnamese documents directly on the device, keeping documents private and costs low.
  • Targeted quantization: INT8 weights on the language decoder, where SenOCR-Vi's Vietnamese fine-tuning lives. The vision encoder, projector, embeddings and output head stay in BF16.
  • No calibration step: per-row symmetric INT8 weight-only quantization with torchao. Activations run in BF16.
  • Native transformers loading: one from_pretrained call with no remote code.
  • Same interface: prompts, chat template and outputs match SenOCR-Vi and PaddleOCR-VL-1.6.
  • Apache 2.0: free for commercial use, customization and redistribution.

Quick start

pip install "transformers>=5.0.0" torchao torch pillow
from PIL import Image
import torch
from transformers import AutoProcessor, AutoModelForImageTextToText

model_id = "VietAlphaLabs/SenOCR-Vi-INT8"

model = AutoModelForImageTextToText.from_pretrained(
    model_id, dtype=torch.bfloat16, device_map="auto"
).eval()
processor = AutoProcessor.from_pretrained(model_id)

image = Image.open("document.png").convert("RGB")
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "image": image},
            {"type": "text", "text": "OCR:"},
        ],
    }
]

inputs = processor.apply_chat_template(
    messages,
    add_generation_prompt=True,
    tokenize=True,
    return_dict=True,
    return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=512)
print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))

Load with dtype=torch.bfloat16. Without it, the non-quantized modules load in FP32.

Download the model

hf download VietAlphaLabs/SenOCR-Vi-INT8 --local-dir SenOCR-Vi-INT8/

Evaluation

The published SenOCR-Vi benchmarks (82.83 Vietnamese document composite, 86.7% Vietnamese text recognition) were measured on the full-precision release. Separate scores for the INT8 build are not yet available, so validate it on your own documents before production use.

See the SenOCR-Vi model card for full evaluation, training, data and limitations.

License

SenOCR-Vi INT8 is released under the Apache License 2.0, the same license as SenOCR-Vi and PaddleOCR-VL-1.6.

Citation

@misc{vietalphalab2026senocrvi,
      title={SenOCR-Vi: A Vietnamese-Specialized Document OCR Model},
      author={VietAlpha Lab},
      year={2026},
      publisher={Hugging Face},
      url={https://huggingface.co/VietAlphaLabs/SenOCR-Vi},
}
Downloads last month
14
Safetensors
Model size
0.9B params
Tensor type
F32
路
BF16
路
I8
路
Inference Providers NEW
This model isn't deployed by any Inference Provider. 馃檵 Ask for provider support

Model tree for VietAlphaLabs/SenOCR-Vi-INT8

Quantized
(1)
this model