Add HuggingFace files (#1)

- Add files (ca64a2951dfceda40ff21c877fd51053b40a5b9d)
This commit is contained in:
nielsr 2022-08-12 13:48:08 +00:00 committed by system
parent 679d8ec7f0
commit 06c2df3936
10 changed files with 230612 additions and 27 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.DS_Store

View File

@ -1,3 +0,0 @@
---
license: mit
---

13
added_tokens.json Executable file → Normal file
View File

@ -1 +1,12 @@
{"<sep/>": 57522, "</s_answer>": 57523, "</s_question>": 57524, "<no/>": 57525, "<s_answer>": 57526, "<s_docvqa>": 57527, "<s_iitcdip>": 57528, "<s_question>": 57529, "<s_synthdog>": 57530, "<yes/>": 57531}
{
"</s_answer>": 57523,
"</s_question>": 57524,
"<no/>": 57525,
"<s_answer>": 57526,
"<s_docvqa>": 57527,
"<s_iitcdip>": 57528,
"<s_question>": 57529,
"<s_synthdog>": 57530,
"<sep/>": 57522,
"<yes/>": 57531
}

201
config.json Executable file → Normal file
View File

@ -1,24 +1,187 @@
{
"_name_or_path": "naver-clova-ix/donut-base",
"align_long_axis": false,
"architectures": [
"DonutModel"
"VisionEncoderDecoderModel"
],
"decoder_layer": 4,
"encoder_layer": [
2,
2,
14,
2
],
"input_size": [
2560,
1920
],
"max_length": 128,
"max_position_embeddings": 128,
"model_type": "donut",
"decoder": {
"_name_or_path": "",
"activation_dropout": 0.0,
"activation_function": "gelu",
"add_cross_attention": true,
"add_final_layer_norm": true,
"architectures": null,
"attention_dropout": 0.0,
"bad_words_ids": null,
"bos_token_id": 0,
"chunk_size_feed_forward": 0,
"classifier_dropout": 0.0,
"cross_attention_hidden_size": null,
"d_model": 1024,
"decoder_attention_heads": 16,
"decoder_ffn_dim": 4096,
"decoder_layerdrop": 0.0,
"decoder_layers": 4,
"decoder_start_token_id": null,
"diversity_penalty": 0.0,
"do_sample": false,
"dropout": 0.1,
"early_stopping": false,
"encoder_attention_heads": 16,
"encoder_ffn_dim": 4096,
"encoder_layerdrop": 0.0,
"encoder_layers": 12,
"encoder_no_repeat_ngram_size": 0,
"eos_token_id": 2,
"exponential_decay_length_penalty": null,
"finetuning_task": null,
"forced_bos_token_id": null,
"forced_eos_token_id": 2,
"id2label": {
"0": "LABEL_0",
"1": "LABEL_1"
},
"init_std": 0.02,
"is_decoder": true,
"is_encoder_decoder": false,
"label2id": {
"LABEL_0": 0,
"LABEL_1": 1
},
"length_penalty": 1.0,
"max_length": 20,
"max_position_embeddings": 128,
"min_length": 0,
"model_type": "mbart",
"no_repeat_ngram_size": 0,
"num_beam_groups": 1,
"num_beams": 1,
"num_hidden_layers": 12,
"num_return_sequences": 1,
"output_attentions": false,
"output_hidden_states": false,
"output_scores": false,
"pad_token_id": 1,
"prefix": null,
"problem_type": null,
"pruned_heads": {},
"remove_invalid_values": false,
"repetition_penalty": 1.0,
"return_dict": true,
"return_dict_in_generate": false,
"scale_embedding": true,
"sep_token_id": null,
"task_specific_params": null,
"temperature": 1.0,
"tf_legacy_loss": false,
"tie_encoder_decoder": false,
"tie_word_embeddings": true,
"tokenizer_class": null,
"top_k": 50,
"top_p": 1.0,
"torch_dtype": null,
"torchscript": false,
"transformers_version": "4.22.0.dev0",
"typical_p": 1.0,
"use_bfloat16": false,
"use_cache": true,
"vocab_size": 57532
},
"encoder": {
"_name_or_path": "",
"add_cross_attention": false,
"architectures": null,
"attention_probs_dropout_prob": 0.0,
"bad_words_ids": null,
"bos_token_id": null,
"chunk_size_feed_forward": 0,
"cross_attention_hidden_size": null,
"decoder_start_token_id": null,
"depths": [
2,
2,
14,
2
],
"diversity_penalty": 0.0,
"do_sample": false,
"drop_path_rate": 0.1,
"early_stopping": false,
"embed_dim": 128,
"encoder_no_repeat_ngram_size": 0,
"eos_token_id": null,
"exponential_decay_length_penalty": null,
"finetuning_task": null,
"forced_bos_token_id": null,
"forced_eos_token_id": null,
"hidden_act": "gelu",
"hidden_dropout_prob": 0.0,
"hidden_size": 1024,
"id2label": {
"0": "LABEL_0",
"1": "LABEL_1"
},
"image_size": [
2560,
1920
],
"initializer_range": 0.02,
"is_decoder": false,
"is_encoder_decoder": false,
"label2id": {
"LABEL_0": 0,
"LABEL_1": 1
},
"layer_norm_eps": 1e-05,
"length_penalty": 1.0,
"max_length": 20,
"min_length": 0,
"mlp_ratio": 4.0,
"model_type": "donut-swin",
"no_repeat_ngram_size": 0,
"num_beam_groups": 1,
"num_beams": 1,
"num_channels": 3,
"num_heads": [
4,
8,
16,
32
],
"num_layers": 4,
"num_return_sequences": 1,
"output_attentions": false,
"output_hidden_states": false,
"output_scores": false,
"pad_token_id": null,
"patch_size": 4,
"path_norm": true,
"prefix": null,
"problem_type": null,
"pruned_heads": {},
"qkv_bias": true,
"remove_invalid_values": false,
"repetition_penalty": 1.0,
"return_dict": true,
"return_dict_in_generate": false,
"sep_token_id": null,
"task_specific_params": null,
"temperature": 1.0,
"tf_legacy_loss": false,
"tie_encoder_decoder": false,
"tie_word_embeddings": true,
"tokenizer_class": null,
"top_k": 50,
"top_p": 1.0,
"torch_dtype": null,
"torchscript": false,
"transformers_version": "4.22.0.dev0",
"typical_p": 1.0,
"use_absolute_embeddings": false,
"use_bfloat16": false,
"window_size": 10
},
"is_encoder_decoder": true,
"model_type": "vision-encoder-decoder",
"tie_word_embeddings": false,
"torch_dtype": "float32",
"transformers_version": "4.11.3",
"window_size": 10
"transformers_version": null
}

24
preprocessor_config.json Normal file
View File

@ -0,0 +1,24 @@
{
"do_align_long_axis": false,
"do_normalize": true,
"do_pad": true,
"do_resize": true,
"do_thumbnail": true,
"feature_extractor_type": "DonutFeatureExtractor",
"image_mean": [
0.5,
0.5,
0.5
],
"image_std": [
0.5,
0.5,
0.5
],
"processor_class": "DonutProcessor",
"resample": 2,
"size": [
1920,
2560
]
}

BIN
pytorch_model.bin (Stored with Git LFS) Executable file → Normal file

Binary file not shown.

0
sentencepiece.bpe.model Executable file → Normal file
View File

27
special_tokens_map.json Executable file → Normal file
View File

@ -1 +1,26 @@
{"bos_token": "<s>", "eos_token": "</s>", "unk_token": "<unk>", "sep_token": "</s>", "pad_token": "<pad>", "cls_token": "<s>", "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true}, "additional_special_tokens": ["</s_answer>", "</s_question>", "<no/>", "<s_answer>", "<s_docvqa>", "<s_iitcdip>", "<s_question>", "<s_synthdog>", "<yes/>"]}
{
"additional_special_tokens": [
"</s_answer>",
"</s_question>",
"<no/>",
"<s_answer>",
"<s_docvqa>",
"<s_iitcdip>",
"<s_question>",
"<s_synthdog>",
"<yes/>"
],
"bos_token": "<s>",
"cls_token": "<s>",
"eos_token": "</s>",
"mask_token": {
"content": "<mask>",
"lstrip": true,
"normalized": true,
"rstrip": false,
"single_word": false
},
"pad_token": "<pad>",
"sep_token": "</s>",
"unk_token": "<unk>"
}

230343
tokenizer.json Normal file

File diff suppressed because one or more lines are too long

23
tokenizer_config.json Executable file → Normal file
View File

@ -1 +1,22 @@
{"bos_token": "<s>", "eos_token": "</s>", "unk_token": "<unk>", "sep_token": "</s>", "cls_token": "<s>", "pad_token": "<pad>", "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "sp_model_kwargs": {}, "special_tokens_map_file": null, "tokenizer_file": "/root/.cache/huggingface/transformers/213c2041358e63047b407f94cde1ae23904d31a3bceb57eab291028c1e949437.7135a4b25ac726e19641f0d68803ff02bad960d6319064f55fa9c536929b86fc", "name_or_path": "hyunwoongko/asian-bart-ecjk", "tokenizer_class": "XLMRobertaTokenizer"}
{
"bos_token": "<s>",
"cls_token": "<s>",
"eos_token": "</s>",
"from_slow": true,
"mask_token": {
"__type": "AddedToken",
"content": "<mask>",
"lstrip": true,
"normalized": true,
"rstrip": false,
"single_word": false
},
"name_or_path": "naver-clova-ix/donut-base-finetuned-docvqa",
"pad_token": "<pad>",
"processor_class": "DonutProcessor",
"sep_token": "</s>",
"sp_model_kwargs": {},
"special_tokens_map_file": null,
"tokenizer_class": "XLMRobertaTokenizer",
"unk_token": "<unk>"
}