Instructions to use Humayoun/ThesisDonutOPD2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Humayoun/ThesisDonutOPD2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Humayoun/ThesisDonutOPD2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("Humayoun/ThesisDonutOPD2") model = AutoModelForMultimodalLM.from_pretrained("Humayoun/ThesisDonutOPD2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Humayoun/ThesisDonutOPD2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Humayoun/ThesisDonutOPD2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Humayoun/ThesisDonutOPD2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Humayoun/ThesisDonutOPD2
- SGLang
How to use Humayoun/ThesisDonutOPD2 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 "Humayoun/ThesisDonutOPD2" \ --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": "Humayoun/ThesisDonutOPD2", "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 "Humayoun/ThesisDonutOPD2" \ --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": "Humayoun/ThesisDonutOPD2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Humayoun/ThesisDonutOPD2 with Docker Model Runner:
docker model run hf.co/Humayoun/ThesisDonutOPD2
Commit History
-
End of training
61f524b -
Training in progress, epoch 5
a11ae8e -
Training in progress, epoch 4
b508825 -
Training in progress, epoch 3
ec22a8a -
Training in progress, epoch 2
fd430d2 -
Training in progress, epoch 1
2f5c18a -
End of training
f0b6134 -
Training in progress, epoch 10
94a40f3 -
Training in progress, epoch 9
97c3b36 -
Training in progress, epoch 8
5ede4dc -
Training in progress, epoch 7
b09cf64 -
Training in progress, epoch 6
047dc43 -
Training in progress, epoch 5
9d2b8bc -
Training in progress, epoch 4
c2f52ef -
Training in progress, epoch 3
754a3e4 -
Training in progress, epoch 2
4b5371a -
Training in progress, epoch 1
bfd987d -
Training in progress, epoch 1
8736d81 -
initial commit
acaca5a