Instructions to use MohammadAminDHM/granite-docling-v2-500m-llama.cpp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use MohammadAminDHM/granite-docling-v2-500m-llama.cpp with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf MohammadAminDHM/granite-docling-v2-500m-llama.cpp:F16 # Run inference directly in the terminal: llama cli -hf MohammadAminDHM/granite-docling-v2-500m-llama.cpp:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf MohammadAminDHM/granite-docling-v2-500m-llama.cpp:F16 # Run inference directly in the terminal: llama cli -hf MohammadAminDHM/granite-docling-v2-500m-llama.cpp:F16
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf MohammadAminDHM/granite-docling-v2-500m-llama.cpp:F16 # Run inference directly in the terminal: ./build/bin/llama cli -hf MohammadAminDHM/granite-docling-v2-500m-llama.cpp:F16
Use Docker
docker model run hf.co/MohammadAminDHM/granite-docling-v2-500m-llama.cpp:F16
- Llama new
- LM Studio
- Jan
- vLLM
How to use MohammadAminDHM/granite-docling-v2-500m-llama.cpp with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MohammadAminDHM/granite-docling-v2-500m-llama.cpp" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MohammadAminDHM/granite-docling-v2-500m-llama.cpp", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/MohammadAminDHM/granite-docling-v2-500m-llama.cpp:F16
- Ollama
How to use MohammadAminDHM/granite-docling-v2-500m-llama.cpp with Ollama:
ollama run hf.co/MohammadAminDHM/granite-docling-v2-500m-llama.cpp:F16
- Unsloth Desktop
- Docker Model Runner
How to use MohammadAminDHM/granite-docling-v2-500m-llama.cpp with Docker Model Runner:
docker model run hf.co/MohammadAminDHM/granite-docling-v2-500m-llama.cpp:F16
- Lemonade
How to use MohammadAminDHM/granite-docling-v2-500m-llama.cpp with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull MohammadAminDHM/granite-docling-v2-500m-llama.cpp:F16
Run and chat with the model
lemonade run user.granite-docling-v2-500m-llama.cpp-F16
List all available models
lemonade list
- Atomic Chat
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf MohammadAminDHM/granite-docling-v2-500m-llama.cpp:F16# Run inference directly in the terminal:
llama cli -hf MohammadAminDHM/granite-docling-v2-500m-llama.cpp:F16Build from source code
git clone https://github.com/ggml-org/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-app# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama serve -hf MohammadAminDHM/granite-docling-v2-500m-llama.cpp:F16# Run inference directly in the terminal:
./build/bin/llama cli -hf MohammadAminDHM/granite-docling-v2-500m-llama.cpp:F16Use Docker
docker model run hf.co/MohammadAminDHM/granite-docling-v2-500m-llama.cpp:F16Granite Docling V2 500M โ GGUF for llama.cpp
GGUF conversions of ibm-granite/granite-docling-v2-500m for llama.cpp through mtmd.
Status: the architecture support lives in an open pull request, ggml-org/llama.cpp#33607, and is not part of an upstream release yet. Use a
llama.cppbuild from that branch (or a later commit once it is merged). The stock Ollama release does not load this architecture.
Files
| File | Size (bytes) | SHA-256 |
|---|---|---|
granite-docling-v2-500m-text-f16.gguf |
777612992 | be305baf06021053860d475bbe7f4f0839fec70033a294446aba5e064ee56022 |
granite-docling-v2-500m-text-Q4_K_M.gguf |
265754112 | 8c16fceb7ecbc41e797ba899e39b10eaffc3a20e3fddbb8dda30195b11313225 |
granite-docling-v2-500m-mmproj-f16.gguf |
347105600 | 45359a72a2a41de459999ff324708696d8dd4d90c71e7fc87ffcfb6c50546bcc |
The projector (mmproj) must be paired with one of the text models. It is kept at F16: low-bit quantization of the deepstack mergers is not recommended.
Usage
llama-mtmd-cli \
-m granite-docling-v2-500m-text-Q4_K_M.gguf \
--mmproj granite-docling-v2-500m-mmproj-f16.gguf \
--image page.png \
-p "<doclang>" \
-n 4096
<doclang> produces DocTag output; <doctag> and <otsl> are also accepted by the model.
Add --fine-route (LLAMA_ARG_FINE_ROUTE=1 for the server) to use the fine connector path.
Connector routes
The 500M checkpoint has two connector paths:
| Route | Scale factor | Tokens per 512 px tile | Flag |
|---|---|---|---|
| coarse | 4 | 64 | default |
| fine | 2 | 256 | --fine-route |
The checkpoint also ships a density router that predicts a route at inference time. It is a tiling heuristic, not part of the forward pass, and is not included in these GGUFs; pick the route explicitly with the flag above.
Conversion notes
- Converted with the converter from PR #33607 (
conversion/granite.py). - The
mtp.*speculative-decoding heads andmodel.density_router.*tensors are not included. The reference model does not loadmtp.*either (_keys_to_ignore_on_load_unexpected = [r"^mtp\."]). - Text model: 28 layers, 1024 hidden, vocabulary 133800,
embedding_multiplier = 12folded into the image embeddings. - Projector: 12-layer SigLIP-style tower with three deepstack taps (
[3, 7, 10]), coarse and fine mergers.
Verification
- Final embeddings fed to the decoder match the HF reference for both routes: coarse
64 x 4096and fine256 x 4096; base stream and all three deepstack streams have cosine similarity ~1.000000. - Both routes and both text quantizations were run on real document pages, including a Persian (RTL) page, producing coherent DocTag output.
License
Apache 2.0, following the base model.
- Downloads last month
- 1
4-bit
16-bit
Model tree for MohammadAminDHM/granite-docling-v2-500m-llama.cpp
Base model
ibm-granite/granite-4.0-350m-base
Install (macOS, Linux)
# Start a local OpenAI-compatible server with a web UI: llama serve -hf MohammadAminDHM/granite-docling-v2-500m-llama.cpp:F16# Run inference directly in the terminal: llama cli -hf MohammadAminDHM/granite-docling-v2-500m-llama.cpp:F16