Granite Vision 5.0 4B — LayerFit MLX 4-bit

NetProjects conversion of IBM Granite Vision 5.0 4B for Apple Silicon. It uses LayerFit mixed-bit quantization at a 4-bit language-weight budget with the vision tower and projectors excluded from quantization, and retains IBM's chat template byte-for-byte. The weight file is 3.25 GB.

This is a chart and table specialist, not a full-document layout pipeline. Verify any extracted numbers before using them downstream.

Run a chart extraction

Tested with mlx-vlm==0.7.11, mlx==0.32.4, and transformers==5.20.0. In this environment the processor did not automatically pick up the external Jinja template, so the example passes it explicitly.

from pathlib import Path
from mlx_vlm import generate, load
from mlx_vlm.utils import get_model_path

path = Path(get_model_path("netprojects/Granite-Vision-5.0-4B-LayerFit-MLX-4bit"))
model, processor = load(str(path))
messages = [{"role": "user", "content": [
    {"type": "image"}, {"type": "text", "text": "<chart2csv>"}
]}]
prompt = processor.apply_chat_template(
    messages, chat_template=(path / "chat_template.jinja").read_text(),
    tokenize=False, add_generation_prompt=True,
)
result = generate(model, processor, prompt, image=["chart.jpg"],
                  temperature=0, max_tokens=1536, verbose=False)
print(result.text)

Use <tables_html> with a table image for HTML extraction.

Validation on Apple Silicon

  • Exact BF16 output matches on IBM's example chart-to-CSV and table-to-HTML samples.
  • 24 held-out ChartNet charts: 58.9% positional CSV cell accuracy, 4/24 exact, versus 54.4%, 4/24 exact for standard uniform 4-bit. One case was capped in each run. The mean is sensitive to alternate layouts: one chart's layout change accounts for most of the positional gain over uniform 4-bit. This is not IBM's published benchmark metric.
  • 12 FinTabNetQA financial-table questions: 9/12 exact, versus 8/12 for uniform 4-bit, MLX 6-bit, and BF16. This small sample does not establish a general quality advantage.
  • Peak MLX allocation on the chart run: 5.07 GB, versus 5.79 GB for 6-bit. This is not a minimum system RAM requirement.

This is the compact option. 6-bit remains the recommended default and 8-bit is the higher-precision option. For GGUF, use IBM's official builds.

Apache-2.0. Original checkpoint, processor, tokenizer and chat template by IBM Granite; MLX quantization by NetProjects. See LICENSE and IBM's model card for attribution.

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

Quantized

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

Model tree for netprojects/Granite-Vision-5.0-4B-LayerFit-MLX-4bit

Quantized
(6)
this model

Collections including netprojects/Granite-Vision-5.0-4B-LayerFit-MLX-4bit