Views
No views yet
| Model | Document Parsing | Fine-grained Text Recognition | Full-page OCR | Handwritten Content Extraction | Text Recognition | Document Classification | Diagram VQA | Cognition VQA | Infographics | Overall |
|---|---|---|---|---|---|---|---|---|---|---|
| Typhoon-OCR1.5-2B | 0.2355 | 0.1274 | 0.7724 | 0.2808 | 0.5922 | 0.4093 | 0.4063 | 0.5690 | 0.5839 | 0.4419 |
| Pathumma-LLM-Vision-3.0.0-re | 0.4117 | 0.1478 | 0.7361 | 0.3675 | 0.6742 | 0.4326 | 0.4363 | 0.6623 | 0.5951 | 0.4960 |
| Pathumma-LLM-Vision-3.0.0-preview | 0.4872 | 0.1458 | 0.7831 | 0.3286 | 0.6443 | 0.2558 | 0.5784 | 0.6763 | 0.6451 | 0.5050 |
| Parameter | Value |
|---|---|
| Base model | Qwen3.5-2B |
| Training data | 377K OCR samples |
| Training method | SFT |
| Learning rate | 1.0e-5 |
| Epochs | 3 |
| lr_scheduler | cosine |
| Gradient accumulation | 2 |
| Hardware | 4 × NVIDIA A100 |
1pip install -U transformers
2pip install torch torchvision1import torch
2from transformers import AutoProcessor, Qwen3_5ForConditionalGeneration
3
4model_id = "nectec/Pathumma-llm-vision-3.0.0-preview"
5
6model = Qwen3_5ForConditionalGeneration.from_pretrained(
7 model_id,
8 dtype=torch.bfloat16,
9 device_map="auto",
10)
11
12processor = AutoProcessor.from_pretrained(model_id)
13
14messages = [
15 {
16 "role": "user",
17 "content": [
18 {
19 "type": "image",
20 "image": "path/to/your/image.jpg",
21 },
22 {
23 "type": "text",
24 "text": "อ่านข้อความในภาพนี้",
25 },
26 ],
27 }
28]
29
30inputs = processor.apply_chat_template(
31 messages,
32 tokenize=True,
33 add_generation_prompt=True,
34 return_dict=True,
35 return_tensors="pt",
36)
37
38inputs = inputs.to(model.device)
39
40generated_ids = model.generate(
41 **inputs,
42 max_new_tokens=512,
43)
44
45generated_ids_trimmed = [
46 out_ids[len(in_ids):]
47 for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
48]
49
50output_text = processor.batch_decode(
51 generated_ids_trimmed,
52 skip_special_tokens=True,
53 clean_up_tokenization_spaces=False,
54)
55
56print(output_text[0])1@misc{PathummaVision3,
2 author = {
3 Phromchai, Theerawat and
4 Kerdthaisong, Kun and
5 Pintobtang, Thanaporn and
6 Prachumkhong, Khemjira and
7 Lilek, Teepakorn and
8 Issaranon, Theerasit and
9 Kongyoung, Sarawoot
10 },
11 title = {Pathumma Vision 3.5-2B},
12 year = {2026},
13 url = {https://huggingface.co/nectec/Pathumma-llm-vision-3.5-2b}
14}
15