📓 Notebook: kora_inference.ipynb (download). It loads the model once and OCRs images or PDF pages, showing each page next to its Markdown. It runs on Google Colab (upload it with File → Upload notebook and pick a GPU runtime) or locally (NVIDIA GPU, Apple GPU or CPU).
kora-v0.1 is an OCR model for Hindi and English document pages. It turns a page image into Markdown: headings, lists and
bold text as Markdown, tables as HTML, math as LaTeX, pictures as  placeholders. Headers, footers and
page numbers are kept, and digits are written in the script they're printed in.
import torch
from PIL import Image
from transformers import AutoProcessor, Qwen3_5ForConditionalGeneration
model_id = "shubhdotai/kora-v0.1"
device = "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
processor = AutoProcessor.from_pretrained(model_id)
model = Qwen3_5ForConditionalGeneration.from_pretrained(
model_id, dtype=torch.float32 if device == "cpu" else torch.bfloat16).to(device).eval()
img = Image.open("page.png").convert("RGB")
img.thumbnail((1540, 1540)) # longest edge at most 1,540 px
prompt = processor.apply_chat_template([{"role": "user", "content": [{"type": "image"}]}],
add_generation_prompt=True, tokenize=False, enable_thinking=False)
inputs = processor(text=[prompt], images=[img], return_tensors="pt").to(device)
end = processor.tokenizer.convert_tokens_to_ids("<|im_end|>")
out = model.generate(**inputs, max_new_tokens=6144, do_sample=False, eos_token_id=end)
print(processor.decode(out[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))
Requires transformers 5.5.4 or newer.
repetition_penalty=1.05.Apache-2.0. Based on lightonai/LightOnOCR-3-0.8B (Apache-2.0).
last-checkpoint/optimizer.pt 6.8 GBkeep/step-00300.safetensors 3.4 GBkeep/step-00400.safetensors 3.4 GBlast-checkpoint/model.safetensors 3.4 GBsoup/step-00575.safetensors 3.4 GBsoup/step-00602.safetensors 3.4 GBsoup/step-00629.safetensors 3.4 GBsoup/step-00656.safetensors 3.4 GBsoup/step-00683.safetensors 3.4 GBmodel.safetensors 1.7 GBlast-checkpoint/rng_state.pth 14.6 kBlast-checkpoint/training_args.bin 5.2 kBlast-checkpoint/scheduler.pt 1.5 kBHave the files? Submit a torrent.
Submit a torrentHave the complete files and permission to share them? Replace the example folder path. The script checks the files, makes a torrent and submits its magnet and checksums. Keep your torrent client seeding. Get your community key from your settings, and read the script before running it.
curl -fsSL https://pirateface.co/package.sh | bash -s -- --repo shubhdotai/kora-v0.1 ./model-folderlightonai/LightOnOCR-3-0.8B