Downloads · 30 days
383
13% of all-time downloads
jwindle47/chandra-ocr-2-8bit-mlx
chandra-ocr-2-8bit-mlx is a image-text-to-text model from jwindle47. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for mlx. The card lists the license as other.
This is an 8-bit MLX quantization of datalab-to/chandra-ocr-2, converted for efficient inference on Apple Silicon using the mlx-vlm framework.
Downloads · 30 days
383
13% of all-time downloads
All-time downloads
3K
Public
Parameters
4.5B
5.2 GB on disk
Likes
3
Trending 1
Click a slice to open those files.
.safetensors5.1 GB · 100%
How the weights are stored.
U324.2B · 93%
From the Hugging Face model README
This is an 8-bit MLX quantization of datalab-to/chandra-ocr-2, converted for efficient inference on Apple Silicon using the mlx-vlm framework.
Original model: datalab-to/chandra-ocr-2
Quantization: 8-bit affine, group size 64
Framework: MLX (Apple Silicon)
Modified files: The weight file (model.safetensors) has been quantized from the original bfloat16 weights. All other files are unchanged from the original repository.
Chandra 2 is a state-of-the-art OCR model from Datalab that outputs markdown, HTML, and JSON. It is highly accurate at extracting text from images and PDFs while preserving layout information.
pip install mlx-vlm
from mlx_vlm import load
from mlx_vlm.utils import generate_step
from PIL import Image
model, processor = load("jacobwindle/chandra-ocr-2-8bit-mlx")
image = Image.open("document.png")
prompt = "Convert this image to markdown."
output = generate_step(
model=model,
processor=processor,
image=image,
prompt=prompt,
max_tokens=4096,
)
print(output)
python -m mlx_vlm.generate --model jacobwindle/chandra-ocr-2-8bit-mlx --image document.png --prompt "Convert this image to markdown." --max-tokens 4096
| Parameter | Value |
|---|---|
| Bits | 8 |
| Group size | 64 |
| Mode | Affine |
| Original dtype | bfloat16 |
| Quantized size | ~4.8 GB |
Converted using:
python -m mlx_vlm.convert --model datalab-to/chandra-ocr-2 --mlx-path models/chandra-ocr-2-8bit -q --q-bits 8
This is a derivative work of datalab-to/chandra-ocr-2. The original model was created by Datalab. The weights in this repository have been modified (8-bit quantized) from the original release. All credit for the model architecture, training data, and original weights belongs to the original authors.
This model inherits the modified OpenRAIL-M license from the original datalab-to/chandra-ocr-2. As a derivative work, the same license terms apply, including the share-alike requirement (Section III, paragraph 8) and use-based restrictions (Attachment A).
Key restrictions from the original license:
For broader commercial licensing, see Datalab pricing.