Model reference · open weights
kiri-ocr is an open-weight language model from mrrtmob. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Maker | mrrtmob |
|---|---|
| Type | Language models |
| Task | Image→text |
| Parameters (lead) | 23M |
| Runs with | kiri-ocr |
| Released | 2026-01-17 |
| Popularity | 753 downloads / month |
| Licence | Open weights |
About
Kiri OCR is a lightweight OCR library for English and Khmer documents. It provides document-level text detection, recognition, and rendering capabilities in a compact package.
| Component | Details |
|---|---|
| Type | Transformer Encoder-Decoder with CTC |
| Encoder | 4 layers, 8 heads, 256 dim, 1024 FFN |
| Decoder | 3 layers, 8 heads, 256 dim, 1024 FFN |
| CNN Backbone | ConvStem (4 conv layers with BatchNorm + SiLU) |
| Decoding | Beam search with CTC fusion + LM fusion |
| Input Size | 48 × 640 px (height × width) |
| Framework | PyTorch |
Input Image (48×640)
↓
ConvStem (CNN)
↓
2D Positional Encoding
↓
Transformer Encoder (4L)
↓
┌───┴───┐
↓ ↓
CTC Head Transformer Decoder (3L)
↓ ↓
└───┬───┘
↓
Beam Search + CTC Fusion + LM Fusion
↓
Output Text
The model is trained on the mrrtmob/khmer_english_ocr_image_line dataset, containing 12 million synthetic images of Khmer and English text lines.
pip install kiri-ocr
from kiri_ocr import OCR
# Initialize (downloads from Hugging Face automatically)
ocr = OCR()
# Extract text from document
text, results = ocr.extract_text("document.jpg")
print(text)
# Access detailed results
for result in results:
print(f"Text: {result.text}")
print(f"Confidence: {result.confidence:.2%}")
# Basic usage
kiri-ocr predict path/to/document.jpg
# With output directory
kiri-ocr predict path/to/document.jpg --output results/
Results on synthetic test images (10 popular fonts):
Default inference parameters:
| Parameter | Value | Description |
|---|---|---|
beam_width | 4 | Beam search width |
ctc_fusion_alpha | 0.5 | CTC score fusion weight |
lm_fusion_alpha | 0.35 | Language model fusion weight |
max_length | 260 | Maximum output sequence length |
kiri-ocr/
├── config.json # Model configuration
├── vocab.json # Character vocabulary
├── model.safetensors # Model weights
└── README.md # This file
This model is released under the Apache 2.0 License.
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys kiri-ocr for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (kiri-ocr below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/chat/completions \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"kiri-ocr","messages":[{"role":"user","content":"Hello"}]}'
Create an account — your API key is available in the console. 5M tokens/month currently included with every new account at launch.