Instructions to use Amani123/Donut with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Amani123/Donut with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Amani123/Donut")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("Amani123/Donut") model = AutoModelForMultimodalLM.from_pretrained("Amani123/Donut", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Amani123/Donut with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Amani123/Donut" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Amani123/Donut", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Amani123/Donut
- SGLang
How to use Amani123/Donut 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 "Amani123/Donut" \ --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": "Amani123/Donut", "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 "Amani123/Donut" \ --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": "Amani123/Donut", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Amani123/Donut with Docker Model Runner:
docker model run hf.co/Amani123/Donut
Commit History
-
Training done
a05736b -
Training done
6712871
-
Training done
1709062 -
Training done
ca2d229 -
Training done
b86361f -
Training done
f0dd42c
-
Training done
c7ee3e3 -
Training done
703705c -
Training in progress, epoch 18
e126f37 -
Training in progress, epoch 17
b8e4a7d -
Training in progress, epoch 16
a66d1be -
Training in progress, epoch 15
63b9dc0 -
Training in progress, epoch 14
dd9e1ea -
Training in progress, epoch 13
1c3317e -
Training in progress, epoch 12
74da58c -
Training in progress, epoch 11
7543fe0 -
Training in progress, epoch 10
31e9b63 -
Training in progress, epoch 9
3020721 -
Training in progress, epoch 8
dfdfa1d -
Training in progress, epoch 7
4d6f81a -
Training in progress, epoch 6
57845a7 -
Training in progress, epoch 5
4d6419b -
Training in progress, epoch 4
8ddf28b -
Training in progress, epoch 3
fb48b41 -
Training in progress, epoch 2
7b493e2 -
Training in progress, epoch 1
8bafed4 -
Training in progress, epoch 0
56b3c56 -
initial commit
eb73199