thelamapi/next-ocr-i1-GGUF
21.6k
<img src='bannerocr.png'>
๐ผ๏ธ Next OCR 8B
Compact OCR AI โ Accurate, Fast, Multilingual, Math-Optimized
 ![Language: Multilingual]()  
๐ Overview
Next OCR 8B is an 8-billion parameter model optimized for optical character recognition (OCR) tasks with mathematical and tabular content understanding.
Supports multilingual OCR (Turkish, English, German, Spanish, French, Chinese, Japanese, Korean, Russian...) with high accuracy, including structured documents like tables, forms, and formulas.
โก Highlights
- ๐ผ๏ธ Accurate text extraction, including math and tables
- ๐ Multilingual support (30+ languages)
- โก Lightweight and efficient
- ๐ฌ Instruction-tuned for document understanding and analysis
๐ Benchmark & Comparison

๐ Installation & Usage
from transformers import AutoTokenizer, AutoModelForVision2Seq
import torch
model_id = "Lamapi/next-ocr"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForVision2Seq.from_pretrained(model_id, torch_dtype=torch.float16)
img = Image.open("image.jpg")
# ATTENTION: The content list must include both an image and text.
messages = [
{"role": "system", "content": "You are Next-OCR, an helpful AI assistant trained by Lamapi."},
{
"role": "user",
"content": [
{"type": "image", "image": img},
{"type": "text", "text": "Read the text in this image and summarize it."}
]
}
]
# Apply the chat template correctly
prompt = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = processor(text=prompt, images=[img], return_tensors="pt").to(model.device)
with torch.no_grad():
generated = model.generate(**inputs, max_new_tokens=256)
print(processor.decode(generated[0], skip_special_tokens=True))๐งฉ Key Features
๐ Model Specifications
๐ฏ Ideal Use Cases
- Document digitization
- Invoice & receipt processing
- Multilingual OCR pipelines
- Tables, forms, and formulas extraction
- Enterprise document management
๐ License
MIT License โ free for commercial & non-commercial use.
๐ Contact & Support
- ๐ง Email: lamapicontact@gmail.com
- ๐ค HuggingFace: Lamapi
Next OCR โ Compact OCR + math-capable AI, blending accuracy, speed, and multilingual document intelligence.

