Update tiny models for Idefics2ForConditionalGeneration
Browse files- config.json +66 -0
- generation_config.json +10 -0
- model.safetensors +3 -0
- preprocessor_config.json +29 -0
- tokenizer.json +0 -0
- tokenizer_config.json +20 -0
config.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Idefics2ForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"dtype": "float32",
|
| 6 |
+
"image_token_id": 99,
|
| 7 |
+
"model_type": "idefics2",
|
| 8 |
+
"perceiver_config": {
|
| 9 |
+
"attention_dropout": 0.0,
|
| 10 |
+
"hidden_act": "silu",
|
| 11 |
+
"hidden_size": 64,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"model_type": "idefics2_perceiver",
|
| 14 |
+
"num_key_value_heads": 1,
|
| 15 |
+
"resampler_depth": 2,
|
| 16 |
+
"resampler_head_dim": 12,
|
| 17 |
+
"resampler_n_heads": 2,
|
| 18 |
+
"resampler_n_latents": 2,
|
| 19 |
+
"rms_norm_eps": 1e-06
|
| 20 |
+
},
|
| 21 |
+
"text_config": {
|
| 22 |
+
"attention_dropout": 0.0,
|
| 23 |
+
"bos_token_id": 1,
|
| 24 |
+
"eos_token_id": 2,
|
| 25 |
+
"head_dim": 32,
|
| 26 |
+
"hidden_act": "silu",
|
| 27 |
+
"hidden_size": 64,
|
| 28 |
+
"image_token_id": 99,
|
| 29 |
+
"initializer_range": 0.02,
|
| 30 |
+
"intermediate_size": 56,
|
| 31 |
+
"max_position_embeddings": 256,
|
| 32 |
+
"model_type": "mistral",
|
| 33 |
+
"num_attention_heads": 2,
|
| 34 |
+
"num_hidden_layers": 2,
|
| 35 |
+
"num_key_value_heads": 2,
|
| 36 |
+
"pad_token_id": 0,
|
| 37 |
+
"rms_norm_eps": 1e-06,
|
| 38 |
+
"rope_parameters": {
|
| 39 |
+
"rope_theta": 10000.0,
|
| 40 |
+
"rope_type": "default"
|
| 41 |
+
},
|
| 42 |
+
"sliding_window": 32,
|
| 43 |
+
"tie_word_embeddings": false,
|
| 44 |
+
"use_cache": true,
|
| 45 |
+
"vocab_size": 32003
|
| 46 |
+
},
|
| 47 |
+
"tie_word_embeddings": false,
|
| 48 |
+
"transformers_version": "5.16.0.dev0",
|
| 49 |
+
"use_cache": false,
|
| 50 |
+
"vision_config": {
|
| 51 |
+
"attention_dropout": 0.1,
|
| 52 |
+
"dropout": 0.1,
|
| 53 |
+
"hidden_act": "gelu_pytorch_tanh",
|
| 54 |
+
"hidden_size": 32,
|
| 55 |
+
"image_size": 12,
|
| 56 |
+
"initializer_range": 0.02,
|
| 57 |
+
"intermediate_size": 32,
|
| 58 |
+
"layer_norm_eps": 1e-06,
|
| 59 |
+
"model_type": "idefics2_vision",
|
| 60 |
+
"num_attention_heads": 4,
|
| 61 |
+
"num_channels": 3,
|
| 62 |
+
"num_hidden_layers": 2,
|
| 63 |
+
"patch_size": 12
|
| 64 |
+
},
|
| 65 |
+
"vocab_size": 32003
|
| 66 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 1,
|
| 4 |
+
"eos_token_id": 2,
|
| 5 |
+
"output_attentions": false,
|
| 6 |
+
"output_hidden_states": false,
|
| 7 |
+
"pad_token_id": 0,
|
| 8 |
+
"transformers_version": "5.16.0.dev0",
|
| 9 |
+
"use_cache": false
|
| 10 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7d00f8851a089cd375aadde5a59dc7b7bd41968e7e2520bb380fd3ec8a75632d
|
| 3 |
+
size 17182728
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"crop_size": {
|
| 3 |
+
"longest_edge": 12,
|
| 4 |
+
"shortest_edge": 12
|
| 5 |
+
},
|
| 6 |
+
"do_convert_rgb": true,
|
| 7 |
+
"do_image_splitting": false,
|
| 8 |
+
"do_normalize": true,
|
| 9 |
+
"do_pad": true,
|
| 10 |
+
"do_rescale": true,
|
| 11 |
+
"do_resize": true,
|
| 12 |
+
"image_mean": [
|
| 13 |
+
0.5,
|
| 14 |
+
0.5,
|
| 15 |
+
0.5
|
| 16 |
+
],
|
| 17 |
+
"image_processor_type": "Idefics2ImageProcessor",
|
| 18 |
+
"image_std": [
|
| 19 |
+
0.5,
|
| 20 |
+
0.5,
|
| 21 |
+
0.5
|
| 22 |
+
],
|
| 23 |
+
"resample": 2,
|
| 24 |
+
"rescale_factor": 0.00392156862745098,
|
| 25 |
+
"size": {
|
| 26 |
+
"longest_edge": 12,
|
| 27 |
+
"shortest_edge": 12
|
| 28 |
+
}
|
| 29 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": null,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": "<s>",
|
| 5 |
+
"clean_up_tokenization_spaces": false,
|
| 6 |
+
"eos_token": "</s>",
|
| 7 |
+
"extra_special_tokens": [
|
| 8 |
+
"<end_of_utterance>"
|
| 9 |
+
],
|
| 10 |
+
"is_local": true,
|
| 11 |
+
"local_files_only": false,
|
| 12 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 13 |
+
"pad_token": "<unk>",
|
| 14 |
+
"processor_class": "Idefics2Processor",
|
| 15 |
+
"sp_model_kwargs": {},
|
| 16 |
+
"spaces_between_special_tokens": false,
|
| 17 |
+
"tokenizer_class": "LlamaTokenizer",
|
| 18 |
+
"unk_token": "<unk>",
|
| 19 |
+
"use_default_system_prompt": true
|
| 20 |
+
}
|