Instructions to use HashNuke/indic-ocr-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use HashNuke/indic-ocr-mlx with MLX:
# 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("HashNuke/indic-ocr-mlx") config = load_config("HashNuke/indic-ocr-mlx") # 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) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
tags:
- mlx
- ocr
- indic
library_name: mlx-vlm
pipeline_tag: image-text-to-text
license: other
license_name: indic-open-model-license-1.0
license_link: https://huggingface.co/HashNuke/indic-ocr-mlx/blob/main/LICENSE.md
base_model: bodhan-ai/indic-ocr
IndicBlockOCR (MLX)
Built with IndicBlockOCR from Bodhan AI / AI4Bharat.
The recognition stage of IndicOCR (MLX): a Qwen3.5-0.8B fine-tune for transcribing text, equations, and tables from cropped document regions. The weights are BF16 (1.7 GB), not quantized.
Use an mlx-vlm checkout with indic_ocr support. Replace crop.png with an
image of a text region, not a complete multi-region page:
from pathlib import Path
from huggingface_hub import snapshot_download
from PIL import Image
from mlx_vlm import generate, load
from mlx_vlm.models.indic_ocr.processing_indic_ocr import area_clamp, prompt_for
from mlx_vlm.prompt_utils import apply_chat_template
root = Path(snapshot_download(
"HashNuke/indic-ocr-mlx", allow_patterns=["weights/ocr/*"]
))
model, processor = load(str(root / "weights/ocr"))
with Image.open("crop.png") as image:
crop = area_clamp(image.convert("RGB"))
prompt = apply_chat_template(
processor, model.config, prompt_for("Text"), num_images=1
)
result = generate(
model, processor, prompt, [crop],
max_tokens=2048, temperature=0.0, verbose=False,
)
print(result.text)
Use prompt_for("Equation") for LaTeX or prompt_for("Table") for HTML
tables. Greedy decoding (temperature=0.0) matches the default page pipeline.
The repository root is a two-stage wrapper: load("HashNuke/indic-ocr-mlx")
does not load this OCR stage. Use the local weights/ocr path above, or
IndicOCRParser.from_pretrained("HashNuke/indic-ocr-mlx") for complete pages,
as shown in the main model card.
The source weights are from bodhan-ai/indic-ocr under the Indic Open Model License v1.0.