Add tiny processor fixture for testing
Browse files- config.json +124 -0
- generation_config.json +13 -0
- preprocessor_config.json +33 -0
- processor_config.json +120 -0
- tokenizer.json +0 -0
- tokenizer_config.json +0 -0
config.json
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Florence2ForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"dtype": "float16",
|
| 6 |
+
"image_token_id": 51289,
|
| 7 |
+
"is_encoder_decoder": true,
|
| 8 |
+
"model_type": "florence2",
|
| 9 |
+
"text_config": {
|
| 10 |
+
"activation_dropout": 0.1,
|
| 11 |
+
"activation_function": "gelu",
|
| 12 |
+
"add_bias_logits": false,
|
| 13 |
+
"add_final_layer_norm": false,
|
| 14 |
+
"attention_dropout": 0.1,
|
| 15 |
+
"classif_dropout": 0.1,
|
| 16 |
+
"classifier_dropout": 0.0,
|
| 17 |
+
"d_model": 768,
|
| 18 |
+
"decoder_attention_heads": 12,
|
| 19 |
+
"decoder_ffn_dim": 3072,
|
| 20 |
+
"decoder_layerdrop": 0.0,
|
| 21 |
+
"decoder_layers": 6,
|
| 22 |
+
"dropout": 0.1,
|
| 23 |
+
"early_stopping": true,
|
| 24 |
+
"encoder_attention_heads": 12,
|
| 25 |
+
"encoder_ffn_dim": 3072,
|
| 26 |
+
"encoder_layerdrop": 0.0,
|
| 27 |
+
"encoder_layers": 6,
|
| 28 |
+
"forced_bos_token_id": 0,
|
| 29 |
+
"gradient_checkpointing": false,
|
| 30 |
+
"init_std": 0.02,
|
| 31 |
+
"max_position_embeddings": 1024,
|
| 32 |
+
"model_type": "bart",
|
| 33 |
+
"no_repeat_ngram_size": 3,
|
| 34 |
+
"normalize_before": false,
|
| 35 |
+
"num_beams": 3,
|
| 36 |
+
"num_hidden_layers": 6,
|
| 37 |
+
"scale_embedding": false,
|
| 38 |
+
"use_cache": true,
|
| 39 |
+
"vocab_size": 51328
|
| 40 |
+
},
|
| 41 |
+
"transformers_version": "4.56.1",
|
| 42 |
+
"vision_config": {
|
| 43 |
+
"activation_function": "gelu",
|
| 44 |
+
"depths": [
|
| 45 |
+
1,
|
| 46 |
+
1,
|
| 47 |
+
9,
|
| 48 |
+
1
|
| 49 |
+
],
|
| 50 |
+
"dim_embed": [
|
| 51 |
+
128,
|
| 52 |
+
256,
|
| 53 |
+
512,
|
| 54 |
+
1024
|
| 55 |
+
],
|
| 56 |
+
"drop_path_rate": 0.1,
|
| 57 |
+
"embed_dim": [
|
| 58 |
+
128,
|
| 59 |
+
256,
|
| 60 |
+
512,
|
| 61 |
+
1024
|
| 62 |
+
],
|
| 63 |
+
"enable_checkpoint": false,
|
| 64 |
+
"image_feature_source": [
|
| 65 |
+
"spatial_avg_pool",
|
| 66 |
+
"temporal_avg_pool"
|
| 67 |
+
],
|
| 68 |
+
"image_pos_embed": {
|
| 69 |
+
"max_pos_embeddings": 50,
|
| 70 |
+
"type": "learned_abs_2d"
|
| 71 |
+
},
|
| 72 |
+
"in_channels": 3,
|
| 73 |
+
"initializer_range": 0.02,
|
| 74 |
+
"max_pos_embeddings": 50,
|
| 75 |
+
"max_position_embeddings": 50,
|
| 76 |
+
"max_temporal_embeddings": 100,
|
| 77 |
+
"mlp_ratio": 4.0,
|
| 78 |
+
"model_type": "florence_vision",
|
| 79 |
+
"num_groups": [
|
| 80 |
+
4,
|
| 81 |
+
8,
|
| 82 |
+
16,
|
| 83 |
+
32
|
| 84 |
+
],
|
| 85 |
+
"num_heads": [
|
| 86 |
+
4,
|
| 87 |
+
8,
|
| 88 |
+
16,
|
| 89 |
+
32
|
| 90 |
+
],
|
| 91 |
+
"patch_padding": [
|
| 92 |
+
3,
|
| 93 |
+
1,
|
| 94 |
+
1,
|
| 95 |
+
1
|
| 96 |
+
],
|
| 97 |
+
"patch_prenorm": [
|
| 98 |
+
false,
|
| 99 |
+
true,
|
| 100 |
+
true,
|
| 101 |
+
true
|
| 102 |
+
],
|
| 103 |
+
"patch_size": [
|
| 104 |
+
7,
|
| 105 |
+
3,
|
| 106 |
+
3,
|
| 107 |
+
3
|
| 108 |
+
],
|
| 109 |
+
"patch_stride": [
|
| 110 |
+
4,
|
| 111 |
+
2,
|
| 112 |
+
2,
|
| 113 |
+
2
|
| 114 |
+
],
|
| 115 |
+
"projection_dim": 768,
|
| 116 |
+
"qkv_bias": true,
|
| 117 |
+
"visual_temporal_embedding": {
|
| 118 |
+
"max_temporal_embeddings": 100,
|
| 119 |
+
"type": "COSINE"
|
| 120 |
+
},
|
| 121 |
+
"window_size": 12
|
| 122 |
+
},
|
| 123 |
+
"vocab_size": 501
|
| 124 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 0,
|
| 4 |
+
"decoder_start_token_id": 2,
|
| 5 |
+
"early_stopping": true,
|
| 6 |
+
"eos_token_id": 2,
|
| 7 |
+
"forced_bos_token_id": 0,
|
| 8 |
+
"forced_eos_token_id": 2,
|
| 9 |
+
"no_repeat_ngram_size": 3,
|
| 10 |
+
"num_beams": 3,
|
| 11 |
+
"pad_token_id": 1,
|
| 12 |
+
"transformers_version": "4.56.1"
|
| 13 |
+
}
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"auto_map": {
|
| 3 |
+
"AutoProcessor": "processing_florence2.Florence2Processor"
|
| 4 |
+
},
|
| 5 |
+
"crop_size": {
|
| 6 |
+
"height": 768,
|
| 7 |
+
"width": 768
|
| 8 |
+
},
|
| 9 |
+
"do_center_crop": false,
|
| 10 |
+
"do_convert_rgb": null,
|
| 11 |
+
"do_normalize": true,
|
| 12 |
+
"do_rescale": true,
|
| 13 |
+
"do_resize": true,
|
| 14 |
+
"image_mean": [
|
| 15 |
+
0.485,
|
| 16 |
+
0.456,
|
| 17 |
+
0.406
|
| 18 |
+
],
|
| 19 |
+
"image_processor_type": "CLIPImageProcessor",
|
| 20 |
+
"image_seq_length": 577,
|
| 21 |
+
"image_std": [
|
| 22 |
+
0.229,
|
| 23 |
+
0.224,
|
| 24 |
+
0.225
|
| 25 |
+
],
|
| 26 |
+
"processor_class": "Florence2Processor",
|
| 27 |
+
"resample": 3,
|
| 28 |
+
"rescale_factor": 0.00392156862745098,
|
| 29 |
+
"size": {
|
| 30 |
+
"height": 768,
|
| 31 |
+
"width": 768
|
| 32 |
+
}
|
| 33 |
+
}
|
processor_config.json
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"num_additional_image_tokens": 0,
|
| 3 |
+
"post_processor_config": {
|
| 4 |
+
"bboxes": {},
|
| 5 |
+
"description_with_bboxes": {},
|
| 6 |
+
"description_with_bboxes_or_polygons": {},
|
| 7 |
+
"description_with_polygons": {},
|
| 8 |
+
"ocr": {
|
| 9 |
+
"area_threshold": 0.0,
|
| 10 |
+
"pattern": "(.+?)<loc_(\\d+)><loc_(\\d+)><loc_(\\d+)><loc_(\\d+)><loc_(\\d+)><loc_(\\d+)><loc_(\\d+)><loc_(\\d+)>"
|
| 11 |
+
},
|
| 12 |
+
"phrase_grounding": {
|
| 13 |
+
"banned_grounding_tokens": [
|
| 14 |
+
"it",
|
| 15 |
+
"I",
|
| 16 |
+
"me",
|
| 17 |
+
"mine",
|
| 18 |
+
"you",
|
| 19 |
+
"your",
|
| 20 |
+
"yours",
|
| 21 |
+
"he",
|
| 22 |
+
"him",
|
| 23 |
+
"his",
|
| 24 |
+
"she",
|
| 25 |
+
"her",
|
| 26 |
+
"hers",
|
| 27 |
+
"they",
|
| 28 |
+
"them",
|
| 29 |
+
"their",
|
| 30 |
+
"theirs",
|
| 31 |
+
"one",
|
| 32 |
+
"oneself",
|
| 33 |
+
"we",
|
| 34 |
+
"us",
|
| 35 |
+
"our",
|
| 36 |
+
"ours",
|
| 37 |
+
"you",
|
| 38 |
+
"your",
|
| 39 |
+
"yours",
|
| 40 |
+
"they",
|
| 41 |
+
"them",
|
| 42 |
+
"their",
|
| 43 |
+
"theirs",
|
| 44 |
+
"mine",
|
| 45 |
+
"yours",
|
| 46 |
+
"his",
|
| 47 |
+
"hers",
|
| 48 |
+
"its",
|
| 49 |
+
"ours",
|
| 50 |
+
"yours",
|
| 51 |
+
"theirs",
|
| 52 |
+
"myself",
|
| 53 |
+
"yourself",
|
| 54 |
+
"himself",
|
| 55 |
+
"herself",
|
| 56 |
+
"itself",
|
| 57 |
+
"ourselves",
|
| 58 |
+
"yourselves",
|
| 59 |
+
"themselves",
|
| 60 |
+
"this",
|
| 61 |
+
"that",
|
| 62 |
+
"these",
|
| 63 |
+
"those",
|
| 64 |
+
"who",
|
| 65 |
+
"whom",
|
| 66 |
+
"whose",
|
| 67 |
+
"which",
|
| 68 |
+
"what",
|
| 69 |
+
"who",
|
| 70 |
+
"whom",
|
| 71 |
+
"whose",
|
| 72 |
+
"which",
|
| 73 |
+
"that",
|
| 74 |
+
"all",
|
| 75 |
+
"another",
|
| 76 |
+
"any",
|
| 77 |
+
"anybody",
|
| 78 |
+
"anyone",
|
| 79 |
+
"anything",
|
| 80 |
+
"each",
|
| 81 |
+
"everybody",
|
| 82 |
+
"everyone",
|
| 83 |
+
"everything",
|
| 84 |
+
"few",
|
| 85 |
+
"many",
|
| 86 |
+
"nobody",
|
| 87 |
+
"none",
|
| 88 |
+
"one",
|
| 89 |
+
"several",
|
| 90 |
+
"some",
|
| 91 |
+
"somebody",
|
| 92 |
+
"someone",
|
| 93 |
+
"something",
|
| 94 |
+
"each other",
|
| 95 |
+
"one another",
|
| 96 |
+
"myself",
|
| 97 |
+
"yourself",
|
| 98 |
+
"himself",
|
| 99 |
+
"herself",
|
| 100 |
+
"itself",
|
| 101 |
+
"ourselves",
|
| 102 |
+
"yourselves",
|
| 103 |
+
"themselves",
|
| 104 |
+
"the image",
|
| 105 |
+
"image",
|
| 106 |
+
"images",
|
| 107 |
+
"the",
|
| 108 |
+
"a",
|
| 109 |
+
"an",
|
| 110 |
+
"a group",
|
| 111 |
+
"other objects",
|
| 112 |
+
"lots",
|
| 113 |
+
"a set"
|
| 114 |
+
]
|
| 115 |
+
},
|
| 116 |
+
"polygons": {},
|
| 117 |
+
"pure_text": {}
|
| 118 |
+
},
|
| 119 |
+
"processor_class": "Florence2Processor"
|
| 120 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|