Instructions to use SandLogicTechnologies/LightOnOCR-2-1B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use SandLogicTechnologies/LightOnOCR-2-1B-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="SandLogicTechnologies/LightOnOCR-2-1B-GGUF", filename="LightOnOCR-2-1B-IQ3_M.gguf", )
llm.create_chat_completion( messages = "\"cats.jpg\"" )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use SandLogicTechnologies/LightOnOCR-2-1B-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/LightOnOCR-2-1B-GGUF:IQ3_M # Run inference directly in the terminal: llama cli -hf SandLogicTechnologies/LightOnOCR-2-1B-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/LightOnOCR-2-1B-GGUF:IQ3_M # Run inference directly in the terminal: llama cli -hf SandLogicTechnologies/LightOnOCR-2-1B-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/LightOnOCR-2-1B-GGUF:IQ3_M # Run inference directly in the terminal: ./llama-cli -hf SandLogicTechnologies/LightOnOCR-2-1B-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/LightOnOCR-2-1B-GGUF:IQ3_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf SandLogicTechnologies/LightOnOCR-2-1B-GGUF:IQ3_M
Use Docker
docker model run hf.co/SandLogicTechnologies/LightOnOCR-2-1B-GGUF:IQ3_M
- LM Studio
- Jan
- Ollama
How to use SandLogicTechnologies/LightOnOCR-2-1B-GGUF with Ollama:
ollama run hf.co/SandLogicTechnologies/LightOnOCR-2-1B-GGUF:IQ3_M
- Unsloth Studio
How to use SandLogicTechnologies/LightOnOCR-2-1B-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/LightOnOCR-2-1B-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/LightOnOCR-2-1B-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/LightOnOCR-2-1B-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use SandLogicTechnologies/LightOnOCR-2-1B-GGUF with Docker Model Runner:
docker model run hf.co/SandLogicTechnologies/LightOnOCR-2-1B-GGUF:IQ3_M
- Lemonade
How to use SandLogicTechnologies/LightOnOCR-2-1B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull SandLogicTechnologies/LightOnOCR-2-1B-GGUF:IQ3_M
Run and chat with the model
lemonade run user.LightOnOCR-2-1B-GGUF-IQ3_M
List all available models
lemonade list
LightOnOCR-2-1B
LightOnOCR-2-1B is a compact vision-language model developed by LightOn AI, designed for efficient optical character recognition, document understanding, and layout-aware text extraction. This repository contains GGUF quantized variants of the model optimized for efficient local inference using llama.cpp.
The model is specifically designed to recognize textual content while understanding document layout and visual context across scanned documents, forms, invoices, receipts, reports, books, and other document-centric images. Its lightweight architecture enables practical deployment on consumer hardware without sacrificing strong OCR capability.
The quantized formats significantly reduce memory requirements while preserving document understanding and text-recognition performance, making the model suitable for edge deployments and enterprise document-processing workflows.
Model Overview
- Model Name: LightOnOCR-2-1B
- Base Model: lightonai/LightOnOCR-2-1B
- Architecture: Vision-Language Model
- Parameter Count: Approximately 1 Billion Parameters
- Modalities: Text, Image
- Primary Languages: Multilingual
- Developer: LightOn AI
- License: Apache 2.0
Quantization Formats
This repository provides various GGUF quantized versions of the LightOnOCR-2-1B model optimized for efficient local inference using llama.cpp.
IQ3_M
- Size reduction of approx 72.06% (320.46 MB) compared to 16-bit (1.12 GB)
- Compact 3-bit quantization optimized for low-memory OCR inference
- Suitable for lightweight document digitization and text-extraction pipelines
- Enables efficient processing of invoices, forms, receipts, books, and scanned documents on resource-constrained hardware
- Recognition quality on dense layouts or visually challenging documents may be slightly reduced compared to higher-precision variants
IQ4_NL
- Size reduction of approx 68.18% (365.01 MB) compared to 16-bit (1.12 GB)
- Optimized 4-bit non-linear quantization designed to preserve OCR quality and layout understanding
- Recommended for production OCR systems requiring reliable document interpretation
- Maintains strong recognition consistency across structured and semi-structured document layouts
- May require slightly increased computational resources during inference
IQ4_XS
- Size reduction of approx 69.36% (352.17 MB) compared to 16-bit (1.12 GB)
- Balanced 4-bit quantization providing an effective compromise between memory efficiency and OCR accuracy
- Suitable for enterprise document digitization, archive processing, and intelligent text extraction
- Delivers dependable performance across a broad range of real-world document types
- Recommended for production deployments requiring efficient inference with stable recognition quality
Q6_K
- Size reduction of approx 58.91% (472.17 MB) compared to 16-bit (1.12 GB)
- Higher-precision 6-bit K-Quant format optimized for preserving OCR fidelity and document interpretation accuracy
- Better suited for multilingual OCR, dense document layouts, and structured information extraction
- Retains more of the original model's recognition capability compared to lower-bit variants
- Recommended when extraction quality is prioritized over maximum memory savings
Training Background (Original Model)
LightOnOCR-2-1B is trained with an emphasis on optical character recognition, document understanding, and multimodal visual-text alignment across a diverse collection of document images.
Pretraining
- Large-scale multimodal pretraining using document-centric image and text datasets
- Focus on OCR, layout understanding, and visual-text representation learning
- Optimized for downstream document analysis and text-extraction tasks
OCR Optimization
- Further optimized for document recognition and layout-aware information extraction
- Enhanced for processing forms, receipts, invoices, reports, and structured business documents
- Improved consistency across multilingual document understanding and OCR workflows
Key Capabilities
Optical Character Recognition (OCR) Extracts textual content from scanned documents, images, and visual media.
Document Understanding Interprets document structure and contextual relationships between textual elements.
Layout Analysis Understands page layouts, forms, tables, and structured document organization.
Structured Information Extraction Supports extraction of key information from business documents and forms.
Multilingual Document Processing Handles OCR and document understanding across multiple languages.
Efficient Local Deployment Quantized variants enable practical OCR inference on consumer hardware.
Usage Example
Using llama.cpp
./llama-mtmd-cli \
-m SandLogicTechnologies/LightOnOCR-2-1B_IQ4_NL.gguf \
--mmproj SandLogicTechnologies/lightonocr-2-1b.mmproj-f16.gguf \
--image receipt.png \
-p "Extract all structured information from this receipt."
Recommended Usecases
Document Digitization Convert scanned documents into searchable digital text.
Invoice & Receipt Processing Extract structured information from financial documents.
Form Processing Automate information extraction from structured business forms.
Enterprise OCR Systems Build efficient OCR-powered document processing pipelines.
Archive Digitization Process books, reports, and historical document collections.
Research & Evaluation Benchmark OCR, document understanding, and layout-aware extraction models.
Acknowledgments
These quantized models are based on the original work by the *LightOn AI- development team.
Special thanks to:
- The LightOn AI team for developing and releasing the LightOnOCR-2-1B model.
- *Georgi Gerganov- and the
llama.cppopen-source community for enabling efficient quantization and inference through 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
- 265
3-bit
4-bit
6-bit
Model tree for SandLogicTechnologies/LightOnOCR-2-1B-GGUF
Base model
lightonai/LightOnOCR-2-1B