File size: 9,026 Bytes
d0960ca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
{
    "module": "keras_hub.src.models.smolvlm2.smolvlm2_causal_lm",
    "class_name": "SmolVLM2CausalLM",
    "config": {
        "backbone": {
            "module": "keras_hub.src.models.smolvlm2.smolvlm2_backbone",
            "class_name": "SmolVLM2Backbone",
            "config": {
                "name": "smol_vlm2_backbone",
                "trainable": true,
                "dtype": {
                    "module": "keras",
                    "class_name": "DTypePolicy",
                    "config": {
                        "name": "float32"
                    },
                    "registered_name": null
                },
                "vocabulary_size": 49280,
                "image_size": 384,
                "patch_size": 14,
                "vision_hidden_dim": 1152,
                "vision_intermediate_dim": 4304,
                "vision_num_layers": 27,
                "vision_num_heads": 16,
                "hidden_dim": 2048,
                "intermediate_dim": 8192,
                "num_layers": 24,
                "num_query_heads": 32,
                "num_key_value_heads": 32,
                "scale_factor": 3,
                "image_token_id": 49190,
                "rope_max_wavelength": 130000,
                "layer_norm_epsilon": 1e-05,
                "vision_layer_norm_epsilon": 1e-06,
                "tie_word_embeddings": false
            },
            "registered_name": "keras_hub>SmolVLM2Backbone"
        },
        "preprocessor": {
            "module": "keras_hub.src.models.smolvlm2.smolvlm2_causal_lm_preprocessor",
            "class_name": "SmolVLM2CausalLMPreprocessor",
            "config": {
                "name": "smol_vlm2_causal_lm_preprocessor",
                "trainable": true,
                "dtype": {
                    "module": "keras",
                    "class_name": "DTypePolicy",
                    "config": {
                        "name": "float32"
                    },
                    "registered_name": null
                },
                "tokenizer": {
                    "module": "keras_hub.src.models.smolvlm2.smolvlm2_tokenizer",
                    "class_name": "SmolVLM2Tokenizer",
                    "config": {
                        "name": "smol_vlm2_tokenizer",
                        "trainable": true,
                        "dtype": {
                            "module": "keras",
                            "class_name": "DTypePolicy",
                            "config": {
                                "name": "int32"
                            },
                            "registered_name": null
                        },
                        "config_file": "tokenizer.json",
                        "sequence_length": null,
                        "add_prefix_space": false,
                        "unsplittable_tokens": [
                            "<row_4_col_1>",
                            "<row_2_col_3>",
                            "<issue_start>",
                            "<jupyter_start>",
                            "<global-img>",
                            "<row_3_col_6>",
                            "<reponame>",
                            "<row_4_col_6>",
                            "<row_3_col_3>",
                            "<row_6_col_4>",
                            "<row_6_col_3>",
                            "<gh_stars>",
                            "<row_5_col_4>",
                            "<row_2_col_6>",
                            "<row_3_col_5>",
                            "<jupyter_text>",
                            "<row_5_col_2>",
                            "<row_5_col_5>",
                            "<row_6_col_6>",
                            "<row_3_col_4>",
                            "<row_5_col_6>",
                            "<|endoftext|>",
                            "<row_4_col_2>",
                            "<fake_token_around_image>",
                            "<|im_end|>",
                            "<row_1_col_2>",
                            "<|im_start|>",
                            "<jupyter_output>",
                            "<row_3_col_2>",
                            "<row_6_col_1>",
                            "<row_2_col_1>",
                            "<row_2_col_5>",
                            "<image>",
                            "<row_5_col_3>",
                            "<row_2_col_4>",
                            "<repo_name>",
                            "<filename>",
                            "<issue_closed>",
                            "<jupyter_script>",
                            "<row_4_col_4>",
                            "<jupyter_code>",
                            "<row_2_col_2>",
                            "<row_6_col_2>",
                            "<row_1_col_5>",
                            "<row_1_col_3>",
                            "<row_1_col_6>",
                            "<row_3_col_1>",
                            "<file_sep>",
                            "<row_4_col_5>",
                            "<row_1_col_4>",
                            "<row_5_col_1>",
                            "<empty_output>",
                            "<issue_comment>",
                            "<row_4_col_3>",
                            "<row_1_col_1>",
                            "<end_of_utterance>",
                            "<row_6_col_5>"
                        ]
                    },
                    "registered_name": "keras_hub>SmolVLM2Tokenizer"
                },
                "image_converter": {
                    "module": "keras_hub.src.models.smolvlm2.smolvlm2_image_converter",
                    "class_name": "SmolVLM2ImageConverter",
                    "config": {
                        "name": "smol_vlm2_image_converter",
                        "trainable": true,
                        "dtype": {
                            "module": "keras",
                            "class_name": "DTypePolicy",
                            "config": {
                                "name": "float32"
                            },
                            "registered_name": null
                        },
                        "image_size": null,
                        "scale": [
                            0.00784313725490196,
                            0.00784313725490196,
                            0.00784313725490196
                        ],
                        "offset": [
                            -1.0,
                            -1.0,
                            -1.0
                        ],
                        "interpolation": "lanczos3",
                        "antialias": true,
                        "crop_to_aspect_ratio": true,
                        "pad_to_aspect_ratio": false,
                        "bounding_box_format": "yxyx",
                        "max_image_size": 384,
                        "size": 1536,
                        "do_image_splitting": true
                    },
                    "registered_name": "keras_hub>SmolVLM2ImageConverter"
                },
                "video_converter": {
                    "module": "keras_hub.src.models.smolvlm2.smolvlm2_video_converter",
                    "class_name": "SmolVLM2VideoConverter",
                    "config": {
                        "name": "smol_vlm2_video_converter",
                        "trainable": true,
                        "dtype": {
                            "module": "keras",
                            "class_name": "DTypePolicy",
                            "config": {
                                "name": "float32"
                            },
                            "registered_name": null
                        },
                        "image_size": null,
                        "scale": [
                            0.00784313725490196,
                            0.00784313725490196,
                            0.00784313725490196
                        ],
                        "offset": [
                            -1.0,
                            -1.0,
                            -1.0
                        ],
                        "max_image_size": 384,
                        "size": 1536,
                        "num_frames": 64,
                        "fps": 1,
                        "interpolation": "lanczos3",
                        "antialias": true
                    },
                    "registered_name": "keras_hub>SmolVLM2VideoConverter"
                },
                "config_file": "preprocessor.json",
                "sequence_length": 1024,
                "add_start_token": false,
                "add_end_token": true,
                "image_seq_len": 81
            },
            "registered_name": "keras_hub>SmolVLM2CausalLMPreprocessor"
        },
        "name": "smol_vlm2_causal_lm"
    },
    "registered_name": "keras_hub>SmolVLM2CausalLM"
}