Instructions to use singhsays/donut-base-w2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use singhsays/donut-base-w2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="singhsays/donut-base-w2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("singhsays/donut-base-w2") model = AutoModelForMultimodalLM.from_pretrained("singhsays/donut-base-w2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use singhsays/donut-base-w2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "singhsays/donut-base-w2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "singhsays/donut-base-w2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/singhsays/donut-base-w2
- SGLang
How to use singhsays/donut-base-w2 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 "singhsays/donut-base-w2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "singhsays/donut-base-w2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "singhsays/donut-base-w2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "singhsays/donut-base-w2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use singhsays/donut-base-w2 with Docker Model Runner:
docker model run hf.co/singhsays/donut-base-w2
Commit History
-
Training in progress, epoch 3
af5b8aa -
Training in progress, epoch 2
9b2f43c -
Training in progress, epoch 1
1a84a8a -
Training done
a398797 -
Training done
2dc8347 -
Training in progress, epoch 4
0ffe47b -
Training in progress, epoch 0
4d887f0 -
Training in progress, epoch 3
d7b8c4f -
Training in progress, epoch 2
54e5554 -
Training in progress, epoch 1
18802d1 -
Training in progress, epoch 0
644e33f -
Training in progress, epoch 1
ce0d178
-
Training in progress, epoch 0
6fe482a -
Training done
93e3b1c -
Training done
5520020 -
Training in progress, epoch 4
6d4b77c -
Training in progress, epoch 3
eca5898 -
Training in progress, epoch 2
ab83a76 -
Training in progress, epoch 1
fe3ce5a -
Training in progress, epoch 0
cbcb3a3 -
Training done
7cc3780 -
Training done
8b7ad1d -
Training in progress, epoch 2
ad6dc72 -
Training in progress, epoch 1
5ae29c7 -
Training in progress, epoch 0
f6d1e04
-
update model card README.md
988db63 -
End of training
c9eef42 -
Training in progress, epoch 3
2de0d57 -
Training in progress, epoch 2
787496c -
Training in progress, epoch 1
98f35ce
-
Training in progress, epoch 1
06d720f -
initial commit
0ebac51