alex-ht commited on
Commit
9d3cd60
·
1 Parent(s): a037064

first commit

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
audio_processing_mllama.py ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import math
2
+ from typing import Dict, List, Optional, Union
3
+ import numpy as np
4
+ import transformers
5
+ from transformers.tokenization_utils_base import AudioInput
6
+ from transformers.models.seamless_m4t.feature_extraction_seamless_m4t import SeamlessM4TFeatureExtractor
7
+ from transformers.utils import TensorType
8
+ from transformers.feature_extraction_utils import BatchFeature
9
+ from transformers import AutoFeatureExtractor
10
+
11
+
12
+ def build_audio_tokens(text: List[str], audio_features: Union[Dict, List[List[np.ndarray]]], audio_token="<|audio|>") -> Dict:
13
+ if not isinstance(audio_features, list):
14
+ audio_features = audio_features['audio_features']
15
+ bs = audio_features.shape[0]
16
+ for i in range(bs):
17
+ for j in range(len(audio_features[i])):
18
+ tgt_token = f"<|audio_{j+1}|>" * get_num_embeddings(audio_features[i][j].shape[0])
19
+ text[i] = text[i].replace(audio_token, tgt_token, 1)
20
+ return text
21
+
22
+ def get_num_embeddings(num_framses, adapter_kernel_size=3, adapter_stride=2) -> int:
23
+ pad = adapter_stride // 2
24
+ seq_lens = ((num_framses + 2 * pad - adapter_kernel_size) / adapter_stride) + 1
25
+ l1 = math.floor(seq_lens)
26
+ seq_lens = ((l1 + 2 * pad - adapter_kernel_size) / adapter_stride) + 1
27
+ l2 = math.floor(seq_lens)
28
+ return l2 + 2
29
+
30
+ class MllamaAudioFeatureExtractor(SeamlessM4TFeatureExtractor):
31
+
32
+ def __call__(
33
+ self,
34
+ batch_audio_clips: List[List[AudioInput]],
35
+ return_tensors: Optional[Union[str, TensorType]] = None,
36
+ ) -> BatchFeature:
37
+ audio_features = [[ super(MllamaAudioFeatureExtractor, self).__call__(audio_j, sampling_rate=16000, return_attention_mask=False)['input_features'][0] for audio_j in audio_i ] for audio_i in batch_audio_clips ]
38
+ packed_audio_features = self.pack_audio_clips(audio_features)
39
+
40
+ encoded_audio_inputs = BatchFeature(
41
+ data={
42
+ "audio_features": packed_audio_features,
43
+ },
44
+ tensor_type=return_tensors,
45
+ )
46
+
47
+ return encoded_audio_inputs
48
+
49
+ def pack_audio_clips(self, batch_audio_clips: List[List[np.ndarray]]) -> np.ndarray:
50
+ assert batch_audio_clips[0][0].ndim == 2 # sequence length x feature dimension
51
+ # Determine output shape: (batch_size, max_num_clips, max_frames, feature_dim)
52
+ batch_size = len(batch_audio_clips)
53
+ max_num_clips = max([len(clips) for clips in batch_audio_clips])
54
+ max_frames = max([clip.shape[0] for clips in batch_audio_clips for clip in clips])
55
+ feature_dim = batch_audio_clips[0][0].shape[1]
56
+
57
+ stacked_audio_clips = np.zeros((batch_size, max_num_clips, max_frames, feature_dim), dtype=np.float32)
58
+ for i, clips in enumerate(batch_audio_clips):
59
+ for j, clip in enumerate(clips):
60
+ stacked_audio_clips[i, j, :clip.shape[0], :] = clip
61
+
62
+ return stacked_audio_clips
63
+
64
+ AutoFeatureExtractor.register("MllamaAudioFeatureExtractor", MllamaAudioFeatureExtractor)
65
+ transformers.MllamaAudioFeatureExtractor = MllamaAudioFeatureExtractor
chat_template.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "chat_template": "{{- bos_token }}\n{%- if custom_tools is defined %}\n {%- set tools = custom_tools %}\n{%- endif %}\n{%- if not tools_in_user_message is defined %}\n {%- set tools_in_user_message = true %}\n{%- endif %}\n{%- if not date_string is defined %}\n {%- if strftime_now is defined %}\n {%- set date_string = strftime_now(\"%d %b %Y\") %}\n {%- else %}\n {%- set date_string = \"26 Jul 2024\" %}\n {%- endif %}\n{%- endif %}\n{%- if not tools is defined %}\n {%- set tools = none %}\n{%- endif %}\n\n{#- This block extracts the system message, so we can slot it into the right place. #}\n{%- if messages[0]['role'] == 'system' %}\n {%- set system_message = messages[0]['content']|trim %}\n {%- set messages = messages[1:] %}\n{%- else %}\n {%- set system_message = \"\" %}\n{%- endif %}\n\n{#- Find out if there are any images #}\n{% set image_ns = namespace(has_images=false) %} \n{%- for message in messages %}\n {%- for content in message['content'] %}\n {%- if content['type'] == 'image' %}\n {%- set image_ns.has_images = true %}\n {%- endif %}\n {%- endfor %}\n{%- endfor %}\n\n{#- Error out if there are images and system message #}\n{%- if image_ns.has_images and not system_message == \"\" %}\n {{- raise_exception(\"Prompting with images is incompatible with system messages.\") }}\n{%- endif %}\n\n{#- System message if there are no images #}\n{%- if not image_ns.has_images %}\n {{- \"<|start_header_id|>system<|end_header_id|>\\n\\n\" }}\n {%- if tools is not none %}\n {{- \"Environment: ipython\\n\" }}\n {%- endif %}\n {{- \"Cutting Knowledge Date: December 2023\\n\" }}\n {{- \"Today Date: \" + date_string + \"\\n\\n\" }}\n {%- if tools is not none and not tools_in_user_message %}\n {{- \"You have access to the following functions. To call a function, please respond with JSON for a function call.\" }}\n {{- 'Respond in the format {\"name\": function name, \"parameters\": dictionary of argument name and its value}.' }}\n {{- \"Do not use variables.\\n\\n\" }}\n {%- for t in tools %}\n {{- t | tojson(indent=4) }}\n {{- \"\\n\\n\" }}\n {%- endfor %}\n {%- endif %}\n {{- system_message }}\n {{- \"<|eot_id|>\" }}\n{%- endif %}\n\n{#- Custom tools are passed in a user message with some extra guidance #}\n{%- if tools_in_user_message and not tools is none %}\n {#- Extract the first user message so we can plug it in here #}\n {%- if messages | length != 0 %}\n {%- set first_user_message = messages[0]['content']|trim %}\n {%- set messages = messages[1:] %}\n {%- else %}\n {{- raise_exception(\"Cannot put tools in the first user message when there's no first user message!\") }}\n{%- endif %}\n {{- '<|start_header_id|>user<|end_header_id|>\\n\\n' -}}\n {{- \"Given the following functions, please respond with a JSON for a function call \" }}\n {{- \"with its proper arguments that best answers the given prompt.\\n\\n\" }}\n {{- 'Respond in the format {\"name\": function name, \"parameters\": dictionary of argument name and its value}.' }}\n {{- \"Do not use variables.\\n\\n\" }}\n {%- for t in tools %}\n {{- t | tojson(indent=4) }}\n {{- \"\\n\\n\" }}\n {%- endfor %}\n {{- first_user_message + \"<|eot_id|>\"}}\n{%- endif %}\n\n{%- for message in messages %}\n {%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %}\n {{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\\n\\n' }}\n {%- if message['content'] is string %}\n {{- message['content'] }}\n {%- else %}\n {%- for content in message['content'] %}\n {%- if content['type'] == 'image' %}\n {{- '<|image|>' }}\n {%- elif content['type'] == 'text' %}\n {{- content['text'] }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {{- '<|eot_id|>' }}\n {%- elif 'tool_calls' in message %}\n {%- if not message.tool_calls|length == 1 %}\n {{- raise_exception(\"This model only supports single tool-calls at once!\") }}\n {%- endif %}\n {%- set tool_call = message.tool_calls[0].function %}\n {{- '<|start_header_id|>assistant<|end_header_id|>\\n\\n' -}}\n {{- '{\"name\": \"' + tool_call.name + '\", ' }}\n {{- '\"parameters\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- \"}\" }}\n {{- \"<|eot_id|>\" }}\n {%- elif message.role == \"tool\" or message.role == \"ipython\" %}\n {{- \"<|start_header_id|>ipython<|end_header_id|>\\n\\n\" }}\n {%- if message.content is mapping or message.content is iterable %}\n {{- message.content | tojson }}\n {%- else %}\n {{- message.content }}\n {%- endif %}\n {{- \"<|eot_id|>\" }}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|start_header_id|>assistant<|end_header_id|>\\n\\n' }}\n{%- endif %}\n"
3
+ }
config.json ADDED
@@ -0,0 +1,239 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Llama3ForCausalLM"
4
+ ],
5
+ "audio_config": {
6
+ "_attn_implementation_autoset": true,
7
+ "_name_or_path": "facebook/w2v-bert-2.0",
8
+ "activation_dropout": 0.0,
9
+ "adapter_act": "relu",
10
+ "adapter_kernel_size": 3,
11
+ "adapter_stride": 2,
12
+ "add_adapter": false,
13
+ "add_cross_attention": false,
14
+ "apply_spec_augment": false,
15
+ "architectures": [
16
+ "Wav2Vec2BertModel"
17
+ ],
18
+ "attention_dropout": 0.0,
19
+ "bad_words_ids": null,
20
+ "begin_suppress_tokens": null,
21
+ "bos_token_id": 1,
22
+ "chunk_size_feed_forward": 0,
23
+ "classifier_proj_size": 768,
24
+ "codevector_dim": 768,
25
+ "conformer_conv_dropout": 0.1,
26
+ "contrastive_logits_temperature": 0.1,
27
+ "conv_depthwise_kernel_size": 31,
28
+ "cross_attention_hidden_size": null,
29
+ "ctc_loss_reduction": "sum",
30
+ "ctc_zero_infinity": false,
31
+ "decoder_start_token_id": null,
32
+ "diversity_loss_weight": 0.1,
33
+ "diversity_penalty": 0.0,
34
+ "do_sample": false,
35
+ "early_stopping": false,
36
+ "encoder_no_repeat_ngram_size": 0,
37
+ "eos_token_id": 2,
38
+ "exponential_decay_length_penalty": null,
39
+ "feat_proj_dropout": 0.0,
40
+ "feat_quantizer_dropout": 0.0,
41
+ "feature_projection_input_dim": 160,
42
+ "final_dropout": 0.1,
43
+ "finetuning_task": null,
44
+ "forced_bos_token_id": null,
45
+ "forced_eos_token_id": null,
46
+ "hidden_act": "swish",
47
+ "hidden_dropout": 0.0,
48
+ "hidden_size": 1024,
49
+ "id2label": {
50
+ "0": "LABEL_0",
51
+ "1": "LABEL_1"
52
+ },
53
+ "initializer_range": 0.02,
54
+ "intermediate_size": 4096,
55
+ "is_decoder": false,
56
+ "is_encoder_decoder": false,
57
+ "label2id": {
58
+ "LABEL_0": 0,
59
+ "LABEL_1": 1
60
+ },
61
+ "layer_norm_eps": 1e-05,
62
+ "layerdrop": 0.1,
63
+ "left_max_position_embeddings": 64,
64
+ "length_penalty": 1.0,
65
+ "mask_feature_length": 10,
66
+ "mask_feature_min_masks": 0,
67
+ "mask_feature_prob": 0.0,
68
+ "mask_time_length": 10,
69
+ "mask_time_min_masks": 2,
70
+ "mask_time_prob": 0.05,
71
+ "max_length": 20,
72
+ "max_source_positions": 5000,
73
+ "min_length": 0,
74
+ "model_type": "wav2vec2-bert",
75
+ "no_repeat_ngram_size": 0,
76
+ "num_adapter_layers": 1,
77
+ "num_attention_heads": 16,
78
+ "num_beam_groups": 1,
79
+ "num_beams": 1,
80
+ "num_codevector_groups": 2,
81
+ "num_codevectors_per_group": 320,
82
+ "num_hidden_layers": 24,
83
+ "num_negatives": 100,
84
+ "num_return_sequences": 1,
85
+ "output_attentions": false,
86
+ "output_hidden_size": 4096,
87
+ "output_hidden_states": false,
88
+ "output_scores": false,
89
+ "pad_token_id": 0,
90
+ "position_embeddings_type": "relative_key",
91
+ "prefix": null,
92
+ "problem_type": null,
93
+ "proj_codevector_dim": 768,
94
+ "pruned_heads": {},
95
+ "remove_invalid_values": false,
96
+ "repetition_penalty": 1.0,
97
+ "return_dict": true,
98
+ "return_dict_in_generate": false,
99
+ "right_max_position_embeddings": 8,
100
+ "rotary_embedding_base": 10000,
101
+ "sep_token_id": null,
102
+ "suppress_tokens": null,
103
+ "task_specific_params": null,
104
+ "tdnn_dilation": [
105
+ 1,
106
+ 2,
107
+ 3,
108
+ 1,
109
+ 1
110
+ ],
111
+ "tdnn_dim": [
112
+ 512,
113
+ 512,
114
+ 512,
115
+ 512,
116
+ 1500
117
+ ],
118
+ "tdnn_kernel": [
119
+ 5,
120
+ 3,
121
+ 3,
122
+ 1,
123
+ 1
124
+ ],
125
+ "temperature": 1.0,
126
+ "tf_legacy_loss": false,
127
+ "tie_encoder_decoder": false,
128
+ "tie_word_embeddings": true,
129
+ "tokenizer_class": null,
130
+ "top_k": 50,
131
+ "top_p": 1.0,
132
+ "torch_dtype": "float32",
133
+ "torchscript": false,
134
+ "typical_p": 1.0,
135
+ "use_bfloat16": false,
136
+ "use_intermediate_ffn_before_adapter": false,
137
+ "use_weighted_layer_sum": false,
138
+ "vocab_size": null,
139
+ "xvector_output_dim": 512
140
+ },
141
+ "audio_token_index": 128257,
142
+ "model_type": "llama3",
143
+ "text_config": {
144
+ "_attn_implementation_autoset": false,
145
+ "_name_or_path": "",
146
+ "add_cross_attention": false,
147
+ "architectures": [
148
+ "LlamaForCausalLM"
149
+ ],
150
+ "attention_bias": false,
151
+ "attention_dropout": 0.0,
152
+ "bad_words_ids": null,
153
+ "begin_suppress_tokens": null,
154
+ "bos_token_id": 128000,
155
+ "chunk_size_feed_forward": 0,
156
+ "cross_attention_hidden_size": null,
157
+ "decoder_start_token_id": null,
158
+ "diversity_penalty": 0.0,
159
+ "do_sample": false,
160
+ "early_stopping": false,
161
+ "encoder_no_repeat_ngram_size": 0,
162
+ "eos_token_id": [
163
+ 128001,
164
+ 128008,
165
+ 128009
166
+ ],
167
+ "exponential_decay_length_penalty": null,
168
+ "finetuning_task": null,
169
+ "forced_bos_token_id": null,
170
+ "forced_eos_token_id": null,
171
+ "head_dim": 128,
172
+ "hidden_act": "silu",
173
+ "hidden_size": 4096,
174
+ "id2label": {
175
+ "0": "LABEL_0",
176
+ "1": "LABEL_1"
177
+ },
178
+ "initializer_range": 0.02,
179
+ "intermediate_size": 14336,
180
+ "is_decoder": false,
181
+ "is_encoder_decoder": false,
182
+ "label2id": {
183
+ "LABEL_0": 0,
184
+ "LABEL_1": 1
185
+ },
186
+ "length_penalty": 1.0,
187
+ "max_length": 20,
188
+ "max_position_embeddings": 131072,
189
+ "min_length": 0,
190
+ "mlp_bias": false,
191
+ "model_type": "llama",
192
+ "no_repeat_ngram_size": 0,
193
+ "num_attention_heads": 32,
194
+ "num_beam_groups": 1,
195
+ "num_beams": 1,
196
+ "num_hidden_layers": 32,
197
+ "num_key_value_heads": 8,
198
+ "num_return_sequences": 1,
199
+ "output_attentions": false,
200
+ "output_hidden_states": false,
201
+ "output_scores": false,
202
+ "pad_token_id": null,
203
+ "prefix": null,
204
+ "pretraining_tp": 1,
205
+ "problem_type": null,
206
+ "pruned_heads": {},
207
+ "remove_invalid_values": false,
208
+ "repetition_penalty": 1.0,
209
+ "return_dict": true,
210
+ "return_dict_in_generate": false,
211
+ "rms_norm_eps": 1e-05,
212
+ "rope_scaling": {
213
+ "factor": 8.0,
214
+ "high_freq_factor": 4.0,
215
+ "low_freq_factor": 1.0,
216
+ "original_max_position_embeddings": 8192,
217
+ "rope_type": "llama3"
218
+ },
219
+ "rope_theta": 500000.0,
220
+ "sep_token_id": null,
221
+ "suppress_tokens": null,
222
+ "task_specific_params": null,
223
+ "temperature": 1.0,
224
+ "tf_legacy_loss": false,
225
+ "tie_encoder_decoder": false,
226
+ "tie_word_embeddings": false,
227
+ "tokenizer_class": null,
228
+ "top_k": 50,
229
+ "top_p": 1.0,
230
+ "torch_dtype": "bfloat16",
231
+ "torchscript": false,
232
+ "typical_p": 1.0,
233
+ "use_bfloat16": false,
234
+ "use_cache": true,
235
+ "vocab_size": 128256
236
+ },
237
+ "torch_dtype": "bfloat16",
238
+ "transformers_version": "4.46.2"
239
+ }
configuration_llama3.py ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2024 HuggingFace Inc. team. All rights reserved.
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ """Mllama model configuration"""
15
+
16
+ import os
17
+ from typing import Dict, List, Optional, Union
18
+
19
+ import transformers
20
+ from transformers.configuration_utils import PretrainedConfig
21
+ from transformers.modeling_rope_utils import rope_config_validation
22
+ from transformers.utils import logging
23
+ from transformers import Wav2Vec2BertConfig, AutoConfig, LlamaConfig
24
+ from transformers.models.mllama.configuration_mllama import MllamaVisionConfig, MllamaTextConfig
25
+
26
+ logger = logging.get_logger(__name__)
27
+
28
+
29
+ class Llama3Config(PretrainedConfig):
30
+ r"""
31
+ This is the configuration class to store the configuration of a [`MllamaForConditionalGeneration`]. It is used to instantiate an
32
+ Mllama model according to the specified arguments, defining the model architecture. Instantiating a configuration
33
+ with the defaults will yield a similar configuration to that of the Mllama-9B.
34
+
35
+ e.g. [meta-llama/Llama-3.2-11B-Vision](https://huggingface.co/meta-llama/Llama-3.2-11B-Vision)
36
+
37
+ Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
38
+ documentation from [`PretrainedConfig`] for more information.
39
+
40
+ Args:
41
+ vision_config (`Union[AutoConfig, dict]`, *optional*, defaults to `MllamaVisionConfig`):
42
+ The config object or dictionary of the vision backbone.
43
+ text_config (`Union[AutoConfig, dict]`, *optional*, defaults to `MllamaTextConfig`):
44
+ The config object or dictionary of the text backbone.
45
+ image_token_index (`int`, *optional*, defaults to 128256):
46
+ The image token index to encode the image prompt.
47
+
48
+ Example:
49
+
50
+ ```python
51
+ >>> from transformers import MllamaForConditionalGeneration, MllamaConfig, MllamaVisionConfig, MllamaTextConfig
52
+
53
+ >>> # Initializing a CLIP-vision config
54
+ >>> vision_config = MllamaVisionConfig()
55
+
56
+ >>> # Initializing a Llama config
57
+ >>> text_config = MllamaTextConfig()
58
+
59
+ >>> # Initializing a mllama-11b style configuration
60
+ >>> configuration = MllamaConfig(vision_config, text_config)
61
+
62
+ >>> # Initializing a model from the mllama-11b style configuration
63
+ >>> model = MllamaForConditionalGeneration(configuration)
64
+
65
+ >>> # Accessing the model configuration
66
+ >>> configuration = model.config
67
+ ```"""
68
+
69
+ model_type = "llama3"
70
+ is_composition = True
71
+
72
+ def __init__(
73
+ self,
74
+ text_config=None,
75
+ audio_config=None,
76
+ audio_token_index=128257,
77
+ **kwargs,
78
+ ):
79
+ if audio_config is None:
80
+ self.audio_config = Wav2Vec2BertConfig()
81
+ logger.info("audio_config is None, using default mllama audio config")
82
+ elif isinstance(audio_config, dict):
83
+ self.audio_config = Wav2Vec2BertConfig(**audio_config)
84
+ elif isinstance(audio_config, Wav2Vec2BertConfig):
85
+ self.audio_config = audio_config
86
+
87
+ self.audio_token_index = audio_token_index
88
+
89
+ if text_config is None:
90
+ self.text_config = LlamaConfig()
91
+ logger.info("text_config is None, using default mllama text config")
92
+ elif isinstance(text_config, dict):
93
+ self.text_config = LlamaConfig(**text_config)
94
+ elif isinstance(text_config, LlamaConfig):
95
+ self.text_config = text_config
96
+
97
+ super().__init__(**kwargs)
98
+
99
+ AutoConfig.register("llama3", Llama3Config)
100
+ transformers.Llama3Config = Llama3Config
generation_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 128000,
4
+ "eos_token_id": [
5
+ 128001,
6
+ 128008,
7
+ 128009
8
+ ],
9
+ "transformers_version": "4.46.2"
10
+ }
mllama_audio_model.py ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import math
2
+ from typing import Optional, Tuple, Union
3
+ import torch
4
+ from torch import nn
5
+ from transformers.modeling_outputs import BaseModelOutput
6
+ from transformers import Wav2Vec2BertModel, Wav2Vec2BertConfig, MllamaPreTrainedModel
7
+ from transformers.models.wav2vec2_bert.modeling_wav2vec2_bert import _compute_new_attention_mask, _prepare_4d_attention_mask, Wav2Vec2BertFeedForward, Wav2Vec2BertSelfAttention, Wav2Vec2BertFeatureProjection
8
+ from .configuration_llama3 import Llama3Config
9
+
10
+ class Wav2Vec2BertAdapterLayer(nn.Module):
11
+ def __init__(self, config):
12
+ super().__init__()
13
+ embed_dim = config.output_hidden_size
14
+ dropout = config.conformer_conv_dropout
15
+
16
+ self.kernel_size = config.adapter_kernel_size
17
+ self.stride = config.adapter_stride
18
+
19
+ self.activation = nn.GLU(dim=1)
20
+
21
+ # Self-Attention
22
+ self.self_attn_conv = nn.Conv1d(
23
+ embed_dim,
24
+ 2 * embed_dim,
25
+ self.kernel_size,
26
+ stride=self.stride,
27
+ padding=self.stride // 2,
28
+ )
29
+ self.self_attn = Wav2Vec2BertSelfAttention(config, is_adapter_attention=True)
30
+ self.self_attn_dropout = nn.Dropout(dropout)
31
+
32
+ # Feed-forward
33
+ self.ffn = Wav2Vec2BertFeedForward(config, act_fn=config.adapter_act, hidden_size=embed_dim)
34
+
35
+ def forward(
36
+ self,
37
+ hidden_states,
38
+ attention_mask: Optional[torch.Tensor] = None,
39
+ output_attentions: bool = False,
40
+ sub_sampled_lengths: Optional[torch.Tensor] = None,
41
+ ):
42
+ # Apply pooling before feeding to the multihead-attention layer.
43
+ # (batch, seq_len, feature_dim) -> (batch, feature_dim, seq_len)
44
+ hidden_states = hidden_states.transpose(1, 2)
45
+ hidden_states = self.self_attn_conv(hidden_states)
46
+ hidden_states = self.activation(hidden_states)
47
+ # (batch, feature_dim, seq_len) -> (batch, seq_len, feature_dim)
48
+ hidden_states = hidden_states.transpose(1, 2)
49
+
50
+ if attention_mask is not None:
51
+ attention_mask = _compute_new_attention_mask(hidden_states=hidden_states, seq_lens=sub_sampled_lengths)
52
+ attention_mask = _prepare_4d_attention_mask(
53
+ attention_mask,
54
+ hidden_states.dtype,
55
+ )
56
+
57
+ # The rest of the computation is identical to a vanilla Transformer
58
+ # encoder layer.
59
+ hidden_states, attn_weigths = self.self_attn(
60
+ hidden_states,
61
+ attention_mask=attention_mask,
62
+ output_attentions=output_attentions,
63
+ )
64
+ hidden_states = self.self_attn_dropout(hidden_states)
65
+ hidden_states = self.ffn(hidden_states)
66
+
67
+ return hidden_states
68
+
69
+ class AudioAdapter(nn.Module):
70
+ def __init__(self, config: Wav2Vec2BertConfig):
71
+ super().__init__()
72
+ # feature dim might need to be down-projected
73
+ if config.output_hidden_size != config.hidden_size:
74
+ self.proj = nn.Linear(config.hidden_size, config.output_hidden_size)
75
+ else:
76
+ self.proj = None
77
+ self.layers = nn.ModuleList(Wav2Vec2BertAdapterLayer(config) for _ in range(config.num_adapter_layers))
78
+
79
+ self.kernel_size = config.adapter_kernel_size
80
+ self.stride = config.adapter_stride
81
+
82
+ def _compute_sub_sample_lengths_from_attention_mask(self, seq_lens):
83
+ if seq_lens is None:
84
+ return seq_lens
85
+ pad = self.stride // 2
86
+ seq_lens = ((seq_lens + 2 * pad - self.kernel_size) / self.stride) + 1
87
+ return seq_lens.floor()
88
+
89
+ def forward(self, hidden_states, attention_mask=None):
90
+ # down project hidden_states if necessary
91
+ if self.proj is not None:
92
+ hidden_states = self.proj(hidden_states)
93
+
94
+ sub_sampled_lengths = None
95
+ if attention_mask is not None:
96
+ sub_sampled_lengths = (attention_mask.size(1) - (1 - attention_mask.int()).sum(1)).to(hidden_states.device)
97
+
98
+ for layer in self.layers:
99
+ sub_sampled_lengths = self._compute_sub_sample_lengths_from_attention_mask(sub_sampled_lengths)
100
+ hidden_states = layer(
101
+ hidden_states, attention_mask=attention_mask, sub_sampled_lengths=sub_sampled_lengths
102
+ )
103
+
104
+ return hidden_states
105
+
106
+
107
+ class Llama3Embedding(MllamaPreTrainedModel):
108
+ config_class = Llama3Config
109
+ base_model_prefix = "audio_model"
110
+ def __init__(self, config: Llama3Config):
111
+ super().__init__(config)
112
+ assert config.audio_config.output_hidden_size == config.text_config.hidden_size
113
+ config.audio_config.add_adapter = False
114
+ self.audio_encoder = Wav2Vec2BertModel(config.audio_config)
115
+ self.audio_adapter = AudioAdapter(config.audio_config)
116
+ self.start_of_audio = nn.Parameter(data=torch.empty((1, config.audio_config.output_hidden_size)), requires_grad=True)
117
+ self.end_of_audio = nn.Parameter(data=torch.empty((1, config.audio_config.output_hidden_size)), requires_grad=True)
118
+
119
+ def forward(
120
+ self,
121
+ input_ids: torch.LongTensor = None,
122
+ input_embeddings: torch.Tensor = None,
123
+ audio_features: Optional[torch.Tensor] = None,
124
+ ) -> Union[BaseModelOutput, Tuple[torch.Tensor, ...]]:
125
+ if audio_features is None:
126
+ return input_embeddings
127
+ bs, max_num_img, l, d = audio_features.shape
128
+ audio_embeddings = self.audio_encoder(input_features=audio_features.view((bs*max_num_img, l, d)))['last_hidden_state']
129
+ audio_embeddings = self.audio_adapter(audio_embeddings)
130
+ audio_embeddings = audio_embeddings.view((bs, max_num_img, -1, self.start_of_audio.shape[-1]))
131
+
132
+ for i in range(bs):
133
+ for j in range(max_num_img):
134
+ audio_id = -1 - j
135
+ if torch.any(input_ids[i] == audio_id):
136
+ positions = torch.nonzero(input_ids[i] == audio_id, as_tuple=True)
137
+ input_embeddings[i] = input_embeddings[i].index_put(positions, torch.concat([self.start_of_audio, audio_embeddings[i, j, :, :], self.end_of_audio]), accumulate=False)
138
+ return input_embeddings
139
+
140
+ def _init_weights(self, module):
141
+ """Initialize the weights"""
142
+ if isinstance(module, Wav2Vec2BertSelfAttention):
143
+ if hasattr(module, "pos_bias_u"):
144
+ nn.init.xavier_uniform_(module.pos_bias_u)
145
+ if hasattr(module, "pos_bias_v"):
146
+ nn.init.xavier_uniform_(module.pos_bias_v)
147
+ elif isinstance(module, Wav2Vec2BertFeatureProjection):
148
+ k = math.sqrt(1 / module.projection.in_features)
149
+ nn.init.uniform_(module.projection.weight, a=-k, b=k)
150
+ nn.init.uniform_(module.projection.bias, a=-k, b=k)
151
+ elif isinstance(module, nn.Linear):
152
+ module.weight.data.normal_(mean=0.0, std=self.config.audio_config.initializer_range)
153
+
154
+ if module.bias is not None:
155
+ module.bias.data.zero_()
156
+ elif isinstance(module, (nn.LayerNorm, nn.GroupNorm)):
157
+ module.bias.data.zero_()
158
+ module.weight.data.fill_(1.0)
159
+ elif isinstance(module, nn.Conv1d):
160
+ nn.init.kaiming_normal_(module.weight)
161
+
162
+ if module.bias is not None:
163
+ k = math.sqrt(module.groups / (module.in_channels * module.kernel_size[0]))
164
+ nn.init.uniform_(module.bias, a=-k, b=k)
model-00001-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:52773461deea8c59ce07e3eeb4fd751cef6b3681ecf5699662e3087ce610dfb7
3
+ size 4976699904
model-00002-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a28b9c6260618cd6aa8322512b304b80b905f9217d04aa682ebafa907f11c904
3
+ size 4999804280
model-00003-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bc9f8ac1b559c20b00291189a797ff65b39af78f2ea198fa83f3bcff98133807
3
+ size 4915917680
model-00004-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:becc36a34d636340d3138ee98c134c9ed495b5946e6618ace81e9caa21656b78
3
+ size 2740372160
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
modeling_llama3.py ADDED
@@ -0,0 +1,256 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ from typing import List, Optional, Tuple, Union
3
+
4
+ import torch
5
+ import torch.utils.checkpoint
6
+ from torch import nn
7
+
8
+ import transformers
9
+ from transformers import PreTrainedModel, LlamaPreTrainedModel, LlamaForCausalLM, AutoModelForCausalLM
10
+ from transformers.generation import GenerationMixin
11
+ from transformers.modeling_outputs import CausalLMOutputWithPast
12
+ from transformers.utils import logging
13
+ from transformers.models.mllama.modeling_mllama import _prepare_cross_attention_mask
14
+ from .configuration_llama3 import Llama3Config
15
+ from .mllama_audio_model import Llama3Embedding
16
+
17
+
18
+ logger = logging.get_logger(__name__)
19
+
20
+ class Llama3PreTrainedModel(PreTrainedModel):
21
+ config_class = Llama3Config
22
+ base_model_prefix = "model"
23
+ supports_gradient_checkpointing = True
24
+ _no_split_modules = ["LlamaDecoderLayer"]
25
+ _skip_keys_device_placement = ["past_key_values"]
26
+ _supports_flash_attn_2 = True
27
+ _supports_sdpa = True
28
+ _supports_cache_class = True
29
+ _supports_quantized_cache = True
30
+ _supports_static_cache = True
31
+
32
+ def _init_weights(self, module):
33
+ std = self.config.get_text_config().initializer_range
34
+ if isinstance(module, nn.Linear):
35
+ module.weight.data.normal_(mean=0.0, std=std)
36
+ if module.bias is not None:
37
+ module.bias.data.zero_()
38
+ elif isinstance(module, nn.Embedding):
39
+ module.weight.data.normal_(mean=0.0, std=std)
40
+ if module.padding_idx is not None:
41
+ module.weight.data[module.padding_idx].zero_()
42
+
43
+ class Llama3ForCausalLM(Llama3PreTrainedModel, GenerationMixin):
44
+ config_class = Llama3Config
45
+ base_model_prefix = "model"
46
+ _supports_quantized_cache = False # quant cache not supported in encoder-decoder setting
47
+
48
+ def __init__(self, config: Llama3Config):
49
+ super().__init__(config)
50
+ self.vocab_size = config.text_config.vocab_size
51
+ self.hidden_size = config.text_config.hidden_size
52
+ self.pad_token_id = self.config.pad_token_id if self.config.pad_token_id is not None else -1
53
+ self.language_model = LlamaForCausalLM._from_config(config.text_config)
54
+ self.embed_tokens = Llama3Embedding(config)
55
+ self.post_init()
56
+
57
+ def get_input_embeddings(self):
58
+ return self.language_model.get_input_embeddings()
59
+
60
+ def set_input_embeddings(self, value):
61
+ self.language_model.set_input_embeddings(value)
62
+
63
+ def get_output_embeddings(self):
64
+ return self.language_model.get_output_embeddings()
65
+
66
+ def set_output_embeddings(self, new_embeddings):
67
+ self.language_model.set_output_embeddings(new_embeddings)
68
+
69
+ def set_decoder(self, decoder):
70
+ self.language_model.set_decoder(decoder)
71
+
72
+ def get_decoder(self):
73
+ return self.language_model.get_decoder()
74
+
75
+ def tie_weights(self):
76
+ return self.language_model.tie_weights()
77
+
78
+ def forward(
79
+ self,
80
+ input_ids: Optional[torch.LongTensor] = None,
81
+ audio_features: Optional[torch.FloatTensor] = None,
82
+ attention_mask: Optional[torch.Tensor] = None,
83
+ cross_attention_mask: Optional[torch.Tensor] = None,
84
+ cross_attention_states: Optional[torch.Tensor] = None,
85
+ position_ids: Optional[torch.LongTensor] = None,
86
+ past_key_values: Optional[List[torch.FloatTensor]] = None,
87
+ inputs_embeds: Optional[torch.FloatTensor] = None,
88
+ labels: Optional[torch.LongTensor] = None,
89
+ use_cache: Optional[bool] = None,
90
+ output_attentions: Optional[bool] = None,
91
+ output_hidden_states: Optional[bool] = None,
92
+ return_dict: Optional[bool] = None,
93
+ cache_position: Optional[torch.LongTensor] = None,
94
+ num_logits_to_keep: int = 0,
95
+ ) -> Union[Tuple, CausalLMOutputWithPast]:
96
+ r"""
97
+ Args:
98
+ labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
99
+ Labels for computing the masked language modeling loss. Indices should either be in `[0, ...,
100
+ config.vocab_size]` or -100 (see `input_ids` docstring). Tokens with indices set to `-100` are ignored
101
+ (masked), the loss is only computed for the tokens with labels in `[0, ..., config.vocab_size]`.
102
+
103
+ num_logits_to_keep (`int`, *optional*):
104
+ Calculate logits for the last `num_logits_to_keep` tokens. If `0`, calculate logits for all
105
+ `input_ids` (special case). Only last token logits are needed for generation, and calculating them only for that
106
+ token can save memory, which becomes pretty significant for long sequences or large vocabulary size.
107
+
108
+
109
+ Returns:
110
+
111
+ Example:
112
+
113
+ ```python
114
+ >>> from PIL import Image
115
+ >>> import requests
116
+ >>> from transformers import AutoProcessor, MllamaForConditionalGeneration
117
+
118
+ >>> checkpoint = "meta-llama/Llama-3.2-11B-Vision"
119
+ >>> model = MllamaForConditionalGeneration.from_pretrained(checkpoint)
120
+ >>> processor = AutoProcessor.from_pretrained(checkpoint)
121
+
122
+ >>> prompt = "<|image|>If I had to write a haiku for this one"
123
+ >>> url = "https://www.ilankelman.org/stopsigns/australia.jpg"
124
+ >>> image = Image.open(requests.get(url, stream=True).raw)
125
+
126
+ >>> inputs = processor(text=prompt, images=image, return_tensors="pt")
127
+
128
+ >>> # Generate
129
+ >>> output = model.generate(**inputs, max_new_tokens=15)
130
+
131
+ >>> prompt_len = inputs.input_ids.shape[-1]
132
+ >>> generated_ids = output[:, prompt_len:]
133
+ >>> generated_text = processor.batch_decode(generated_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)
134
+ >>> print(generated_text)
135
+ [', it would be:.\\nA stop sign in Chinatown.\\n']
136
+ ```
137
+ """
138
+ output_attentions = output_attentions if output_attentions is not None else self.config.text_config.output_attentions
139
+ output_hidden_states = (
140
+ output_hidden_states if output_hidden_states is not None else self.config.text_config.output_hidden_states
141
+ )
142
+ return_dict = return_dict if return_dict is not None else self.config.text_config.use_return_dict
143
+
144
+ if (input_ids is None) ^ (inputs_embeds is not None):
145
+ raise ValueError("You must specify exactly one of input_ids or inputs_embeds")
146
+
147
+ if inputs_embeds is None:
148
+ input_embeddings = self.get_input_embeddings()(input_ids.clamp_min(0).detach())
149
+ inputs_embeds = self.embed_tokens(input_ids=input_ids, input_embeddings=input_embeddings, audio_features=audio_features)
150
+
151
+ outputs = self.language_model(
152
+ input_ids=None,
153
+ attention_mask=attention_mask,
154
+ position_ids=position_ids,
155
+ cross_attention_states=cross_attention_states,
156
+ cross_attention_mask=cross_attention_mask,
157
+ full_text_row_masked_out_mask=None,
158
+ past_key_values=past_key_values,
159
+ use_cache=use_cache,
160
+ inputs_embeds=inputs_embeds,
161
+ labels=labels,
162
+ output_hidden_states=output_hidden_states,
163
+ output_attentions=output_attentions,
164
+ return_dict=return_dict,
165
+ cache_position=cache_position,
166
+ num_logits_to_keep=num_logits_to_keep,
167
+ )
168
+
169
+ return outputs
170
+
171
+ def prepare_inputs_for_generation(
172
+ self,
173
+ input_ids=None,
174
+ audio_features=None,
175
+ inputs_embeds=None,
176
+ attention_mask=None,
177
+ position_ids=None,
178
+ aspect_ratio_ids=None,
179
+ aspect_ratio_mask=None,
180
+ cross_attention_mask=None,
181
+ past_key_values=None,
182
+ use_cache=False,
183
+ cache_position=None,
184
+ num_logits_to_keep=None,
185
+ **kwargs,
186
+ ):
187
+ # Overwritten -- in specific circumstances we don't want to forward image inputs to the model
188
+
189
+ # If we have cache: let's slice `input_ids` through `cache_position`, to keep only the unprocessed tokens
190
+ # Exception 1: when passing input_embeds, input_ids may be missing entries
191
+ # Exception 2: some generation methods do special slicing of input_ids, so we don't need to do it here
192
+ if past_key_values is not None:
193
+ if inputs_embeds is not None: # Exception 1
194
+ input_ids = input_ids[:, -cache_position.shape[0] :]
195
+ elif input_ids.shape[1] != cache_position.shape[0]: # Default case (the "else", a no op, is Exception 2)
196
+ input_ids = input_ids[:, cache_position]
197
+
198
+ # TODO: we have no attention_mask so this won't work, check if we really won't need attention mask and find another way
199
+ if attention_mask is not None and position_ids is None:
200
+ # create position_ids on the fly for batch generation
201
+ position_ids = attention_mask.long().cumsum(-1) - 1
202
+ position_ids.masked_fill_(attention_mask == 0, 1)
203
+ if past_key_values:
204
+ position_ids = position_ids[:, -input_ids.shape[1] :]
205
+
206
+ # This `clone` call is needed to avoid recapturing cuda graphs with `torch.compile`'s `mode="reduce-overhead`, as otherwise the input `position_ids` would have various stride during the decoding. Here, simply using `.contiguous()` is not sufficient as in the batch size = 1 case, `position_ids` is already contiguous but with varying stride which retriggers a capture.
207
+ position_ids = position_ids.clone(memory_format=torch.contiguous_format)
208
+
209
+ # if `inputs_embeds` are passed, we only want to use them in the 1st generation step
210
+ if inputs_embeds is not None and cache_position[0] == 0:
211
+ model_inputs = {"inputs_embeds": inputs_embeds, "input_ids": None}
212
+ else:
213
+ # The clone here is for the same reason as for `position_ids`.
214
+ model_inputs = {"input_ids": input_ids.clone(memory_format=torch.contiguous_format), "inputs_embeds": None}
215
+
216
+ if num_logits_to_keep is not None:
217
+ model_inputs["num_logits_to_keep"] = num_logits_to_keep
218
+
219
+ model_inputs.update(
220
+ {
221
+ "audio_features":audio_features,
222
+ "position_ids": position_ids,
223
+ "cache_position": cache_position,
224
+ "past_key_values": past_key_values,
225
+ "use_cache": use_cache,
226
+ "attention_mask": attention_mask,
227
+ "cross_attention_mask": cross_attention_mask,
228
+ }
229
+ )
230
+
231
+ # If we're in pre-fill or cacheless decoding step, then we need pixel_values and aspect ratios
232
+ # to compute image hidden states, otherwise they are cached within each cross attn layer
233
+ if cache_position[0] == 0:
234
+ model_inputs["aspect_ratio_ids"] = aspect_ratio_ids
235
+ model_inputs["aspect_ratio_mask"] = aspect_ratio_mask
236
+
237
+ return model_inputs
238
+
239
+ def _update_model_kwargs_for_generation(self, outputs, model_kwargs, is_encoder_decoder, **kwargs):
240
+ cross_attention_mask_prev = model_kwargs.get("cross_attention_mask", None)
241
+ model_kwargs = super()._update_model_kwargs_for_generation(
242
+ outputs=outputs,
243
+ model_kwargs=model_kwargs,
244
+ is_encoder_decoder=is_encoder_decoder,
245
+ **kwargs,
246
+ )
247
+
248
+ # add cross-attn mask for new token
249
+ if cross_attention_mask_prev is not None:
250
+ model_kwargs["cross_attention_mask"] = torch.cat(
251
+ [cross_attention_mask_prev, cross_attention_mask_prev[:, -1:, ...]], dim=1
252
+ )
253
+ return model_kwargs
254
+
255
+ AutoModelForCausalLM.register(Llama3Config, Llama3ForCausalLM)
256
+ transformers.Llama3ForCausalLM = Llama3ForCausalLM
preprocessor_config.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "auto_map": {
3
+ "AutoFeatureExtractor": "audio_processing_mllama.MllamaAudioFeatureExtractor",
4
+ "AutoProcessor": "processing_mllama.MllamaProcessor"
5
+ },
6
+ "do_convert_rgb": true,
7
+ "do_normalize": true,
8
+ "do_pad": true,
9
+ "do_rescale": true,
10
+ "do_resize": true,
11
+ "feature_extractor_type": "MllamaAudioFeatureExtractor",
12
+ "feature_size": 80,
13
+ "image_mean": [
14
+ 0.48145466,
15
+ 0.4578275,
16
+ 0.40821073
17
+ ],
18
+ "image_processor_type": "MllamaImageProcessor",
19
+ "image_std": [
20
+ 0.26862954,
21
+ 0.26130258,
22
+ 0.27577711
23
+ ],
24
+ "max_image_tiles": 4,
25
+ "num_mel_bins": 80,
26
+ "padding_side": "right",
27
+ "padding_value": 0.0,
28
+ "processor_class": "MllamaProcessor",
29
+ "resample": 2,
30
+ "rescale_factor": 0.00392156862745098,
31
+ "return_attention_mask": true,
32
+ "sampling_rate": 16000,
33
+ "size": {
34
+ "height": 560,
35
+ "width": 560
36
+ },
37
+ "stride": 2
38
+ }
processing_mllama.py ADDED
@@ -0,0 +1,377 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2024 The HuggingFace Inc. team.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ """Processor class for Mllama."""
17
+
18
+ from typing import List, Optional, Union
19
+
20
+ import numpy as np
21
+ import torch
22
+ import transformers
23
+ from transformers import AutoProcessor
24
+ from transformers.feature_extraction_utils import BatchFeature
25
+ from transformers.image_utils import ImageInput
26
+ from transformers.processing_utils import ImagesKwargs, ProcessingKwargs, ProcessorMixin, Unpack, AudioKwargs
27
+ from transformers.tokenization_utils_base import (
28
+ PreTokenizedInput,
29
+ TextInput,
30
+ AudioInput,
31
+ )
32
+
33
+ # TODO: Can we do it that way or its better include as "Copied from ..."
34
+ from transformers.models.mllama.image_processing_mllama import make_list_of_images
35
+ from .audio_processing_mllama import build_audio_tokens
36
+
37
+
38
+ class MllamaImagesKwargs(ImagesKwargs, total=False):
39
+ max_image_tiles: Optional[int]
40
+
41
+ class MllamaProcessorKwargs(ProcessingKwargs, total=False):
42
+ images_kwargs: MllamaImagesKwargs
43
+
44
+ _defaults = {
45
+ "image_kwargs": {
46
+ "max_image_tiles": 4,
47
+ },
48
+ }
49
+
50
+
51
+ def get_cross_attention_token_mask(input_ids: List[int], image_token_id: int) -> List[List[int]]:
52
+ """
53
+ Generate a cross-attention token mask for image tokens in the input sequence.
54
+
55
+ This function identifies the positions of image tokens in the input sequence and creates
56
+ a mask that defines which subsequent tokens each image token should attend to.
57
+
58
+ Args:
59
+ input_ids (List[int]): A list of token ids representing the input sequence.
60
+ image_token_id (int): The id of the token used to represent images in the sequence.
61
+
62
+ Returns:
63
+ List[List[int]]: A list of [start, end] pairs, where each pair represents the range
64
+ of tokens an image token should attend to.
65
+
66
+ Notes:
67
+ - If no image tokens are present, an empty list is returned.
68
+ - For a single image token, it attends to all subsequent tokens until the end of the sequence.
69
+ - For multiple image tokens, each attends to tokens up to the next image token or the end of the sequence.
70
+ - Consecutive image tokens are treated as a group and attend to all subsequent tokens together.
71
+ """
72
+
73
+ image_token_locations = [i for i, token in enumerate(input_ids) if token == image_token_id]
74
+
75
+ if len(image_token_locations) == 0:
76
+ return []
77
+
78
+ # only one image present, unmask until end of sequence
79
+ if len(image_token_locations) == 1:
80
+ return [[image_token_locations[0], -1]]
81
+
82
+ vision_masks = [[loc1, loc2] for loc1, loc2 in zip(image_token_locations[:-1], image_token_locations[1:])]
83
+
84
+ # last image will attend to all subsequent text
85
+ vision_masks.append([image_token_locations[-1], len(input_ids)])
86
+
87
+ # if there are two or more consecutive vision tokens,
88
+ # they should all attend to all subsequent
89
+ # text present
90
+ last_mask_end = vision_masks[-1][1]
91
+ for vision_mask in vision_masks[::-1]:
92
+ if vision_mask[0] == vision_mask[1] - 1:
93
+ vision_mask[1] = last_mask_end
94
+ last_mask_end = vision_mask[1]
95
+
96
+ return vision_masks
97
+
98
+
99
+ def convert_sparse_cross_attention_mask_to_dense(
100
+ cross_attention_token_mask: List[List[List[int]]],
101
+ num_tiles: List[List[int]],
102
+ max_num_tiles: int,
103
+ length: int,
104
+ ) -> np.ndarray:
105
+ """
106
+ Convert the cross attention mask indices to a cross attention mask 4D array.
107
+
108
+ This function takes a sparse representation of cross attention masks and converts it to a dense 4D numpy array.
109
+ The sparse representation is a nested list structure that defines attention ranges for each image in each batch item.
110
+
111
+ Args:
112
+ cross_attention_token_mask (List[List[List[int]]]): A nested list structure where:
113
+ - The outer list represents the batch dimension.
114
+ - The middle list represents different images within each batch item.
115
+ - The inner list contains pairs of integers [start, end] representing token ranges for each image.
116
+ num_tiles (List[List[int]]): A nested list structure specifying the number of tiles for each image in each batch item.
117
+ max_num_tiles (int): The maximum possible number of tiles.
118
+ length (int): The total sequence length of the input.
119
+
120
+ Returns:
121
+ np.ndarray: A 4D numpy array of shape (batch_size, length, max_num_images, max_num_tiles)
122
+ The array contains `1` where attention is allowed and `0` where it is not.
123
+
124
+ Note:
125
+ - Special handling is done for cases where the end token is -1, which is interpreted as attending to the end of the sequence.
126
+ """
127
+
128
+ batch_size = len(cross_attention_token_mask)
129
+ max_num_images = max([len(masks) for masks in cross_attention_token_mask])
130
+
131
+ cross_attention_mask = np.zeros(
132
+ shape=(batch_size, length, max_num_images, max_num_tiles),
133
+ dtype=np.int64,
134
+ )
135
+
136
+ for sample_idx, (sample_masks, sample_num_tiles) in enumerate(zip(cross_attention_token_mask, num_tiles)):
137
+ for mask_idx, (locations, mask_num_tiles) in enumerate(zip(sample_masks, sample_num_tiles)):
138
+ if len(locations) == 2:
139
+ start, end = locations
140
+ end = min(end, length)
141
+ if end == -1:
142
+ end = length
143
+ cross_attention_mask[sample_idx, start:end, mask_idx, :mask_num_tiles] = 1
144
+ return cross_attention_mask
145
+
146
+
147
+ def build_string_from_input(prompt: str, bos_token: str, image_token: str) -> str:
148
+ """
149
+ Builds a string from the input prompt by adding `bos_token` if not already present.
150
+
151
+ Args:
152
+ prompt (`str`):
153
+ The input prompt string.
154
+ bos_token (`str`):
155
+ The beginning of sentence token to be added.
156
+ image_token (`str`):
157
+ The image token used to identify the start of an image sequence.
158
+
159
+ Returns:
160
+ str: The modified prompt string with the `bos_token` added if necessary.
161
+
162
+ Examples:
163
+ >>> build_string_from_input("Hello world", "<begin_of_text>", "<|image|>")
164
+ '<begin_of_text>Hello world'
165
+
166
+ >>> build_string_from_input("<|image|>Hello world", "<begin_of_text>", "<|image|>")
167
+ '<|image|><begin_of_text>Hello world'
168
+
169
+ >>> build_string_from_input("<begin_of_text>Hello world", "<begin_of_text>", "<|image|>")
170
+ '<begin_of_text>Hello world'
171
+ """
172
+
173
+ if bos_token in prompt:
174
+ return prompt
175
+
176
+ num_image_tokens_on_start = 0
177
+ while prompt.startswith(image_token):
178
+ prompt = prompt[len(image_token) :]
179
+ num_image_tokens_on_start += 1
180
+
181
+ return f"{image_token * num_image_tokens_on_start}{bos_token}{prompt}"
182
+
183
+
184
+ class MllamaProcessor(ProcessorMixin):
185
+ r"""
186
+ Constructs a Mllama processor which wraps [`MllamaImageProcessor`] and
187
+ [`PretrainedTokenizerFast`] into a single processor that inherits both the image processor and
188
+ tokenizer functionalities. See the [`~MllamaProcessor.__call__`] and [`~OwlViTProcessor.decode`] for more
189
+ information.
190
+ The preferred way of passing kwargs is as a dictionary per modality, see usage example below.
191
+ ```python
192
+ from transformers import MllamaProcessor
193
+ from PIL import Image
194
+
195
+ processor = MllamaProcessor.from_pretrained("meta-llama/Llama-3.2-11B-Vision")
196
+
197
+ processor(
198
+ images=your_pil_image,
199
+ text=["<|image|>If I had to write a haiku for this one"],
200
+ images_kwargs = {"size": {"height": 448, "width": 448}},
201
+ text_kwargs = {"padding": "right"},
202
+ common_kwargs = {"return_tensors": "pt"},
203
+ )
204
+ ```
205
+
206
+ Args:
207
+ image_processor ([`MllamaImageProcessor`]):
208
+ The image processor is a required input.
209
+ tokenizer ([`PreTrainedTokenizer`, `PreTrainedTokenizerFast`]):
210
+ The tokenizer is a required input.
211
+
212
+ """
213
+
214
+ attributes = ["image_processor", "audio_processor", "tokenizer"]
215
+ image_processor_class = "MllamaImageProcessor"
216
+ audio_processor_class = "MllamaAudioFeatureExtractor"
217
+ tokenizer_class = "PreTrainedTokenizerFast"
218
+
219
+ def __init__(self, image_processor, audio_processor, tokenizer):
220
+ self.image_token = "<|image|>"
221
+ self.image_token_id = tokenizer.convert_tokens_to_ids(self.image_token)
222
+ self.audio_token = "<|audio|>"
223
+ self.audio_token_id = tokenizer.convert_tokens_to_ids(self.audio_token)
224
+ self.python_token = "<|python_tag|>"
225
+ self.python_token_id = tokenizer.convert_tokens_to_ids(self.python_token)
226
+ self.bos_token = tokenizer.bos_token
227
+ self.chat_template = tokenizer.chat_template
228
+ super().__init__(image_processor, audio_processor, tokenizer)
229
+ self.tokenizer.add_tokens([f"<|audio_{i}|>" for i in range(1, 50)])
230
+
231
+
232
+ def __call__(
233
+ self,
234
+ images: Optional[ImageInput] = None,
235
+ text: Optional[Union[TextInput, PreTokenizedInput, List[TextInput], List[PreTokenizedInput]]] = None,
236
+ audio: Optional[Union[AudioInput, List[AudioInput]]] = None,
237
+ videos=None,
238
+ **kwargs: Unpack[MllamaProcessorKwargs],
239
+ ) -> BatchFeature:
240
+ """
241
+ Main method to prepare text(s) and image(s) to be fed as input to the model. This method forwards the `text`
242
+ arguments to PreTrainedTokenizerFast's [`~PreTrainedTokenizerFast.__call__`] if `text` is not `None` to encode
243
+ the text. To prepare the image(s), this method forwards the `images` arguments to
244
+ MllamaImageProcessor's [`~MllamaImageProcessor.__call__`] if `images` is not `None`. Please refer
245
+ to the docstring of the above two methods for more information.
246
+
247
+ Args:
248
+ images (`PIL.Image.Image`, `np.ndarray`, `torch.Tensor`, `List[PIL.Image.Image]`, `List[np.ndarray]`, `List[torch.Tensor]`):
249
+ The image or batch of images to be prepared. Each image can be a PIL image, NumPy array or PyTorch
250
+ tensor. Both channels-first and channels-last formats are supported.
251
+ text (`str`, `List[str]`, `List[List[str]]`):
252
+ The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
253
+ (pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
254
+ `is_split_into_words=True` (to lift the ambiguity with a batch of sequences).
255
+ return_tensors (`str` or [`~utils.TensorType`], *optional*):
256
+ If set, will return tensors of a particular framework. Acceptable values are:
257
+ - `'tf'`: Return TensorFlow `tf.constant` objects.
258
+ - `'pt'`: Return PyTorch `torch.Tensor` objects.
259
+ - `'np'`: Return NumPy `np.ndarray` objects.
260
+ - `'jax'`: Return JAX `jnp.ndarray` objects.
261
+ Returns:
262
+ [`BatchFeature`]: A [`BatchFeature`] with the following fields:
263
+
264
+ - **input_ids** -- List of token ids to be fed to a model. Returned when `text` is not `None`.
265
+ - **attention_mask** -- List of indices specifying which tokens should be attended to by the model (when
266
+ `return_attention_mask=True` or if *"attention_mask"* is in `self.model_input_names` and if `text` is not
267
+ `None`).
268
+ - **pixel_values** -- Pixel values to be fed to a model. Returned when `images` is not `None`.
269
+ - **audio_features** -- Audio features extracted using SeamlessM4TFeatureExtractor. Returned when `audio` is not `None`.
270
+ TODO: add aspect_ratio_ids and aspect_ratio_mask and cross_attention_mask
271
+ """
272
+ if text is None:
273
+ raise ValueError("You must specify text.")
274
+
275
+ output_kwargs = self._merge_kwargs(
276
+ MllamaProcessorKwargs,
277
+ tokenizer_init_kwargs=self.tokenizer.init_kwargs,
278
+ **kwargs,
279
+ )
280
+
281
+ text_kwargs = output_kwargs["text_kwargs"]
282
+ images_kwargs = output_kwargs["images_kwargs"]
283
+ common_kwargs = output_kwargs["common_kwargs"]
284
+
285
+ data = {}
286
+
287
+ if audio is not None:
288
+ audio_features = self.audio_processor(audio)
289
+ data.update(audio_features)
290
+
291
+ if isinstance(text, str):
292
+ text = [text]
293
+ elif not (isinstance(text, (list, tuple)) and all(isinstance(t, str) for t in text)):
294
+ raise ValueError("Invalid input text. Please provide a string, or a list of strings")
295
+ n_images_in_text = [t.count(self.image_token) for t in text]
296
+ text = [build_string_from_input(text_item, self.bos_token, self.image_token) for text_item in text]
297
+ _ = text_kwargs.pop("padding_side", None) # hack until padding-side is an accepted kwarg by tokenizers
298
+
299
+ if audio is not None:
300
+ text = build_audio_tokens(text, audio_features, self.audio_token)
301
+
302
+ encoding = self.tokenizer(text, add_special_tokens=False, **text_kwargs)
303
+ if audio is not None:
304
+ beg_audio_id = self.tokenizer.convert_tokens_to_ids("<|audio_1|>")
305
+ idx = torch.where(encoding['input_ids'] >= beg_audio_id)
306
+ encoding['input_ids'][idx] = beg_audio_id - encoding['input_ids'][idx] - 1
307
+ data.update(encoding)
308
+
309
+ n_images_in_images = [0]
310
+ if images is not None:
311
+ images = make_list_of_images(images)
312
+ n_images_in_images = [len(sample) for sample in images]
313
+
314
+ if text is not None:
315
+ if any(batch_img == 0 for batch_img in n_images_in_text) and not all(
316
+ batch_img == 0 for batch_img in n_images_in_text
317
+ ):
318
+ raise ValueError(
319
+ "If a batch of text is provided, there should be either no images or at least one image per sample"
320
+ )
321
+ if sum(n_images_in_images) != sum(n_images_in_text):
322
+ if images is None:
323
+ raise ValueError("No image were provided, but there are image tokens in the prompt")
324
+ else:
325
+ raise ValueError(
326
+ f"The number of image token ({sum(n_images_in_text)}) should be the same as in the number of provided images ({sum(n_images_in_images)})"
327
+ )
328
+
329
+ if images is not None:
330
+ image_features = self.image_processor(images, **images_kwargs)
331
+ num_tiles = image_features.pop("num_tiles")
332
+ data.update(image_features)
333
+
334
+ # Create cross attention mask
335
+ if images is not None and text is not None:
336
+ cross_attention_token_mask = [
337
+ get_cross_attention_token_mask(token_ids, self.image_token_id) for token_ids in encoding["input_ids"]
338
+ ]
339
+ cross_attention_mask = convert_sparse_cross_attention_mask_to_dense(
340
+ cross_attention_token_mask,
341
+ num_tiles=num_tiles,
342
+ max_num_tiles=self.image_processor.max_image_tiles,
343
+ length=max(len(input_ids) for input_ids in encoding["input_ids"]),
344
+ )
345
+ data["cross_attention_mask"] = cross_attention_mask
346
+
347
+ return_tensors = common_kwargs.pop("return_tensors", None)
348
+ batch_feature = BatchFeature(data=data, tensor_type=return_tensors)
349
+
350
+ return batch_feature
351
+
352
+ def batch_decode(self, *args, **kwargs):
353
+ """
354
+ This method forwards all its arguments to PreTrainedTokenizerFast's [`~PreTrainedTokenizer.batch_decode`]. Please
355
+ refer to the docstring of this method for more information.
356
+ """
357
+ return self.tokenizer.batch_decode(*args, **kwargs)
358
+
359
+ def decode(self, *args, **kwargs):
360
+ """
361
+ This method forwards all its arguments to PreTrainedTokenizerFast's [`~PreTrainedTokenizer.decode`]. Please refer to
362
+ the docstring of this method for more information.
363
+ """
364
+ return self.tokenizer.decode(*args, **kwargs)
365
+
366
+ @property
367
+ def model_input_names(self):
368
+ tokenizer_input_names = self.tokenizer.model_input_names
369
+ image_processor_input_names = self.image_processor.model_input_names
370
+ audio_processor_input_names = self.audio_processor.model_input_names
371
+ return list(tokenizer_input_names +
372
+ image_processor_input_names +
373
+ ["cross_attention_mask"] +
374
+ audio_processor_input_names)
375
+
376
+ AutoProcessor.register("MllamaProcessor", MllamaProcessor)
377
+ transformers.MllamaProcessor = MllamaProcessor
special_tokens_map.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<|begin_of_text|>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|eot_id|>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "<|finetune_right_pad_id|>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ }
23
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1abddc03bfea0030ef2d2a5c8222256ef2a9abd2fcfbf20825bb2d7d84142103
3
+ size 17219500
tokenizer_config.json ADDED
@@ -0,0 +1,2475 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "128000": {
4
+ "content": "<|begin_of_text|>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "128001": {
12
+ "content": "<|end_of_text|>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "128002": {
20
+ "content": "<|reserved_special_token_0|>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "128003": {
28
+ "content": "<|reserved_special_token_1|>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "128004": {
36
+ "content": "<|finetune_right_pad_id|>",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ },
43
+ "128005": {
44
+ "content": "<|step_id|>",
45
+ "lstrip": false,
46
+ "normalized": false,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": true
50
+ },
51
+ "128006": {
52
+ "content": "<|start_header_id|>",
53
+ "lstrip": false,
54
+ "normalized": false,
55
+ "rstrip": false,
56
+ "single_word": false,
57
+ "special": true
58
+ },
59
+ "128007": {
60
+ "content": "<|end_header_id|>",
61
+ "lstrip": false,
62
+ "normalized": false,
63
+ "rstrip": false,
64
+ "single_word": false,
65
+ "special": true
66
+ },
67
+ "128008": {
68
+ "content": "<|eom_id|>",
69
+ "lstrip": false,
70
+ "normalized": false,
71
+ "rstrip": false,
72
+ "single_word": false,
73
+ "special": true
74
+ },
75
+ "128009": {
76
+ "content": "<|eot_id|>",
77
+ "lstrip": false,
78
+ "normalized": false,
79
+ "rstrip": false,
80
+ "single_word": false,
81
+ "special": true
82
+ },
83
+ "128010": {
84
+ "content": "<|python_tag|>",
85
+ "lstrip": false,
86
+ "normalized": false,
87
+ "rstrip": false,
88
+ "single_word": false,
89
+ "special": true
90
+ },
91
+ "128011": {
92
+ "content": "<|reserved_special_token_2|>",
93
+ "lstrip": false,
94
+ "normalized": false,
95
+ "rstrip": false,
96
+ "single_word": false,
97
+ "special": true
98
+ },
99
+ "128012": {
100
+ "content": "<|reserved_special_token_3|>",
101
+ "lstrip": false,
102
+ "normalized": false,
103
+ "rstrip": false,
104
+ "single_word": false,
105
+ "special": true
106
+ },
107
+ "128013": {
108
+ "content": "<|reserved_special_token_4|>",
109
+ "lstrip": false,
110
+ "normalized": false,
111
+ "rstrip": false,
112
+ "single_word": false,
113
+ "special": true
114
+ },
115
+ "128014": {
116
+ "content": "<|reserved_special_token_5|>",
117
+ "lstrip": false,
118
+ "normalized": false,
119
+ "rstrip": false,
120
+ "single_word": false,
121
+ "special": true
122
+ },
123
+ "128015": {
124
+ "content": "<|reserved_special_token_6|>",
125
+ "lstrip": false,
126
+ "normalized": false,
127
+ "rstrip": false,
128
+ "single_word": false,
129
+ "special": true
130
+ },
131
+ "128016": {
132
+ "content": "<|reserved_special_token_7|>",
133
+ "lstrip": false,
134
+ "normalized": false,
135
+ "rstrip": false,
136
+ "single_word": false,
137
+ "special": true
138
+ },
139
+ "128017": {
140
+ "content": "<|reserved_special_token_8|>",
141
+ "lstrip": false,
142
+ "normalized": false,
143
+ "rstrip": false,
144
+ "single_word": false,
145
+ "special": true
146
+ },
147
+ "128018": {
148
+ "content": "<|reserved_special_token_9|>",
149
+ "lstrip": false,
150
+ "normalized": false,
151
+ "rstrip": false,
152
+ "single_word": false,
153
+ "special": true
154
+ },
155
+ "128019": {
156
+ "content": "<|reserved_special_token_10|>",
157
+ "lstrip": false,
158
+ "normalized": false,
159
+ "rstrip": false,
160
+ "single_word": false,
161
+ "special": true
162
+ },
163
+ "128020": {
164
+ "content": "<|reserved_special_token_11|>",
165
+ "lstrip": false,
166
+ "normalized": false,
167
+ "rstrip": false,
168
+ "single_word": false,
169
+ "special": true
170
+ },
171
+ "128021": {
172
+ "content": "<|reserved_special_token_12|>",
173
+ "lstrip": false,
174
+ "normalized": false,
175
+ "rstrip": false,
176
+ "single_word": false,
177
+ "special": true
178
+ },
179
+ "128022": {
180
+ "content": "<|reserved_special_token_13|>",
181
+ "lstrip": false,
182
+ "normalized": false,
183
+ "rstrip": false,
184
+ "single_word": false,
185
+ "special": true
186
+ },
187
+ "128023": {
188
+ "content": "<|reserved_special_token_14|>",
189
+ "lstrip": false,
190
+ "normalized": false,
191
+ "rstrip": false,
192
+ "single_word": false,
193
+ "special": true
194
+ },
195
+ "128024": {
196
+ "content": "<|reserved_special_token_15|>",
197
+ "lstrip": false,
198
+ "normalized": false,
199
+ "rstrip": false,
200
+ "single_word": false,
201
+ "special": true
202
+ },
203
+ "128025": {
204
+ "content": "<|reserved_special_token_16|>",
205
+ "lstrip": false,
206
+ "normalized": false,
207
+ "rstrip": false,
208
+ "single_word": false,
209
+ "special": true
210
+ },
211
+ "128026": {
212
+ "content": "<|reserved_special_token_17|>",
213
+ "lstrip": false,
214
+ "normalized": false,
215
+ "rstrip": false,
216
+ "single_word": false,
217
+ "special": true
218
+ },
219
+ "128027": {
220
+ "content": "<|reserved_special_token_18|>",
221
+ "lstrip": false,
222
+ "normalized": false,
223
+ "rstrip": false,
224
+ "single_word": false,
225
+ "special": true
226
+ },
227
+ "128028": {
228
+ "content": "<|reserved_special_token_19|>",
229
+ "lstrip": false,
230
+ "normalized": false,
231
+ "rstrip": false,
232
+ "single_word": false,
233
+ "special": true
234
+ },
235
+ "128029": {
236
+ "content": "<|reserved_special_token_20|>",
237
+ "lstrip": false,
238
+ "normalized": false,
239
+ "rstrip": false,
240
+ "single_word": false,
241
+ "special": true
242
+ },
243
+ "128030": {
244
+ "content": "<|reserved_special_token_21|>",
245
+ "lstrip": false,
246
+ "normalized": false,
247
+ "rstrip": false,
248
+ "single_word": false,
249
+ "special": true
250
+ },
251
+ "128031": {
252
+ "content": "<|reserved_special_token_22|>",
253
+ "lstrip": false,
254
+ "normalized": false,
255
+ "rstrip": false,
256
+ "single_word": false,
257
+ "special": true
258
+ },
259
+ "128032": {
260
+ "content": "<|reserved_special_token_23|>",
261
+ "lstrip": false,
262
+ "normalized": false,
263
+ "rstrip": false,
264
+ "single_word": false,
265
+ "special": true
266
+ },
267
+ "128033": {
268
+ "content": "<|reserved_special_token_24|>",
269
+ "lstrip": false,
270
+ "normalized": false,
271
+ "rstrip": false,
272
+ "single_word": false,
273
+ "special": true
274
+ },
275
+ "128034": {
276
+ "content": "<|reserved_special_token_25|>",
277
+ "lstrip": false,
278
+ "normalized": false,
279
+ "rstrip": false,
280
+ "single_word": false,
281
+ "special": true
282
+ },
283
+ "128035": {
284
+ "content": "<|reserved_special_token_26|>",
285
+ "lstrip": false,
286
+ "normalized": false,
287
+ "rstrip": false,
288
+ "single_word": false,
289
+ "special": true
290
+ },
291
+ "128036": {
292
+ "content": "<|reserved_special_token_27|>",
293
+ "lstrip": false,
294
+ "normalized": false,
295
+ "rstrip": false,
296
+ "single_word": false,
297
+ "special": true
298
+ },
299
+ "128037": {
300
+ "content": "<|reserved_special_token_28|>",
301
+ "lstrip": false,
302
+ "normalized": false,
303
+ "rstrip": false,
304
+ "single_word": false,
305
+ "special": true
306
+ },
307
+ "128038": {
308
+ "content": "<|reserved_special_token_29|>",
309
+ "lstrip": false,
310
+ "normalized": false,
311
+ "rstrip": false,
312
+ "single_word": false,
313
+ "special": true
314
+ },
315
+ "128039": {
316
+ "content": "<|reserved_special_token_30|>",
317
+ "lstrip": false,
318
+ "normalized": false,
319
+ "rstrip": false,
320
+ "single_word": false,
321
+ "special": true
322
+ },
323
+ "128040": {
324
+ "content": "<|reserved_special_token_31|>",
325
+ "lstrip": false,
326
+ "normalized": false,
327
+ "rstrip": false,
328
+ "single_word": false,
329
+ "special": true
330
+ },
331
+ "128041": {
332
+ "content": "<|reserved_special_token_32|>",
333
+ "lstrip": false,
334
+ "normalized": false,
335
+ "rstrip": false,
336
+ "single_word": false,
337
+ "special": true
338
+ },
339
+ "128042": {
340
+ "content": "<|reserved_special_token_33|>",
341
+ "lstrip": false,
342
+ "normalized": false,
343
+ "rstrip": false,
344
+ "single_word": false,
345
+ "special": true
346
+ },
347
+ "128043": {
348
+ "content": "<|reserved_special_token_34|>",
349
+ "lstrip": false,
350
+ "normalized": false,
351
+ "rstrip": false,
352
+ "single_word": false,
353
+ "special": true
354
+ },
355
+ "128044": {
356
+ "content": "<|reserved_special_token_35|>",
357
+ "lstrip": false,
358
+ "normalized": false,
359
+ "rstrip": false,
360
+ "single_word": false,
361
+ "special": true
362
+ },
363
+ "128045": {
364
+ "content": "<|reserved_special_token_36|>",
365
+ "lstrip": false,
366
+ "normalized": false,
367
+ "rstrip": false,
368
+ "single_word": false,
369
+ "special": true
370
+ },
371
+ "128046": {
372
+ "content": "<|reserved_special_token_37|>",
373
+ "lstrip": false,
374
+ "normalized": false,
375
+ "rstrip": false,
376
+ "single_word": false,
377
+ "special": true
378
+ },
379
+ "128047": {
380
+ "content": "<|reserved_special_token_38|>",
381
+ "lstrip": false,
382
+ "normalized": false,
383
+ "rstrip": false,
384
+ "single_word": false,
385
+ "special": true
386
+ },
387
+ "128048": {
388
+ "content": "<|reserved_special_token_39|>",
389
+ "lstrip": false,
390
+ "normalized": false,
391
+ "rstrip": false,
392
+ "single_word": false,
393
+ "special": true
394
+ },
395
+ "128049": {
396
+ "content": "<|reserved_special_token_40|>",
397
+ "lstrip": false,
398
+ "normalized": false,
399
+ "rstrip": false,
400
+ "single_word": false,
401
+ "special": true
402
+ },
403
+ "128050": {
404
+ "content": "<|reserved_special_token_41|>",
405
+ "lstrip": false,
406
+ "normalized": false,
407
+ "rstrip": false,
408
+ "single_word": false,
409
+ "special": true
410
+ },
411
+ "128051": {
412
+ "content": "<|reserved_special_token_42|>",
413
+ "lstrip": false,
414
+ "normalized": false,
415
+ "rstrip": false,
416
+ "single_word": false,
417
+ "special": true
418
+ },
419
+ "128052": {
420
+ "content": "<|reserved_special_token_43|>",
421
+ "lstrip": false,
422
+ "normalized": false,
423
+ "rstrip": false,
424
+ "single_word": false,
425
+ "special": true
426
+ },
427
+ "128053": {
428
+ "content": "<|reserved_special_token_44|>",
429
+ "lstrip": false,
430
+ "normalized": false,
431
+ "rstrip": false,
432
+ "single_word": false,
433
+ "special": true
434
+ },
435
+ "128054": {
436
+ "content": "<|reserved_special_token_45|>",
437
+ "lstrip": false,
438
+ "normalized": false,
439
+ "rstrip": false,
440
+ "single_word": false,
441
+ "special": true
442
+ },
443
+ "128055": {
444
+ "content": "<|reserved_special_token_46|>",
445
+ "lstrip": false,
446
+ "normalized": false,
447
+ "rstrip": false,
448
+ "single_word": false,
449
+ "special": true
450
+ },
451
+ "128056": {
452
+ "content": "<|reserved_special_token_47|>",
453
+ "lstrip": false,
454
+ "normalized": false,
455
+ "rstrip": false,
456
+ "single_word": false,
457
+ "special": true
458
+ },
459
+ "128057": {
460
+ "content": "<|reserved_special_token_48|>",
461
+ "lstrip": false,
462
+ "normalized": false,
463
+ "rstrip": false,
464
+ "single_word": false,
465
+ "special": true
466
+ },
467
+ "128058": {
468
+ "content": "<|reserved_special_token_49|>",
469
+ "lstrip": false,
470
+ "normalized": false,
471
+ "rstrip": false,
472
+ "single_word": false,
473
+ "special": true
474
+ },
475
+ "128059": {
476
+ "content": "<|reserved_special_token_50|>",
477
+ "lstrip": false,
478
+ "normalized": false,
479
+ "rstrip": false,
480
+ "single_word": false,
481
+ "special": true
482
+ },
483
+ "128060": {
484
+ "content": "<|reserved_special_token_51|>",
485
+ "lstrip": false,
486
+ "normalized": false,
487
+ "rstrip": false,
488
+ "single_word": false,
489
+ "special": true
490
+ },
491
+ "128061": {
492
+ "content": "<|reserved_special_token_52|>",
493
+ "lstrip": false,
494
+ "normalized": false,
495
+ "rstrip": false,
496
+ "single_word": false,
497
+ "special": true
498
+ },
499
+ "128062": {
500
+ "content": "<|reserved_special_token_53|>",
501
+ "lstrip": false,
502
+ "normalized": false,
503
+ "rstrip": false,
504
+ "single_word": false,
505
+ "special": true
506
+ },
507
+ "128063": {
508
+ "content": "<|reserved_special_token_54|>",
509
+ "lstrip": false,
510
+ "normalized": false,
511
+ "rstrip": false,
512
+ "single_word": false,
513
+ "special": true
514
+ },
515
+ "128064": {
516
+ "content": "<|reserved_special_token_55|>",
517
+ "lstrip": false,
518
+ "normalized": false,
519
+ "rstrip": false,
520
+ "single_word": false,
521
+ "special": true
522
+ },
523
+ "128065": {
524
+ "content": "<|reserved_special_token_56|>",
525
+ "lstrip": false,
526
+ "normalized": false,
527
+ "rstrip": false,
528
+ "single_word": false,
529
+ "special": true
530
+ },
531
+ "128066": {
532
+ "content": "<|reserved_special_token_57|>",
533
+ "lstrip": false,
534
+ "normalized": false,
535
+ "rstrip": false,
536
+ "single_word": false,
537
+ "special": true
538
+ },
539
+ "128067": {
540
+ "content": "<|reserved_special_token_58|>",
541
+ "lstrip": false,
542
+ "normalized": false,
543
+ "rstrip": false,
544
+ "single_word": false,
545
+ "special": true
546
+ },
547
+ "128068": {
548
+ "content": "<|reserved_special_token_59|>",
549
+ "lstrip": false,
550
+ "normalized": false,
551
+ "rstrip": false,
552
+ "single_word": false,
553
+ "special": true
554
+ },
555
+ "128069": {
556
+ "content": "<|reserved_special_token_60|>",
557
+ "lstrip": false,
558
+ "normalized": false,
559
+ "rstrip": false,
560
+ "single_word": false,
561
+ "special": true
562
+ },
563
+ "128070": {
564
+ "content": "<|reserved_special_token_61|>",
565
+ "lstrip": false,
566
+ "normalized": false,
567
+ "rstrip": false,
568
+ "single_word": false,
569
+ "special": true
570
+ },
571
+ "128071": {
572
+ "content": "<|reserved_special_token_62|>",
573
+ "lstrip": false,
574
+ "normalized": false,
575
+ "rstrip": false,
576
+ "single_word": false,
577
+ "special": true
578
+ },
579
+ "128072": {
580
+ "content": "<|reserved_special_token_63|>",
581
+ "lstrip": false,
582
+ "normalized": false,
583
+ "rstrip": false,
584
+ "single_word": false,
585
+ "special": true
586
+ },
587
+ "128073": {
588
+ "content": "<|reserved_special_token_64|>",
589
+ "lstrip": false,
590
+ "normalized": false,
591
+ "rstrip": false,
592
+ "single_word": false,
593
+ "special": true
594
+ },
595
+ "128074": {
596
+ "content": "<|reserved_special_token_65|>",
597
+ "lstrip": false,
598
+ "normalized": false,
599
+ "rstrip": false,
600
+ "single_word": false,
601
+ "special": true
602
+ },
603
+ "128075": {
604
+ "content": "<|reserved_special_token_66|>",
605
+ "lstrip": false,
606
+ "normalized": false,
607
+ "rstrip": false,
608
+ "single_word": false,
609
+ "special": true
610
+ },
611
+ "128076": {
612
+ "content": "<|reserved_special_token_67|>",
613
+ "lstrip": false,
614
+ "normalized": false,
615
+ "rstrip": false,
616
+ "single_word": false,
617
+ "special": true
618
+ },
619
+ "128077": {
620
+ "content": "<|reserved_special_token_68|>",
621
+ "lstrip": false,
622
+ "normalized": false,
623
+ "rstrip": false,
624
+ "single_word": false,
625
+ "special": true
626
+ },
627
+ "128078": {
628
+ "content": "<|reserved_special_token_69|>",
629
+ "lstrip": false,
630
+ "normalized": false,
631
+ "rstrip": false,
632
+ "single_word": false,
633
+ "special": true
634
+ },
635
+ "128079": {
636
+ "content": "<|reserved_special_token_70|>",
637
+ "lstrip": false,
638
+ "normalized": false,
639
+ "rstrip": false,
640
+ "single_word": false,
641
+ "special": true
642
+ },
643
+ "128080": {
644
+ "content": "<|reserved_special_token_71|>",
645
+ "lstrip": false,
646
+ "normalized": false,
647
+ "rstrip": false,
648
+ "single_word": false,
649
+ "special": true
650
+ },
651
+ "128081": {
652
+ "content": "<|reserved_special_token_72|>",
653
+ "lstrip": false,
654
+ "normalized": false,
655
+ "rstrip": false,
656
+ "single_word": false,
657
+ "special": true
658
+ },
659
+ "128082": {
660
+ "content": "<|reserved_special_token_73|>",
661
+ "lstrip": false,
662
+ "normalized": false,
663
+ "rstrip": false,
664
+ "single_word": false,
665
+ "special": true
666
+ },
667
+ "128083": {
668
+ "content": "<|reserved_special_token_74|>",
669
+ "lstrip": false,
670
+ "normalized": false,
671
+ "rstrip": false,
672
+ "single_word": false,
673
+ "special": true
674
+ },
675
+ "128084": {
676
+ "content": "<|reserved_special_token_75|>",
677
+ "lstrip": false,
678
+ "normalized": false,
679
+ "rstrip": false,
680
+ "single_word": false,
681
+ "special": true
682
+ },
683
+ "128085": {
684
+ "content": "<|reserved_special_token_76|>",
685
+ "lstrip": false,
686
+ "normalized": false,
687
+ "rstrip": false,
688
+ "single_word": false,
689
+ "special": true
690
+ },
691
+ "128086": {
692
+ "content": "<|reserved_special_token_77|>",
693
+ "lstrip": false,
694
+ "normalized": false,
695
+ "rstrip": false,
696
+ "single_word": false,
697
+ "special": true
698
+ },
699
+ "128087": {
700
+ "content": "<|reserved_special_token_78|>",
701
+ "lstrip": false,
702
+ "normalized": false,
703
+ "rstrip": false,
704
+ "single_word": false,
705
+ "special": true
706
+ },
707
+ "128088": {
708
+ "content": "<|reserved_special_token_79|>",
709
+ "lstrip": false,
710
+ "normalized": false,
711
+ "rstrip": false,
712
+ "single_word": false,
713
+ "special": true
714
+ },
715
+ "128089": {
716
+ "content": "<|reserved_special_token_80|>",
717
+ "lstrip": false,
718
+ "normalized": false,
719
+ "rstrip": false,
720
+ "single_word": false,
721
+ "special": true
722
+ },
723
+ "128090": {
724
+ "content": "<|reserved_special_token_81|>",
725
+ "lstrip": false,
726
+ "normalized": false,
727
+ "rstrip": false,
728
+ "single_word": false,
729
+ "special": true
730
+ },
731
+ "128091": {
732
+ "content": "<|reserved_special_token_82|>",
733
+ "lstrip": false,
734
+ "normalized": false,
735
+ "rstrip": false,
736
+ "single_word": false,
737
+ "special": true
738
+ },
739
+ "128092": {
740
+ "content": "<|reserved_special_token_83|>",
741
+ "lstrip": false,
742
+ "normalized": false,
743
+ "rstrip": false,
744
+ "single_word": false,
745
+ "special": true
746
+ },
747
+ "128093": {
748
+ "content": "<|reserved_special_token_84|>",
749
+ "lstrip": false,
750
+ "normalized": false,
751
+ "rstrip": false,
752
+ "single_word": false,
753
+ "special": true
754
+ },
755
+ "128094": {
756
+ "content": "<|reserved_special_token_85|>",
757
+ "lstrip": false,
758
+ "normalized": false,
759
+ "rstrip": false,
760
+ "single_word": false,
761
+ "special": true
762
+ },
763
+ "128095": {
764
+ "content": "<|reserved_special_token_86|>",
765
+ "lstrip": false,
766
+ "normalized": false,
767
+ "rstrip": false,
768
+ "single_word": false,
769
+ "special": true
770
+ },
771
+ "128096": {
772
+ "content": "<|reserved_special_token_87|>",
773
+ "lstrip": false,
774
+ "normalized": false,
775
+ "rstrip": false,
776
+ "single_word": false,
777
+ "special": true
778
+ },
779
+ "128097": {
780
+ "content": "<|reserved_special_token_88|>",
781
+ "lstrip": false,
782
+ "normalized": false,
783
+ "rstrip": false,
784
+ "single_word": false,
785
+ "special": true
786
+ },
787
+ "128098": {
788
+ "content": "<|reserved_special_token_89|>",
789
+ "lstrip": false,
790
+ "normalized": false,
791
+ "rstrip": false,
792
+ "single_word": false,
793
+ "special": true
794
+ },
795
+ "128099": {
796
+ "content": "<|reserved_special_token_90|>",
797
+ "lstrip": false,
798
+ "normalized": false,
799
+ "rstrip": false,
800
+ "single_word": false,
801
+ "special": true
802
+ },
803
+ "128100": {
804
+ "content": "<|reserved_special_token_91|>",
805
+ "lstrip": false,
806
+ "normalized": false,
807
+ "rstrip": false,
808
+ "single_word": false,
809
+ "special": true
810
+ },
811
+ "128101": {
812
+ "content": "<|reserved_special_token_92|>",
813
+ "lstrip": false,
814
+ "normalized": false,
815
+ "rstrip": false,
816
+ "single_word": false,
817
+ "special": true
818
+ },
819
+ "128102": {
820
+ "content": "<|reserved_special_token_93|>",
821
+ "lstrip": false,
822
+ "normalized": false,
823
+ "rstrip": false,
824
+ "single_word": false,
825
+ "special": true
826
+ },
827
+ "128103": {
828
+ "content": "<|reserved_special_token_94|>",
829
+ "lstrip": false,
830
+ "normalized": false,
831
+ "rstrip": false,
832
+ "single_word": false,
833
+ "special": true
834
+ },
835
+ "128104": {
836
+ "content": "<|reserved_special_token_95|>",
837
+ "lstrip": false,
838
+ "normalized": false,
839
+ "rstrip": false,
840
+ "single_word": false,
841
+ "special": true
842
+ },
843
+ "128105": {
844
+ "content": "<|reserved_special_token_96|>",
845
+ "lstrip": false,
846
+ "normalized": false,
847
+ "rstrip": false,
848
+ "single_word": false,
849
+ "special": true
850
+ },
851
+ "128106": {
852
+ "content": "<|reserved_special_token_97|>",
853
+ "lstrip": false,
854
+ "normalized": false,
855
+ "rstrip": false,
856
+ "single_word": false,
857
+ "special": true
858
+ },
859
+ "128107": {
860
+ "content": "<|reserved_special_token_98|>",
861
+ "lstrip": false,
862
+ "normalized": false,
863
+ "rstrip": false,
864
+ "single_word": false,
865
+ "special": true
866
+ },
867
+ "128108": {
868
+ "content": "<|reserved_special_token_99|>",
869
+ "lstrip": false,
870
+ "normalized": false,
871
+ "rstrip": false,
872
+ "single_word": false,
873
+ "special": true
874
+ },
875
+ "128109": {
876
+ "content": "<|reserved_special_token_100|>",
877
+ "lstrip": false,
878
+ "normalized": false,
879
+ "rstrip": false,
880
+ "single_word": false,
881
+ "special": true
882
+ },
883
+ "128110": {
884
+ "content": "<|reserved_special_token_101|>",
885
+ "lstrip": false,
886
+ "normalized": false,
887
+ "rstrip": false,
888
+ "single_word": false,
889
+ "special": true
890
+ },
891
+ "128111": {
892
+ "content": "<|reserved_special_token_102|>",
893
+ "lstrip": false,
894
+ "normalized": false,
895
+ "rstrip": false,
896
+ "single_word": false,
897
+ "special": true
898
+ },
899
+ "128112": {
900
+ "content": "<|reserved_special_token_103|>",
901
+ "lstrip": false,
902
+ "normalized": false,
903
+ "rstrip": false,
904
+ "single_word": false,
905
+ "special": true
906
+ },
907
+ "128113": {
908
+ "content": "<|reserved_special_token_104|>",
909
+ "lstrip": false,
910
+ "normalized": false,
911
+ "rstrip": false,
912
+ "single_word": false,
913
+ "special": true
914
+ },
915
+ "128114": {
916
+ "content": "<|reserved_special_token_105|>",
917
+ "lstrip": false,
918
+ "normalized": false,
919
+ "rstrip": false,
920
+ "single_word": false,
921
+ "special": true
922
+ },
923
+ "128115": {
924
+ "content": "<|reserved_special_token_106|>",
925
+ "lstrip": false,
926
+ "normalized": false,
927
+ "rstrip": false,
928
+ "single_word": false,
929
+ "special": true
930
+ },
931
+ "128116": {
932
+ "content": "<|reserved_special_token_107|>",
933
+ "lstrip": false,
934
+ "normalized": false,
935
+ "rstrip": false,
936
+ "single_word": false,
937
+ "special": true
938
+ },
939
+ "128117": {
940
+ "content": "<|reserved_special_token_108|>",
941
+ "lstrip": false,
942
+ "normalized": false,
943
+ "rstrip": false,
944
+ "single_word": false,
945
+ "special": true
946
+ },
947
+ "128118": {
948
+ "content": "<|reserved_special_token_109|>",
949
+ "lstrip": false,
950
+ "normalized": false,
951
+ "rstrip": false,
952
+ "single_word": false,
953
+ "special": true
954
+ },
955
+ "128119": {
956
+ "content": "<|reserved_special_token_110|>",
957
+ "lstrip": false,
958
+ "normalized": false,
959
+ "rstrip": false,
960
+ "single_word": false,
961
+ "special": true
962
+ },
963
+ "128120": {
964
+ "content": "<|reserved_special_token_111|>",
965
+ "lstrip": false,
966
+ "normalized": false,
967
+ "rstrip": false,
968
+ "single_word": false,
969
+ "special": true
970
+ },
971
+ "128121": {
972
+ "content": "<|reserved_special_token_112|>",
973
+ "lstrip": false,
974
+ "normalized": false,
975
+ "rstrip": false,
976
+ "single_word": false,
977
+ "special": true
978
+ },
979
+ "128122": {
980
+ "content": "<|reserved_special_token_113|>",
981
+ "lstrip": false,
982
+ "normalized": false,
983
+ "rstrip": false,
984
+ "single_word": false,
985
+ "special": true
986
+ },
987
+ "128123": {
988
+ "content": "<|reserved_special_token_114|>",
989
+ "lstrip": false,
990
+ "normalized": false,
991
+ "rstrip": false,
992
+ "single_word": false,
993
+ "special": true
994
+ },
995
+ "128124": {
996
+ "content": "<|reserved_special_token_115|>",
997
+ "lstrip": false,
998
+ "normalized": false,
999
+ "rstrip": false,
1000
+ "single_word": false,
1001
+ "special": true
1002
+ },
1003
+ "128125": {
1004
+ "content": "<|reserved_special_token_116|>",
1005
+ "lstrip": false,
1006
+ "normalized": false,
1007
+ "rstrip": false,
1008
+ "single_word": false,
1009
+ "special": true
1010
+ },
1011
+ "128126": {
1012
+ "content": "<|reserved_special_token_117|>",
1013
+ "lstrip": false,
1014
+ "normalized": false,
1015
+ "rstrip": false,
1016
+ "single_word": false,
1017
+ "special": true
1018
+ },
1019
+ "128127": {
1020
+ "content": "<|reserved_special_token_118|>",
1021
+ "lstrip": false,
1022
+ "normalized": false,
1023
+ "rstrip": false,
1024
+ "single_word": false,
1025
+ "special": true
1026
+ },
1027
+ "128128": {
1028
+ "content": "<|reserved_special_token_119|>",
1029
+ "lstrip": false,
1030
+ "normalized": false,
1031
+ "rstrip": false,
1032
+ "single_word": false,
1033
+ "special": true
1034
+ },
1035
+ "128129": {
1036
+ "content": "<|reserved_special_token_120|>",
1037
+ "lstrip": false,
1038
+ "normalized": false,
1039
+ "rstrip": false,
1040
+ "single_word": false,
1041
+ "special": true
1042
+ },
1043
+ "128130": {
1044
+ "content": "<|reserved_special_token_121|>",
1045
+ "lstrip": false,
1046
+ "normalized": false,
1047
+ "rstrip": false,
1048
+ "single_word": false,
1049
+ "special": true
1050
+ },
1051
+ "128131": {
1052
+ "content": "<|reserved_special_token_122|>",
1053
+ "lstrip": false,
1054
+ "normalized": false,
1055
+ "rstrip": false,
1056
+ "single_word": false,
1057
+ "special": true
1058
+ },
1059
+ "128132": {
1060
+ "content": "<|reserved_special_token_123|>",
1061
+ "lstrip": false,
1062
+ "normalized": false,
1063
+ "rstrip": false,
1064
+ "single_word": false,
1065
+ "special": true
1066
+ },
1067
+ "128133": {
1068
+ "content": "<|reserved_special_token_124|>",
1069
+ "lstrip": false,
1070
+ "normalized": false,
1071
+ "rstrip": false,
1072
+ "single_word": false,
1073
+ "special": true
1074
+ },
1075
+ "128134": {
1076
+ "content": "<|reserved_special_token_125|>",
1077
+ "lstrip": false,
1078
+ "normalized": false,
1079
+ "rstrip": false,
1080
+ "single_word": false,
1081
+ "special": true
1082
+ },
1083
+ "128135": {
1084
+ "content": "<|reserved_special_token_126|>",
1085
+ "lstrip": false,
1086
+ "normalized": false,
1087
+ "rstrip": false,
1088
+ "single_word": false,
1089
+ "special": true
1090
+ },
1091
+ "128136": {
1092
+ "content": "<|reserved_special_token_127|>",
1093
+ "lstrip": false,
1094
+ "normalized": false,
1095
+ "rstrip": false,
1096
+ "single_word": false,
1097
+ "special": true
1098
+ },
1099
+ "128137": {
1100
+ "content": "<|reserved_special_token_128|>",
1101
+ "lstrip": false,
1102
+ "normalized": false,
1103
+ "rstrip": false,
1104
+ "single_word": false,
1105
+ "special": true
1106
+ },
1107
+ "128138": {
1108
+ "content": "<|reserved_special_token_129|>",
1109
+ "lstrip": false,
1110
+ "normalized": false,
1111
+ "rstrip": false,
1112
+ "single_word": false,
1113
+ "special": true
1114
+ },
1115
+ "128139": {
1116
+ "content": "<|reserved_special_token_130|>",
1117
+ "lstrip": false,
1118
+ "normalized": false,
1119
+ "rstrip": false,
1120
+ "single_word": false,
1121
+ "special": true
1122
+ },
1123
+ "128140": {
1124
+ "content": "<|reserved_special_token_131|>",
1125
+ "lstrip": false,
1126
+ "normalized": false,
1127
+ "rstrip": false,
1128
+ "single_word": false,
1129
+ "special": true
1130
+ },
1131
+ "128141": {
1132
+ "content": "<|reserved_special_token_132|>",
1133
+ "lstrip": false,
1134
+ "normalized": false,
1135
+ "rstrip": false,
1136
+ "single_word": false,
1137
+ "special": true
1138
+ },
1139
+ "128142": {
1140
+ "content": "<|reserved_special_token_133|>",
1141
+ "lstrip": false,
1142
+ "normalized": false,
1143
+ "rstrip": false,
1144
+ "single_word": false,
1145
+ "special": true
1146
+ },
1147
+ "128143": {
1148
+ "content": "<|reserved_special_token_134|>",
1149
+ "lstrip": false,
1150
+ "normalized": false,
1151
+ "rstrip": false,
1152
+ "single_word": false,
1153
+ "special": true
1154
+ },
1155
+ "128144": {
1156
+ "content": "<|reserved_special_token_135|>",
1157
+ "lstrip": false,
1158
+ "normalized": false,
1159
+ "rstrip": false,
1160
+ "single_word": false,
1161
+ "special": true
1162
+ },
1163
+ "128145": {
1164
+ "content": "<|reserved_special_token_136|>",
1165
+ "lstrip": false,
1166
+ "normalized": false,
1167
+ "rstrip": false,
1168
+ "single_word": false,
1169
+ "special": true
1170
+ },
1171
+ "128146": {
1172
+ "content": "<|reserved_special_token_137|>",
1173
+ "lstrip": false,
1174
+ "normalized": false,
1175
+ "rstrip": false,
1176
+ "single_word": false,
1177
+ "special": true
1178
+ },
1179
+ "128147": {
1180
+ "content": "<|reserved_special_token_138|>",
1181
+ "lstrip": false,
1182
+ "normalized": false,
1183
+ "rstrip": false,
1184
+ "single_word": false,
1185
+ "special": true
1186
+ },
1187
+ "128148": {
1188
+ "content": "<|reserved_special_token_139|>",
1189
+ "lstrip": false,
1190
+ "normalized": false,
1191
+ "rstrip": false,
1192
+ "single_word": false,
1193
+ "special": true
1194
+ },
1195
+ "128149": {
1196
+ "content": "<|reserved_special_token_140|>",
1197
+ "lstrip": false,
1198
+ "normalized": false,
1199
+ "rstrip": false,
1200
+ "single_word": false,
1201
+ "special": true
1202
+ },
1203
+ "128150": {
1204
+ "content": "<|reserved_special_token_141|>",
1205
+ "lstrip": false,
1206
+ "normalized": false,
1207
+ "rstrip": false,
1208
+ "single_word": false,
1209
+ "special": true
1210
+ },
1211
+ "128151": {
1212
+ "content": "<|reserved_special_token_142|>",
1213
+ "lstrip": false,
1214
+ "normalized": false,
1215
+ "rstrip": false,
1216
+ "single_word": false,
1217
+ "special": true
1218
+ },
1219
+ "128152": {
1220
+ "content": "<|reserved_special_token_143|>",
1221
+ "lstrip": false,
1222
+ "normalized": false,
1223
+ "rstrip": false,
1224
+ "single_word": false,
1225
+ "special": true
1226
+ },
1227
+ "128153": {
1228
+ "content": "<|reserved_special_token_144|>",
1229
+ "lstrip": false,
1230
+ "normalized": false,
1231
+ "rstrip": false,
1232
+ "single_word": false,
1233
+ "special": true
1234
+ },
1235
+ "128154": {
1236
+ "content": "<|reserved_special_token_145|>",
1237
+ "lstrip": false,
1238
+ "normalized": false,
1239
+ "rstrip": false,
1240
+ "single_word": false,
1241
+ "special": true
1242
+ },
1243
+ "128155": {
1244
+ "content": "<|reserved_special_token_146|>",
1245
+ "lstrip": false,
1246
+ "normalized": false,
1247
+ "rstrip": false,
1248
+ "single_word": false,
1249
+ "special": true
1250
+ },
1251
+ "128156": {
1252
+ "content": "<|reserved_special_token_147|>",
1253
+ "lstrip": false,
1254
+ "normalized": false,
1255
+ "rstrip": false,
1256
+ "single_word": false,
1257
+ "special": true
1258
+ },
1259
+ "128157": {
1260
+ "content": "<|reserved_special_token_148|>",
1261
+ "lstrip": false,
1262
+ "normalized": false,
1263
+ "rstrip": false,
1264
+ "single_word": false,
1265
+ "special": true
1266
+ },
1267
+ "128158": {
1268
+ "content": "<|reserved_special_token_149|>",
1269
+ "lstrip": false,
1270
+ "normalized": false,
1271
+ "rstrip": false,
1272
+ "single_word": false,
1273
+ "special": true
1274
+ },
1275
+ "128159": {
1276
+ "content": "<|reserved_special_token_150|>",
1277
+ "lstrip": false,
1278
+ "normalized": false,
1279
+ "rstrip": false,
1280
+ "single_word": false,
1281
+ "special": true
1282
+ },
1283
+ "128160": {
1284
+ "content": "<|reserved_special_token_151|>",
1285
+ "lstrip": false,
1286
+ "normalized": false,
1287
+ "rstrip": false,
1288
+ "single_word": false,
1289
+ "special": true
1290
+ },
1291
+ "128161": {
1292
+ "content": "<|reserved_special_token_152|>",
1293
+ "lstrip": false,
1294
+ "normalized": false,
1295
+ "rstrip": false,
1296
+ "single_word": false,
1297
+ "special": true
1298
+ },
1299
+ "128162": {
1300
+ "content": "<|reserved_special_token_153|>",
1301
+ "lstrip": false,
1302
+ "normalized": false,
1303
+ "rstrip": false,
1304
+ "single_word": false,
1305
+ "special": true
1306
+ },
1307
+ "128163": {
1308
+ "content": "<|reserved_special_token_154|>",
1309
+ "lstrip": false,
1310
+ "normalized": false,
1311
+ "rstrip": false,
1312
+ "single_word": false,
1313
+ "special": true
1314
+ },
1315
+ "128164": {
1316
+ "content": "<|reserved_special_token_155|>",
1317
+ "lstrip": false,
1318
+ "normalized": false,
1319
+ "rstrip": false,
1320
+ "single_word": false,
1321
+ "special": true
1322
+ },
1323
+ "128165": {
1324
+ "content": "<|reserved_special_token_156|>",
1325
+ "lstrip": false,
1326
+ "normalized": false,
1327
+ "rstrip": false,
1328
+ "single_word": false,
1329
+ "special": true
1330
+ },
1331
+ "128166": {
1332
+ "content": "<|reserved_special_token_157|>",
1333
+ "lstrip": false,
1334
+ "normalized": false,
1335
+ "rstrip": false,
1336
+ "single_word": false,
1337
+ "special": true
1338
+ },
1339
+ "128167": {
1340
+ "content": "<|reserved_special_token_158|>",
1341
+ "lstrip": false,
1342
+ "normalized": false,
1343
+ "rstrip": false,
1344
+ "single_word": false,
1345
+ "special": true
1346
+ },
1347
+ "128168": {
1348
+ "content": "<|reserved_special_token_159|>",
1349
+ "lstrip": false,
1350
+ "normalized": false,
1351
+ "rstrip": false,
1352
+ "single_word": false,
1353
+ "special": true
1354
+ },
1355
+ "128169": {
1356
+ "content": "<|reserved_special_token_160|>",
1357
+ "lstrip": false,
1358
+ "normalized": false,
1359
+ "rstrip": false,
1360
+ "single_word": false,
1361
+ "special": true
1362
+ },
1363
+ "128170": {
1364
+ "content": "<|reserved_special_token_161|>",
1365
+ "lstrip": false,
1366
+ "normalized": false,
1367
+ "rstrip": false,
1368
+ "single_word": false,
1369
+ "special": true
1370
+ },
1371
+ "128171": {
1372
+ "content": "<|reserved_special_token_162|>",
1373
+ "lstrip": false,
1374
+ "normalized": false,
1375
+ "rstrip": false,
1376
+ "single_word": false,
1377
+ "special": true
1378
+ },
1379
+ "128172": {
1380
+ "content": "<|reserved_special_token_163|>",
1381
+ "lstrip": false,
1382
+ "normalized": false,
1383
+ "rstrip": false,
1384
+ "single_word": false,
1385
+ "special": true
1386
+ },
1387
+ "128173": {
1388
+ "content": "<|reserved_special_token_164|>",
1389
+ "lstrip": false,
1390
+ "normalized": false,
1391
+ "rstrip": false,
1392
+ "single_word": false,
1393
+ "special": true
1394
+ },
1395
+ "128174": {
1396
+ "content": "<|reserved_special_token_165|>",
1397
+ "lstrip": false,
1398
+ "normalized": false,
1399
+ "rstrip": false,
1400
+ "single_word": false,
1401
+ "special": true
1402
+ },
1403
+ "128175": {
1404
+ "content": "<|reserved_special_token_166|>",
1405
+ "lstrip": false,
1406
+ "normalized": false,
1407
+ "rstrip": false,
1408
+ "single_word": false,
1409
+ "special": true
1410
+ },
1411
+ "128176": {
1412
+ "content": "<|reserved_special_token_167|>",
1413
+ "lstrip": false,
1414
+ "normalized": false,
1415
+ "rstrip": false,
1416
+ "single_word": false,
1417
+ "special": true
1418
+ },
1419
+ "128177": {
1420
+ "content": "<|reserved_special_token_168|>",
1421
+ "lstrip": false,
1422
+ "normalized": false,
1423
+ "rstrip": false,
1424
+ "single_word": false,
1425
+ "special": true
1426
+ },
1427
+ "128178": {
1428
+ "content": "<|reserved_special_token_169|>",
1429
+ "lstrip": false,
1430
+ "normalized": false,
1431
+ "rstrip": false,
1432
+ "single_word": false,
1433
+ "special": true
1434
+ },
1435
+ "128179": {
1436
+ "content": "<|reserved_special_token_170|>",
1437
+ "lstrip": false,
1438
+ "normalized": false,
1439
+ "rstrip": false,
1440
+ "single_word": false,
1441
+ "special": true
1442
+ },
1443
+ "128180": {
1444
+ "content": "<|reserved_special_token_171|>",
1445
+ "lstrip": false,
1446
+ "normalized": false,
1447
+ "rstrip": false,
1448
+ "single_word": false,
1449
+ "special": true
1450
+ },
1451
+ "128181": {
1452
+ "content": "<|reserved_special_token_172|>",
1453
+ "lstrip": false,
1454
+ "normalized": false,
1455
+ "rstrip": false,
1456
+ "single_word": false,
1457
+ "special": true
1458
+ },
1459
+ "128182": {
1460
+ "content": "<|reserved_special_token_173|>",
1461
+ "lstrip": false,
1462
+ "normalized": false,
1463
+ "rstrip": false,
1464
+ "single_word": false,
1465
+ "special": true
1466
+ },
1467
+ "128183": {
1468
+ "content": "<|reserved_special_token_174|>",
1469
+ "lstrip": false,
1470
+ "normalized": false,
1471
+ "rstrip": false,
1472
+ "single_word": false,
1473
+ "special": true
1474
+ },
1475
+ "128184": {
1476
+ "content": "<|reserved_special_token_175|>",
1477
+ "lstrip": false,
1478
+ "normalized": false,
1479
+ "rstrip": false,
1480
+ "single_word": false,
1481
+ "special": true
1482
+ },
1483
+ "128185": {
1484
+ "content": "<|reserved_special_token_176|>",
1485
+ "lstrip": false,
1486
+ "normalized": false,
1487
+ "rstrip": false,
1488
+ "single_word": false,
1489
+ "special": true
1490
+ },
1491
+ "128186": {
1492
+ "content": "<|reserved_special_token_177|>",
1493
+ "lstrip": false,
1494
+ "normalized": false,
1495
+ "rstrip": false,
1496
+ "single_word": false,
1497
+ "special": true
1498
+ },
1499
+ "128187": {
1500
+ "content": "<|reserved_special_token_178|>",
1501
+ "lstrip": false,
1502
+ "normalized": false,
1503
+ "rstrip": false,
1504
+ "single_word": false,
1505
+ "special": true
1506
+ },
1507
+ "128188": {
1508
+ "content": "<|reserved_special_token_179|>",
1509
+ "lstrip": false,
1510
+ "normalized": false,
1511
+ "rstrip": false,
1512
+ "single_word": false,
1513
+ "special": true
1514
+ },
1515
+ "128189": {
1516
+ "content": "<|reserved_special_token_180|>",
1517
+ "lstrip": false,
1518
+ "normalized": false,
1519
+ "rstrip": false,
1520
+ "single_word": false,
1521
+ "special": true
1522
+ },
1523
+ "128190": {
1524
+ "content": "<|reserved_special_token_181|>",
1525
+ "lstrip": false,
1526
+ "normalized": false,
1527
+ "rstrip": false,
1528
+ "single_word": false,
1529
+ "special": true
1530
+ },
1531
+ "128191": {
1532
+ "content": "<|reserved_special_token_182|>",
1533
+ "lstrip": false,
1534
+ "normalized": false,
1535
+ "rstrip": false,
1536
+ "single_word": false,
1537
+ "special": true
1538
+ },
1539
+ "128192": {
1540
+ "content": "<|reserved_special_token_183|>",
1541
+ "lstrip": false,
1542
+ "normalized": false,
1543
+ "rstrip": false,
1544
+ "single_word": false,
1545
+ "special": true
1546
+ },
1547
+ "128193": {
1548
+ "content": "<|reserved_special_token_184|>",
1549
+ "lstrip": false,
1550
+ "normalized": false,
1551
+ "rstrip": false,
1552
+ "single_word": false,
1553
+ "special": true
1554
+ },
1555
+ "128194": {
1556
+ "content": "<|reserved_special_token_185|>",
1557
+ "lstrip": false,
1558
+ "normalized": false,
1559
+ "rstrip": false,
1560
+ "single_word": false,
1561
+ "special": true
1562
+ },
1563
+ "128195": {
1564
+ "content": "<|reserved_special_token_186|>",
1565
+ "lstrip": false,
1566
+ "normalized": false,
1567
+ "rstrip": false,
1568
+ "single_word": false,
1569
+ "special": true
1570
+ },
1571
+ "128196": {
1572
+ "content": "<|reserved_special_token_187|>",
1573
+ "lstrip": false,
1574
+ "normalized": false,
1575
+ "rstrip": false,
1576
+ "single_word": false,
1577
+ "special": true
1578
+ },
1579
+ "128197": {
1580
+ "content": "<|reserved_special_token_188|>",
1581
+ "lstrip": false,
1582
+ "normalized": false,
1583
+ "rstrip": false,
1584
+ "single_word": false,
1585
+ "special": true
1586
+ },
1587
+ "128198": {
1588
+ "content": "<|reserved_special_token_189|>",
1589
+ "lstrip": false,
1590
+ "normalized": false,
1591
+ "rstrip": false,
1592
+ "single_word": false,
1593
+ "special": true
1594
+ },
1595
+ "128199": {
1596
+ "content": "<|reserved_special_token_190|>",
1597
+ "lstrip": false,
1598
+ "normalized": false,
1599
+ "rstrip": false,
1600
+ "single_word": false,
1601
+ "special": true
1602
+ },
1603
+ "128200": {
1604
+ "content": "<|reserved_special_token_191|>",
1605
+ "lstrip": false,
1606
+ "normalized": false,
1607
+ "rstrip": false,
1608
+ "single_word": false,
1609
+ "special": true
1610
+ },
1611
+ "128201": {
1612
+ "content": "<|reserved_special_token_192|>",
1613
+ "lstrip": false,
1614
+ "normalized": false,
1615
+ "rstrip": false,
1616
+ "single_word": false,
1617
+ "special": true
1618
+ },
1619
+ "128202": {
1620
+ "content": "<|reserved_special_token_193|>",
1621
+ "lstrip": false,
1622
+ "normalized": false,
1623
+ "rstrip": false,
1624
+ "single_word": false,
1625
+ "special": true
1626
+ },
1627
+ "128203": {
1628
+ "content": "<|reserved_special_token_194|>",
1629
+ "lstrip": false,
1630
+ "normalized": false,
1631
+ "rstrip": false,
1632
+ "single_word": false,
1633
+ "special": true
1634
+ },
1635
+ "128204": {
1636
+ "content": "<|reserved_special_token_195|>",
1637
+ "lstrip": false,
1638
+ "normalized": false,
1639
+ "rstrip": false,
1640
+ "single_word": false,
1641
+ "special": true
1642
+ },
1643
+ "128205": {
1644
+ "content": "<|reserved_special_token_196|>",
1645
+ "lstrip": false,
1646
+ "normalized": false,
1647
+ "rstrip": false,
1648
+ "single_word": false,
1649
+ "special": true
1650
+ },
1651
+ "128206": {
1652
+ "content": "<|reserved_special_token_197|>",
1653
+ "lstrip": false,
1654
+ "normalized": false,
1655
+ "rstrip": false,
1656
+ "single_word": false,
1657
+ "special": true
1658
+ },
1659
+ "128207": {
1660
+ "content": "<|reserved_special_token_198|>",
1661
+ "lstrip": false,
1662
+ "normalized": false,
1663
+ "rstrip": false,
1664
+ "single_word": false,
1665
+ "special": true
1666
+ },
1667
+ "128208": {
1668
+ "content": "<|reserved_special_token_199|>",
1669
+ "lstrip": false,
1670
+ "normalized": false,
1671
+ "rstrip": false,
1672
+ "single_word": false,
1673
+ "special": true
1674
+ },
1675
+ "128209": {
1676
+ "content": "<|reserved_special_token_200|>",
1677
+ "lstrip": false,
1678
+ "normalized": false,
1679
+ "rstrip": false,
1680
+ "single_word": false,
1681
+ "special": true
1682
+ },
1683
+ "128210": {
1684
+ "content": "<|reserved_special_token_201|>",
1685
+ "lstrip": false,
1686
+ "normalized": false,
1687
+ "rstrip": false,
1688
+ "single_word": false,
1689
+ "special": true
1690
+ },
1691
+ "128211": {
1692
+ "content": "<|reserved_special_token_202|>",
1693
+ "lstrip": false,
1694
+ "normalized": false,
1695
+ "rstrip": false,
1696
+ "single_word": false,
1697
+ "special": true
1698
+ },
1699
+ "128212": {
1700
+ "content": "<|reserved_special_token_203|>",
1701
+ "lstrip": false,
1702
+ "normalized": false,
1703
+ "rstrip": false,
1704
+ "single_word": false,
1705
+ "special": true
1706
+ },
1707
+ "128213": {
1708
+ "content": "<|reserved_special_token_204|>",
1709
+ "lstrip": false,
1710
+ "normalized": false,
1711
+ "rstrip": false,
1712
+ "single_word": false,
1713
+ "special": true
1714
+ },
1715
+ "128214": {
1716
+ "content": "<|reserved_special_token_205|>",
1717
+ "lstrip": false,
1718
+ "normalized": false,
1719
+ "rstrip": false,
1720
+ "single_word": false,
1721
+ "special": true
1722
+ },
1723
+ "128215": {
1724
+ "content": "<|reserved_special_token_206|>",
1725
+ "lstrip": false,
1726
+ "normalized": false,
1727
+ "rstrip": false,
1728
+ "single_word": false,
1729
+ "special": true
1730
+ },
1731
+ "128216": {
1732
+ "content": "<|reserved_special_token_207|>",
1733
+ "lstrip": false,
1734
+ "normalized": false,
1735
+ "rstrip": false,
1736
+ "single_word": false,
1737
+ "special": true
1738
+ },
1739
+ "128217": {
1740
+ "content": "<|reserved_special_token_208|>",
1741
+ "lstrip": false,
1742
+ "normalized": false,
1743
+ "rstrip": false,
1744
+ "single_word": false,
1745
+ "special": true
1746
+ },
1747
+ "128218": {
1748
+ "content": "<|reserved_special_token_209|>",
1749
+ "lstrip": false,
1750
+ "normalized": false,
1751
+ "rstrip": false,
1752
+ "single_word": false,
1753
+ "special": true
1754
+ },
1755
+ "128219": {
1756
+ "content": "<|reserved_special_token_210|>",
1757
+ "lstrip": false,
1758
+ "normalized": false,
1759
+ "rstrip": false,
1760
+ "single_word": false,
1761
+ "special": true
1762
+ },
1763
+ "128220": {
1764
+ "content": "<|reserved_special_token_211|>",
1765
+ "lstrip": false,
1766
+ "normalized": false,
1767
+ "rstrip": false,
1768
+ "single_word": false,
1769
+ "special": true
1770
+ },
1771
+ "128221": {
1772
+ "content": "<|reserved_special_token_212|>",
1773
+ "lstrip": false,
1774
+ "normalized": false,
1775
+ "rstrip": false,
1776
+ "single_word": false,
1777
+ "special": true
1778
+ },
1779
+ "128222": {
1780
+ "content": "<|reserved_special_token_213|>",
1781
+ "lstrip": false,
1782
+ "normalized": false,
1783
+ "rstrip": false,
1784
+ "single_word": false,
1785
+ "special": true
1786
+ },
1787
+ "128223": {
1788
+ "content": "<|reserved_special_token_214|>",
1789
+ "lstrip": false,
1790
+ "normalized": false,
1791
+ "rstrip": false,
1792
+ "single_word": false,
1793
+ "special": true
1794
+ },
1795
+ "128224": {
1796
+ "content": "<|reserved_special_token_215|>",
1797
+ "lstrip": false,
1798
+ "normalized": false,
1799
+ "rstrip": false,
1800
+ "single_word": false,
1801
+ "special": true
1802
+ },
1803
+ "128225": {
1804
+ "content": "<|reserved_special_token_216|>",
1805
+ "lstrip": false,
1806
+ "normalized": false,
1807
+ "rstrip": false,
1808
+ "single_word": false,
1809
+ "special": true
1810
+ },
1811
+ "128226": {
1812
+ "content": "<|reserved_special_token_217|>",
1813
+ "lstrip": false,
1814
+ "normalized": false,
1815
+ "rstrip": false,
1816
+ "single_word": false,
1817
+ "special": true
1818
+ },
1819
+ "128227": {
1820
+ "content": "<|reserved_special_token_218|>",
1821
+ "lstrip": false,
1822
+ "normalized": false,
1823
+ "rstrip": false,
1824
+ "single_word": false,
1825
+ "special": true
1826
+ },
1827
+ "128228": {
1828
+ "content": "<|reserved_special_token_219|>",
1829
+ "lstrip": false,
1830
+ "normalized": false,
1831
+ "rstrip": false,
1832
+ "single_word": false,
1833
+ "special": true
1834
+ },
1835
+ "128229": {
1836
+ "content": "<|reserved_special_token_220|>",
1837
+ "lstrip": false,
1838
+ "normalized": false,
1839
+ "rstrip": false,
1840
+ "single_word": false,
1841
+ "special": true
1842
+ },
1843
+ "128230": {
1844
+ "content": "<|reserved_special_token_221|>",
1845
+ "lstrip": false,
1846
+ "normalized": false,
1847
+ "rstrip": false,
1848
+ "single_word": false,
1849
+ "special": true
1850
+ },
1851
+ "128231": {
1852
+ "content": "<|reserved_special_token_222|>",
1853
+ "lstrip": false,
1854
+ "normalized": false,
1855
+ "rstrip": false,
1856
+ "single_word": false,
1857
+ "special": true
1858
+ },
1859
+ "128232": {
1860
+ "content": "<|reserved_special_token_223|>",
1861
+ "lstrip": false,
1862
+ "normalized": false,
1863
+ "rstrip": false,
1864
+ "single_word": false,
1865
+ "special": true
1866
+ },
1867
+ "128233": {
1868
+ "content": "<|reserved_special_token_224|>",
1869
+ "lstrip": false,
1870
+ "normalized": false,
1871
+ "rstrip": false,
1872
+ "single_word": false,
1873
+ "special": true
1874
+ },
1875
+ "128234": {
1876
+ "content": "<|reserved_special_token_225|>",
1877
+ "lstrip": false,
1878
+ "normalized": false,
1879
+ "rstrip": false,
1880
+ "single_word": false,
1881
+ "special": true
1882
+ },
1883
+ "128235": {
1884
+ "content": "<|reserved_special_token_226|>",
1885
+ "lstrip": false,
1886
+ "normalized": false,
1887
+ "rstrip": false,
1888
+ "single_word": false,
1889
+ "special": true
1890
+ },
1891
+ "128236": {
1892
+ "content": "<|reserved_special_token_227|>",
1893
+ "lstrip": false,
1894
+ "normalized": false,
1895
+ "rstrip": false,
1896
+ "single_word": false,
1897
+ "special": true
1898
+ },
1899
+ "128237": {
1900
+ "content": "<|reserved_special_token_228|>",
1901
+ "lstrip": false,
1902
+ "normalized": false,
1903
+ "rstrip": false,
1904
+ "single_word": false,
1905
+ "special": true
1906
+ },
1907
+ "128238": {
1908
+ "content": "<|reserved_special_token_229|>",
1909
+ "lstrip": false,
1910
+ "normalized": false,
1911
+ "rstrip": false,
1912
+ "single_word": false,
1913
+ "special": true
1914
+ },
1915
+ "128239": {
1916
+ "content": "<|reserved_special_token_230|>",
1917
+ "lstrip": false,
1918
+ "normalized": false,
1919
+ "rstrip": false,
1920
+ "single_word": false,
1921
+ "special": true
1922
+ },
1923
+ "128240": {
1924
+ "content": "<|reserved_special_token_231|>",
1925
+ "lstrip": false,
1926
+ "normalized": false,
1927
+ "rstrip": false,
1928
+ "single_word": false,
1929
+ "special": true
1930
+ },
1931
+ "128241": {
1932
+ "content": "<|reserved_special_token_232|>",
1933
+ "lstrip": false,
1934
+ "normalized": false,
1935
+ "rstrip": false,
1936
+ "single_word": false,
1937
+ "special": true
1938
+ },
1939
+ "128242": {
1940
+ "content": "<|reserved_special_token_233|>",
1941
+ "lstrip": false,
1942
+ "normalized": false,
1943
+ "rstrip": false,
1944
+ "single_word": false,
1945
+ "special": true
1946
+ },
1947
+ "128243": {
1948
+ "content": "<|reserved_special_token_234|>",
1949
+ "lstrip": false,
1950
+ "normalized": false,
1951
+ "rstrip": false,
1952
+ "single_word": false,
1953
+ "special": true
1954
+ },
1955
+ "128244": {
1956
+ "content": "<|reserved_special_token_235|>",
1957
+ "lstrip": false,
1958
+ "normalized": false,
1959
+ "rstrip": false,
1960
+ "single_word": false,
1961
+ "special": true
1962
+ },
1963
+ "128245": {
1964
+ "content": "<|reserved_special_token_236|>",
1965
+ "lstrip": false,
1966
+ "normalized": false,
1967
+ "rstrip": false,
1968
+ "single_word": false,
1969
+ "special": true
1970
+ },
1971
+ "128246": {
1972
+ "content": "<|reserved_special_token_237|>",
1973
+ "lstrip": false,
1974
+ "normalized": false,
1975
+ "rstrip": false,
1976
+ "single_word": false,
1977
+ "special": true
1978
+ },
1979
+ "128247": {
1980
+ "content": "<|reserved_special_token_238|>",
1981
+ "lstrip": false,
1982
+ "normalized": false,
1983
+ "rstrip": false,
1984
+ "single_word": false,
1985
+ "special": true
1986
+ },
1987
+ "128248": {
1988
+ "content": "<|reserved_special_token_239|>",
1989
+ "lstrip": false,
1990
+ "normalized": false,
1991
+ "rstrip": false,
1992
+ "single_word": false,
1993
+ "special": true
1994
+ },
1995
+ "128249": {
1996
+ "content": "<|reserved_special_token_240|>",
1997
+ "lstrip": false,
1998
+ "normalized": false,
1999
+ "rstrip": false,
2000
+ "single_word": false,
2001
+ "special": true
2002
+ },
2003
+ "128250": {
2004
+ "content": "<|begin_of_audio|>",
2005
+ "lstrip": false,
2006
+ "normalized": false,
2007
+ "rstrip": false,
2008
+ "single_word": false,
2009
+ "special": true
2010
+ },
2011
+ "128251": {
2012
+ "content": "<|end_of_audio|>",
2013
+ "lstrip": false,
2014
+ "normalized": false,
2015
+ "rstrip": false,
2016
+ "single_word": false,
2017
+ "special": true
2018
+ },
2019
+ "128252": {
2020
+ "content": "<|reserved_special_token_243|>",
2021
+ "lstrip": false,
2022
+ "normalized": false,
2023
+ "rstrip": false,
2024
+ "single_word": false,
2025
+ "special": true
2026
+ },
2027
+ "128253": {
2028
+ "content": "<|reserved_special_token_244|>",
2029
+ "lstrip": false,
2030
+ "normalized": false,
2031
+ "rstrip": false,
2032
+ "single_word": false,
2033
+ "special": true
2034
+ },
2035
+ "128254": {
2036
+ "content": "<|reserved_special_token_245|>",
2037
+ "lstrip": false,
2038
+ "normalized": false,
2039
+ "rstrip": false,
2040
+ "single_word": false,
2041
+ "special": true
2042
+ },
2043
+ "128255": {
2044
+ "content": "<|reserved_special_token_246|>",
2045
+ "lstrip": false,
2046
+ "normalized": false,
2047
+ "rstrip": false,
2048
+ "single_word": false,
2049
+ "special": true
2050
+ },
2051
+ "128256": {
2052
+ "content": "<|image|>",
2053
+ "lstrip": false,
2054
+ "normalized": false,
2055
+ "rstrip": false,
2056
+ "single_word": false,
2057
+ "special": true
2058
+ },
2059
+ "128257": {
2060
+ "content": "<|audio|>",
2061
+ "lstrip": false,
2062
+ "normalized": false,
2063
+ "rstrip": false,
2064
+ "single_word": false,
2065
+ "special": true
2066
+ },
2067
+ "128258": {
2068
+ "content": "<|audio_1|>",
2069
+ "lstrip": false,
2070
+ "normalized": true,
2071
+ "rstrip": false,
2072
+ "single_word": false,
2073
+ "special": false
2074
+ },
2075
+ "128259": {
2076
+ "content": "<|audio_2|>",
2077
+ "lstrip": false,
2078
+ "normalized": true,
2079
+ "rstrip": false,
2080
+ "single_word": false,
2081
+ "special": false
2082
+ },
2083
+ "128260": {
2084
+ "content": "<|audio_3|>",
2085
+ "lstrip": false,
2086
+ "normalized": true,
2087
+ "rstrip": false,
2088
+ "single_word": false,
2089
+ "special": false
2090
+ },
2091
+ "128261": {
2092
+ "content": "<|audio_4|>",
2093
+ "lstrip": false,
2094
+ "normalized": true,
2095
+ "rstrip": false,
2096
+ "single_word": false,
2097
+ "special": false
2098
+ },
2099
+ "128262": {
2100
+ "content": "<|audio_5|>",
2101
+ "lstrip": false,
2102
+ "normalized": true,
2103
+ "rstrip": false,
2104
+ "single_word": false,
2105
+ "special": false
2106
+ },
2107
+ "128263": {
2108
+ "content": "<|audio_6|>",
2109
+ "lstrip": false,
2110
+ "normalized": true,
2111
+ "rstrip": false,
2112
+ "single_word": false,
2113
+ "special": false
2114
+ },
2115
+ "128264": {
2116
+ "content": "<|audio_7|>",
2117
+ "lstrip": false,
2118
+ "normalized": true,
2119
+ "rstrip": false,
2120
+ "single_word": false,
2121
+ "special": false
2122
+ },
2123
+ "128265": {
2124
+ "content": "<|audio_8|>",
2125
+ "lstrip": false,
2126
+ "normalized": true,
2127
+ "rstrip": false,
2128
+ "single_word": false,
2129
+ "special": false
2130
+ },
2131
+ "128266": {
2132
+ "content": "<|audio_9|>",
2133
+ "lstrip": false,
2134
+ "normalized": true,
2135
+ "rstrip": false,
2136
+ "single_word": false,
2137
+ "special": false
2138
+ },
2139
+ "128267": {
2140
+ "content": "<|audio_10|>",
2141
+ "lstrip": false,
2142
+ "normalized": true,
2143
+ "rstrip": false,
2144
+ "single_word": false,
2145
+ "special": false
2146
+ },
2147
+ "128268": {
2148
+ "content": "<|audio_11|>",
2149
+ "lstrip": false,
2150
+ "normalized": true,
2151
+ "rstrip": false,
2152
+ "single_word": false,
2153
+ "special": false
2154
+ },
2155
+ "128269": {
2156
+ "content": "<|audio_12|>",
2157
+ "lstrip": false,
2158
+ "normalized": true,
2159
+ "rstrip": false,
2160
+ "single_word": false,
2161
+ "special": false
2162
+ },
2163
+ "128270": {
2164
+ "content": "<|audio_13|>",
2165
+ "lstrip": false,
2166
+ "normalized": true,
2167
+ "rstrip": false,
2168
+ "single_word": false,
2169
+ "special": false
2170
+ },
2171
+ "128271": {
2172
+ "content": "<|audio_14|>",
2173
+ "lstrip": false,
2174
+ "normalized": true,
2175
+ "rstrip": false,
2176
+ "single_word": false,
2177
+ "special": false
2178
+ },
2179
+ "128272": {
2180
+ "content": "<|audio_15|>",
2181
+ "lstrip": false,
2182
+ "normalized": true,
2183
+ "rstrip": false,
2184
+ "single_word": false,
2185
+ "special": false
2186
+ },
2187
+ "128273": {
2188
+ "content": "<|audio_16|>",
2189
+ "lstrip": false,
2190
+ "normalized": true,
2191
+ "rstrip": false,
2192
+ "single_word": false,
2193
+ "special": false
2194
+ },
2195
+ "128274": {
2196
+ "content": "<|audio_17|>",
2197
+ "lstrip": false,
2198
+ "normalized": true,
2199
+ "rstrip": false,
2200
+ "single_word": false,
2201
+ "special": false
2202
+ },
2203
+ "128275": {
2204
+ "content": "<|audio_18|>",
2205
+ "lstrip": false,
2206
+ "normalized": true,
2207
+ "rstrip": false,
2208
+ "single_word": false,
2209
+ "special": false
2210
+ },
2211
+ "128276": {
2212
+ "content": "<|audio_19|>",
2213
+ "lstrip": false,
2214
+ "normalized": true,
2215
+ "rstrip": false,
2216
+ "single_word": false,
2217
+ "special": false
2218
+ },
2219
+ "128277": {
2220
+ "content": "<|audio_20|>",
2221
+ "lstrip": false,
2222
+ "normalized": true,
2223
+ "rstrip": false,
2224
+ "single_word": false,
2225
+ "special": false
2226
+ },
2227
+ "128278": {
2228
+ "content": "<|audio_21|>",
2229
+ "lstrip": false,
2230
+ "normalized": true,
2231
+ "rstrip": false,
2232
+ "single_word": false,
2233
+ "special": false
2234
+ },
2235
+ "128279": {
2236
+ "content": "<|audio_22|>",
2237
+ "lstrip": false,
2238
+ "normalized": true,
2239
+ "rstrip": false,
2240
+ "single_word": false,
2241
+ "special": false
2242
+ },
2243
+ "128280": {
2244
+ "content": "<|audio_23|>",
2245
+ "lstrip": false,
2246
+ "normalized": true,
2247
+ "rstrip": false,
2248
+ "single_word": false,
2249
+ "special": false
2250
+ },
2251
+ "128281": {
2252
+ "content": "<|audio_24|>",
2253
+ "lstrip": false,
2254
+ "normalized": true,
2255
+ "rstrip": false,
2256
+ "single_word": false,
2257
+ "special": false
2258
+ },
2259
+ "128282": {
2260
+ "content": "<|audio_25|>",
2261
+ "lstrip": false,
2262
+ "normalized": true,
2263
+ "rstrip": false,
2264
+ "single_word": false,
2265
+ "special": false
2266
+ },
2267
+ "128283": {
2268
+ "content": "<|audio_26|>",
2269
+ "lstrip": false,
2270
+ "normalized": true,
2271
+ "rstrip": false,
2272
+ "single_word": false,
2273
+ "special": false
2274
+ },
2275
+ "128284": {
2276
+ "content": "<|audio_27|>",
2277
+ "lstrip": false,
2278
+ "normalized": true,
2279
+ "rstrip": false,
2280
+ "single_word": false,
2281
+ "special": false
2282
+ },
2283
+ "128285": {
2284
+ "content": "<|audio_28|>",
2285
+ "lstrip": false,
2286
+ "normalized": true,
2287
+ "rstrip": false,
2288
+ "single_word": false,
2289
+ "special": false
2290
+ },
2291
+ "128286": {
2292
+ "content": "<|audio_29|>",
2293
+ "lstrip": false,
2294
+ "normalized": true,
2295
+ "rstrip": false,
2296
+ "single_word": false,
2297
+ "special": false
2298
+ },
2299
+ "128287": {
2300
+ "content": "<|audio_30|>",
2301
+ "lstrip": false,
2302
+ "normalized": true,
2303
+ "rstrip": false,
2304
+ "single_word": false,
2305
+ "special": false
2306
+ },
2307
+ "128288": {
2308
+ "content": "<|audio_31|>",
2309
+ "lstrip": false,
2310
+ "normalized": true,
2311
+ "rstrip": false,
2312
+ "single_word": false,
2313
+ "special": false
2314
+ },
2315
+ "128289": {
2316
+ "content": "<|audio_32|>",
2317
+ "lstrip": false,
2318
+ "normalized": true,
2319
+ "rstrip": false,
2320
+ "single_word": false,
2321
+ "special": false
2322
+ },
2323
+ "128290": {
2324
+ "content": "<|audio_33|>",
2325
+ "lstrip": false,
2326
+ "normalized": true,
2327
+ "rstrip": false,
2328
+ "single_word": false,
2329
+ "special": false
2330
+ },
2331
+ "128291": {
2332
+ "content": "<|audio_34|>",
2333
+ "lstrip": false,
2334
+ "normalized": true,
2335
+ "rstrip": false,
2336
+ "single_word": false,
2337
+ "special": false
2338
+ },
2339
+ "128292": {
2340
+ "content": "<|audio_35|>",
2341
+ "lstrip": false,
2342
+ "normalized": true,
2343
+ "rstrip": false,
2344
+ "single_word": false,
2345
+ "special": false
2346
+ },
2347
+ "128293": {
2348
+ "content": "<|audio_36|>",
2349
+ "lstrip": false,
2350
+ "normalized": true,
2351
+ "rstrip": false,
2352
+ "single_word": false,
2353
+ "special": false
2354
+ },
2355
+ "128294": {
2356
+ "content": "<|audio_37|>",
2357
+ "lstrip": false,
2358
+ "normalized": true,
2359
+ "rstrip": false,
2360
+ "single_word": false,
2361
+ "special": false
2362
+ },
2363
+ "128295": {
2364
+ "content": "<|audio_38|>",
2365
+ "lstrip": false,
2366
+ "normalized": true,
2367
+ "rstrip": false,
2368
+ "single_word": false,
2369
+ "special": false
2370
+ },
2371
+ "128296": {
2372
+ "content": "<|audio_39|>",
2373
+ "lstrip": false,
2374
+ "normalized": true,
2375
+ "rstrip": false,
2376
+ "single_word": false,
2377
+ "special": false
2378
+ },
2379
+ "128297": {
2380
+ "content": "<|audio_40|>",
2381
+ "lstrip": false,
2382
+ "normalized": true,
2383
+ "rstrip": false,
2384
+ "single_word": false,
2385
+ "special": false
2386
+ },
2387
+ "128298": {
2388
+ "content": "<|audio_41|>",
2389
+ "lstrip": false,
2390
+ "normalized": true,
2391
+ "rstrip": false,
2392
+ "single_word": false,
2393
+ "special": false
2394
+ },
2395
+ "128299": {
2396
+ "content": "<|audio_42|>",
2397
+ "lstrip": false,
2398
+ "normalized": true,
2399
+ "rstrip": false,
2400
+ "single_word": false,
2401
+ "special": false
2402
+ },
2403
+ "128300": {
2404
+ "content": "<|audio_43|>",
2405
+ "lstrip": false,
2406
+ "normalized": true,
2407
+ "rstrip": false,
2408
+ "single_word": false,
2409
+ "special": false
2410
+ },
2411
+ "128301": {
2412
+ "content": "<|audio_44|>",
2413
+ "lstrip": false,
2414
+ "normalized": true,
2415
+ "rstrip": false,
2416
+ "single_word": false,
2417
+ "special": false
2418
+ },
2419
+ "128302": {
2420
+ "content": "<|audio_45|>",
2421
+ "lstrip": false,
2422
+ "normalized": true,
2423
+ "rstrip": false,
2424
+ "single_word": false,
2425
+ "special": false
2426
+ },
2427
+ "128303": {
2428
+ "content": "<|audio_46|>",
2429
+ "lstrip": false,
2430
+ "normalized": true,
2431
+ "rstrip": false,
2432
+ "single_word": false,
2433
+ "special": false
2434
+ },
2435
+ "128304": {
2436
+ "content": "<|audio_47|>",
2437
+ "lstrip": false,
2438
+ "normalized": true,
2439
+ "rstrip": false,
2440
+ "single_word": false,
2441
+ "special": false
2442
+ },
2443
+ "128305": {
2444
+ "content": "<|audio_48|>",
2445
+ "lstrip": false,
2446
+ "normalized": true,
2447
+ "rstrip": false,
2448
+ "single_word": false,
2449
+ "special": false
2450
+ },
2451
+ "128306": {
2452
+ "content": "<|audio_49|>",
2453
+ "lstrip": false,
2454
+ "normalized": true,
2455
+ "rstrip": false,
2456
+ "single_word": false,
2457
+ "special": false
2458
+ }
2459
+ },
2460
+ "auto_map": {
2461
+ "AutoProcessor": "AlexHung29629/test_mllama_11B_v3--processing_mllama.MllamaProcessor"
2462
+ },
2463
+ "bos_token": "<|begin_of_text|>",
2464
+ "chat_template": "{{- bos_token }}\n{%- if custom_tools is defined %}\n {%- set tools = custom_tools %}\n{%- endif %}\n{%- if not tools_in_user_message is defined %}\n {%- set tools_in_user_message = true %}\n{%- endif %}\n{%- if not date_string is defined %}\n {%- if strftime_now is defined %}\n {%- set date_string = strftime_now(\"%d %b %Y\") %}\n {%- else %}\n {%- set date_string = \"26 Jul 2024\" %}\n {%- endif %}\n{%- endif %}\n{%- if not tools is defined %}\n {%- set tools = none %}\n{%- endif %}\n\n{#- This block extracts the system message, so we can slot it into the right place. #}\n{%- if messages[0]['role'] == 'system' %}\n {%- set system_message = messages[0]['content']|trim %}\n {%- set messages = messages[1:] %}\n{%- else %}\n {%- set system_message = \"\" %}\n{%- endif %}\n\n{#- Find out if there are any images #}\n{% set image_ns = namespace(has_images=false) %} \n{%- for message in messages %}\n {%- for content in message['content'] %}\n {%- if content['type'] == 'image' %}\n {%- set image_ns.has_images = true %}\n {%- endif %}\n {%- endfor %}\n{%- endfor %}\n\n{#- Error out if there are images and system message #}\n{%- if image_ns.has_images and not system_message == \"\" %}\n {{- raise_exception(\"Prompting with images is incompatible with system messages.\") }}\n{%- endif %}\n\n{#- System message if there are no images #}\n{%- if not image_ns.has_images %}\n {{- \"<|start_header_id|>system<|end_header_id|>\\n\\n\" }}\n {%- if tools is not none %}\n {{- \"Environment: ipython\\n\" }}\n {%- endif %}\n {{- \"Cutting Knowledge Date: December 2023\\n\" }}\n {{- \"Today Date: \" + date_string + \"\\n\\n\" }}\n {%- if tools is not none and not tools_in_user_message %}\n {{- \"You have access to the following functions. To call a function, please respond with JSON for a function call.\" }}\n {{- 'Respond in the format {\"name\": function name, \"parameters\": dictionary of argument name and its value}.' }}\n {{- \"Do not use variables.\\n\\n\" }}\n {%- for t in tools %}\n {{- t | tojson(indent=4) }}\n {{- \"\\n\\n\" }}\n {%- endfor %}\n {%- endif %}\n {{- system_message }}\n {{- \"<|eot_id|>\" }}\n{%- endif %}\n\n{#- Custom tools are passed in a user message with some extra guidance #}\n{%- if tools_in_user_message and not tools is none %}\n {#- Extract the first user message so we can plug it in here #}\n {%- if messages | length != 0 %}\n {%- set first_user_message = messages[0]['content']|trim %}\n {%- set messages = messages[1:] %}\n {%- else %}\n {{- raise_exception(\"Cannot put tools in the first user message when there's no first user message!\") }}\n{%- endif %}\n {{- '<|start_header_id|>user<|end_header_id|>\\n\\n' -}}\n {{- \"Given the following functions, please respond with a JSON for a function call \" }}\n {{- \"with its proper arguments that best answers the given prompt.\\n\\n\" }}\n {{- 'Respond in the format {\"name\": function name, \"parameters\": dictionary of argument name and its value}.' }}\n {{- \"Do not use variables.\\n\\n\" }}\n {%- for t in tools %}\n {{- t | tojson(indent=4) }}\n {{- \"\\n\\n\" }}\n {%- endfor %}\n {{- first_user_message + \"<|eot_id|>\"}}\n{%- endif %}\n\n{%- for message in messages %}\n {%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %}\n {{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\\n\\n' }}\n {%- if message['content'] is string %}\n {{- message['content'] }}\n {%- else %}\n {%- for content in message['content'] %}\n {%- if content['type'] == 'image' %}\n {{- '<|image|>' }}\n {%- elif content['type'] == 'text' %}\n {{- content['text'] }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {{- '<|eot_id|>' }}\n {%- elif 'tool_calls' in message %}\n {%- if not message.tool_calls|length == 1 %}\n {{- raise_exception(\"This model only supports single tool-calls at once!\") }}\n {%- endif %}\n {%- set tool_call = message.tool_calls[0].function %}\n {{- '<|start_header_id|>assistant<|end_header_id|>\\n\\n' -}}\n {{- '{\"name\": \"' + tool_call.name + '\", ' }}\n {{- '\"parameters\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- \"}\" }}\n {{- \"<|eot_id|>\" }}\n {%- elif message.role == \"tool\" or message.role == \"ipython\" %}\n {{- \"<|start_header_id|>ipython<|end_header_id|>\\n\\n\" }}\n {%- if message.content is mapping or message.content is iterable %}\n {{- message.content | tojson }}\n {%- else %}\n {{- message.content }}\n {%- endif %}\n {{- \"<|eot_id|>\" }}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|start_header_id|>assistant<|end_header_id|>\\n\\n' }}\n{%- endif %}\n",
2465
+ "clean_up_tokenization_spaces": true,
2466
+ "eos_token": "<|eot_id|>",
2467
+ "model_input_names": [
2468
+ "input_ids",
2469
+ "attention_mask"
2470
+ ],
2471
+ "model_max_length": 131072,
2472
+ "pad_token": "<|finetune_right_pad_id|>",
2473
+ "processor_class": "MllamaProcessor",
2474
+ "tokenizer_class": "PreTrainedTokenizerFast"
2475
+ }