Instructions to use JandC/donut-base-ner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JandC/donut-base-ner with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="JandC/donut-base-ner")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("JandC/donut-base-ner") model = AutoModelForMultimodalLM.from_pretrained("JandC/donut-base-ner", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use JandC/donut-base-ner with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JandC/donut-base-ner" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JandC/donut-base-ner", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/JandC/donut-base-ner
- SGLang
How to use JandC/donut-base-ner 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 "JandC/donut-base-ner" \ --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": "JandC/donut-base-ner", "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 "JandC/donut-base-ner" \ --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": "JandC/donut-base-ner", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use JandC/donut-base-ner with Docker Model Runner:
docker model run hf.co/JandC/donut-base-ner
Commit History
-
End of training
c9d0d1a -
Training in progress, epoch 97
5e0d7f0 -
Training in progress, epoch 91
df01f01 -
Training in progress, epoch 85
e3b3c63 -
Training in progress, epoch 79
771eebf -
Training in progress, epoch 73
b982aac -
Training in progress, epoch 67
f24d34e -
Training in progress, epoch 61
35e06ab -
Training in progress, epoch 55
73f77de -
Training in progress, epoch 49
c457993 -
Training in progress, epoch 43
be0dd2b -
Training in progress, epoch 37
52636e6 -
Training in progress, epoch 31
28d1c52 -
Training in progress, epoch 25
776ccd5 -
Training in progress, epoch 19
94de974 -
Training in progress, epoch 13
671ce3d -
Training in progress, epoch 7
6049dd4 -
Training in progress, epoch 1
5da8206 -
End of training
6363b62 -
Training in progress, epoch 19
7e1b5c5 -
Training in progress, epoch 13
1010f87 -
Training in progress, epoch 7
42f2774 -
Training in progress, epoch 1
b4ae9c4 -
End of training
fa25093 -
Training in progress, epoch 1
123b0eb -
End of training
5a7fecc -
Training in progress, epoch 1
bb6a4c7 -
initial commit
f619e75