Instructions to use SandLogicTechnologies/granite-docling-258M-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use SandLogicTechnologies/granite-docling-258M-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="SandLogicTechnologies/granite-docling-258M-GGUF", filename="granite-docling-258M_IQ3_M.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use SandLogicTechnologies/granite-docling-258M-GGUF 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 SandLogicTechnologies/granite-docling-258M-GGUF:IQ3_M # Run inference directly in the terminal: llama cli -hf SandLogicTechnologies/granite-docling-258M-GGUF:IQ3_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf SandLogicTechnologies/granite-docling-258M-GGUF:IQ3_M # Run inference directly in the terminal: llama cli -hf SandLogicTechnologies/granite-docling-258M-GGUF:IQ3_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf SandLogicTechnologies/granite-docling-258M-GGUF:IQ3_M # Run inference directly in the terminal: ./llama-cli -hf SandLogicTechnologies/granite-docling-258M-GGUF:IQ3_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf SandLogicTechnologies/granite-docling-258M-GGUF:IQ3_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf SandLogicTechnologies/granite-docling-258M-GGUF:IQ3_M
Use Docker
docker model run hf.co/SandLogicTechnologies/granite-docling-258M-GGUF:IQ3_M
- LM Studio
- Jan
- Ollama
How to use SandLogicTechnologies/granite-docling-258M-GGUF with Ollama:
ollama run hf.co/SandLogicTechnologies/granite-docling-258M-GGUF:IQ3_M
- Unsloth Studio
How to use SandLogicTechnologies/granite-docling-258M-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for SandLogicTechnologies/granite-docling-258M-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for SandLogicTechnologies/granite-docling-258M-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for SandLogicTechnologies/granite-docling-258M-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use SandLogicTechnologies/granite-docling-258M-GGUF with Docker Model Runner:
docker model run hf.co/SandLogicTechnologies/granite-docling-258M-GGUF:IQ3_M
- Lemonade
How to use SandLogicTechnologies/granite-docling-258M-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull SandLogicTechnologies/granite-docling-258M-GGUF:IQ3_M
Run and chat with the model
lemonade run user.granite-docling-258M-GGUF-IQ3_M
List all available models
lemonade list
Granite-Docling-258M
Granite-Docling-258M is a compact vision-language document model developed by IBM, designed for OCR, document conversion, layout understanding, and structured content extraction workflows. This repository contains GGUF quantized variants of the model optimized for efficient local inference using llama.cpp.
The model specializes in transforming complex documents into machine-readable representations while preserving semantic structure, document hierarchy, tables, forms, equations, code blocks, and layout relationships. The quantized formats significantly reduce memory requirements while maintaining strong document-processing capabilities, enabling deployment on consumer hardware, edge devices, and enterprise document-processing pipelines.
Model Overview
- Model Name: Granite-Docling-258M
- Base Model: ibm-granite/granite-docling-258M
- Architecture: Multimodal Document Understanding Model
- Parameter Count: 258 Million
- Modalities: Text, Image
- Primary Languages: English
- Developer: IBM
- License: Apache 2.0
Quantization Formats
This repository provides various GGUF quantized versions of the Granite-Docling-258M model optimized for efficient local inference using llama.cpp. Below are the details of the available quantization formats.
IQ3_M
- Size reduction of approx 62.97% (117 MB) compared to 16-bit (316 MB)
- Aggressive 3-bit quantization optimized for maximum memory efficiency
- Suitable for lightweight OCR pipelines and low-memory deployment environments
- Enables practical execution of document-understanding workloads on consumer hardware
- Complex layouts, dense tables, mathematical content, and highly structured extraction tasks may experience reduced fidelity compared to higher-precision variants
IQ4_NL
- Size reduction of approx 62.34% (119 MB) compared to 16-bit (316 MB)
- Advanced 4-bit non-linear quantization designed to better preserve OCR quality and document understanding performance
- Better suited for structured document conversion, layout-aware analysis, and information extraction workflows
- Designed to reduce quantization loss compared to more aggressive formats
- May require slightly increased computational overhead during inference
IQ4_XS
- Size reduction of approx 62.66% (118 MB) compared to 16-bit (316 MB)
- Balanced 4-bit quantization focused on efficient inference and dependable document-processing performance
- Provides a practical balance between memory efficiency, extraction quality, and runtime speed
- Suitable for PDF conversion, OCR workflows, document digitization, and structured content extraction
- Maintains stable performance across most practical document-understanding tasks
Q6_K
- Size reduction of approx 48.42% (163 MB) compared to 16-bit (316 MB)
- Higher-precision 6-bit K-Quant format designed to preserve document structure recognition and extraction quality
- Better suited for demanding workloads involving complex layouts, tables, equations, technical documents, and dense visual content
- Provides stronger output consistency and improved retention of the original model capabilities compared to lower-bit formats
- Requires higher memory resources but offers enhanced document-conversion fidelity and structured extraction quality
Training Background (Original Model)
Granite-Docling-258M is trained with an emphasis on document intelligence, OCR, layout understanding, and structured document conversion across diverse document formats.
Pretraining
- Large-scale multimodal pretraining across document-centric image and text datasets
- Focus on text recognition, layout understanding, and document representation learning
- Optimized for downstream OCR, document conversion, and document-analysis workloads
Document Understanding Optimization
- Optimized for OCR, document parsing, and structured content extraction
- Enhanced for preserving document hierarchy, layout relationships, and semantic structure
- Improved performance on tables, forms, equations, code blocks, and technical documents
- Designed to generate structured document representations suitable for downstream processing workflows
Key Capabilities
Optical Character Recognition (OCR) Extracts textual information from scanned documents, images, and visual content.
Document Understanding Interprets document structure, context, and relationships between textual elements.
Layout Analysis Understands page layouts, sections, tables, forms, and structured document formats.
Structured Information Extraction Supports extraction of key-value pairs, fields, metadata, and document content.
Document Conversion Converts complex documents into structured machine-readable representations.
Efficient Local Deployment Quantized variants enable practical document-processing inference on consumer hardware.
Usage Example
Using llama.cpp
./llama-mtmd-cli \
-m SandlogicTechnologies/Granite-Docling-258M_IQ4_NL.gguf \
--mmproj SandlogicTechnologies/mmproj-granite-docling-258M-f16.gguf \
--image document.png \
-p "Extract all tables and convert the document into structured markdown."
Recommended Usecases
Document Digitization Convert scanned documents into searchable and structured formats.
OCR Pipelines Extract text from images, scanned pages, and document archives.
Structured Content Extraction Extract tables, forms, metadata, and key-value information from documents.
Enterprise Document Processing Automate large-scale document conversion and information retrieval workflows.
RAG Data Preparation Transform enterprise documents into structured formats suitable for retrieval systems.
Research and Experimentation Evaluate OCR, layout analysis, and document-understanding workflows.
Acknowledgments
These quantized models are based on the original work by the IBM Granite development team.
Special thanks to:
- The IBM team for developing and releasing the Granite-Docling-258M model.
- Georgi Gerganov and the
llama.cppopen-source community for enabling efficient quantization and inference via the GGUF format.
Contact
For questions, feedback, or support, please reach out at support@sandlogic.com or visit https://www.sandlogic.com/
- Downloads last month
- 137
3-bit
4-bit
6-bit
Model tree for SandLogicTechnologies/granite-docling-258M-GGUF
Base model
ibm-granite/granite-docling-258M