Instructions to use tomfunk/donut-demo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tomfunk/donut-demo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="tomfunk/donut-demo")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("tomfunk/donut-demo") model = AutoModelForMultimodalLM.from_pretrained("tomfunk/donut-demo", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tomfunk/donut-demo with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tomfunk/donut-demo" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tomfunk/donut-demo", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tomfunk/donut-demo
- SGLang
How to use tomfunk/donut-demo 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 "tomfunk/donut-demo" \ --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": "tomfunk/donut-demo", "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 "tomfunk/donut-demo" \ --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": "tomfunk/donut-demo", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use tomfunk/donut-demo with Docker Model Runner:
docker model run hf.co/tomfunk/donut-demo
Commit History
-
Training done
ac20e79 -
Training done
2aaa989 -
Training in progress, epoch 1
6b1b9ef -
Training in progress, epoch 0
5d90657 -
Training in progress, epoch 16
62a7956 -
Training in progress, epoch 15
af8956c -
Training in progress, epoch 14
19596e7 -
Training in progress, epoch 13
67cf64f -
Training in progress, epoch 12
8070a9c -
Training in progress, epoch 11
d095c38 -
Training in progress, epoch 10
5692433 -
Training in progress, epoch 9
a798166 -
Training in progress, epoch 8
458f95d -
Training in progress, epoch 7
426a780 -
Training in progress, epoch 6
5ba1840 -
Training in progress, epoch 5
3169cbd -
Training in progress, epoch 4
beac23b -
Training in progress, epoch 3
bd518d8 -
Training in progress, epoch 2
cd87ae2 -
Training in progress, epoch 1
956c9c3 -
Training in progress, epoch 0
f00dfcc -
Training in progress, epoch 16
52fe230 -
Training in progress, epoch 15
1a03253 -
Training in progress, epoch 14
b7d3ecf -
Training in progress, epoch 13
27ded50 -
Training in progress, epoch 12
b20c192 -
Training in progress, epoch 11
d787da0 -
Training in progress, epoch 10
25d8b57 -
Training in progress, epoch 9
7188adc -
Training in progress, epoch 8
c886acf -
Training in progress, epoch 7
1270476 -
Training in progress, epoch 6
6dbd395 -
Training in progress, epoch 5
d2f7ae5 -
Training in progress, epoch 4
950f6ec -
Training in progress, epoch 3
bc0c2cb -
Training in progress, epoch 2
093505d -
Training in progress, epoch 1
828317d -
Training in progress, epoch 0
91a79e2 -
Training in progress, epoch 16
141c9ea -
Training in progress, epoch 15
1705f88 -
Training in progress, epoch 14
bcc1c24 -
Training in progress, epoch 13
3e9b264 -
Training in progress, epoch 12
30c343f -
Training in progress, epoch 11
76193a5
-
Training in progress, epoch 10
a991efc -
Training in progress, epoch 9
20031a1 -
Training in progress, epoch 8
dcfb6d1 -
Training in progress, epoch 7
824df2f -
Training in progress, epoch 6
05dc59e -
Training in progress, epoch 5
4a6c2d7