Views
No views yet
07dea832), the 3.34B
DeepSeek-V2-style MoE OCR model ("one-shot long-horizon parsing"), validated against a BF16
baseline of the published checkpoint. All credit for the model belongs to Baidu; this repo changes
only the numeric precision of the text-decoder weights. Checkpoint size drops from 6.7 GB to
3.9 GB.FP8_DYNAMIC via llm-compressor —
per-channel FP8 weights, dynamic per-token FP8 activations, data-free. Only the DeepSeek-V2 MoE
text-decoder linears are quantized (2196 modules: 2112 routed-expert, 33 shared-expert/dense-MLP,
48 attention, 3 dense-layer). Everything the vision path depends on stays BF16:embed_tokens / lm_headtransformers + compressed-tensors.| BF16 | FP8-Dynamic (this repo) | |
|---|---|---|
| Mean CER vs BF16 | — | 0.0000 |
| invoice / memo / table CER | — | 0.0 / 0.0 / 0.0 |
| Decode throughput (tok/s, greedy) | 45.3 | 39.4 |
| Checkpoint size | 6.7 GB | 3.9 GB |
evidence/, produced by the
validation harness.quantization_config.ignore uses prefix-agnostic regex patterns — required for
vLLM to correctly skip the vision tower for quantization compatibility. Do not replace it with expanded
module names.1import torch
2from transformers import AutoModel, AutoTokenizer
3
4repo = "shadowrock-io/Unlimited-OCR-Community-FP8-Dynamic"
5tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
6model = AutoModel.from_pretrained(repo, trust_remote_code=True,
7 torch_dtype=torch.bfloat16, device_map="cuda").eval()
8text = model.infer(tok, prompt="<image>\n<|grounding|>OCR this image.",
9 image_file="document.png", output_path="./out",
10 base_size=1024, image_size=1024, crop_mode=False, eval_mode=True)evidence/.