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
Commit History
-
Update README.md
Verified signaturef036a7c
-
Update README.md
Verified signature37b608f -
Update README.md
Verified signature048d265 -
Update README.md
Verified signatureb962f2f
-
Update README.md
Verified signaturee481b41 -
Update README.md
Verified signature0c9986c -
Update README.md
Verified signature3e0b477 -
Update README.md
Verified signature8e44339 -
Update README.md
Verified signature8b4f0da
-
Update README.md
Verified signature54bdddc
-
Update README.md
Verified signature72ac785 -
Update README.md
Verified signature717e610 -
Update README.md
Verified signature9e2cae7 -
Update README.md
Verified signature4cd7d63 -
Update README.md
Verified signature9fb2711 -
update config (Adding the Attributes) (#1)
Verified signature- update config (Adding the Attributes) (c0cae42dcb497ec01e4624565cabda1defd65486)f3c6f63 -
Update README.md
Verified signature200ae8f -
Update README.md
Verified signature4c97f61 -
Update README.md
Verified signaturef6d8ced -
upload model
Verified signature3b45d14 -
Update README.md
Verified signature5c6a374 -
initial commit
Verified signature444af32