Instructions to use ivelin/donut-refexp-draft-precision2decs with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ivelin/donut-refexp-draft-precision2decs with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="ivelin/donut-refexp-draft-precision2decs")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("ivelin/donut-refexp-draft-precision2decs") model = AutoModelForMultimodalLM.from_pretrained("ivelin/donut-refexp-draft-precision2decs", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ivelin/donut-refexp-draft-precision2decs with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ivelin/donut-refexp-draft-precision2decs" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ivelin/donut-refexp-draft-precision2decs", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ivelin/donut-refexp-draft-precision2decs
- SGLang
How to use ivelin/donut-refexp-draft-precision2decs 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 "ivelin/donut-refexp-draft-precision2decs" \ --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": "ivelin/donut-refexp-draft-precision2decs", "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 "ivelin/donut-refexp-draft-precision2decs" \ --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": "ivelin/donut-refexp-draft-precision2decs", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ivelin/donut-refexp-draft-precision2decs with Docker Model Runner:
docker model run hf.co/ivelin/donut-refexp-draft-precision2decs
Commit History
-
Adding `safetensors` variant of this model
Verified signatureThis is an automated PR created with https://huggingface.co/spaces/safetensors/convert This new file is equivalent to `pytorch_model.bin` but safe in the sense that no arbitrary code can be put into it. These files also happen to load much faster than their pytorch counterpart: https://colab.research.google.com/github/huggingface/notebooks/blob/main/safetensors_doc/en/speed.ipynb The widgets on your model page will run using this model even if this is not merged making sure the file actually works. If you find any issues: please report here: https://huggingface.co/spaces/safetensors/convert/discussions Feel free to ignore this PR.69440eb
-
Upload model
36c79a7 -
Upload processor
835242b -
Upload model
ce439fb -
Upload processor
8b76ac9 -
Upload model
a66775c -
Upload processor
08817e4
-
Upload model
976893b -
Upload processor
cb23797 -
Upload model
8af029e -
Upload processor
51bbf30
-
Upload model
2ea1147 -
Upload processor
47cd10a -
Upload model
82fea6e -
Upload processor
7ed1eb4
-
Upload model
3acd45f -
Upload processor
b0175f1 -
Upload model
f182415 -
Upload processor
9ca63a4 -
Upload model
90ee1bc -
Upload processor
3a3d12f -
Upload model
003e452 -
Upload processor
3d5a912
-
Upload model
00b54ad -
Upload processor
11fe67d -
Upload model
129a09c -
Upload processor
d85b027 -
Upload model
feb5f66 -
Upload processor
b18f96b
-
Upload model
48639d6 -
Upload processor
0e39f87
-
Upload model
30602da -
Upload processor
8364cff
-
Upload model
ae4a11a -
Upload processor
f653e16 -
Upload model
86b16d2 -
Upload processor
378a0d1 -
initial commit
2cf4655