CoolFace
Modelpublic

nectec/Pathumma-llm-vision-3.0.0-preview

sourceHugging Faceapache-2.0updated 29d agoView on Hugging Face
2likes1kdownloads
Model Card

Pathumma-llm-vision-3.0.0-preview 2B

Pathumma-llm-vision-3.0.0-preview 2B is a vision-language model developed by NECTEC, based on Qwen3.5-2B and further trained for Thai and multilingual OCR and image-text understanding.

The model was trained on 377K OCR samples with a focus on improving OCR performance, particularly for Thai and challenging real-world document and scene-text images.

Model Highlights

  • —🧠 Based on Qwen3.5-2B
  • —🇹🇭 Optimized for Thai OCR
  • —📚 Trained on 377K OCR samples
  • —đŸ–ŧī¸ Vision-language image-to-text understanding
  • —📄 Designed for OCR and document understanding
  • —🚀 Intended for efficient and compact deployment

Benchmark

We evaluate our models on ThaiOCRBench, a benchmark designed to assess OCR and document understanding capabilities across Thai and challenging real-world visual content.

ThaiOCRBench Results

ModelDocument ParsingFine-grained Text RecognitionFull-page OCRHandwritten Content ExtractionText RecognitionDocument ClassificationDiagram VQACognition VQAInfographicsOverall
Typhoon-OCR1.5-2B0.23550.12740.77240.28080.59220.40930.40630.56900.58390.4419
Pathumma-LLM-Vision-3.0.0-re0.41170.14780.73610.36750.67420.43260.43630.66230.59510.4960
Pathumma-LLM-Vision-3.0.0-preview0.48720.14580.78310.32860.64430.25580.57840.67630.64510.5050

Training

The model was trained using 377K OCR samples.

Training Configuration

ParameterValue
Base modelQwen3.5-2B
Training data377K OCR samples
Training methodSFT
Learning rate1.0e-5
Epochs3
lr_schedulercosine
Gradient accumulation2
Hardware4 × NVIDIA A100

The training setup was designed for large-scale OCR fine-tuning using 4 NVIDIA A100 GPUs.

Intended Use

Pathumma Vision 3.5-2B is intended for:

  • —Thai OCR
  • —Scene text recognition
  • —Document text extraction
  • —Thai document understanding
  • —Efficient OCR deployment

Quickstart

Installation

bash
pip install -U transformers
pip install torch torchvision

Using 🤗 Transformers

python
import torch
from transformers import AutoProcessor, Qwen3_5ForConditionalGeneration

model_id = "nectec/Pathumma-llm-vision-3.0.0-preview"

model = Qwen3_5ForConditionalGeneration.from_pretrained(
    model_id,
    dtype=torch.bfloat16,
    device_map="auto",
)

processor = AutoProcessor.from_pretrained(model_id)

messages = [
    {
        "role": "user",
        "content": [
            {
                "type": "image",
                "image": "path/to/your/image.jpg",
            },
            {
                "type": "text",
                "text": "ā¸­āšˆā¸˛ā¸™ā¸‚āš‰ā¸­ā¸„ā¸§ā¸˛ā¸Ąāšƒā¸™ā¸ ā¸˛ā¸žā¸™ā¸ĩāš‰",
            },
        ],
    }
]

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

inputs = inputs.to(model.device)

generated_ids = model.generate(
    **inputs,
    max_new_tokens=512,
)

generated_ids_trimmed = [
    out_ids[len(in_ids):]
    for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
]

output_text = processor.batch_decode(
    generated_ids_trimmed,
    skip_special_tokens=True,
    clean_up_tokenization_spaces=False,
)

print(output_text[0])

Contributors

This model was developed by:

  • —Theerawat Phromchai
  • —Kun Kerdthaisong
  • —Thanaporn Pintobtang
  • —Khemjira Prachumkhong
  • —Teepakorn Lilek
  • —Theerasit Issaranon
  • —Sarawoot Kongyoung

Acknowledgements

We thank the NECTEC team and contributors involved in the development of Pathumma and Thai-language vision-language resources.

This model is built upon the Qwen3.5 architecture and benefits from the work of the Qwen team.

Citation

If you find Pathumma-llm-vision-3.0.0-preview useful in your research, please cite:

bibtex
@misc{PathummaVision3,
  author = {
    Phromchai, Theerawat and
    Kerdthaisong, Kun and
    Pintobtang, Thanaporn and
    Prachumkhong, Khemjira and
    Lilek, Teepakorn and
    Issaranon, Theerasit and
    Kongyoung, Sarawoot
  },
  title = {Pathumma Vision 3.5-2B},
  year = {2026},
  url = {https://huggingface.co/nectec/Pathumma-llm-vision-3.5-2b}
}