Image-Text-to-Text
Transformers
Safetensors
English
Spanish
vision-encoder-decoder
vision
document-understanding
donut
Instructions to use de-Rodrigo/donut-merit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use de-Rodrigo/donut-merit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="de-Rodrigo/donut-merit")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("de-Rodrigo/donut-merit") model = AutoModelForMultimodalLM.from_pretrained("de-Rodrigo/donut-merit", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use de-Rodrigo/donut-merit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "de-Rodrigo/donut-merit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "de-Rodrigo/donut-merit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/de-Rodrigo/donut-merit
- SGLang
How to use de-Rodrigo/donut-merit 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 "de-Rodrigo/donut-merit" \ --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": "de-Rodrigo/donut-merit", "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 "de-Rodrigo/donut-merit" \ --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": "de-Rodrigo/donut-merit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use de-Rodrigo/donut-merit with Docker Model Runner:
docker model run hf.co/de-Rodrigo/donut-merit
Best model up to epoch 0 (val_edit_distance=0.7122723460197449)
Browse files- retamar_train-asc-synth_filtered_retamar_train-frozen-encoder/added_tokens.json +1 -9
- retamar_train-asc-synth_filtered_retamar_train-frozen-encoder/config.json +2 -2
- retamar_train-asc-synth_filtered_retamar_train-frozen-encoder/model.safetensors +2 -2
- retamar_train-asc-synth_filtered_retamar_train-frozen-encoder/tokenizer.json +0 -72
- retamar_train-asc-synth_filtered_retamar_train-frozen-encoder/tokenizer_config.json +0 -64
retamar_train-asc-synth_filtered_retamar_train-frozen-encoder/added_tokens.json
CHANGED
|
@@ -1,14 +1,6 @@
|
|
| 1 |
{
|
| 2 |
-
"<
|
| 3 |
-
"</s_4_de_la_eso>": 57532,
|
| 4 |
-
"</s_grade>": 57530,
|
| 5 |
-
"</s_subject>": 57528,
|
| 6 |
-
"<s_3_de_la_eso>": 57525,
|
| 7 |
-
"<s_4_de_la_eso>": 57531,
|
| 8 |
-
"<s_cord-v2>": 57533,
|
| 9 |
-
"<s_grade>": 57529,
|
| 10 |
"<s_iitcdip>": 57523,
|
| 11 |
-
"<s_subject>": 57527,
|
| 12 |
"<s_synthdog>": 57524,
|
| 13 |
"<sep/>": 57522
|
| 14 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"<s_cord-v2>": 57525,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
"<s_iitcdip>": 57523,
|
|
|
|
| 4 |
"<s_synthdog>": 57524,
|
| 5 |
"<sep/>": 57522
|
| 6 |
}
|
retamar_train-asc-synth_filtered_retamar_train-frozen-encoder/config.json
CHANGED
|
@@ -85,9 +85,9 @@
|
|
| 85 |
"typical_p": 1.0,
|
| 86 |
"use_bfloat16": false,
|
| 87 |
"use_cache": true,
|
| 88 |
-
"vocab_size":
|
| 89 |
},
|
| 90 |
-
"decoder_start_token_id":
|
| 91 |
"encoder": {
|
| 92 |
"_name_or_path": "",
|
| 93 |
"add_cross_attention": false,
|
|
|
|
| 85 |
"typical_p": 1.0,
|
| 86 |
"use_bfloat16": false,
|
| 87 |
"use_cache": true,
|
| 88 |
+
"vocab_size": 57526
|
| 89 |
},
|
| 90 |
+
"decoder_start_token_id": 57525,
|
| 91 |
"encoder": {
|
| 92 |
"_name_or_path": "",
|
| 93 |
"add_cross_attention": false,
|
retamar_train-asc-synth_filtered_retamar_train-frozen-encoder/model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3787166bbfe1d14874fa8ecab0c832ed9fc97b0a727be02f5974fd21e025cdf0
|
| 3 |
+
size 809074840
|
retamar_train-asc-synth_filtered_retamar_train-frozen-encoder/tokenizer.json
CHANGED
|
@@ -77,78 +77,6 @@
|
|
| 77 |
},
|
| 78 |
{
|
| 79 |
"id": 57525,
|
| 80 |
-
"content": "<s_3_de_la_eso>",
|
| 81 |
-
"single_word": false,
|
| 82 |
-
"lstrip": false,
|
| 83 |
-
"rstrip": false,
|
| 84 |
-
"normalized": true,
|
| 85 |
-
"special": false
|
| 86 |
-
},
|
| 87 |
-
{
|
| 88 |
-
"id": 57526,
|
| 89 |
-
"content": "</s_3_de_la_eso>",
|
| 90 |
-
"single_word": false,
|
| 91 |
-
"lstrip": false,
|
| 92 |
-
"rstrip": false,
|
| 93 |
-
"normalized": true,
|
| 94 |
-
"special": false
|
| 95 |
-
},
|
| 96 |
-
{
|
| 97 |
-
"id": 57527,
|
| 98 |
-
"content": "<s_subject>",
|
| 99 |
-
"single_word": false,
|
| 100 |
-
"lstrip": false,
|
| 101 |
-
"rstrip": false,
|
| 102 |
-
"normalized": true,
|
| 103 |
-
"special": false
|
| 104 |
-
},
|
| 105 |
-
{
|
| 106 |
-
"id": 57528,
|
| 107 |
-
"content": "</s_subject>",
|
| 108 |
-
"single_word": false,
|
| 109 |
-
"lstrip": false,
|
| 110 |
-
"rstrip": false,
|
| 111 |
-
"normalized": true,
|
| 112 |
-
"special": false
|
| 113 |
-
},
|
| 114 |
-
{
|
| 115 |
-
"id": 57529,
|
| 116 |
-
"content": "<s_grade>",
|
| 117 |
-
"single_word": false,
|
| 118 |
-
"lstrip": false,
|
| 119 |
-
"rstrip": false,
|
| 120 |
-
"normalized": true,
|
| 121 |
-
"special": false
|
| 122 |
-
},
|
| 123 |
-
{
|
| 124 |
-
"id": 57530,
|
| 125 |
-
"content": "</s_grade>",
|
| 126 |
-
"single_word": false,
|
| 127 |
-
"lstrip": false,
|
| 128 |
-
"rstrip": false,
|
| 129 |
-
"normalized": true,
|
| 130 |
-
"special": false
|
| 131 |
-
},
|
| 132 |
-
{
|
| 133 |
-
"id": 57531,
|
| 134 |
-
"content": "<s_4_de_la_eso>",
|
| 135 |
-
"single_word": false,
|
| 136 |
-
"lstrip": false,
|
| 137 |
-
"rstrip": false,
|
| 138 |
-
"normalized": true,
|
| 139 |
-
"special": false
|
| 140 |
-
},
|
| 141 |
-
{
|
| 142 |
-
"id": 57532,
|
| 143 |
-
"content": "</s_4_de_la_eso>",
|
| 144 |
-
"single_word": false,
|
| 145 |
-
"lstrip": false,
|
| 146 |
-
"rstrip": false,
|
| 147 |
-
"normalized": true,
|
| 148 |
-
"special": false
|
| 149 |
-
},
|
| 150 |
-
{
|
| 151 |
-
"id": 57533,
|
| 152 |
"content": "<s_cord-v2>",
|
| 153 |
"single_word": false,
|
| 154 |
"lstrip": false,
|
|
|
|
| 77 |
},
|
| 78 |
{
|
| 79 |
"id": 57525,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
"content": "<s_cord-v2>",
|
| 81 |
"single_word": false,
|
| 82 |
"lstrip": false,
|
retamar_train-asc-synth_filtered_retamar_train-frozen-encoder/tokenizer_config.json
CHANGED
|
@@ -65,70 +65,6 @@
|
|
| 65 |
"special": true
|
| 66 |
},
|
| 67 |
"57525": {
|
| 68 |
-
"content": "<s_3_de_la_eso>",
|
| 69 |
-
"lstrip": false,
|
| 70 |
-
"normalized": true,
|
| 71 |
-
"rstrip": false,
|
| 72 |
-
"single_word": false,
|
| 73 |
-
"special": false
|
| 74 |
-
},
|
| 75 |
-
"57526": {
|
| 76 |
-
"content": "</s_3_de_la_eso>",
|
| 77 |
-
"lstrip": false,
|
| 78 |
-
"normalized": true,
|
| 79 |
-
"rstrip": false,
|
| 80 |
-
"single_word": false,
|
| 81 |
-
"special": false
|
| 82 |
-
},
|
| 83 |
-
"57527": {
|
| 84 |
-
"content": "<s_subject>",
|
| 85 |
-
"lstrip": false,
|
| 86 |
-
"normalized": true,
|
| 87 |
-
"rstrip": false,
|
| 88 |
-
"single_word": false,
|
| 89 |
-
"special": false
|
| 90 |
-
},
|
| 91 |
-
"57528": {
|
| 92 |
-
"content": "</s_subject>",
|
| 93 |
-
"lstrip": false,
|
| 94 |
-
"normalized": true,
|
| 95 |
-
"rstrip": false,
|
| 96 |
-
"single_word": false,
|
| 97 |
-
"special": false
|
| 98 |
-
},
|
| 99 |
-
"57529": {
|
| 100 |
-
"content": "<s_grade>",
|
| 101 |
-
"lstrip": false,
|
| 102 |
-
"normalized": true,
|
| 103 |
-
"rstrip": false,
|
| 104 |
-
"single_word": false,
|
| 105 |
-
"special": false
|
| 106 |
-
},
|
| 107 |
-
"57530": {
|
| 108 |
-
"content": "</s_grade>",
|
| 109 |
-
"lstrip": false,
|
| 110 |
-
"normalized": true,
|
| 111 |
-
"rstrip": false,
|
| 112 |
-
"single_word": false,
|
| 113 |
-
"special": false
|
| 114 |
-
},
|
| 115 |
-
"57531": {
|
| 116 |
-
"content": "<s_4_de_la_eso>",
|
| 117 |
-
"lstrip": false,
|
| 118 |
-
"normalized": true,
|
| 119 |
-
"rstrip": false,
|
| 120 |
-
"single_word": false,
|
| 121 |
-
"special": false
|
| 122 |
-
},
|
| 123 |
-
"57532": {
|
| 124 |
-
"content": "</s_4_de_la_eso>",
|
| 125 |
-
"lstrip": false,
|
| 126 |
-
"normalized": true,
|
| 127 |
-
"rstrip": false,
|
| 128 |
-
"single_word": false,
|
| 129 |
-
"special": false
|
| 130 |
-
},
|
| 131 |
-
"57533": {
|
| 132 |
"content": "<s_cord-v2>",
|
| 133 |
"lstrip": false,
|
| 134 |
"normalized": true,
|
|
|
|
| 65 |
"special": true
|
| 66 |
},
|
| 67 |
"57525": {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
"content": "<s_cord-v2>",
|
| 69 |
"lstrip": false,
|
| 70 |
"normalized": true,
|