You need to agree to share your Hugging Face information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

Qwen OCR Standalone FP8

Standalone Persian/Arabic text-line OCR model. The trained OCR LoRA adapter is already merged into the base weights. No separate adapter or base download is required. Do not apply the adapter again.

  • Base: Qwen/Qwen3.8-27B-FP8, revision 017b9c7af6b5689d5dd426a76e0bc077eb5ca20a.
  • Approximately 30.9 GB across 66 Safetensors shards.
  • FP8 E4M3 block-quantized weights with BF16 components and BF16 inference compute.
  • Merge: dequantize affected weights to FP32, add rank-16 LoRA updates (alpha 32), then requantize the 400 affected FP8 layers. The other 96 affected BF16 layers remain BF16. Untargeted tensor values are preserved.
  • merge_provenance.json records the export method, source revision, adapter hash and package versions. Its export-time quality status predates the evaluation below.

Evaluation

Evaluation on 2026-11-01 used the same 100 held-out Persian/Arabic text lines as the earlier BF16+LoRA evaluation: 3,150 reference characters and 609 words.

Metric Previous BF16 + LoRA Standalone FP8
CER (lower is better) 0.8889% 1.1111%
WER (lower is better) 2.7915% 3.1199%
Exact transcriptions 88/100 86/100
Valid JSON/schema responses 100/100 100/100

No incomplete responses or HTTP failures. CER uses Unicode codepoints; WER splits on whitespace. No normalization or transcription repair was applied, so spacing and combining-mark order differences count as errors. See evaluation_summary.json.

This is a pilot evaluation, not the full 164,995-line publisher Test split. Existing reference approvals have unspecified reviewer provenance. Source language labels are unspecified, so separate Persian and Arabic scores are unavailable. Runtime and precision also changed relative to the baseline; this does not isolate the effect of merging. Full-page layout analysis, language identification and broader multilingual quality were not validated.

Download and verify

For this private repository, authenticate with an account that has access:

hf auth login
hf download shbaydadaev/qwen-ocr-standalone-fp8 \
  --local-dir models/qwen-ocr-standalone-fp8
cd models/qwen-ocr-standalone-fp8
sha256sum -c SHA256SUMS
cd ../..

Serve

Tested using vLLM 0.32.0 on an NVIDIA RTX PRO 6000 Blackwell GPU with approximately 96 GB VRAM. GPU memory needs include activations, image tokens and KV cache in addition to weights; checkpoint disk size is not a VRAM requirement.

vllm serve models/qwen-ocr-standalone-fp8 \
  --served-model-name ocr \
  --dtype bfloat16 --quantization fp8 \
  --max-model-len 4096 --max-num-seqs 1 \
  --limit-mm-per-prompt '{"image":1,"video":0}' \
  --default-chat-template-kwargs '{"enable_thinking":false}' \
  --gpu-memory-utilization 0.60 --enforce-eager \
  --host 127.0.0.1 --port 8000

Send a cropped text-line image to POST /v1/chat/completions using "model": "ocr", temperature 0, max_tokens: 1024, and chat_template_kwargs: {"enable_thinking": false}. Include an image URL or base64 data URL in the user message alongside the prompt from ocr_prompt.txt; replace {width} and {height} with the actual image dimensions.

The training output is JSON with text-r001.original_text. Language/script fields may be und and should not be treated as reliable language identification. Validate JSON and check the finish reason before consuming a response. For full pages, detect/crop text lines and assemble their reading order separately.

Files and license

Model shards, configuration, tokenizer, preprocessing settings, chat template, merge provenance, OCR prompt and aggregate evaluation are included. Raw training/test images and annotations are not included. SHA256SUMS covers the release files other than itself.

The bundled source license is Apache 2.0; retain the license and attribution when redistributing. This checkpoint is a modified OCR derivative, not an official Qwen release.

Downloads last month
2
Safetensors
Model size
28B params
Tensor type
BF16
·
F8_E4M3
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for shbaydadaev/qwen-ocr-standalone-fp8

Base model

Qwen/Qwen3.8-27B
Finetuned
(9)
this model