Image-Text-to-Text
Transformers
Safetensors
PyTorch
English
dots_ocr
text-generation
text-generation-inference
OCR
VLM
Markdown
conversational
custom_code
Instructions to use strangervisionhf/dots.ocr-base-fix with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use strangervisionhf/dots.ocr-base-fix with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="strangervisionhf/dots.ocr-base-fix", trust_remote_code=True) messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("strangervisionhf/dots.ocr-base-fix", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use strangervisionhf/dots.ocr-base-fix with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "strangervisionhf/dots.ocr-base-fix" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "strangervisionhf/dots.ocr-base-fix", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/strangervisionhf/dots.ocr-base-fix
- SGLang
How to use strangervisionhf/dots.ocr-base-fix with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "strangervisionhf/dots.ocr-base-fix" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "strangervisionhf/dots.ocr-base-fix", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "strangervisionhf/dots.ocr-base-fix" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "strangervisionhf/dots.ocr-base-fix", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use strangervisionhf/dots.ocr-base-fix with Docker Model Runner:
docker model run hf.co/strangervisionhf/dots.ocr-base-fix
Update README.md
Browse files
README.md
CHANGED
|
@@ -9,3 +9,29 @@ Previously, inference with the model [[https://huggingface.co/rednote-hilab/dots
|
|
| 9 |
**Error loading dots-ocr model: Received a NoneType for argument 'video_processor', but a BaseVideoProcessor was expected.** in the latest Transformers versions.
|
| 10 |
|
| 11 |
This page, which includes the model weights and corrected configuration, fixed the issue and allowed Transformers inference to run smoothly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
**Error loading dots-ocr model: Received a NoneType for argument 'video_processor', but a BaseVideoProcessor was expected.** in the latest Transformers versions.
|
| 10 |
|
| 11 |
This page, which includes the model weights and corrected configuration, fixed the issue and allowed Transformers inference to run smoothly.
|
| 12 |
+
|
| 13 |
+
> [!note]
|
| 14 |
+
Last updated: 4:00 AM (IST), October 25, 2025.
|
| 15 |
+
|
| 16 |
+
> [!note]
|
| 17 |
+
The latest transformers version used as of the above date is `transformers==4.57.1` and the torch version `2.8.0+cu126`
|
| 18 |
+
|
| 19 |
+
## Quick Start with Transformers
|
| 20 |
+
|
| 21 |
+
> #### Install the required packages
|
| 22 |
+
|
| 23 |
+
```py
|
| 24 |
+
!pip install transformers torch torchvision gradio hf_xet \
|
| 25 |
+
huggingface_hub pillow accelerate peft \
|
| 26 |
+
matplotlib requests einops av sentencepiece\
|
| 27 |
+
transformers-stream-generator
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
> ### notebook login
|
| 31 |
+
|
| 32 |
+
```py
|
| 33 |
+
from huggingface_hub import notebook_login, HfApi
|
| 34 |
+
notebook_login()
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
> ### Run [app.py]
|