clovaai / donut

Official Implementation of OCR-free Document Understanding Transformer (Donut) and Synthetic Document Generator (SynthDoG), ECCV 2022
https://arxiv.org/abs/2111.15664
MIT License
5.53k stars 444 forks source link

How to serve trained donut model #228

Closed Codedrainer closed 11 months ago

Codedrainer commented 11 months ago

Hello,

I have successfully trained a Donut model using donut-base, and now I am looking for guidance on how to deploy the model for easy inference. I have already explored TorchServe and Hugging Face's documentation, but I couldn't find a straightforward solution.

Here are the files I have after training the model:

added_tokens.json config.json pytorch_model.bin sentencepiece.bpe.model special_tokens_map.json tokenizer_config.json I have been able to perform inference locally, but I need help with the steps to serve the model so that I can easily perform inference remotely.

Any assistance or guidance would be highly appreciated. Thank you!

carlos21 commented 11 months ago

@Codedrainer how did you manage to generate those files? added_tokens.json config.json pytorch_model.bin sentencepiece.bpe.model special_tokens_map.json tokenizer_config.json

Codedrainer commented 11 months ago

@carlos21 i have used Donut to train a model and got these files, Finally, I made it to deployment.