Image-Text-to-Text
Transformers
Safetensors
vision-encoder-decoder
validation_1
validation_2
validation_3
validation_4
validation_5
validation_6
validation_7
Instructions to use HamAndCheese82/math-ocr-donut-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HamAndCheese82/math-ocr-donut-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="HamAndCheese82/math-ocr-donut-v2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("HamAndCheese82/math-ocr-donut-v2") model = AutoModelForMultimodalLM.from_pretrained("HamAndCheese82/math-ocr-donut-v2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use HamAndCheese82/math-ocr-donut-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HamAndCheese82/math-ocr-donut-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HamAndCheese82/math-ocr-donut-v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/HamAndCheese82/math-ocr-donut-v2
- SGLang
How to use HamAndCheese82/math-ocr-donut-v2 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 "HamAndCheese82/math-ocr-donut-v2" \ --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": "HamAndCheese82/math-ocr-donut-v2", "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 "HamAndCheese82/math-ocr-donut-v2" \ --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": "HamAndCheese82/math-ocr-donut-v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use HamAndCheese82/math-ocr-donut-v2 with Docker Model Runner:
docker model run hf.co/HamAndCheese82/math-ocr-donut-v2
Commit History
-
Training done
Verified signatureb83f069 -
Training done
Verified signature7f9d01e -
Training in progress, epoch 6
Verified signature5237349 -
On validation process, epoch 6, global step 255478
Verified signature2e0d0d3 -
On validation process, epoch 6, global step 255478
Verified signature6c0312e -
On validation process, epoch 6, global step 237230
Verified signaturefd71a76 -
On validation process, epoch 6, global step 237230
Verified signature41ba031 -
Training in progress, epoch 5
Verified signaturef8f5938 -
On validation process, epoch 5, global step 218981
Verified signature926ba4d -
On validation process, epoch 5, global step 218981
Verified signature2e32374 -
On validation process, epoch 5, global step 200733
Verified signaturec0ebfb0 -
On validation process, epoch 5, global step 200733
Verified signatureba65694 -
Training in progress, epoch 4
Verified signature18e2ff4 -
On validation process, epoch 4, global step 182484
Verified signature323f6f1 -
On validation process, epoch 4, global step 182484
Verified signatureae730d9 -
On validation process, epoch 4, global step 164236
Verified signature198f17a -
On validation process, epoch 4, global step 164236
Verified signatureb90c5d3 -
Training in progress, epoch 3
Verified signaturee91c38d -
On validation process, epoch 3, global step 145987
Verified signature4fb686e -
On validation process, epoch 3, global step 145987
Verified signature2b6c548
-
On validation process, epoch 3, global step 127739
Verified signature69ad9ae -
On validation process, epoch 3, global step 127739
Verified signature33a5d2f -
Training in progress, epoch 2
Verified signaturebe56bd6 -
On validation process, epoch 2, global step 109490
Verified signature7bd157f -
On validation process, epoch 2, global step 109490
Verified signature6f164a2 -
On validation process, epoch 2, global step 91242
Verified signature3502f2e -
On validation process, epoch 2, global step 91242
Verified signatureba6fc8a -
Training in progress, epoch 1
Verified signature2bcb3ae -
On validation process, epoch 1, global step 72993
Verified signature92fdff7 -
On validation process, epoch 1, global step 72993
Verified signaturefcbb1d4 -
On validation process, epoch 1, global step 54745
Verified signature76a52e1 -
On validation process, epoch 1, global step 54745
Verified signaturec930cef -
Training in progress, epoch 0
Verified signature94f16be -
On validation process, epoch 0, global step 36496
Verified signature4bace44 -
On validation process, epoch 0, global step 36496
Verified signaturec5ad1c5 -
On validation process, epoch 0, global step 18248
Verified signature56e6cff -
On validation process, epoch 0, global step 18248
Verified signature5750144 -
initial commit
Verified signatureb0ec047