soyrsoyr commited on
Commit
8d5f581
·
verified ·
1 Parent(s): 5b6a20e

Duplicate of nm-testing/granite-vision-4.1-0.2B-tiny

Browse files
chat_template.jinja ADDED
@@ -0,0 +1,180 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {#- ===== Task tag prompt constants ===== -#}
2
+ {%- set chart2code_prompt = "Generate code that recreates the chart as best as possible." -%}
3
+ {%- set chart2csv_prompt = "Please examine this chart image. Consider you are a data visualization expert, and extract the data into a CSV table.\n\nYour CSV should:\n- Include a header row with clear column names\n- Represent all data series/categories shown in the chart\n- Use numeric values that match the chart as closely as possible\n\nOutput only the CSV data, nothing else." -%}
4
+ {%- set chart2summary_prompt = "Can you describe this chart image?" -%}
5
+ {%- set tables_json_prompt = "Identify and extract the table schema\n Extract the schema of all the tables in the image sorted according to the reading order.\nThe output must be a valid JSON object containing a list of dictionaries with the following structure:\n\n {\n \"dimensions\": {\n \"rows\": <number of data rows (excluding header rows)>,\n \"columns\": <number of columns>,\n \"header_rows\": <number of header rows>,\n \"total_rows\": <total number of rows including headers>\n },\n \"cells\": [\n {\n \"row\": <row index starting at 1>,\n \"col\": <column index starting at 1>,\n \"colspan\": <number of columns spanned>,\n \"rowspan\": <number of rows spanned>,\n \"type\": \"<'header' or 'data'>\",\n \"header_level\": <header nesting level if type=header, else omit or null>,\n \"content\": \"<string content of the cell>\"\n },\n ...\n ]\n }" -%}
6
+ {%- set tables_html_prompt = "Identify and extract the table schema\n Extract the schema of all the tables in the image sorted according to the reading order.\nThe output must be a list of valid HTML tables" -%}
7
+ {%- set tables_otsl_prompt = "Identify and extract the table schema\n Extract the schema of all the tables in the image sorted according to the reading order.\nThe output must be a list of valid OTSL objects, each consists of the following fields: \n <fcel> - a cell with content in it\n <ecel> - an empty cell\n <lcel> - a cell that is merged with the cell to its left\n <ucel> - a cell that is merged with the cell above it\n <xcel> - a cell that is merged with both the cell above it and the cell to its left\n <nl> - a new line\n <ched> - a column header\n <otsl> - the beginning of the OTSL table\n </otsl> - the end of the OTSL table\n\n An example for an output:\n [\n <otsl><ched>first table header1<ched>first table header2<nl><fcel>data1<fcel>data2<nl><fcel>data with horizontal span<lcel><nl><fcel>data with vertical span<ecel><nl><ucel><fcel>data3<nl></otsl>,\n <otsl><ched>second table header1<ched>second table header2<nl><fcel>data1<fcel>data2<nl><fcel>data with horizontal span<lcel><nl><fcel>data with vertical span<ecel><nl><ucel><fcel>data3<nl></otsl>\n ]" -%}
8
+
9
+
10
+ {#- ===== Tag expansion dispatcher ===== -#}
11
+ {%- macro expand_tags(text) -%}
12
+ {%- set has_image = "<image>" in text -%}
13
+ {#- Determine image position: prefix if <image> appears before the tag, suffix if after -#}
14
+ {%- if has_image -%}
15
+ {%- set img_idx = text.index("<image>") -%}
16
+ {%- if "<chart2code>" in text -%}{%- set tag_idx = text.index("<chart2code>") -%}
17
+ {%- elif "<chart2csv>" in text -%}{%- set tag_idx = text.index("<chart2csv>") -%}
18
+ {%- elif "<chart2summary>" in text -%}{%- set tag_idx = text.index("<chart2summary>") -%}
19
+ {%- elif "<tables_json>" in text -%}{%- set tag_idx = text.index("<tables_json>") -%}
20
+ {%- elif "<tables_html>" in text -%}{%- set tag_idx = text.index("<tables_html>") -%}
21
+ {%- elif "<tables_otsl>" in text -%}{%- set tag_idx = text.index("<tables_otsl>") -%}
22
+ {%- else -%}{%- set tag_idx = 999999 -%}
23
+ {%- endif -%}
24
+ {%- set img_prefix = "<image>\n" if img_idx < tag_idx else "" -%}
25
+ {%- set img_suffix = "<image>\n" if img_idx >= tag_idx else "" -%}
26
+ {%- else -%}
27
+ {%- set img_prefix = "" -%}
28
+ {%- set img_suffix = "" -%}
29
+ {%- endif -%}
30
+ {%- if "<chart2code>" in text -%}
31
+ {{- img_prefix + chart2code_prompt + img_suffix -}}
32
+ {%- elif "<chart2csv>" in text -%}
33
+ {{- img_prefix + chart2csv_prompt + img_suffix -}}
34
+ {%- elif "<chart2summary>" in text -%}
35
+ {{- img_prefix + chart2summary_prompt + img_suffix -}}
36
+ {%- elif "<tables_json>" in text -%}
37
+ {{- img_prefix + tables_json_prompt + img_suffix -}}
38
+ {%- elif "<tables_html>" in text -%}
39
+ {{- img_prefix + tables_html_prompt + img_suffix -}}
40
+ {%- elif "<tables_otsl>" in text -%}
41
+ {{- img_prefix + tables_otsl_prompt + img_suffix -}}
42
+ {%- else -%}
43
+ {{- text -}}
44
+ {%- endif -%}
45
+ {%- endmacro -%}
46
+
47
+ {#- ===== Original chat template ===== -#}
48
+ {% macro render_content(x) %}
49
+ {%- if x is string %}
50
+ {{ x }}
51
+ {%- else %}
52
+ {%- for chunk in x %}
53
+ {%- if chunk['type'] == 'text' -%}
54
+ {{ chunk['text']}}
55
+ {%- elif chunk['type'] == 'image' -%}
56
+ {{- "<image>
57
+ " }}
58
+ {%- endif -%}
59
+ {%- endfor -%}
60
+ {%- endif -%}
61
+ {% endmacro %}
62
+
63
+ {%- set tools_system_message_prefix = 'You are a helpful assistant with access to the following tools. You may call one or more tools to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>' %}
64
+ {%- set tools_system_message_suffix = '\n</tools>\n\nFor each tool call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call>. If a tool does not exist in the provided list of tools, notify the user that you do not have the ability to fulfill the request.' %}
65
+ {%- set documents_system_message_prefix = 'You are a helpful assistant with access to the following documents. You may use one or more documents to assist with the user query.\n\nYou are given a list of documents within <documents></documents> XML tags:\n<documents>' %}
66
+ {%- set documents_system_message_suffix = '\n</documents>\n\nWrite the response to the user\'s input by strictly aligning with the facts in the provided documents. If the information needed to answer the question is not available in the documents, inform the user that the question cannot be answered based on the available data.' %}
67
+ {%- set g4_default_system_message = 'You are a helpful assistant. Please ensure responses are professional, accurate, and safe.' %}
68
+ {%- if available_tools is defined and available_tools %}
69
+ {%- set tools = available_tools %}
70
+ {%- endif %}
71
+ {%- set ns = namespace(tools_system_message=tools_system_message_prefix,
72
+ documents_system_message=documents_system_message_prefix,
73
+ default_system_message=g4_default_system_message,
74
+ system_message=''
75
+ ) %}
76
+ {%- if tools %}
77
+ {%- for tool in tools %}
78
+ {%- set ns.tools_system_message = ns.tools_system_message + '\n' + (tool | tojson) %}
79
+ {%- endfor %}
80
+ {%- set ns.tools_system_message = ns.tools_system_message + tools_system_message_suffix %}
81
+ {%- else %}
82
+ {%- set ns.tools_system_message = '' %}
83
+ {%- endif %}
84
+ {%- if documents %}
85
+ {%- for document in documents %}
86
+ {%- set ns.documents_system_message = ns.documents_system_message + '\n' + (document | tojson) %}
87
+ {%- endfor %}
88
+ {%- set ns.documents_system_message = ns.documents_system_message + documents_system_message_suffix %}
89
+ {%- else %}
90
+ {%- set ns.documents_system_message = '' %}
91
+ {%- endif %}
92
+ {%- if messages[0].role == 'system' %}
93
+ {%- if messages[0].content is string %}
94
+ {%- set ns.system_message = messages[0].content %}
95
+ {%- elif messages[0].content is iterable %}
96
+ {%- for entry in messages[0].content %}
97
+ {%- if entry.type== 'text' %}
98
+ {%- if ns.system_message != '' %}
99
+ {%- set ns.system_message = ns.system_message + '\n' %}
100
+ {%- endif %}
101
+ {%- set ns.system_message = ns.system_message + entry.text %}
102
+ {%- endif %}
103
+ {%- endfor %}
104
+ {%- endif %}
105
+ {%- if tools and documents %}
106
+ {%- set ns.system_message = ns.system_message + '\n\n' + ns.tools_system_message + '\n\n' + ns.documents_system_message %}
107
+ {%- elif tools %}
108
+ {%- set ns.system_message = ns.system_message + '\n\n' + ns.tools_system_message %}
109
+ {%- elif documents %}
110
+ {%- set ns.system_message = ns.system_message + '\n\n' + ns.documents_system_message %}
111
+ {%- endif %}
112
+ {%- else %}
113
+ {%- if tools and documents %}
114
+ {%- set ns.system_message = ns.tools_system_message + '\n\n' + ns.documents_system_message %}
115
+ {%- elif tools %}
116
+ {%- set ns.system_message = ns.tools_system_message %}
117
+ {%- elif documents %}
118
+ {%- set ns.system_message = ns.documents_system_message %}
119
+ {%- endif %}
120
+ {%- endif %}
121
+ {%- if ns.system_message %}
122
+ {{- '<|start_of_role|>system<|end_of_role|>' + ns.system_message + '<|end_of_text|>\n' }}
123
+ {%- else %}
124
+ {{- '<|start_of_role|>system<|end_of_role|>' + ns.default_system_message + '<|end_of_text|>\n' }}
125
+ {%- endif %}
126
+ {%- for message in messages %}
127
+ {%- set content = namespace(val='') %}
128
+ {%- if render_content(message['content']) is string %}
129
+ {%- set content.val = render_content(message['content']) %}
130
+ {%- else %}
131
+ {%- if render_content(message['content']) is iterable %}
132
+ {%- for entry in render_content(message['content']) %}
133
+ {%- if entry.type== 'text' %}
134
+ {%- if content.val != '' %}
135
+ {%- set content.val = content.val + '\n' %}
136
+ {%- endif %}
137
+ {%- set content.val = content.val + entry.text %}
138
+ {%- endif %}
139
+ {%- endfor %}
140
+ {%- endif %}
141
+ {%- endif %}
142
+ {%- if (message.role == 'user') or (message.role == 'system' and not loop.first) %}
143
+ {{- '<|start_of_role|>' + message.role + '<|end_of_role|>' + expand_tags(content.val) + '<|end_of_text|>\n' }}
144
+ {%- elif message.role == 'assistant' %}
145
+ {{- '<|start_of_role|>' + message.role + '<|end_of_role|>' + content.val }}
146
+ {%- if message.tool_calls %}
147
+ {%- for tool_call in message.tool_calls %}
148
+ {%- if (loop.first and content.val) or (not loop.first) %}
149
+ {{- '\n' }}
150
+ {%- endif %}
151
+ {%- if tool_call.function %}
152
+ {%- set tool_call = tool_call.function %}
153
+ {%- endif %}
154
+ {{- '<tool_call>\n{"name": "' }}
155
+ {{- tool_call.name }}
156
+ {{- '", "arguments": ' }}
157
+ {%- if tool_call.arguments is string %}
158
+ {{- tool_call.arguments }}
159
+ {%- else %}
160
+ {{- tool_call.arguments | tojson }}
161
+ {%- endif %}
162
+ {{- '}\n</tool_call>' }}
163
+ {%- endfor %}
164
+ {%- endif %}
165
+ {{- '<|end_of_text|>\n' }}
166
+ {%- elif message.role == 'tool' %}
167
+ {%- if loop.first or (messages[loop.index0 - 1].role != 'tool') %}
168
+ {{- '<|start_of_role|>user<|end_of_role|>' }}
169
+ {%- endif %}
170
+ {{- '\n<tool_response>\n' }}
171
+ {{- content.val }}
172
+ {{- '\n</tool_response>' }}
173
+ {%- if loop.last or (messages[loop.index0 + 1].role != 'tool') %}
174
+ {{- '<|end_of_text|>\n' }}
175
+ {%- endif %}
176
+ {%- endif %}
177
+ {%- endfor %}
178
+ {%- if add_generation_prompt %}
179
+ {{- '<|start_of_role|>assistant<|end_of_role|>' }}
180
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Granite4VisionForConditionalGeneration"
4
+ ],
5
+ "auto_map": {
6
+ "AutoConfig": "configuration.Granite4VisionConfig",
7
+ "AutoModel": "modeling.Granite4VisionForConditionalGeneration",
8
+ "AutoModelForImageTextToText": "modeling.Granite4VisionForConditionalGeneration",
9
+ "AutoModelForVision2Seq": "modeling.Granite4VisionForConditionalGeneration",
10
+ "AutoProcessor": "processing.Granite4VisionProcessor"
11
+ },
12
+ "deepstack_layer_map": [
13
+ [
14
+ -4,
15
+ 3
16
+ ],
17
+ [
18
+ -3,
19
+ 2
20
+ ],
21
+ [
22
+ -2,
23
+ 1
24
+ ],
25
+ [
26
+ -1,
27
+ 0
28
+ ]
29
+ ],
30
+ "downsample_rate": "4/8",
31
+ "dtype": "float32",
32
+ "image_grid_pinpoints": [
33
+ [
34
+ 384,
35
+ 384
36
+ ],
37
+ [
38
+ 384,
39
+ 768
40
+ ],
41
+ [
42
+ 384,
43
+ 1152
44
+ ],
45
+ [
46
+ 384,
47
+ 1536
48
+ ],
49
+ [
50
+ 384,
51
+ 1920
52
+ ],
53
+ [
54
+ 384,
55
+ 2304
56
+ ],
57
+ [
58
+ 384,
59
+ 2688
60
+ ],
61
+ [
62
+ 384,
63
+ 3072
64
+ ],
65
+ [
66
+ 384,
67
+ 3456
68
+ ],
69
+ [
70
+ 384,
71
+ 3840
72
+ ],
73
+ [
74
+ 768,
75
+ 384
76
+ ],
77
+ [
78
+ 768,
79
+ 768
80
+ ],
81
+ [
82
+ 768,
83
+ 1152
84
+ ],
85
+ [
86
+ 768,
87
+ 1536
88
+ ],
89
+ [
90
+ 768,
91
+ 1920
92
+ ],
93
+ [
94
+ 1152,
95
+ 384
96
+ ],
97
+ [
98
+ 1152,
99
+ 768
100
+ ],
101
+ [
102
+ 1152,
103
+ 1152
104
+ ],
105
+ [
106
+ 1536,
107
+ 384
108
+ ],
109
+ [
110
+ 1536,
111
+ 768
112
+ ],
113
+ [
114
+ 1920,
115
+ 384
116
+ ],
117
+ [
118
+ 1920,
119
+ 768
120
+ ],
121
+ [
122
+ 2304,
123
+ 384
124
+ ],
125
+ [
126
+ 2688,
127
+ 384
128
+ ],
129
+ [
130
+ 3072,
131
+ 384
132
+ ],
133
+ [
134
+ 3456,
135
+ 384
136
+ ],
137
+ [
138
+ 3840,
139
+ 384
140
+ ]
141
+ ],
142
+ "image_seq_length": 576,
143
+ "image_token_index": 100266,
144
+ "initializer_range": 0.02,
145
+ "model_type": "granite4_vision",
146
+ "projector_dropout": 0.1,
147
+ "projector_hidden_act": "gelu",
148
+ "qformer_config": {
149
+ "attention_probs_dropout_prob": 0.1,
150
+ "cross_attention_frequency": 1,
151
+ "dtype": "float32",
152
+ "encoder_hidden_size": 384,
153
+ "hidden_act": "gelu",
154
+ "hidden_dropout_prob": 0.1,
155
+ "hidden_size": 384,
156
+ "initializer_range": 0.02,
157
+ "intermediate_size": 768,
158
+ "layer_norm_eps": 1e-12,
159
+ "max_position_embeddings": 2048,
160
+ "model_type": "blip_2_qformer",
161
+ "num_attention_heads": 4,
162
+ "num_hidden_layers": 1,
163
+ "pad_token_id": 0,
164
+ "use_qformer_text_input": false,
165
+ "vocab_size": 30522
166
+ },
167
+ "spatial_stride": 2,
168
+ "spatial_target_layers": [
169
+ 0,
170
+ 1,
171
+ 2,
172
+ 3
173
+ ],
174
+ "spatial_vision_layer": -1,
175
+ "text_config": {
176
+ "architectures": [
177
+ "GraniteForCausalLM"
178
+ ],
179
+ "attention_bias": false,
180
+ "attention_dropout": 0.0,
181
+ "attention_multiplier": 0.015625,
182
+ "bos_token_id": 100257,
183
+ "dtype": "float32",
184
+ "embedding_multiplier": 12.0,
185
+ "eos_token_id": 100257,
186
+ "hidden_act": "silu",
187
+ "hidden_size": 1024,
188
+ "initializer_range": 0.1,
189
+ "intermediate_size": 2048,
190
+ "logits_scaling": 10.0,
191
+ "max_position_embeddings": 131072,
192
+ "mlp_bias": false,
193
+ "model_type": "granite",
194
+ "num_attention_heads": 8,
195
+ "num_hidden_layers": 4,
196
+ "num_key_value_heads": 2,
197
+ "pad_token_id": 100256,
198
+ "residual_multiplier": 0.22,
199
+ "rms_norm_eps": 1e-05,
200
+ "rope_parameters": {
201
+ "rope_theta": 10000000,
202
+ "rope_type": "default"
203
+ },
204
+ "tie_word_embeddings": true,
205
+ "use_cache": true,
206
+ "vocab_size": 100352
207
+ },
208
+ "tie_word_embeddings": true,
209
+ "transformers_version": "5.14.1",
210
+ "use_cache": true,
211
+ "use_image_newline_parameter": true,
212
+ "use_spatial_sampling": true,
213
+ "vision_config": {
214
+ "attention_dropout": 0.0,
215
+ "dtype": "float32",
216
+ "hidden_act": "gelu_pytorch_tanh",
217
+ "hidden_size": 384,
218
+ "image_size": 384,
219
+ "intermediate_size": 768,
220
+ "layer_norm_eps": 1e-06,
221
+ "model_type": "siglip_vision_model",
222
+ "num_attention_heads": 4,
223
+ "num_channels": 3,
224
+ "num_hidden_layers": 4,
225
+ "patch_size": 16
226
+ },
227
+ "vision_feature_layer": -2,
228
+ "vision_feature_select_strategy": "full"
229
+ }
generation_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 100257,
4
+ "eos_token_id": 100257,
5
+ "output_attentions": false,
6
+ "output_hidden_states": false,
7
+ "pad_token_id": 100256,
8
+ "transformers_version": "5.14.1",
9
+ "use_cache": true
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:02771ae0a46c3d1c0be4b4c01de54d6e427a35c7f05455955a975dc383df3f32
3
+ size 325012776
processor_config.json ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "downsample_rate": "4/8",
3
+ "image_processor": {
4
+ "auto_map": {
5
+ "AutoProcessor": "processing.Granite4VisionProcessor"
6
+ },
7
+ "crop_size": {
8
+ "height": 384,
9
+ "width": 384
10
+ },
11
+ "do_center_crop": true,
12
+ "do_convert_rgb": true,
13
+ "do_normalize": true,
14
+ "do_pad": true,
15
+ "do_rescale": true,
16
+ "do_resize": true,
17
+ "image_grid_pinpoints": [
18
+ [
19
+ 384,
20
+ 384
21
+ ],
22
+ [
23
+ 384,
24
+ 768
25
+ ],
26
+ [
27
+ 384,
28
+ 1152
29
+ ],
30
+ [
31
+ 384,
32
+ 1536
33
+ ],
34
+ [
35
+ 384,
36
+ 1920
37
+ ],
38
+ [
39
+ 384,
40
+ 2304
41
+ ],
42
+ [
43
+ 384,
44
+ 2688
45
+ ],
46
+ [
47
+ 384,
48
+ 3072
49
+ ],
50
+ [
51
+ 384,
52
+ 3456
53
+ ],
54
+ [
55
+ 384,
56
+ 3840
57
+ ],
58
+ [
59
+ 768,
60
+ 384
61
+ ],
62
+ [
63
+ 768,
64
+ 768
65
+ ],
66
+ [
67
+ 768,
68
+ 1152
69
+ ],
70
+ [
71
+ 768,
72
+ 1536
73
+ ],
74
+ [
75
+ 768,
76
+ 1920
77
+ ],
78
+ [
79
+ 1152,
80
+ 384
81
+ ],
82
+ [
83
+ 1152,
84
+ 768
85
+ ],
86
+ [
87
+ 1152,
88
+ 1152
89
+ ],
90
+ [
91
+ 1536,
92
+ 384
93
+ ],
94
+ [
95
+ 1536,
96
+ 768
97
+ ],
98
+ [
99
+ 1920,
100
+ 384
101
+ ],
102
+ [
103
+ 1920,
104
+ 768
105
+ ],
106
+ [
107
+ 2304,
108
+ 384
109
+ ],
110
+ [
111
+ 2688,
112
+ 384
113
+ ],
114
+ [
115
+ 3072,
116
+ 384
117
+ ],
118
+ [
119
+ 3456,
120
+ 384
121
+ ],
122
+ [
123
+ 3840,
124
+ 384
125
+ ]
126
+ ],
127
+ "image_mean": [
128
+ 0.5,
129
+ 0.5,
130
+ 0.5
131
+ ],
132
+ "image_processor_type": "LlavaNextImageProcessor",
133
+ "image_std": [
134
+ 0.5,
135
+ 0.5,
136
+ 0.5
137
+ ],
138
+ "resample": 3,
139
+ "rescale_factor": 0.00392156862745098,
140
+ "size": {
141
+ "height": 384,
142
+ "width": 384
143
+ }
144
+ },
145
+ "image_token": "<image>",
146
+ "num_additional_image_tokens": 0,
147
+ "patch_size": 16,
148
+ "processor_class": "Granite4VisionProcessor",
149
+ "vision_feature_select_strategy": "full"
150
+ }
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": false,
3
+ "backend": "tokenizers",
4
+ "bos_token": "<|end_of_text|>",
5
+ "clean_up_tokenization_spaces": false,
6
+ "eos_token": "<|end_of_text|>",
7
+ "errors": "replace",
8
+ "is_local": true,
9
+ "local_files_only": false,
10
+ "model_input_names": [
11
+ "input_ids",
12
+ "attention_mask"
13
+ ],
14
+ "model_max_length": 1000000000000000019884624838656,
15
+ "pad_token": "<|pad|>",
16
+ "padding_side": "left",
17
+ "processor_class": "Granite4VisionProcessor",
18
+ "tokenizer_class": "TokenizersBackend",
19
+ "unk_token": "<|unk|>"
20
+ }