Instructions to use ANZ-Innovation/VietSurya-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ANZ-Innovation/VietSurya-v1 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("datalab-to/surya-ocr-2") model = PeftModel.from_pretrained(base_model, "ANZ-Innovation/VietSurya-v1") - Notebooks
- Google Colab
- Kaggle
VietSurya-v1
Vietnamese document OCR adaptation of Surya OCR 2, released by ANZ Innovation.
VietSurya-v1 is a lightweight LoRA adapter for datalab-to/surya-ocr-2. It packages the Vietnamese adaptation weights together with compatible tokenizer and processor assets. Load the adapter alongside the base model to use Surya's native document OCR workflow.
Model at a glance
| Specification | Value |
|---|---|
| Primary language | Vietnamese |
| Task | Document image-to-text |
| Base model | datalab-to/surya-ocr-2 |
| Base architecture | Qwen3.5-style multimodal architecture |
| Release format | PEFT LoRA adapter · Safetensors |
| Adapter parameters | 18,284,544 · 18.28M |
| Adapter weight size | 73.18 MB · 69.79 MiB |
| Stored weight dtype | FP32 |
| Training precision | BF16 |
| LoRA rank / alpha | 32 / 64 |
| LoRA dropout | 0.05 |
| Adapted components | Selected language-model linear-attention and MLP projections |
| Spatial modules | Frozen during adaptation |
| Base weights included | No — download the base model separately |
Parameter count, storage dtype and file size were verified directly from the published adapter_model.safetensors. The adapter size excludes the base model and tokenizer/processor files.
Checkpoint and validation
| Reported training measurement | Value |
|---|---|
| Selected checkpoint step | 22,925 |
| Completed epochs | 1 |
| Validation examples | 512 · stratified |
| Selected validation loss | 0.04034 |
| Maximum training sequence length | 8,192 tokens |
| Checkpoint selection | Best saved validation-loss candidate |
Validation loss measures the training objective; it is not OCR accuracy, CER or WER. This model card does not report CER/WER for this adapter, and the validation loss alone does not establish an improvement over the base model. The training corpus combines Vietnamese document sources; dataset contents are not distributed here.
Usage
The repository contains an adapter, so both the base model and adapter must be accessible to your Hugging Face account. Use a Transformers version that supports the base model's Qwen3.5 architecture, together with compatible PEFT and PyTorch versions.
from peft import PeftModel
from transformers import AutoModelForImageTextToText, AutoProcessor
base_id = "datalab-to/surya-ocr-2"
adapter_id = "ANZ-Innovation/VietSurya-v1"
processor = AutoProcessor.from_pretrained(adapter_id)
base_model = AutoModelForImageTextToText.from_pretrained(
base_id,
torch_dtype="auto",
device_map="auto",
)
model = PeftModel.from_pretrained(base_model, adapter_id)
model.eval()
Use Surya OCR 2's documented prompts and processor conventions for generation. Keep the native output format when integrating the model into document-processing workflows. Evaluate OCR text and document structure separately on representative inputs; no exact-layout reproduction guarantee is claimed by this release.
Repository files
| File | Purpose |
|---|---|
adapter_model.safetensors |
Vietnamese LoRA adaptation weights |
adapter_config.json |
Adapter loading configuration |
tokenizer.json, tokenizer_config.json |
Compatible tokenizer assets |
processor_config.json |
Image/text processor configuration |
chat_template.jinja |
Native prompt formatting |
LICENSE |
Inherited model license |
Training scripts, optimization code, private documents and training datasets are not included in this repository.
Attribution and license
Developed by ANZ Innovation, based on Datalab's Surya OCR 2.
This derivative adapter is distributed under the base model's modified AI Pubs Open Rail-M license, included in LICENSE. It carries use-based restrictions, attribution and share-alike terms. Read the license before using or redistributing the adapter. No endorsement by Datalab is implied.
- Downloads last month
- 13
Model tree for ANZ-Innovation/VietSurya-v1
Base model
datalab-to/surya-ocr-2