Instructions to use richardyoung/WeVisDoc-4B-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 richardyoung/WeVisDoc-4B-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 richardyoung/WeVisDoc-4B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf richardyoung/WeVisDoc-4B-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 richardyoung/WeVisDoc-4B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf richardyoung/WeVisDoc-4B-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 richardyoung/WeVisDoc-4B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf richardyoung/WeVisDoc-4B-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 richardyoung/WeVisDoc-4B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf richardyoung/WeVisDoc-4B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/richardyoung/WeVisDoc-4B-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use richardyoung/WeVisDoc-4B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "richardyoung/WeVisDoc-4B-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": "richardyoung/WeVisDoc-4B-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/richardyoung/WeVisDoc-4B-GGUF:Q4_K_M
- Ollama
How to use richardyoung/WeVisDoc-4B-GGUF with Ollama:
ollama run hf.co/richardyoung/WeVisDoc-4B-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use richardyoung/WeVisDoc-4B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf richardyoung/WeVisDoc-4B-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "richardyoung/WeVisDoc-4B-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use richardyoung/WeVisDoc-4B-GGUF with Docker Model Runner:
docker model run hf.co/richardyoung/WeVisDoc-4B-GGUF:Q4_K_M
- Lemonade
How to use richardyoung/WeVisDoc-4B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull richardyoung/WeVisDoc-4B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.WeVisDoc-4B-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use richardyoung/WeVisDoc-4B-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 richardyoung/WeVisDoc-4B-GGUF:Q4_K_M
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 richardyoung/WeVisDoc-4B-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use richardyoung/WeVisDoc-4B-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf richardyoung/WeVisDoc-4B-GGUF:Q4_K_M
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 "richardyoung/WeVisDoc-4B-GGUF:Q4_K_M" \ --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"
WeVisDoc-4B (GGUF)
GGUF quantizations of tencent/WeVisDoc-4B — Tencent's 4B WeVisDoc, an end-to-end document parser fine-tuned from Qwen3-VL that turns a page image into structured Markdown, with LaTeX formulas and HTML tables — optimized for local inference with llama.cpp and Ollama, with its vision projector. All quants use an importance matrix.
Quick Start
With Ollama
ollama run richardyoung/wevisdoc-4b
# or straight from Hugging Face
ollama run hf.co/richardyoung/WeVisDoc-4B-GGUF:Q4_K_M
With llama.cpp
huggingface-cli download richardyoung/WeVisDoc-4B-GGUF \
--include "*Q4_K_M*" "mmproj*" --local-dir ./models
./llama-mtmd-cli -m ./models/WeVisDoc-4B-Q4_K_M.gguf \
--mmproj ./models/mmproj-WeVisDoc-4B-F16.gguf \
--image page.png -p "Parse this document page into Markdown."
Prompts: send a page image and ask for Markdown (e.g. Parse this document page into Markdown.). Tencent's own client and its exact prompt are in the WeVisDoc repository.
Why This Model?
- OmniDocBench v1.6 Overall 95.38, first among the end-to-end parsers Tencent compared
- Page image in, Markdown out: formulas as LaTeX, tables as HTML
- English and Chinese
- Apache-2.0
Use Cases
- Converting scanned pages and PDFs (rendered to images) into Markdown
- Formula-heavy papers (LaTeX output)
- Tables to HTML for RAG pipelines
Available Quantizations
| File | Size | Use Case |
|---|---|---|
WeVisDoc-4B-IQ3_M.gguf |
2.1 GB | Smallest |
WeVisDoc-4B-IQ4_XS.gguf |
2.5 GB | Great quality-size balance |
WeVisDoc-4B-Q4_K_M.gguf |
2.7 GB | Recommended — good balance |
WeVisDoc-4B-Q5_K_M.gguf |
3.2 GB | Higher quality |
WeVisDoc-4B-Q6_K.gguf |
3.6 GB | Very high quality |
WeVisDoc-4B-Q8_0.gguf |
4.7 GB | Near-lossless |
mmproj-WeVisDoc-4B-F16.gguf |
0.84 GB | Vision projector (required for images) |
WeVisDoc-4B-imatrix.gguf |
– | Importance matrix used for the quants (calibration_datav3) |
Verified
Tested through Ollama before upload (Q4_K_M and Q8_0) on a synthetic invoice with the prompt Parse this document page into Markdown.; Q4_K_M returned: '## INVOICE 4471 / Date: 2026-09-28 / Widgets x3 ..... $42.00 / TOTAL: $86.20'.
Also Available
- WeVisDoc-2B GGUF — smaller and faster
Other Models by richardyoung
- New Heretic models (reproducible, listed in the Heretic Grimoire): LFM2.5-1.2B | Granite-4.2-3B | Granite-4.2-8B | Olmo-3-7B-Think | Phi-4-mini | DeepSeek-R1-0528-Qwen3-8B | Agents-A1-4B | FrogNano-4B
- Abliterated/Uncensored models: Qwen2.5-7B | Qwen3-14B | DeepSeek-R1-32B | Qwen3-8B
- OCR & Vision: MiniCPM-V-4.6 GGUF | dots.mocr GGUF | Unlimited-OCR GGUF | olmOCR GGUF | LightOnOCR-3-4B GGUF | WeVisDoc-4B GGUF | Xiaomi-OCR-0 GGUF
- MLX quantizations (Apple Silicon): Kimi-K2 series | olmOCR MLX
- Healthcare/Medical: Synthea 575K patients dataset | CardioEmbed
- Research: LLM Instruction-Following Evaluation (arxiv:2510.18892)
Built & maintained by Richard Young · DeepNeuro
- Downloads last month
- 654
Model tree for richardyoung/WeVisDoc-4B-GGUF
Base model
tencent/WeVisDoc-4B