Run this model with HF Jobs

Run kaopanboonyuen/KaoOCR-Ledger-1.0c on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/kaopanboonyuen/KaoOCR-Ledger-1.0c. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/kaopanboonyuen/KaoOCR-Ledger-1.0c on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/kaopanboonyuen/KaoOCR-Ledger-1.0c. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/kaopanboonyuen/KaoOCR-Ledger-1.0c. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
KaoOCR by GSB AI Lab, Government Savings Bank

KaoOCR-Ledger-1.0c

Thai documents in, clean Markdown out.
From GSB AI Lab Β· Government Savings Bank

release params output lang license

Overview Β· Quick start Β· Benchmark Β· Model family Β· Acknowledgements

54.0 66.7 +8.8 +5.1
OCR Β· NLS Parsing Β· TEDS/NLS OCR gain vs 1.0a Parsing gain vs 1.0a

πŸ‡ΉπŸ‡­ KaoOCR Β· Local OCR LLM ΰΈ•ΰΈ±ΰΈ§ΰΉΰΈ£ΰΈΰΈ‚ΰΈ­ΰΈ‡ΰΈ˜ΰΈ™ΰΈ²ΰΈ„ΰΈ²ΰΈ£ΰΈ­ΰΈ­ΰΈ‘ΰΈͺΰΈ΄ΰΈ™

KaoOCR ΰΈˆΰΈ²ΰΈΰΈ—ΰΈ΅ΰΈ‘ΰΉΰΈ₯ΰΉ‡ΰΈš AI ΰΈ‚ΰΈ­ΰΈ‡ΰΈ˜ΰΈ™ΰΈ²ΰΈ„ΰΈ²ΰΈ£ΰΈ­ΰΈ­ΰΈ‘ΰΈͺΰΈ΄ΰΈ™ (GSB AI Lab) Β· ΰΉƒΰΈ«ΰΉ‰ AI ΰΈ­ΰΉˆΰΈ²ΰΈ™ΰΉ€ΰΈ­ΰΈΰΈͺΰΈ²ΰΈ£ΰΉ„ΰΈ—ΰΈ’ ΰΈšΰΈ™ΰΉ€ΰΈ„ΰΈ£ΰΈ·ΰΉˆΰΈ­ΰΈ‡ΰΈ‚ΰΈ­ΰΈ‡ΰΉ€ΰΈ£ΰΈ²ΰΉ€ΰΈ­ΰΈ‡

ΰΈ£ΰΈΈΰΉˆΰΈ™ Ledger ΰΈ­ΰΉˆΰΈ²ΰΈ™ΰΈ ΰΈ²ΰΈžΰΉ€ΰΈ­ΰΈΰΈͺารภาษาไทฒแΰΈ₯ะอังก฀ษ แΰΈ₯้วแปΰΈ₯ΰΈ‡ΰΉ€ΰΈ›ΰΉ‡ΰΈ™ Markdown

βš—οΈ Disclaimer Β· ΰΈˆΰΈ²ΰΈΰΈ«ΰΉ‰ΰΈ­ΰΈ‡ΰΉΰΈ₯ΰΉ‡ΰΈš

ΰΈ™ΰΈ΅ΰΉˆΰΈ„ΰΈ·ΰΈ­ΰΉ€ΰΈ§ΰΈ­ΰΈ£ΰΉŒΰΈŠΰΈ±ΰΈ™ΰΈ—ΰΈ”ΰΈ₯ΰΈ­ΰΈ‡ΰΈˆΰΈ²ΰΈΰΈ«ΰΉ‰ΰΈ­ΰΈ‡ΰΉΰΈ₯ΰΉ‡ΰΈšΰΈ§ΰΈ΄ΰΈˆΰΈ±ΰΈ’ΰΈ›ΰΈ±ΰΈΰΈΰΈ²ΰΈ›ΰΈ£ΰΈ°ΰΈ”ΰΈ΄ΰΈ©ΰΈΰΉŒΰΈ‚ΰΈ­ΰΈ‡ΰΈ˜ΰΈ™ΰΈ²ΰΈ„ΰΈ²ΰΈ£ΰΈ­ΰΈ­ΰΈ‘ΰΈͺΰΈ΄ΰΈ™


✨ Overview

KaoOCR-Ledger reads a document page image and returns structured Markdown: headings, paragraphs and tables. 1.0c is the current release: OCR level with 1.0b at 54.0, and parsing +5.1 over 1.0a.

page image ──► vision encoder ──► autoregressive decoder ──► post-process ──► Markdown
Family KaoOCR Β· Ledger (document parsing, GPU)
Version 1.0c
Parameters 0.63B (vision encoder + autoregressive decoder)
Input Document page image, or a single text-line crop
Output Markdown (page mode) Β· plain text (line mode)
Languages Thai, English
Fine-tuned from KaoOCR-Ledger-1.0a

Lineage

NVIDIA Nemotron 3.5 Parse
          └─► KaoOCR-Ledger-1.0a   (https://huggingface.co/kaopanboonyuen/KaoOCR-Ledger-1.0a)
                 └─► KaoOCR-Ledger-1.0b
                        └─► KaoOCR-Ledger-1.0c   ◄── you are here

The diagram shows release order. 1.0b and 1.0c were each fine-tuned from the 1.0a weights.

πŸš€ Quick start

pip install -U huggingface_hub
hf download kaopanboonyuen/KaoOCR-Ledger-1.0c --local-dir KaoOCR-Ledger-1.0c
cd KaoOCR-Ledger-1.0c
pip install -r requirements.txt

python inference.py page.png                 # document page -> Markdown on stdout
python inference.py page.png -o page.md      # ... saved to a file
python inference.py line.png --line          # one handwriting line -> plain text

Run inference.py from inside the repo folder: the bundled nemotron_parse/ post-processor sits next to it. A GPU is recommended; --device cpu works but is slow.

For throughput, serve it with vLLM:

pip install -e ".[vllm,client]"
vllm serve . --served-model-name nemotron-parse --trust-remote-code

πŸ“Š Benchmark

KaoOCR results on ThaiOCRBench, GSB AI Lab

Benchmark: ThaiOCRBench. Scores are 0–100, higher is better. NLS = 1 βˆ’ normalised edit distance. TEDS is used for parsing pages whose ground truth has a table.

Model OCR (NLS) Parsing (TEDS/NLS)
KaoOCR-Ledger-1.0a 45.2 61.6
KaoOCR-Ledger-1.0b 54.0 67.6
KaoOCR-Ledger-1.0c 54.0 66.7
OpenThai2.1-OCR-Markdown (reference) 50.4 68.1
typhoon-ocr2-2b (reference) 55.8 63.6

OCR tasks Β· NLS (β–ˆ KaoOCR Β· β–‘ reference)

typhoon-ocr2-2b           β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘         55.8
KaoOCR-Ledger-1.0b        β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ         54.0
KaoOCR-Ledger-1.0c        β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ         54.0  β—„
OpenThai2.1-OCR-Markdown  β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘           50.4
KaoOCR-Ledger-1.0a        β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ             45.2

Parsing tasks Β· TEDS/NLS (β–ˆ KaoOCR Β· β–‘ reference)

OpenThai2.1-OCR-Markdown  β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘    68.1
KaoOCR-Ledger-1.0b        β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ    67.6
KaoOCR-Ledger-1.0c        β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ    66.7  β—„
typhoon-ocr2-2b           β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘      63.6
KaoOCR-Ledger-1.0a        β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ      61.6

Ahead: parsing +3.1 vs typhoon-ocr2-2b, OCR +3.6 vs OpenThai2.1-OCR-Markdown.
Not ahead: OCR βˆ’1.8 vs typhoon-ocr2-2b, parsing βˆ’1.4 vs OpenThai2.1-OCR-Markdown.

c vs b. OCR is level at 54.0; parsing is βˆ’0.9 (66.7 vs 67.6). Pick c as the current release, b if parsing and tables are your main workload.

Numbers come from our own ThaiOCRBench run and scorers, not an official leaderboard. VQA and key-information tasks are not included. Deltas use unrounded scores, so they can differ by 0.1 from subtracting the rounded values. Please test on your own documents.

πŸ”¬ How it was made

1.0c is a fine-tune of KaoOCR-Ledger-1.0a, a handwriting-tuned, weight-blended (WiSE-FT) model. Tokenizer, runtime code (nemotron_parse/) and licence files are carried over unchanged.

🧩 Model family

Release Ledger
Markdown Β· GPU
General
plain text Β· CPU
1.0a KaoOCR-Ledger-1.0a KaoOCR-General-1.0a
1.0b KaoOCR-Ledger-1.0b KaoOCR-General-1.0b
1.0c KaoOCR-Ledger-1.0c β—„ KaoOCR-General-1.0c

⚠️ Limitations

  • Formulas, scene text and unusual layouts remain hard (inherited from the base architecture).
  • Line mode (--line) is for cropped single lines; page mode uses the native page-parsing prompt.
  • A speculative-decoding drafter, if present in the base repo, was not re-tested.

πŸ“„ License

OpenMDW-1.1 (derivative of NVIDIA Nemotron 3.5 Parse). Tokenizer terms are in TOKENIZER_ATTRIBUTION.md where present.

The 1.0a handwriting stage used iapp/thai_handwriting_dataset and sivakorn-su/thai-handwriting-textdisjoint-v1. They carry their own terms: check them before commercial use.

πŸ™ Acknowledgements

Thai OCR moves forward because people share their work openly. We are proud to build on it, and we hope KaoOCR adds something useful back to the community.


GSB AI Lab Β· Government Savings Bank Β· Made with πŸ’› in Thailand Β· KaoOCR-Ledger-1.0c
Downloads last month
65
Safetensors
Model size
0.6B params
Tensor type
I64
Β·
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for kaopanboonyuen/KaoOCR-Ledger-1.0c

Finetuned
(2)
this model