Granite Docling v2 2B โ€” MLX 6-bit

NetProjects conversion of IBM Granite Docling v2 2B for Apple Silicon. The model converts page images to DocLang, with text, layout, tables, and formulas. Language weights use uniform 6-bit affine quantization with group size 64 where eligible; the vision path is not quantized. The main safetensors file is 2.35 GB. This package does not include an MTP drafter or custom executable model code.

Run with MLX-VLM

Tested with mlx-vlm==0.8.2, mlx==0.32.5, and docling-core==2.109.0. Set page.png to a local document image. The example uses plain greedy decoding.

from pathlib import Path
from mlx_vlm import generate, load
from mlx_vlm.prompt_utils import apply_chat_template
from docling_core.transforms.deserializer.doclang import DocLangDocDeserializer

model, processor = load("netprojects/Granite-Docling-v2-2B-MLX-6bit", trust_remote_code=False)
prompt = apply_chat_template(processor, model.config, "<doclang>", num_images=1)
result = generate(model, processor, prompt, image=["page.png"],
                  temperature=0, max_tokens=8192, verbose=False)
Path("page.doclang").write_text(result.text, encoding="utf-8")
if result.generation_tokens >= 8192:
    raise RuntimeError("Output reached the token limit; check for truncation.")
print(DocLangDocDeserializer().deserialize_str(result.text).export_to_markdown())

Local validation and limitations

  • On 12 financial-table crops, 11 had numeric reference cells. Plain 6-bit recovered 237/240 expected numeric cell values, with exact numeric multiset matches on 9/11 tables, tied with local BF16 and IBM's official 8-bit. The metric counts repeated values but does not check row or column placement. Plain 6-bit emitted 249 numeric values versus 243 for each baseline.
  • On separate synthetic fixtures, 6-bit retained both detected table spans, read 112 correctly where the tested 4- and 5-bit builds read 12, and extracted both formulas. It still interleaved two text columns, as both comparison baselines did. The merged-table output also repeated values under an extra Market row.
  • A separate 6-bit run with the upstream MTP head matched plain greedy output on 13/16 cases. Use plain decoding when reproducibility matters. Check important numbers, reading order, and table structure against the source image.
  • For a higher-precision option, see IBM's 8-bit MLX release.

Apache-2.0. Original checkpoint, tokenizer, processor, and template by IBM Granite; MLX conversion and quantization by NetProjects. Source revision: 1a542535d21bf6cc423f9b0fa96e94641b65217a. See LICENSE, NOTICE, and the upstream model card for attribution.

Downloads last month
-
Safetensors
Model size
2B params
Tensor type
U32
ยท
BF16
ยท
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 netprojects/Granite-Docling-v2-2B-MLX-6bit

Collection including netprojects/Granite-Docling-v2-2B-MLX-6bit