Qianfan-OCR
- Structured output
- Open weights
Prices
1 offering · prices as listedQianfan-OCR| Conditions/ 1K tokens | Input | Output |
|---|---|---|
| Standard | ¥0.00045 | ¥0.0018 |
Prices from 百度智能云千帆:模型价格 (opens in a new tab) (checked Nov 1, 2026)
Standard: the price a request with no conditions pays (the headline price elsewhere on the site).
Details
- Output formats
- json
- Context
- 32K
- Max output
- 28K
- Model ID
Not stated on Baidu’s pages: input modalities, output modalities, file formats, max file size (mb), languages, licence.
Run locally
Weights: baidu/Qianfan-OCR- Parameters 4.7B
- Dense
- Native precision BF16
- Layers 36
- KV cache per token 144 KB
- Config positions 32K (config.json max_position_embeddings)
- API context 31K (maker’s API)
- Needs
- ≈ 10.5 GB (weights 8.8 (maker’s file) + KV cache 1.1 + overhead 0.5)
- Usable
- 21.6 GB (90% of its memory)
- Generation speed
- 47–71 tok/s
- Longest context
- 31K (the model’s limit)
- First token
- about 0.15–0.23 s for a 2K prompt
| Precision | Weights | Needs at 8K | On your hardware | Longest context |
|---|---|---|---|---|
| BF16 (native)maker’s file | 8.8 GB | ≈ 10.5 | ●Runs well 47–71 tok/s | 31K |
| Q8_0 | 4.7 GB | ≈ 6.3 | ●Runs well 81–121 tok/s | 31K |
| FP8 | 4.4 GB | ≈ 6.0 | ●Runs well 85–127 tok/s | 31K |
| Q6_K | 3.6 GB | ≈ 5.3 | ●Runs well 99–148 tok/s | 31K |
| Q5_K_M | 3.1 GB | ≈ 4.8 | ●Runs well 110–165 tok/s | 31K |
| Q5_0 | 3.0 GB | ≈ 4.7 | ●Runs well 113–169 tok/s | 31K |
| Q4_K_M | 2.7 GB | ≈ 4.3 | ●Runs well 123–185 tok/s | 31K |
| Q4_0 | 2.5 GB | ≈ 4.1 | ●Runs well 130–195 tok/s | 31K |
| IQ4_XS | 2.3 GB | ≈ 4.0 | ●Runs well 135–203 tok/s | 31K |
| Q3_K_Mquality drops | 2.2 GB | ≈ 3.8 | ●Runs well 143–214 tok/s | 31K |
| IQ3_XXSquality drops | 1.7 GB | ≈ 3.3 | ●Runs well 167–250 tok/s | 31K |
| Q2_Kquality drops | 1.7 GB | ≈ 3.3 | ●Runs well 169–253 tok/s | 31K |
| IQ2_XXSquality drops | 1.1 GB | ≈ 2.8 | ●Runs well 208–311 tok/s | 31K |
Click a row to choose a precision. “Maker’s file” sizes are the maker’s own files; others are parameters × bits per weight.
Compared with other hardware
Each at the highest precision it runs. Click one for details.
Smallest that runs it (Q4_K_M, 8K): GPU GeForce RTX 3080; unified memory Apple M5 · 16 GB.
Run commands
vllm serve baidu/Qianfan-OCR --max-model-len 8192
Memory to fine-tune
Batch 1, 2,048-token sequences, gradient checkpointing; LoRA and QLoRA train rank-16 adapters on the attention projections.
Estimates; facts from the maker’s Hugging Face repositories, as of 2026-11-06. How it’s estimated
Cited scores
From third-party leaderboards, not measured by usNo cited leaderboard covers OCR models yet. We will cite one when its license allows.
Changes
All changes →- Now priced on Baidu Qianfan, China Input ¥0.00045 · Output ¥0.0018
Sources
- 百度智能云千帆:模型列表in Chinese (opens in a new tab) cloud.baidu.com · checked Nov 1, 2026
- Qianfan-OCR:重新定义文档智能处理的4B参数端到端模型-百度开发者中心in Chinese (opens in a new tab) developer.baidu.com · checked Nov 3, 2026
- 百度智能云千帆:模型价格in Chinese (opens in a new tab) cloud.baidu.com · checked Nov 1, 2026
- baidu/Qianfan-OCR model card (opens in a new tab) huggingface.co · checked Nov 4, 2026
- baidu/Qianfan-OCR config.json (opens in a new tab) huggingface.co · checked Nov 3, 2026
- baidu/Qianfan-OCR files (opens in a new tab) huggingface.co · checked Oct 31, 2026
Baidu · China · cloud.baidu.com
Related models
Snapshots, the same family and other models from this provider