CoolFace
Modelpublic

thelamapi/next-ocr

sourceHugging Faceapache-2.0updated 7mo agoView on Hugging Face
29likes919downloads
Model Card

<img src='bannerocr.png'>

๐Ÿ–ผ๏ธ Next OCR 8B

Compact OCR AI โ€” Accurate, Fast, Multilingual, Math-Optimized

![License: MIT](https://opensource.org/licenses/MIT) ![Language: Multilingual]() ![HuggingFace](https://huggingface.co/Lamapi/next-ocr) ![Discord](https://discord.gg/XgH4EpyPD2)


๐Ÿ“– 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

image


ModelOCR-Bench Accuracy (%)Multilingual Accuracy (%)Layout / Table Understanding (%)
Next OCR99.096.895.3
PaddleOCR95.293.995.3
Deepseek OCR90.687.486.1
Tesseract92.088.472.0
EasyOCR90.484.778.9
Google Cloud Vision / DocAI98.795.593.6
Amazon Textract94.786.286.1
Azure Document Intelligence95.193.691.4

ModelHandwriting (%)Scene Text (%)Complex Tables (%)
Next OCR929691
PaddleOCR889290
Deepseek OCR808583
Tesseract758870
EasyOCR788675
Google Cloud Vision / DocAI909592
Amazon Textract859088
Azure Document Intelligence879189

๐Ÿš€ Installation & Usage

python
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

FeatureDescription
๐Ÿ–ผ๏ธ High-Accuracy OCRExtracts text from images, documents, and screenshots reliably.
๐Ÿ‡น๐Ÿ‡ท Multilingual SupportWorks with 30+ languages including Turkish.
โšก Lightweight & EfficientOptimized for resource-constrained environments.
๐Ÿ“„ Layout & Math AwarenessHandles tables, forms, and mathematical formulas.
๐Ÿข Reliable OutputsSuitable for enterprise document workflows.

๐Ÿ“ Model Specifications

SpecificationDetails
Base ModelQwen 3
Parameters8 Billion
ArchitectureVision + Transformer (OCR LLM)
ModalitiesImage-to-text
Fine-TuningOCR datasets with multilingual and math/tabular content
OptimizationsQuantization-ready, FP16 support
Primary FocusText extraction, document understanding, mathematical OCR

๐ŸŽฏ 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


Next OCR โ€” Compact OCR + math-capable AI, blending accuracy, speed, and multilingual document intelligence.

![Follow on HuggingFace](https://huggingface.co/Lamapi)