Instructions to use AbnerYang/donut-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AbnerYang/donut-model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="AbnerYang/donut-model")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("AbnerYang/donut-model") model = AutoModelForMultimodalLM.from_pretrained("AbnerYang/donut-model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AbnerYang/donut-model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AbnerYang/donut-model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AbnerYang/donut-model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AbnerYang/donut-model
- SGLang
How to use AbnerYang/donut-model 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 "AbnerYang/donut-model" \ --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": "AbnerYang/donut-model", "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 "AbnerYang/donut-model" \ --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": "AbnerYang/donut-model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use AbnerYang/donut-model with Docker Model Runner:
docker model run hf.co/AbnerYang/donut-model
Commit History
-
Training done
cfc1abd -
Training done
5791027 -
Training in progress, epoch 29
d394469 -
Training in progress, epoch 28
acf0acd -
Training in progress, epoch 27
b2c8f8a -
Training in progress, epoch 26
6bf4f18 -
Training in progress, epoch 25
b6fe528 -
Training in progress, epoch 24
2349307 -
Training in progress, epoch 23
385b4f7 -
Training in progress, epoch 22
509c740 -
Training in progress, epoch 21
66f9e63 -
Training in progress, epoch 20
cab4ece -
Training in progress, epoch 19
c3eef1b -
Training in progress, epoch 18
46d89cb -
Training in progress, epoch 17
6cc52f5 -
Training in progress, epoch 16
37be38f -
Training in progress, epoch 15
4d35810 -
Training in progress, epoch 14
ad37acc -
Training in progress, epoch 13
110454a -
Training in progress, epoch 12
07bfb46 -
Training in progress, epoch 11
9a4f3a0 -
Training in progress, epoch 10
0fdaf89 -
Training in progress, epoch 9
c8cf1d8 -
Training in progress, epoch 8
10513a9 -
Training in progress, epoch 7
446e0e0 -
Training in progress, epoch 6
99f22f5 -
Training in progress, epoch 5
bded34d -
Training in progress, epoch 4
3fa3521 -
Training in progress, epoch 3
2c89240 -
Training in progress, epoch 2
7421f17 -
Training in progress, epoch 1
746f18b -
Training in progress, epoch 0
b3b7d77 -
Training in progress, epoch 9
5e93bb1 -
Training in progress, epoch 8
cb7b506 -
Training in progress, epoch 7
1f7dd87 -
Training in progress, epoch 6
8aa3a68 -
Training in progress, epoch 5
0e482cb -
Training in progress, epoch 4
605fe01 -
Training in progress, epoch 3
6653e88 -
Training in progress, epoch 2
40557f7 -
Training in progress, epoch 1
25173e5 -
Training in progress, epoch 0
3fc2eba -
Training done
417bf0c -
Training done
d58b5d2 -
Training in progress, epoch 17
919c9c1 -
Training in progress, epoch 16
4bea628 -
Training in progress, epoch 15
2528d66 -
Training in progress, epoch 14
d65ada0 -
Training in progress, epoch 13
a725d38 -
Training in progress, epoch 12
ea5f650