How to use from the
Use from the
MLX library
# Make sure mlx-vlm is installed
# pip install --upgrade mlx-vlm

from mlx_vlm import load, generate
from mlx_vlm.prompt_utils import apply_chat_template
from mlx_vlm.utils import load_config

# Load the model
model, processor = load("yugeshkarunamurthy/OvisOCR2-oQ6e")
config = load_config("yugeshkarunamurthy/OvisOCR2-oQ6e")

# Prepare input
image = ["http://images.cocodataset.org/val2017/000000039769.jpg"]
prompt = "Describe this image."

# Apply chat template
formatted_prompt = apply_chat_template(
    processor, config, prompt, num_images=1
)

# Generate output
output = generate(model, processor, formatted_prompt, image)
print(output)

OvisOCR2-oQe6

Apple Silicon Optimized oQe6 MLX Quantized Release

This repository contains an oQe6 mixed-precision MLX quantized version of OvisOCR2, optimized for fast and memory-efficient document understanding on Apple Silicon.

The original OvisOCR2 model was developed by ATH-MaaS. This repository provides an optimized MLX/oQe6 conversion only and does not include any additional training or fine-tuning.

Using oQe6 sensitivity-aware mixed-precision quantization, this release preserves the excellent OCR and document parsing capabilities of the original model while significantly reducing memory usage and improving inference efficiency on Apple Silicon. OvisOCR2 is a compact 0.8B end-to-end document parser that converts document images directly into structured Markdown and achieves state-of-the-art results on OmniDocBench v1.6 and PureDocBench. 0


About OvisOCR2

OvisOCR2 is a compact Vision Language Model (VLM) specialized for end-to-end document parsing.

Unlike traditional OCR pipelines that separately detect layouts, recognize text, and reconstruct documents, OvisOCR2 directly converts a document page into structured Markdown while preserving natural reading order.

The model is capable of extracting:

  • 📄 Plain text
  • 📐 Mathematical formulas (LaTeX)
  • 📊 Tables (HTML)
  • 🖼 Images and visual regions
  • 📚 Complex layouts
  • 📰 Multi-column documents
  • 📑 Scientific papers
  • 📋 Forms
  • 📖 Books
  • 📃 Receipts
  • 📜 Scanned documents

The model is based on Qwen3.5-0.8B and is trained using a combination of:

  • Real-world document data
  • Synthetic document generation
  • Supervised Fine-Tuning (SFT)
  • Reinforcement Learning (RL)
  • On-Policy Distillation (OPD)

OvisOCR2 achieves an overall score of 96.58 on OmniDocBench v1.6, becoming the first end-to-end model to top that benchmark, and also leads PureDocBench with an Avg3 score of 75.06. 1


Quantization

This release uses oQe6 mixed-precision quantization.

Specifications

  • Format: MLX
  • Quantization: oQe6
  • Method: Sensitivity-Aware Mixed Precision
  • Target Platform: Apple Silicon
  • Inference Engine: MLX / oMLX

Unlike traditional fixed-bit quantization, oQe6 automatically assigns precision according to layer sensitivity, preserving critical components while compressing less sensitive regions.

Benefits include:

  • Better OCR accuracy retention
  • Lower memory usage
  • Faster inference
  • Higher throughput
  • Excellent Apple Silicon optimization

Recommended Settings

For the best OCR quality:

temp: 0.0
top_p: 1.0
top_k: 1
max_tokens: 4096

For difficult or noisy scans:

temp: 0.1
top_p: 0.95
top_k: 20
max_tokens: 4096

OCR is generally deterministic, so greedy or near-greedy decoding is recommended for maximum transcription accuracy.


Example Usage

from mlx_vlm import load, generate
from PIL import Image

model, processor = load("yugeshkarunamurthy/OvisOCR2-oQe6")

image = Image.open("document.png")

prompt = """
Extract all readable content from the document.
Output Markdown preserving reading order.
Render tables as HTML.
Render formulas using LaTeX.
"""

response = generate(
    model=model,
    processor=processor,
    image=image,
    prompt=prompt,
    temperature=0.0,
)

print(response)

Optimized For

This release is optimized for:

  • Apple M1
  • Apple M2
  • Apple M3
  • Apple M4

Compatible with:

  • MLX
  • MLX-VLM
  • oMLX
  • Local OCR Applications
  • Document Processing Pipelines

Model Highlights

  • End-to-End OCR
  • Page-level Document Parsing
  • Markdown Generation
  • HTML Table Extraction
  • LaTeX Formula Recognition
  • Scientific Paper Parsing
  • Forms and Receipts
  • Complex Multi-column Documents
  • Reading Order Preservation
  • High OCR Accuracy

Intended Use

OvisOCR2-oQe6 is well suited for:

  • OCR
  • PDF Digitization
  • Scientific Paper Extraction
  • Book Digitization
  • Invoice Processing
  • Receipt Processing
  • Form Parsing
  • Research Automation
  • Knowledge Base Construction
  • RAG Preprocessing
  • Markdown Conversion
  • Digital Archives

Hardware Recommendations

Recommended systems:

  • Apple M1 Pro / Max / Ultra
  • Apple M2 Pro / Max / Ultra
  • Apple M3 Series
  • Apple M4 Series

The compact 0.8B model is lightweight and runs comfortably on most Apple Silicon devices while benefiting from additional memory for larger documents and higher throughput.


About oQe6 Quantization

oQe6 is a sensitivity-aware mixed-precision quantization technique designed to preserve model quality while significantly reducing memory requirements.

Rather than assigning identical precision to every layer, oQe6 analyzes the sensitivity of individual modules and allocates higher precision only where it has the greatest impact.

Benefits include:

  • Better OCR accuracy retention
  • Improved document layout understanding
  • Lower RAM usage
  • Faster inference
  • Excellent Apple Silicon performance

Original Model

The original OvisOCR2 is an end-to-end document parsing model built upon Qwen3.5-0.8B.

Notable features include:

  • State-of-the-art document OCR
  • Markdown document generation
  • HTML table extraction
  • LaTeX formula recognition
  • Natural reading order
  • End-to-end architecture
  • Compact 0.8B model
  • Apache-2.0 license

For benchmark results, technical details, and training methodology, please visit the original repository. 2


Credits

Original Model

All credit for the original model, datasets, training methodology, evaluation, benchmarks, and research belongs entirely to:

ATH-MaaS

Original Repository:

https://huggingface.co/ATH-MaaS/OvisOCR2

Technical Report:

https://arxiv.org/abs/2607.13639


oQe6 MLX Quantized Release

This repository provides an Apple Silicon optimized oQe6 MLX quantized version of the original model.

No additional fine-tuning has been performed.


Acknowledgements

  • ATH-MaaS
  • Qwen Team
  • Apple MLX
  • Hugging Face
  • Transformers
  • vLLM
  • SGLang
  • MLX-VLM
  • oMLX
  • OptiQ Quantization

Citation

If you use this model in research, please cite the original OvisOCR2 paper:

@misc{lu2026ovisocr2,
  title        = {OvisOCR2 Technical Report},
  author       = {Shiyin Lu and Yinglun Li and Yu Xia and Yuhui Chen and An-Yang Ji and Jun-Peng Jiang and Qing-Guo Chen and Jianshan Zhao and En Lin and Haijun Li and Cheng Qin and Zhao Xu and Weihua Luo},
  year         = {2026},
  eprint       = {2607.13639},
  archivePrefix= {arXiv},
  primaryClass = {cs.CV}
}

License

This release inherits the Apache-2.0 license from the original model.

Please refer to the original repository for complete licensing information.


Disclaimer

This repository contains an optimized oQe6 MLX quantized conversion intended for efficient local inference on Apple Silicon.

All original model architecture, datasets, training methodology, benchmarks, evaluations, and research remain entirely the work of the original ATH-MaaS team. ````3

Downloads last month
50
Safetensors
Model size
0.3B params
Tensor type
BF16
·
U32
·
MLX
Hardware compatibility
Log In to add your hardware

6-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for yugeshkarunamurthy/OvisOCR2-oQ6e

Quantized
(17)
this model

Paper for yugeshkarunamurthy/OvisOCR2-oQ6e