Image-Text-to-Text
GGUF
qwen2_vl
vision
ocr
document-analysis
multimodal
qwen2vl
lm-studio
conversational
Instructions to use dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF 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 dinhquangson/MonkeyOCR-pro-1.2B-Vision-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 dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF # Run inference directly in the terminal: llama cli -hf dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF # Run inference directly in the terminal: llama cli -hf dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF
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 dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF # Run inference directly in the terminal: ./llama-cli -hf dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF
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 dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF # Run inference directly in the terminal: ./build/bin/llama-cli -hf dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF
Use Docker
docker model run hf.co/dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF
- LM Studio
- Jan
- vLLM
How to use dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF", "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/dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF
- Ollama
How to use dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF with Ollama:
ollama run hf.co/dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF
- Unsloth Studio
How to use dinhquangson/MonkeyOCR-pro-1.2B-Vision-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 dinhquangson/MonkeyOCR-pro-1.2B-Vision-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 dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF to start chatting
- Pi
How to use dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF
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": "dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use dinhquangson/MonkeyOCR-pro-1.2B-Vision-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 dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF
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 dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF with Docker Model Runner:
docker model run hf.co/dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF
- Lemonade
How to use dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull dinhquangson/MonkeyOCR-pro-1.2B-Vision-GGUF
Run and chat with the model
lemonade run user.MonkeyOCR-pro-1.2B-Vision-GGUF-{{QUANT_TAG}}List all available models
lemonade list
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,119 +1,118 @@
|
|
| 1 |
---
|
| 2 |
-
language:
|
| 3 |
-
- en
|
| 4 |
-
- zh
|
| 5 |
license: apache-2.0
|
| 6 |
-
library_name: transformers
|
| 7 |
tags:
|
| 8 |
- vision
|
| 9 |
- ocr
|
| 10 |
-
- multimodal
|
| 11 |
-
- text-recognition
|
| 12 |
- document-analysis
|
|
|
|
|
|
|
| 13 |
- gguf
|
| 14 |
-
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
| 18 |
pipeline_tag: image-text-to-text
|
| 19 |
---
|
| 20 |
|
| 21 |
-
# MonkeyOCR
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
-
##
|
| 26 |
|
| 27 |
-
|
| 28 |
-
- **
|
| 29 |
-
- **
|
| 30 |
-
- **Large Context**: 128,000 token context length
|
| 31 |
-
- **Architecture**: Based on Qwen2.5-VL
|
| 32 |
|
| 33 |
-
##
|
|
|
|
|
|
|
| 34 |
|
| 35 |
-
|
| 36 |
-
- **Parameters**: 1.2B
|
| 37 |
-
- **Quantization**: Q8_0
|
| 38 |
-
- **File Size**: ~1.3GB
|
| 39 |
-
- **Context Length**: 128,000 tokens
|
| 40 |
-
- **Vision Support**: β
Enabled
|
| 41 |
|
| 42 |
-
##
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
| Vision Support | Yes |
|
| 50 |
-
| OCR Optimized | Yes |
|
| 51 |
-
| Context Length | 128K tokens |
|
| 52 |
-
| File Format | GGUF |
|
| 53 |
|
| 54 |
-
##
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
-
|
| 57 |
|
| 58 |
-
###
|
| 59 |
-
```
|
| 60 |
-
|
| 61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
```
|
| 63 |
|
| 64 |
-
###
|
| 65 |
-
```
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
# Load the model
|
| 69 |
-
llm = Llama(
|
| 70 |
-
model_path="MonkeyOCR-pro-1.2B-Recognition.gguf",
|
| 71 |
-
chat_format="qwen2vl",
|
| 72 |
-
n_ctx=2048,
|
| 73 |
-
verbose=False
|
| 74 |
-
)
|
| 75 |
-
|
| 76 |
-
# Use with image
|
| 77 |
-
response = llm.create_chat_completion(
|
| 78 |
-
messages=[{
|
| 79 |
-
"role": "user",
|
| 80 |
-
"content": [
|
| 81 |
-
{"type": "text", "text": "What text do you see in this image?"},
|
| 82 |
-
{"type": "image_url", "image_url": {"url": "path/to/your/image.jpg"}}
|
| 83 |
-
]
|
| 84 |
-
}]
|
| 85 |
-
)
|
| 86 |
```
|
| 87 |
|
| 88 |
-
##
|
| 89 |
|
| 90 |
-
- **
|
| 91 |
-
- **
|
| 92 |
-
- **
|
| 93 |
-
- **
|
| 94 |
-
- **
|
| 95 |
-
- **
|
| 96 |
|
| 97 |
-
##
|
| 98 |
|
| 99 |
-
|
| 100 |
-
-
|
| 101 |
-
-
|
|
|
|
|
|
|
| 102 |
|
| 103 |
-
##
|
| 104 |
|
| 105 |
-
- **
|
| 106 |
-
- **
|
| 107 |
-
- **
|
| 108 |
-
- **
|
| 109 |
-
- **Special Tokens**: Image token (151665), Video token (151656)
|
| 110 |
|
| 111 |
## π License
|
| 112 |
|
| 113 |
-
|
| 114 |
|
| 115 |
## π Credits
|
| 116 |
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
-
|
|
|
|
|
|
|
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
| 2 |
license: apache-2.0
|
|
|
|
| 3 |
tags:
|
| 4 |
- vision
|
| 5 |
- ocr
|
|
|
|
|
|
|
| 6 |
- document-analysis
|
| 7 |
+
- multimodal
|
| 8 |
+
- qwen2vl
|
| 9 |
- gguf
|
| 10 |
+
- lm-studio
|
| 11 |
+
model_type: vision-language
|
| 12 |
+
architecture: qwen2vl
|
| 13 |
+
quantization: q8_0
|
| 14 |
+
languages:
|
| 15 |
+
- en
|
| 16 |
+
- zh
|
| 17 |
pipeline_tag: image-text-to-text
|
| 18 |
---
|
| 19 |
|
| 20 |
+
# MonkeyOCR-pro-1.2B Vision GGUF
|
| 21 |
+
|
| 22 |
+
A high-performance **vision-language model** specialized for **Optical Character Recognition (OCR)** and **document analysis**. This repository contains GGUF format models optimized for both general use and **LM Studio** compatibility.
|
| 23 |
+
|
| 24 |
+
## π― Model Capabilities
|
| 25 |
|
| 26 |
+
- β
**Vision-Language Processing**: Understand and process images with text
|
| 27 |
+
- β
**OCR (Optical Character Recognition)**: Extract text from images and documents
|
| 28 |
+
- β
**Document Structure Analysis**: Analyze layout, tables, and formatting
|
| 29 |
+
- β
**Multi-turn Conversations**: Chat about images and documents
|
| 30 |
+
- β
**Multiple Languages**: Support for English, Chinese, and more
|
| 31 |
|
| 32 |
+
## π Files Included
|
| 33 |
|
| 34 |
+
### Standard GGUF Models
|
| 35 |
+
- **`MonkeyOCR-pro-1.2B-Recognition.gguf`** (1.26 GB) - Complete vision-enabled model
|
| 36 |
+
- **`MonkeyOCR-pro-1.2B.gguf`** (1.26 GB) - Alternative version
|
|
|
|
|
|
|
| 37 |
|
| 38 |
+
### LM Studio Optimized
|
| 39 |
+
- **`MonkeyOCR-pro-1.2B-Text-LMStudio.gguf`** (1.23 GB) - Text model for LM Studio
|
| 40 |
+
- **`mmproj-MonkeyOCR-pro-1.2B-Vision-LMStudio.gguf`** (1.25 GB) - Vision projection for LM Studio
|
| 41 |
|
| 42 |
+
## π¨ LM Studio Setup (Recommended)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
+
### Step 1: Download Files
|
| 45 |
+
Download both LM Studio files:
|
| 46 |
+
- `MonkeyOCR-pro-1.2B-Text-LMStudio.gguf`
|
| 47 |
+
- `mmproj-MonkeyOCR-pro-1.2B-Vision-LMStudio.gguf`
|
| 48 |
|
| 49 |
+
### Step 2: Install in LM Studio
|
| 50 |
+
1. Copy both files to your LM Studio models directory
|
| 51 |
+
2. Keep them in the same folder
|
| 52 |
+
3. Open LM Studio and load the text model: `MonkeyOCR-pro-1.2B-Text-LMStudio.gguf`
|
| 53 |
+
4. LM Studio will automatically detect and load the vision projection
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
+
### Step 3: Enable Vision
|
| 56 |
+
1. Start a new chat session
|
| 57 |
+
2. Look for the camera/image icon in the chat interface
|
| 58 |
+
3. Upload an image and start asking questions!
|
| 59 |
|
| 60 |
+
## π§ Usage Examples
|
| 61 |
|
| 62 |
+
### OCR Tasks
|
| 63 |
+
```
|
| 64 |
+
User: [uploads image] Extract all text from this document
|
| 65 |
+
Assistant: I can see text in the image. Here's what I extracted:
|
| 66 |
+
[Provides accurate OCR results]
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
### Document Analysis
|
| 70 |
+
```
|
| 71 |
+
User: [uploads form] Analyze the structure of this form
|
| 72 |
+
Assistant: This appears to be a [form type] with the following structure:
|
| 73 |
+
- Header section with title
|
| 74 |
+
- Main content area with fields for...
|
| 75 |
+
- Footer with signature area
|
| 76 |
```
|
| 77 |
|
| 78 |
+
### Vision Q&A
|
| 79 |
+
```
|
| 80 |
+
User: [uploads chart] What does this chart show?
|
| 81 |
+
Assistant: This chart displays [detailed analysis of the visual content]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
```
|
| 83 |
|
| 84 |
+
## βοΈ Technical Specifications
|
| 85 |
|
| 86 |
+
- **Architecture**: Qwen2.5-VL (qwen2vl)
|
| 87 |
+
- **Model Size**: 1.2B parameters
|
| 88 |
+
- **Quantization**: Q8_0 (8-bit)
|
| 89 |
+
- **Context Length**: 8,196 tokens
|
| 90 |
+
- **Vision Encoder**: CLIP-based projection
|
| 91 |
+
- **Input Support**: Images, text, multimodal conversations
|
| 92 |
|
| 93 |
+
## π§ Configuration Details
|
| 94 |
|
| 95 |
+
The model includes proper vision token configuration:
|
| 96 |
+
- Image Token ID: 151655 (`<|image_pad|>`)
|
| 97 |
+
- Video Token ID: 151656 (`<|video_pad|>`)
|
| 98 |
+
- Vision Start: 151652 (`<|vision_start|>`)
|
| 99 |
+
- Vision End: 151653 (`<|vision_end|>`)
|
| 100 |
|
| 101 |
+
## π Performance
|
| 102 |
|
| 103 |
+
- **Fast inference** with Q8_0 quantization
|
| 104 |
+
- **High accuracy** OCR capabilities
|
| 105 |
+
- **Efficient memory usage** (~1.2-1.3 GB VRAM)
|
| 106 |
+
- **Multi-language support** for global documents
|
|
|
|
| 107 |
|
| 108 |
## π License
|
| 109 |
|
| 110 |
+
Apache 2.0 - Free for commercial and research use
|
| 111 |
|
| 112 |
## π Credits
|
| 113 |
|
| 114 |
+
Based on the MonkeyOCR model architecture with optimizations for GGUF format and LM Studio compatibility.
|
| 115 |
+
|
| 116 |
+
---
|
| 117 |
+
|
| 118 |
+
**For best vision performance, use the LM Studio optimized files!** π―
|