files
Browse files- config.json +106 -0
- generation_config.json +11 -0
- model.safetensors +3 -0
- preprocessor_config.json +26 -0
- special_tokens_map.json +26 -0
- tokenizer.json +0 -0
- tokenizer_config.json +71 -0
config.json
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"LegatoModel"
|
| 4 |
+
],
|
| 5 |
+
"encoder_pretrained_model_name_or_path": "./vision_encoder",
|
| 6 |
+
"image_token_index": 4096,
|
| 7 |
+
"model_type": "legato",
|
| 8 |
+
"pad_token_id": 4,
|
| 9 |
+
"text_config": {
|
| 10 |
+
"bos_token_id": 1,
|
| 11 |
+
"cross_attention_layers": [
|
| 12 |
+
3,
|
| 13 |
+
7,
|
| 14 |
+
11,
|
| 15 |
+
15
|
| 16 |
+
],
|
| 17 |
+
"dropout": 0,
|
| 18 |
+
"eos_token_id": [
|
| 19 |
+
2
|
| 20 |
+
],
|
| 21 |
+
"hidden_act": "silu",
|
| 22 |
+
"hidden_size": 768,
|
| 23 |
+
"initializer_range": 0.02,
|
| 24 |
+
"intermediate_size": 1526,
|
| 25 |
+
"max_position_embeddings": 131072,
|
| 26 |
+
"model_type": "mllama_text_model",
|
| 27 |
+
"num_attention_heads": 12,
|
| 28 |
+
"num_hidden_layers": 18,
|
| 29 |
+
"num_key_value_heads": 6,
|
| 30 |
+
"pad_token_id": 4,
|
| 31 |
+
"rms_norm_eps": 1e-05,
|
| 32 |
+
"rope_scaling": {
|
| 33 |
+
"factor": 8.0,
|
| 34 |
+
"high_freq_factor": 4.0,
|
| 35 |
+
"low_freq_factor": 1.0,
|
| 36 |
+
"original_max_position_embeddings": 8192,
|
| 37 |
+
"rope_type": "llama3"
|
| 38 |
+
},
|
| 39 |
+
"rope_theta": 500000,
|
| 40 |
+
"torch_dtype": "float32",
|
| 41 |
+
"use_cache": true,
|
| 42 |
+
"vocab_size": 4097
|
| 43 |
+
},
|
| 44 |
+
"torch_dtype": "float32",
|
| 45 |
+
"transformers_version": "4.50.0",
|
| 46 |
+
"vision_config": {
|
| 47 |
+
"_attn_implementation_autoset": true,
|
| 48 |
+
"_name_or_path": "meta-llama/Llama-3.2-11B-Vision",
|
| 49 |
+
"attention_heads": 16,
|
| 50 |
+
"hidden_act": "gelu",
|
| 51 |
+
"hidden_size": 1280,
|
| 52 |
+
"image_size": 448,
|
| 53 |
+
"initializer_range": 0.02,
|
| 54 |
+
"intermediate_layers_indices": [
|
| 55 |
+
3,
|
| 56 |
+
7,
|
| 57 |
+
15,
|
| 58 |
+
23,
|
| 59 |
+
30
|
| 60 |
+
],
|
| 61 |
+
"intermediate_size": 5120,
|
| 62 |
+
"max_num_tiles": 4,
|
| 63 |
+
"model_type": "mllama_vision_model",
|
| 64 |
+
"norm_eps": 1e-05,
|
| 65 |
+
"num_channels": 3,
|
| 66 |
+
"num_global_layers": 8,
|
| 67 |
+
"num_hidden_layers": 32,
|
| 68 |
+
"patch_size": 14,
|
| 69 |
+
"supported_aspect_ratios": [
|
| 70 |
+
[
|
| 71 |
+
1,
|
| 72 |
+
1
|
| 73 |
+
],
|
| 74 |
+
[
|
| 75 |
+
1,
|
| 76 |
+
2
|
| 77 |
+
],
|
| 78 |
+
[
|
| 79 |
+
1,
|
| 80 |
+
3
|
| 81 |
+
],
|
| 82 |
+
[
|
| 83 |
+
1,
|
| 84 |
+
4
|
| 85 |
+
],
|
| 86 |
+
[
|
| 87 |
+
2,
|
| 88 |
+
1
|
| 89 |
+
],
|
| 90 |
+
[
|
| 91 |
+
2,
|
| 92 |
+
2
|
| 93 |
+
],
|
| 94 |
+
[
|
| 95 |
+
3,
|
| 96 |
+
1
|
| 97 |
+
],
|
| 98 |
+
[
|
| 99 |
+
4,
|
| 100 |
+
1
|
| 101 |
+
]
|
| 102 |
+
],
|
| 103 |
+
"torch_dtype": "float32",
|
| 104 |
+
"vision_output_dim": 7680
|
| 105 |
+
}
|
| 106 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 1,
|
| 3 |
+
"eos_token_id": [
|
| 4 |
+
2
|
| 5 |
+
],
|
| 6 |
+
"load_pretrained_encoder": false,
|
| 7 |
+
"max_length": 2048,
|
| 8 |
+
"pad_token_id": 4,
|
| 9 |
+
"repetition_penalty": 1.1,
|
| 10 |
+
"transformers_version": "4.50.0"
|
| 11 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cdeafc9ab30eba74e1c87f0722f869aa9c00d4c4d5986561d4abfeccd6f9cfcc
|
| 3 |
+
size 429478304
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"do_convert_rgb": true,
|
| 3 |
+
"do_normalize": true,
|
| 4 |
+
"do_pad": true,
|
| 5 |
+
"do_rescale": true,
|
| 6 |
+
"do_resize": true,
|
| 7 |
+
"image_mean": [
|
| 8 |
+
0.48145466,
|
| 9 |
+
0.4578275,
|
| 10 |
+
0.40821073
|
| 11 |
+
],
|
| 12 |
+
"image_processor_type": "LegatoImageProcessor",
|
| 13 |
+
"image_std": [
|
| 14 |
+
0.26862954,
|
| 15 |
+
0.26130258,
|
| 16 |
+
0.27577711
|
| 17 |
+
],
|
| 18 |
+
"max_image_tiles": 4,
|
| 19 |
+
"processor_class": "LegatoProcessor",
|
| 20 |
+
"resample": 2,
|
| 21 |
+
"rescale_factor": 0.00392156862745098,
|
| 22 |
+
"size": {
|
| 23 |
+
"height": 448,
|
| 24 |
+
"width": 448
|
| 25 |
+
}
|
| 26 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"additional_special_tokens": [
|
| 3 |
+
"<|image|>"
|
| 4 |
+
],
|
| 5 |
+
"bos_token": {
|
| 6 |
+
"content": "<|begin_of_abc|>",
|
| 7 |
+
"lstrip": false,
|
| 8 |
+
"normalized": false,
|
| 9 |
+
"rstrip": false,
|
| 10 |
+
"single_word": false
|
| 11 |
+
},
|
| 12 |
+
"eos_token": {
|
| 13 |
+
"content": "<|end_of_abc|>",
|
| 14 |
+
"lstrip": false,
|
| 15 |
+
"normalized": false,
|
| 16 |
+
"rstrip": false,
|
| 17 |
+
"single_word": false
|
| 18 |
+
},
|
| 19 |
+
"pad_token": {
|
| 20 |
+
"content": "<|pad|>",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false
|
| 25 |
+
}
|
| 26 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "<|unkown|>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"1": {
|
| 12 |
+
"content": "<|begin_of_abc|>",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"2": {
|
| 20 |
+
"content": "<|end_of_abc|>",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"3": {
|
| 28 |
+
"content": "<|text|>",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": true,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": false
|
| 34 |
+
},
|
| 35 |
+
"4": {
|
| 36 |
+
"content": "<|pad|>",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
},
|
| 43 |
+
"4096": {
|
| 44 |
+
"content": "<|image|>",
|
| 45 |
+
"lstrip": false,
|
| 46 |
+
"normalized": false,
|
| 47 |
+
"rstrip": false,
|
| 48 |
+
"single_word": false,
|
| 49 |
+
"special": true
|
| 50 |
+
}
|
| 51 |
+
},
|
| 52 |
+
"additional_special_tokens": [
|
| 53 |
+
"<|image|>"
|
| 54 |
+
],
|
| 55 |
+
"bos_token": "<|begin_of_abc|>",
|
| 56 |
+
"clean_up_tokenization_spaces": false,
|
| 57 |
+
"eos_token": "<|end_of_abc|>",
|
| 58 |
+
"extra_special_tokens": {},
|
| 59 |
+
"max_length": 2048,
|
| 60 |
+
"model_max_length": 2048,
|
| 61 |
+
"pad_to_multiple_of": null,
|
| 62 |
+
"pad_token": "<|pad|>",
|
| 63 |
+
"pad_token_type_id": 0,
|
| 64 |
+
"padding_side": "left",
|
| 65 |
+
"processor_class": "LegatoProcessor",
|
| 66 |
+
"return_token_type_ids": false,
|
| 67 |
+
"stride": 0,
|
| 68 |
+
"tokenizer_class": "PreTrainedTokenizer",
|
| 69 |
+
"truncation_side": "right",
|
| 70 |
+
"truncation_strategy": "longest_first"
|
| 71 |
+
}
|