Instructions to use AnandSingh/hunyuanocr-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 AnandSingh/hunyuanocr-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 AnandSingh/hunyuanocr-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf AnandSingh/hunyuanocr-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf AnandSingh/hunyuanocr-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf AnandSingh/hunyuanocr-GGUF:Q4_K_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 AnandSingh/hunyuanocr-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf AnandSingh/hunyuanocr-GGUF:Q4_K_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 AnandSingh/hunyuanocr-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf AnandSingh/hunyuanocr-GGUF:Q4_K_M
Use Docker
docker model run hf.co/AnandSingh/hunyuanocr-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use AnandSingh/hunyuanocr-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AnandSingh/hunyuanocr-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": "AnandSingh/hunyuanocr-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/AnandSingh/hunyuanocr-GGUF:Q4_K_M
- Ollama
How to use AnandSingh/hunyuanocr-GGUF with Ollama:
ollama run hf.co/AnandSingh/hunyuanocr-GGUF:Q4_K_M
- Unsloth Studio
How to use AnandSingh/hunyuanocr-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 AnandSingh/hunyuanocr-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 AnandSingh/hunyuanocr-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for AnandSingh/hunyuanocr-GGUF to start chatting
- Docker Model Runner
How to use AnandSingh/hunyuanocr-GGUF with Docker Model Runner:
docker model run hf.co/AnandSingh/hunyuanocr-GGUF:Q4_K_M
- Lemonade
How to use AnandSingh/hunyuanocr-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull AnandSingh/hunyuanocr-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.hunyuanocr-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
HunyuanOCR GGUF
HunyuanOCR converted to GGUF format for inference with llama.cpp.
This is a quantization of Tencent's HunyuanOCR — a 1B parameter OCR expert Vision-Language Model. Native support was added in llama.cpp build b8670 (April 2026).
Model Architecture
| Component | Spec |
|---|---|
| Type | Vision-Language Model (VLM) |
| Parameters | ~1.12B |
| Text Model | hunyuan-dense, 24-layer decoder, 1024 dim, GQA (16Q/8KV) |
| Vision Encoder | 27-layer ViT, 1152 dim, perceiver-based projector |
| Features | xdrope RoPE, QK normalization, RMS norm, SiLU SwiGLU |
Files
| File | Size | Description |
|---|---|---|
HunyuanOCR-Q4_K_M.gguf |
339 MB | Text model — Q4_K_M quantized |
HunyuanOCR-Q8_0.gguf |
551 MB | Text model — Q8_0 quantized |
HunyuanOCR-F16.gguf |
1.0 GB | Text model — F16 (full precision) |
mmproj-HunyuanOCR-F16.gguf |
909 MB | Vision encoder (mmproj) — F16 required |
Usage
# Via Hugging Face (easiest)
llama-server -hf AnandSingh/hunyuanocr-GGUF
# Or locally
llama-server \
-m HunyuanOCR-Q4_K_M.gguf \
--mmproj mmproj-HunyuanOCR-F16.gguf
API request:
{
"messages": [
{
"role": "user",
"content": [
{ "type": "text", "text": "OCR" },
{ "type": "image_url", "image_url": { "url": "data:image/jpeg;base64,..." } }
]
}
]
}
Prompt Examples
| Task | Prompt |
|---|---|
| Text Spotting | 检测并识别图片中的文字,将文本坐标格式化输出。 |
| Document Parsing | 提取文档图片中正文的所有信息用markdown格式表示,其中页眉、页脚部分忽略,表格用html格式表达,文档中公式用latex格式表示,按照阅读顺序组织进行解析。 |
| Formula Recognition | 识别图片中的公式,用LaTeX格式表示。 |
| Table Extraction | 把图中的表格解析为 HTML。 |
| Translation | 先提取文字,再将文字内容翻译为英文。 |
Requirements
- llama.cpp build
b8670or later - macOS, Linux, or Windows
License
Licensed under the Tencent Hunyuan Community License Agreement.
Attribution
Original model by Tencent Hunyuan Vision Team. GGUF conversion is not affiliated with or endorsed by Tencent.
- Downloads last month
- 549
4-bit
8-bit
16-bit
Model tree for AnandSingh/hunyuanocr-GGUF
Base model
tencent/HunyuanOCR
ollama run hf.co/AnandSingh/hunyuanocr-GGUF: