Instructions to use jeongho99/donut-docvqa-demo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jeongho99/donut-docvqa-demo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="jeongho99/donut-docvqa-demo")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("jeongho99/donut-docvqa-demo") model = AutoModelForMultimodalLM.from_pretrained("jeongho99/donut-docvqa-demo") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jeongho99/donut-docvqa-demo with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jeongho99/donut-docvqa-demo" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jeongho99/donut-docvqa-demo", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/jeongho99/donut-docvqa-demo
- SGLang
How to use jeongho99/donut-docvqa-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 "jeongho99/donut-docvqa-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": "jeongho99/donut-docvqa-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 "jeongho99/donut-docvqa-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": "jeongho99/donut-docvqa-demo", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use jeongho99/donut-docvqa-demo with Docker Model Runner:
docker model run hf.co/jeongho99/donut-docvqa-demo
| { | |
| "</s_answer>": 57530, | |
| "</s_question>": 57528, | |
| "<no/>": 57526, | |
| "<s_answer>": 57529, | |
| "<s_docvqa>": 57531, | |
| "<s_iitcdip>": 57523, | |
| "<s_question>": 57527, | |
| "<s_synthdog>": 57524, | |
| "<sep/>": 57522, | |
| "<yes/>": 57525 | |
| } | |