Instructions to use SandLogicTechnologies/chandra-ocr-2-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use SandLogicTechnologies/chandra-ocr-2-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="SandLogicTechnologies/chandra-ocr-2-GGUF", filename="chandra-ocr-2.mmproj-f16.gguf", )
llm.create_chat_completion( messages = "\"cats.jpg\"" )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use SandLogicTechnologies/chandra-ocr-2-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/chandra-ocr-2-GGUF:F16 # Run inference directly in the terminal: llama cli -hf SandLogicTechnologies/chandra-ocr-2-GGUF:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf SandLogicTechnologies/chandra-ocr-2-GGUF:F16 # Run inference directly in the terminal: llama cli -hf SandLogicTechnologies/chandra-ocr-2-GGUF:F16
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/chandra-ocr-2-GGUF:F16 # Run inference directly in the terminal: ./llama-cli -hf SandLogicTechnologies/chandra-ocr-2-GGUF:F16
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/chandra-ocr-2-GGUF:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf SandLogicTechnologies/chandra-ocr-2-GGUF:F16
Use Docker
docker model run hf.co/SandLogicTechnologies/chandra-ocr-2-GGUF:F16
- LM Studio
- Jan
- Ollama
How to use SandLogicTechnologies/chandra-ocr-2-GGUF with Ollama:
ollama run hf.co/SandLogicTechnologies/chandra-ocr-2-GGUF:F16
- Unsloth Studio
How to use SandLogicTechnologies/chandra-ocr-2-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/chandra-ocr-2-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/chandra-ocr-2-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/chandra-ocr-2-GGUF to start chatting
- Pi
How to use SandLogicTechnologies/chandra-ocr-2-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SandLogicTechnologies/chandra-ocr-2-GGUF:F16
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "SandLogicTechnologies/chandra-ocr-2-GGUF:F16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use SandLogicTechnologies/chandra-ocr-2-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SandLogicTechnologies/chandra-ocr-2-GGUF:F16
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default SandLogicTechnologies/chandra-ocr-2-GGUF:F16
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use SandLogicTechnologies/chandra-ocr-2-GGUF with Docker Model Runner:
docker model run hf.co/SandLogicTechnologies/chandra-ocr-2-GGUF:F16
- Lemonade
How to use SandLogicTechnologies/chandra-ocr-2-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull SandLogicTechnologies/chandra-ocr-2-GGUF:F16
Run and chat with the model
lemonade run user.chandra-ocr-2-GGUF-F16
List all available models
lemonade list
Chandra-OCR-2
Chandra-OCR-2 is a multimodal OCR-focused vision-language model designed for document understanding, text extraction, layout analysis, and structured information retrieval from visual documents. This repository contains GGUF quantized variants of the model optimized for efficient local inference using llama.cpp.
The model is specifically optimized for extracting and understanding textual content from documents, scanned pages, forms, tables, receipts, invoices, reports, and other document-centric visual inputs. Unlike general-purpose multimodal assistants, Chandra-OCR-2 focuses on high-quality optical character recognition and document intelligence workflows.
The quantized formats significantly reduce memory requirements while preserving OCR accuracy and document understanding capability, enabling practical deployment on consumer hardware and edge environments.
Model Overview
- Model Name: Chandra-OCR-2
- Base Model: datalab-to/chandra-ocr-2
- Architecture: Vision-Language Model
- Parameter Count: Approximately 4 Billion Parameters
- Modalities: Text, Image
- Languages: Multilingual
- Developer: DataLab
- License: Apache 2.0
Quantization Formats
This repository provides various GGUF quantized versions of the Chandra-OCR-2 model optimized for efficient local inference using llama.cpp. Below are the details of the available quantization formats.
IQ3_M
- Size reduction of approx 74.92% (2.32 GB) compared to 16-bit (9.25 GB)
- 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
- Fine-grained text extraction accuracy and complex document interpretation may experience reduced fidelity compared to higher-precision variants
IQ4_NL
- Size reduction of approx 69.30% (2.84 GB) compared to 16-bit (9.25 GB)
- Advanced 4-bit non-linear quantization designed to better preserve OCR quality and document understanding performance
- Better suited for document extraction, structured information retrieval, and layout-aware analysis 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 70.49% (2.73 GB) compared to 16-bit (9.25 GB)
- Balanced 4-bit quantization focused on efficient inference and dependable OCR performance
- Provides a practical balance between memory efficiency, extraction quality, and runtime speed
- Suitable for invoices, forms, receipts, reports, and general document-processing workflows
- Maintains stable performance across most practical OCR and document-understanding tasks
Q6_K
- Size reduction of approx 58.92% (3.80 GB) compared to 16-bit (9.25 GB)
- Higher-precision 6-bit K-Quant format designed to preserve OCR fidelity and document interpretation quality
- Better suited for demanding workloads involving dense documents, complex layouts, multilingual content, and structured extraction tasks
- Provides stronger output consistency and improved retention of the original model capabilities compared to lower-bit formats
- Requires higher memory resources but offers enhanced extraction quality and document-understanding performance
Training Background (Original Model)
Chandra-OCR-2 is trained with an emphasis on document intelligence, optical character recognition, layout understanding, and multimodal information extraction across a diverse range of document types.
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 and document-analysis workloads
Instruction Tuning
- Refined using document understanding and extraction-oriented datasets
- Enhanced for structured information retrieval and visual-text comprehension
- Improved consistency for OCR, layout reasoning, and document-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, and document metadata.
Multilingual Processing Handles multilingual document understanding and text extraction workflows including the Indic Languages.
Efficient Local Deployment Quantized variants enable practical OCR inference on consumer hardware.
Usage Example
Using llama.cpp
./llama-mtmd-cli \
-m SandlogicTechnologies/Chandra-OCR-2_IQ4_NL.gguf \
--mmproj SandlogicTechnologies/chandra-ocr-2.mmproj-f16.gguf \
--image invoice.png \
-p "Extract all invoice fields and return them in structured JSON format."
Recommended Usecases
Document Digitization Convert scanned documents into searchable and structured text.
Invoice and Receipt Processing Extract fields, totals, dates, and metadata from financial documents.
Form Processing Automate extraction of information from structured forms and applications.
Document Intelligence Systems Build OCR-powered enterprise document-processing workflows.
Research and Experimentation Evaluate OCR, layout understanding, and multimodal document-analysis techniques.
Acknowledgments
These quantized models are based on the original work by the DataLab development team.
Special thanks to:
The DataLab team for developing and releasing the Chandra-OCR-2 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
- 180
3-bit
4-bit
6-bit
Model tree for SandLogicTechnologies/chandra-ocr-2-GGUF
Base model
datalab-to/chandra-ocr-2