Image-Text-to-Text
Transformers
TensorBoard
Safetensors
vision-encoder-decoder
Generated from Trainer
Instructions to use TomasFAV/DonutInvoiceCzechV0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TomasFAV/DonutInvoiceCzechV0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="TomasFAV/DonutInvoiceCzechV0")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("TomasFAV/DonutInvoiceCzechV0") model = AutoModelForMultimodalLM.from_pretrained("TomasFAV/DonutInvoiceCzechV0", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TomasFAV/DonutInvoiceCzechV0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TomasFAV/DonutInvoiceCzechV0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TomasFAV/DonutInvoiceCzechV0", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TomasFAV/DonutInvoiceCzechV0
- SGLang
How to use TomasFAV/DonutInvoiceCzechV0 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 "TomasFAV/DonutInvoiceCzechV0" \ --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": "TomasFAV/DonutInvoiceCzechV0", "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 "TomasFAV/DonutInvoiceCzechV0" \ --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": "TomasFAV/DonutInvoiceCzechV0", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TomasFAV/DonutInvoiceCzechV0 with Docker Model Runner:
docker model run hf.co/TomasFAV/DonutInvoiceCzechV0
Training in progress, epoch 1
Browse files
config.json
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"VisionEncoderDecoderModel"
|
| 4 |
+
],
|
| 5 |
+
"decoder": {
|
| 6 |
+
"_name_or_path": "",
|
| 7 |
+
"activation_dropout": 0.0,
|
| 8 |
+
"activation_function": "gelu",
|
| 9 |
+
"add_cross_attention": true,
|
| 10 |
+
"add_final_layer_norm": true,
|
| 11 |
+
"architectures": null,
|
| 12 |
+
"attention_dropout": 0.0,
|
| 13 |
+
"bos_token_id": 0,
|
| 14 |
+
"chunk_size_feed_forward": 0,
|
| 15 |
+
"classifier_dropout": 0.0,
|
| 16 |
+
"cross_attention_hidden_size": null,
|
| 17 |
+
"d_model": 1024,
|
| 18 |
+
"decoder_attention_heads": 16,
|
| 19 |
+
"decoder_ffn_dim": 4096,
|
| 20 |
+
"decoder_layerdrop": 0.0,
|
| 21 |
+
"decoder_layers": 4,
|
| 22 |
+
"decoder_start_token_id": null,
|
| 23 |
+
"dropout": 0.1,
|
| 24 |
+
"dtype": "float32",
|
| 25 |
+
"encoder_attention_heads": 16,
|
| 26 |
+
"encoder_ffn_dim": 4096,
|
| 27 |
+
"encoder_layerdrop": 0.0,
|
| 28 |
+
"encoder_layers": 12,
|
| 29 |
+
"eos_token_id": 2,
|
| 30 |
+
"finetuning_task": null,
|
| 31 |
+
"id2label": {
|
| 32 |
+
"0": "LABEL_0",
|
| 33 |
+
"1": "LABEL_1"
|
| 34 |
+
},
|
| 35 |
+
"init_std": 0.02,
|
| 36 |
+
"is_decoder": true,
|
| 37 |
+
"is_encoder_decoder": false,
|
| 38 |
+
"label2id": {
|
| 39 |
+
"LABEL_0": 0,
|
| 40 |
+
"LABEL_1": 1
|
| 41 |
+
},
|
| 42 |
+
"max_length": 768,
|
| 43 |
+
"max_position_embeddings": 768,
|
| 44 |
+
"model_type": "mbart",
|
| 45 |
+
"num_hidden_layers": 12,
|
| 46 |
+
"output_attentions": false,
|
| 47 |
+
"output_hidden_states": false,
|
| 48 |
+
"pad_token_id": 1,
|
| 49 |
+
"prefix": null,
|
| 50 |
+
"problem_type": null,
|
| 51 |
+
"pruned_heads": {},
|
| 52 |
+
"return_dict": true,
|
| 53 |
+
"scale_embedding": true,
|
| 54 |
+
"sep_token_id": null,
|
| 55 |
+
"task_specific_params": null,
|
| 56 |
+
"tf_legacy_loss": false,
|
| 57 |
+
"tie_encoder_decoder": false,
|
| 58 |
+
"tie_word_embeddings": true,
|
| 59 |
+
"tokenizer_class": null,
|
| 60 |
+
"torchscript": false,
|
| 61 |
+
"use_bfloat16": false,
|
| 62 |
+
"use_cache": true,
|
| 63 |
+
"vocab_size": 57664
|
| 64 |
+
},
|
| 65 |
+
"decoder_start_token_id": 0,
|
| 66 |
+
"dtype": "float32",
|
| 67 |
+
"encoder": {
|
| 68 |
+
"_name_or_path": "",
|
| 69 |
+
"add_cross_attention": false,
|
| 70 |
+
"architectures": null,
|
| 71 |
+
"attention_probs_dropout_prob": 0.0,
|
| 72 |
+
"bos_token_id": null,
|
| 73 |
+
"chunk_size_feed_forward": 0,
|
| 74 |
+
"cross_attention_hidden_size": null,
|
| 75 |
+
"decoder_start_token_id": null,
|
| 76 |
+
"depths": [
|
| 77 |
+
2,
|
| 78 |
+
2,
|
| 79 |
+
14,
|
| 80 |
+
2
|
| 81 |
+
],
|
| 82 |
+
"drop_path_rate": 0.1,
|
| 83 |
+
"dtype": "float32",
|
| 84 |
+
"embed_dim": 128,
|
| 85 |
+
"eos_token_id": null,
|
| 86 |
+
"finetuning_task": null,
|
| 87 |
+
"hidden_act": "gelu",
|
| 88 |
+
"hidden_dropout_prob": 0.0,
|
| 89 |
+
"hidden_size": 1024,
|
| 90 |
+
"id2label": {
|
| 91 |
+
"0": "LABEL_0",
|
| 92 |
+
"1": "LABEL_1"
|
| 93 |
+
},
|
| 94 |
+
"image_size": [
|
| 95 |
+
2338,
|
| 96 |
+
1654
|
| 97 |
+
],
|
| 98 |
+
"initializer_range": 0.02,
|
| 99 |
+
"is_decoder": false,
|
| 100 |
+
"is_encoder_decoder": false,
|
| 101 |
+
"label2id": {
|
| 102 |
+
"LABEL_0": 0,
|
| 103 |
+
"LABEL_1": 1
|
| 104 |
+
},
|
| 105 |
+
"layer_norm_eps": 1e-05,
|
| 106 |
+
"mlp_ratio": 4.0,
|
| 107 |
+
"model_type": "donut-swin",
|
| 108 |
+
"num_channels": 3,
|
| 109 |
+
"num_heads": [
|
| 110 |
+
4,
|
| 111 |
+
8,
|
| 112 |
+
16,
|
| 113 |
+
32
|
| 114 |
+
],
|
| 115 |
+
"num_layers": 4,
|
| 116 |
+
"output_attentions": false,
|
| 117 |
+
"output_hidden_states": false,
|
| 118 |
+
"pad_token_id": null,
|
| 119 |
+
"patch_size": 4,
|
| 120 |
+
"path_norm": true,
|
| 121 |
+
"prefix": null,
|
| 122 |
+
"problem_type": null,
|
| 123 |
+
"pruned_heads": {},
|
| 124 |
+
"qkv_bias": true,
|
| 125 |
+
"return_dict": true,
|
| 126 |
+
"sep_token_id": null,
|
| 127 |
+
"task_specific_params": null,
|
| 128 |
+
"tf_legacy_loss": false,
|
| 129 |
+
"tie_encoder_decoder": false,
|
| 130 |
+
"tie_word_embeddings": true,
|
| 131 |
+
"tokenizer_class": null,
|
| 132 |
+
"torchscript": false,
|
| 133 |
+
"use_absolute_embeddings": false,
|
| 134 |
+
"use_bfloat16": false,
|
| 135 |
+
"window_size": 10
|
| 136 |
+
},
|
| 137 |
+
"eos_token_id": 2,
|
| 138 |
+
"is_encoder_decoder": true,
|
| 139 |
+
"model_type": "vision-encoder-decoder",
|
| 140 |
+
"pad_token_id": 1,
|
| 141 |
+
"tie_word_embeddings": false,
|
| 142 |
+
"transformers_version": "5.0.0",
|
| 143 |
+
"use_cache": false
|
| 144 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": false,
|
| 3 |
+
"assistant_confidence_threshold": 0.4,
|
| 4 |
+
"assistant_lookbehind": 10,
|
| 5 |
+
"bos_token_id": 0,
|
| 6 |
+
"decoder_start_token_id": 0,
|
| 7 |
+
"diversity_penalty": 0.0,
|
| 8 |
+
"do_sample": false,
|
| 9 |
+
"early_stopping": false,
|
| 10 |
+
"encoder_no_repeat_ngram_size": 0,
|
| 11 |
+
"encoder_repetition_penalty": 1.0,
|
| 12 |
+
"eos_token_id": 2,
|
| 13 |
+
"epsilon_cutoff": 0.0,
|
| 14 |
+
"eta_cutoff": 0.0,
|
| 15 |
+
"forced_eos_token_id": 2,
|
| 16 |
+
"length_penalty": 1.0,
|
| 17 |
+
"max_length": 20,
|
| 18 |
+
"min_length": 0,
|
| 19 |
+
"no_repeat_ngram_size": 0,
|
| 20 |
+
"num_assistant_tokens": 20,
|
| 21 |
+
"num_assistant_tokens_schedule": "constant",
|
| 22 |
+
"num_beam_groups": 1,
|
| 23 |
+
"num_beams": 1,
|
| 24 |
+
"num_return_sequences": 1,
|
| 25 |
+
"output_attentions": false,
|
| 26 |
+
"output_hidden_states": false,
|
| 27 |
+
"output_scores": false,
|
| 28 |
+
"pad_token_id": 1,
|
| 29 |
+
"remove_invalid_values": false,
|
| 30 |
+
"repetition_penalty": 1.0,
|
| 31 |
+
"return_dict_in_generate": false,
|
| 32 |
+
"target_lookbehind": 10,
|
| 33 |
+
"temperature": 1.0,
|
| 34 |
+
"top_k": 50,
|
| 35 |
+
"top_p": 1.0,
|
| 36 |
+
"transformers_version": "5.0.0",
|
| 37 |
+
"typical_p": 1.0,
|
| 38 |
+
"use_cache": true
|
| 39 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6399b6c5968c90192a07e335b18bda556109f3d45a36e926acf06bcb84db94d7
|
| 3 |
+
size 806494360
|
runs/Mar22_10-21-49_5e59ae3c1ae1/events.out.tfevents.1774174909.5e59ae3c1ae1.11931.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4b08eeae90a6e7f4bf14f6009eb6e4e4d62d064b2c65c79e914e8d0e6eaf560d
|
| 3 |
+
size 13941
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f98f3cb2b4a37c89958840949039f8a56a1c9e6fbc512d6141a43af943cca1bc
|
| 3 |
+
size 5329
|