Image-Text-to-Text
Safetensors
Transformers
English
Chinese
multilingual
dots_mocr
dots_ocr
text-generation
image-to-text
ocr
document-parse
layout
table
formula
custom_code
conversational
Eval Results
Instructions to use dots-studio/dots.mocr with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dots-studio/dots.mocr with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="dots-studio/dots.mocr", 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("dots-studio/dots.mocr", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use dots-studio/dots.mocr with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dots-studio/dots.mocr" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dots-studio/dots.mocr", "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/dots-studio/dots.mocr
- SGLang
How to use dots-studio/dots.mocr 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 "dots-studio/dots.mocr" \ --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": "dots-studio/dots.mocr", "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 "dots-studio/dots.mocr" \ --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": "dots-studio/dots.mocr", "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 dots-studio/dots.mocr with Docker Model Runner:
docker model run hf.co/dots-studio/dots.mocr
Commit History
-
Add MDPBench private evaluation result (#8)
- Add MDPBench private evaluation result (5d141aa1fb946c782124338ffcedb1323f5dbf22) - Repair MDPBench evaluation results (20e7f51819dbbc77b09ce29dcd7ddec9f7cb7883) Co-authored-by: Delores Lin <Delores-Lin@users.noreply.huggingface.co>e539fbb
-
Add ParseBench evaluation results (#5)
- Add ParseBench evaluation results (2d42ce5715ff0765648f6611d7e96e159bd0086b) Co-authored-by: boyang zhang <boyang-runllama@users.noreply.huggingface.co>6f8b484 -
Add MDPBench evaluation results (#3)
- Add MDPBench evaluation results (5054d93a4d91136716fba8ce0d1651568c0c0629) Co-authored-by: Delores Lin <Delores-Lin@users.noreply.huggingface.co>92a22a4
-
Add OlmOCRBench evaluation results (#1)
- Add OlmOCRBench evaluation results (32238a42a77e4b75a91f0bb22fda49866cef1dc5) Co-authored-by: Niels Rogge <nielsr@users.noreply.huggingface.co>f5a115b
-
Upload folder using huggingface_hub
Verified signaturec59816f -
initial commit
Verified signature474c21d