Run this model with HF Jobs

Run inclusionAI/ArmorOCR on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/inclusionAI/ArmorOCR. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/inclusionAI/ArmorOCR on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/inclusionAI/ArmorOCR. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/inclusionAI/ArmorOCR. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

ArmorOCR

Code Paper License

ArmorOCR is a two-stage framework for grounded adversarial OCR perception built on Qwen3-VL-8B-Instruct. It enables single-pass inference on the original image, without any inference-time visual transformations or tool assistance.

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

Quickstart

pip install transformers==4.57.1 accelerate
from transformers import Qwen3VLForConditionalGeneration, AutoProcessor

model = Qwen3VLForConditionalGeneration.from_pretrained(
    "inclusionAI/ArmorOCR", dtype="auto", device_map="auto",
)
processor = AutoProcessor.from_pretrained("inclusionAI/ArmorOCR")

messages = [{
    "role": "user",
    "content": [
        {"type": "image", "image": "path/to/image.png"},
        {"type": "text",
         "text": ("Please identify the text in the image. "
                  "Put your reasoning inside <analyze></analyze> "
                  "and your final recognized text inside <answer></answer>.")},
    ],
}]

inputs = processor.apply_chat_template(
    messages, tokenize=True, add_generation_prompt=True,
    return_dict=True, return_tensors="pt",
).to(model.device)

out = model.generate(**inputs, max_new_tokens=256)
trimmed = [o[len(i):] for i, o in zip(inputs.input_ids, out)]
print(processor.batch_decode(trimmed, skip_special_tokens=True))

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
153
Safetensors
Model size
9B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for inclusionAI/ArmorOCR

Finetuned
(790)
this model
Quantizations
3 models

Space using inclusionAI/ArmorOCR 1

Paper for inclusionAI/ArmorOCR