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("mikoy92/Unlimited-OCR-4bit-mlx")
config = load_config("mikoy92/Unlimited-OCR-4bit-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)

Unlimited-OCR 4-bit MLX

This is a 4-bit affine MLX quantization of mikoy92/Unlimited-OCR-bf16-mlx, converted with mlx-vlm.

Quantization settings:

  • mode: affine
  • bits: 4
  • group size: 64
  • observed effective bits per weight during conversion: 5.883

Because this is a vision-language OCR model, mlx-vlm does not aggressively quantize every multimodal tensor; the effective bits-per-weight can be higher than exactly 4-bit.

Usage

pip install -U mlx-vlm

mlx_vlm.generate \
  --model mikoy92/Unlimited-OCR-4bit-mlx \
  --image /path/to/image.png \
  --prompt "Extract all readable text from this image." \
  --max-tokens 512 \
  --temperature 0

Validation

Before upload, this checkpoint was loaded locally with mlx_vlm.generate and produced OCR text/table output on a document-image smoke test.

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

4-bit

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

Model tree for mikoy92/Unlimited-OCR-4bit-mlx

Quantized
(2)
this model