Model reference · open weights

kiri-ocr

Available as managed deployment LLMs mrrtmob · community Image→text 1 variants 753 dl/mo

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

Makermrrtmob
TypeLanguage models
TaskImage→text
Parameters (lead)23M
Runs withkiri-ocr
Released2026-01-17
Popularity753 downloads / month
LicenceOpen weights

About

What kiri-ocr is

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.

✨ Key Features

  • Lightweight: Compact model optimized for speed and efficiency
  • Bilingual: Native support for English and Khmer (including mixed text)
  • Document Processing: Automatic text line and word detection
  • Hybrid Decoding: CTC + Attention decoder with language model fusion

🏗️ Architecture

ComponentDetails
TypeTransformer Encoder-Decoder with CTC
Encoder4 layers, 8 heads, 256 dim, 1024 FFN
Decoder3 layers, 8 heads, 256 dim, 1024 FFN
CNN BackboneConvStem (4 conv layers with BatchNorm + SiLU)
DecodingBeam search with CTC fusion + LM fusion
Input Size48 × 640 px (height × width)
FrameworkPyTorch

Model Diagram

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

📊 Dataset

The model is trained on the mrrtmob/khmer_english_ocr_image_line dataset, containing 12 million synthetic images of Khmer and English text lines.

💻 Usage

Installation

pip install kiri-ocr

Python API

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%}")

CLI Tool

# Basic usage
kiri-ocr predict path/to/document.jpg

# With output directory
kiri-ocr predict path/to/document.jpg --output results/

📈 Benchmarks

Results on synthetic test images (10 popular fonts):

⚙️ Configuration

Default inference parameters:

ParameterValueDescription
beam_width4Beam search width
ctc_fusion_alpha0.5CTC score fusion weight
lm_fusion_alpha0.35Language model fusion weight
max_length260Maximum output sequence length

📁 Model Files

kiri-ocr/
├── config.json          # Model configuration
├── vocab.json           # Character vocabulary
├── model.safetensors    # Model weights
└── README.md            # This file

🔗 Links

📄 License

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

Call it like any OpenAI endpoint

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.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms