How to use from
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 inclusionAI/ArmorOCR-GGUF:Q4_K_M
# Run inference directly in the terminal:
llama cli -hf inclusionAI/ArmorOCR-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 inclusionAI/ArmorOCR-GGUF:Q4_K_M
# Run inference directly in the terminal:
llama cli -hf inclusionAI/ArmorOCR-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-app
# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama serve -hf inclusionAI/ArmorOCR-GGUF:Q4_K_M
# Run inference directly in the terminal:
./build/bin/llama cli -hf inclusionAI/ArmorOCR-GGUF:Q4_K_M
Use Docker
docker model run hf.co/inclusionAI/ArmorOCR-GGUF:Q4_K_M
Quick Links

ArmorOCR-GGUF

Base model Code Paper License

This is the GGUF quantized release of ArmorOCR โ€” a two-stage framework for grounded adversarial OCR perception built on Qwen3-VL-8B-Instruct. It provides two quantization tiers, Q8_0 and Q4_K_M, for both the main model and its vision projector (mmproj), intended to be served with llama.cpp.

๐Ÿ“– For training details, the AdvSpot benchmark, and the full evaluation pipeline, please visit the GitHub repo.

Quickstart

Build llama.cpp with CUDA support, then serve a tier with llama-server + --mmproj:

# 1) Build llama.cpp (CUDA)
git clone https://github.com/ggml-org/llama.cpp && cd llama.cpp
cmake -B build -DGGML_CUDA=ON && cmake --build build --config Release
export LLAMA_BIN=$(pwd)/build/bin
pip install requests tqdm

# 2) Start the OpenAI-compatible server (Q8_0 here; use Q4_K_M likewise)
bash serve_gguf.sh Q8_0 8080
# 3) Run inference against the local server (mirrors the ArmorOCR quickstart)
import base64, requests

with open("path/to/image.png", "rb") as f:
    img_url = f"data:image/jpeg;base64,{base64.b64encode(f.read()).decode()}"

resp = requests.post("http://127.0.0.1:8080/v1/chat/completions", json={
    "model": "ArmorOCR-GGUF",
    "messages": [{"role": "user", "content": [
        {"type": "image_url", "image_url": {"url": img_url}},
        {"type": "text", "text": ("Please identify the text in the image. "
                                  "Put your reasoning inside <analyze></analyze> "
                                  "and your final recognized text inside <answer></answer>.")},
    ]}],
    "temperature": 0.0,
    "max_tokens": 1024,
}, timeout=600)
print(resp.json()["choices"][0]["message"]["content"])

serve_gguf.sh is included in this repo for convenience.

Evaluation on AdvSpot

Region-grounded VQA accuracy and IoU on the public AdvSpot release (383 images / 389 grounded VQA pairs). The two GGUF tiers were served with llama-server (llama.cpp build b12359) on an Apple M3 Pro (Metal), following the official evaluation recipe (serve_gguf.sh parameters, temperature 0). The base column reports the full-precision ArmorOCR results from the paper, measured on the same public release.

Category Sub-type base Q8_0 Q4_K_M
Spatial Manipulation Rotated Text 54.3 57.1 54.3
Mirrored Text 46.7 46.7 40.0
Tiny Text 57.1 62.9 57.1
Glyph Variation Stylized Text 26.7 26.7 23.3
Handwritten Text 46.7 53.3 53.3
Imaging Degradation Capture Artifacts 43.3 43.3 43.3
Post-processing 60.0 63.3 63.3
Contextual Blending Low Contrast 42.9 51.4 51.4
AIGC Fusion 82.9 82.9 80.0
Pattern Overlay 66.7 63.3 63.3
Visual Encoding Symbol Encoding 68.6 68.6 68.6
Dot Encoding 63.3 63.3 63.3
Line Encoding 54.3 54.3 57.1
Avg. Acc. 57.1 58.9 57.3
Avg. IoU 63.2 64.2 61.7

License

Released under the Apache License 2.0. Use is additionally subject to the license and acceptable-use policy of the base model Qwen/Qwen3-VL-8B-Instruct.

Citation

@misc{cao2026armorocrgroundedadversarialvisual,
      title={ArmorOCR: Grounded Adversarial Visual Perception via Observation-Transferred Self-Distillation}, 
      author={Linhan Cao and Siyuan Li and Jun Lan and Liangbo He and Guannan Li and Xiaolei Huang and Jun Jia and Shuheng Zhou and Huijia Zhu and Weiqiang Wang and Wei Sun},
      year={2026},
      eprint={2608.20122},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2608.20122}, 
}
Downloads last month
271
GGUF
Model size
8B params
Architecture
qwen3vl
Hardware compatibility
Log In to add your hardware

4-bit

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for inclusionAI/ArmorOCR-GGUF

Quantized
(3)
this model

Paper for inclusionAI/ArmorOCR-GGUF