Instructions to use daitavan/donut-pretrain-german with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use daitavan/donut-pretrain-german with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="daitavan/donut-pretrain-german", device_map="auto")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("daitavan/donut-pretrain-german") model = AutoModelForMultimodalLM.from_pretrained("daitavan/donut-pretrain-german", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use daitavan/donut-pretrain-german with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "daitavan/donut-pretrain-german" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "daitavan/donut-pretrain-german", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/daitavan/donut-pretrain-german
- SGLang
How to use daitavan/donut-pretrain-german 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 "daitavan/donut-pretrain-german" \ --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": "daitavan/donut-pretrain-german", "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 "daitavan/donut-pretrain-german" \ --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": "daitavan/donut-pretrain-german", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use daitavan/donut-pretrain-german with Docker Model Runner:
docker model run hf.co/daitavan/donut-pretrain-german
State of the training
Hi, maybe this is a newbie question, but what was this model trained/what’s the state of the training?
As i read from the paper of the original donut model, the base model was trained with synthdog documents. i assume you did the same with the dataset on your account? is the training of this model completed?
I try pretraining the donut model on a german language, but i am not sure about the accuracy of my pretrain model. You can use it if you want. This model is pretraining with the same dataset on my account
Can you tell me how you trained it, the official repository just shows how to finetune the pretrained model, but not how the pretrain model gets created.
Anyway, thanks for the work, I'll give it a try 😊
You create dataset by synthendog then train as guidlines