melhoushi commited on
Commit
5d33013
·
verified ·
1 Parent(s): 81af422

Init model

Browse files
config.json ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "vocab_size": 128256,
3
+ "max_position_embeddings": 8192,
4
+ "position_embedding_type": "alibi",
5
+ "hidden_size": 1152,
6
+ "tie_word_embeddings": false,
7
+ "num_hidden_layers": 23,
8
+ "rms_norm_eps": 1e-05,
9
+ "num_attention_heads": 9,
10
+ "attention_bias": true,
11
+ "intermediate_size": 9216,
12
+ "use_mlp_gating": false,
13
+ "hidden_act": "relu2",
14
+ "mlp_bias": true,
15
+ "mhsa_residual_scale": 0.037584782608695654,
16
+ "mlp_residual_scale": 0.021978260869565214,
17
+ "embeddings_scale": 1.0,
18
+ "scale_qk_dot_by_d": true,
19
+ "output_logits_scale": 0.0008680555555555555,
20
+ "norm_type": "layernorm",
21
+ "rope_scaling": null,
22
+ "model_type": "celerity",
23
+ "architectures": [
24
+ "CelerityForCausalLM"
25
+ ],
26
+ "use_cache": true,
27
+ "auto_map": {
28
+ "AutoConfig": "configuration_celerity.CelerityConfig",
29
+ "AutoModel": "modeling_celerity.CelerityModel",
30
+ "AutoModelForCausalLM": "modeling_celerity.CelerityForCausalLM",
31
+ "AutoModelForQuestionAnswering": "modeling_celerity.CelerityForQuestionAnswering",
32
+ "AutoModelForSequenceClassification": "modeling_celerity.CelerityForSequenceClassification",
33
+ "AutoModelForTokenClassification": "modeling_celerity.CelerityForTokenClassification"
34
+ }
35
+ }
configuration_celerity.py ADDED
@@ -0,0 +1,244 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved.
3
+ #
4
+ # This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX
5
+ # and OPT implementations in this library. It has been modified from its
6
+ # original forms to accommodate minor architectural differences compared
7
+ # to GPT-NeoX and OPT used by the Meta AI team that trained the model.
8
+ #
9
+ # Licensed under the Apache License, Version 2.0 (the "License");
10
+ # you may not use this file except in compliance with the License.
11
+ # You may obtain a copy of the License at
12
+ #
13
+ # http://www.apache.org/licenses/LICENSE-2.0
14
+ #
15
+ # Unless required by applicable law or agreed to in writing, software
16
+ # distributed under the License is distributed on an "AS IS" BASIS,
17
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ # See the License for the specific language governing permissions and
19
+ # limitations under the License.
20
+ """Celerity model configuration"""
21
+
22
+ # Adapted from https://github.com/huggingface/transformers/blob/v4.45.2/src/transformers/models/llama/configuration_llama.py
23
+
24
+ from transformers.configuration_utils import PretrainedConfig
25
+ from transformers.modeling_rope_utils import rope_config_validation
26
+
27
+
28
+ class CelerityConfig(PretrainedConfig):
29
+ r"""
30
+ This is the configuration class to store the configuration of a [`CelerityModel`]. It is used to instantiate an Celerity
31
+ model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
32
+ defaults will yield a similar configuration to that of the LLaMA-7B.
33
+
34
+ Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
35
+ documentation from [`PretrainedConfig`] for more information.
36
+
37
+
38
+ Args:
39
+ vocab_size (`int`, *optional*, defaults to 32000):
40
+ Vocabulary size of the LLaMA model. Defines the number of different tokens that can be represented by the
41
+ `inputs_ids` passed when calling [`LlamaModel`]
42
+ hidden_size (`int`, *optional*, defaults to 4096):
43
+ Dimension of the hidden representations.
44
+ intermediate_size (`int`, *optional*, defaults to 11008):
45
+ Dimension of the MLP representations.
46
+ num_hidden_layers (`int`, *optional*, defaults to 32):
47
+ Number of hidden layers in the Transformer decoder.
48
+ num_attention_heads (`int`, *optional*, defaults to 32):
49
+ Number of attention heads for each attention layer in the Transformer decoder.
50
+ num_key_value_heads (`int`, *optional*):
51
+ This is the number of key_value heads that should be used to implement Grouped Query Attention. If
52
+ `num_key_value_heads=num_attention_heads`, the model will use Multi Head Attention (MHA), if
53
+ `num_key_value_heads=1` the model will use Multi Query Attention (MQA) otherwise GQA is used. When
54
+ converting a multi-head checkpoint to a GQA checkpoint, each group key and value head should be constructed
55
+ by meanpooling all the original heads within that group. For more details checkout [this
56
+ paper](https://arxiv.org/pdf/2305.13245.pdf). If it is not specified, will default to
57
+ `num_attention_heads`.
58
+ hidden_act (`str` or `function`, *optional*, defaults to `"silu"`):
59
+ The non-linear activation function (function or string) in the decoder.
60
+ max_position_embeddings (`int`, *optional*, defaults to 2048):
61
+ The maximum sequence length that this model might ever be used with. Llama 1 supports up to 2048 tokens,
62
+ Llama 2 up to 4096, CodeLlama up to 16384.
63
+ initializer_range (`float`, *optional*, defaults to 0.02):
64
+ The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
65
+ norm_type (`str`, *optional*, defaults to `"rmsnorm"`):
66
+ The normalization type to use. Should be one of `["layernorm", "rmsnorm"]`.
67
+ rms_norm_eps (`float`, *optional*, defaults to 1e-06):
68
+ The epsilon used by the rms normalization layers.
69
+ use_cache (`bool`, *optional*, defaults to `True`):
70
+ Whether or not the model should return the last key/values attentions (not used by all models). Only
71
+ relevant if `config.is_decoder=True`.
72
+ pad_token_id (`int`, *optional*):
73
+ Padding token id.
74
+ bos_token_id (`int`, *optional*, defaults to 1):
75
+ Beginning of stream token id.
76
+ eos_token_id (`int`, *optional*, defaults to 2):
77
+ End of stream token id.
78
+ pretraining_tp (`int`, *optional*, defaults to 1):
79
+ Experimental feature. Tensor parallelism rank used during pretraining. Please refer to [this
80
+ document](https://huggingface.co/docs/transformers/main/perf_train_gpu_many#tensor-parallelism) to
81
+ understand more about it. This value is necessary to ensure exact reproducibility of the pretraining
82
+ results. Please refer to [this issue](https://github.com/pytorch/pytorch/issues/76232).
83
+ tie_word_embeddings (`bool`, *optional*, defaults to `False`):
84
+ Whether to tie weight embeddings
85
+ rope_theta (`float`, *optional*, defaults to 10000.0):
86
+ The base period of the RoPE embeddings.
87
+ rope_scaling (`Dict`, *optional*):
88
+ Dictionary containing the scaling configuration for the RoPE embeddings. NOTE: if you apply new rope type
89
+ and you expect the model to work on longer `max_position_embeddings`, we recommend you to update this value
90
+ accordingly.
91
+ Expected contents:
92
+ `rope_type` (`str`):
93
+ The sub-variant of RoPE to use. Can be one of ['default', 'linear', 'dynamic', 'yarn', 'longrope',
94
+ 'llama3'], with 'default' being the original RoPE implementation.
95
+ `factor` (`float`, *optional*):
96
+ Used with all rope types except 'default'. The scaling factor to apply to the RoPE embeddings. In
97
+ most scaling types, a `factor` of x will enable the model to handle sequences of length x *
98
+ original maximum pre-trained length.
99
+ `original_max_position_embeddings` (`int`, *optional*):
100
+ Used with 'dynamic', 'longrope' and 'llama3'. The original max position embeddings used during
101
+ pretraining.
102
+ `attention_factor` (`float`, *optional*):
103
+ Used with 'yarn' and 'longrope'. The scaling factor to be applied on the attention
104
+ computation. If unspecified, it defaults to value recommended by the implementation, using the
105
+ `factor` field to infer the suggested value.
106
+ `beta_fast` (`float`, *optional*):
107
+ Only used with 'yarn'. Parameter to set the boundary for extrapolation (only) in the linear
108
+ ramp function. If unspecified, it defaults to 32.
109
+ `beta_slow` (`float`, *optional*):
110
+ Only used with 'yarn'. Parameter to set the boundary for interpolation (only) in the linear
111
+ ramp function. If unspecified, it defaults to 1.
112
+ `short_factor` (`List[float]`, *optional*):
113
+ Only used with 'longrope'. The scaling factor to be applied to short contexts (<
114
+ `original_max_position_embeddings`). Must be a list of numbers with the same length as the hidden
115
+ size divided by the number of attention heads divided by 2
116
+ `long_factor` (`List[float]`, *optional*):
117
+ Only used with 'longrope'. The scaling factor to be applied to long contexts (<
118
+ `original_max_position_embeddings`). Must be a list of numbers with the same length as the hidden
119
+ size divided by the number of attention heads divided by 2
120
+ `low_freq_factor` (`float`, *optional*):
121
+ Only used with 'llama3'. Scaling factor applied to low frequency components of the RoPE
122
+ `high_freq_factor` (`float`, *optional*):
123
+ Only used with 'llama3'. Scaling factor applied to high frequency components of the RoPE
124
+ attention_bias (`bool`, *optional*, defaults to `False`):
125
+ Whether to use a bias in the query, key, value and output projection layers during self-attention.
126
+ attention_dropout (`float`, *optional*, defaults to 0.0):
127
+ The dropout ratio for the attention probabilities.
128
+ mlp_bias (`bool`, *optional*, defaults to `False`):
129
+ Whether to use a bias in up_proj, down_proj and gate_proj layers in the MLP layers.
130
+ head_dim (`int`, *optional*):
131
+ The attention head dimension. If None, it will default to hidden_size // num_heads
132
+ position_embedding_type (`str`, *optional*, defaults to `"alibi"`):
133
+ Positional embedding can be either `"alibi"` or `"learned"`.
134
+ use_mlp_gating (`bool`, *optional*, defaults to `False`):
135
+ Whether to gate up projection using an output of a linear layer in MLP as in Swish.
136
+ embeddings_scale (`float`, *optional*, defaults to 1.0):
137
+ Scaler multiplier to scale token and position embeddings.
138
+ output_logits_scale (`float`, *optional*, defaults to 1.0):
139
+ Scaler multiplier to scale output logits.
140
+ mhsa_residual_scale (`float`, *optional*, defaults to 1.0):
141
+ Scaler multiplier to scale the multi-head self-attention residual stream.
142
+ mlp_residual_scale (`float`, *optional*, defaults to 1.0):
143
+ Scaler multiplier to scale the MLP residual stream.
144
+ scale_qk_dot_by_d (`bool`, *optional*, defaults to `True`):
145
+ Scale attention weights by dividing by hidden_size instead of sqrt(hidden_size). Need to set
146
+ scale_attn_weights to `True` as well.
147
+
148
+ ```python
149
+ >>> from transformers import CelerityModel, CelerityConfig
150
+
151
+ >>> # Initializing a Celerity style configuration
152
+ >>> configuration = CelerityConfig()
153
+
154
+ >>> # Initializing a model from the style configuration
155
+ >>> model = CelerityModel(configuration)
156
+
157
+ >>> # Accessing the model configuration
158
+ >>> configuration = model.config
159
+ ```"""
160
+
161
+ model_type = "celerity"
162
+ keys_to_ignore_at_inference = ["past_key_values"]
163
+
164
+ def __init__(
165
+ self,
166
+ vocab_size=32000,
167
+ hidden_size=4096,
168
+ intermediate_size=11008,
169
+ num_hidden_layers=32,
170
+ num_attention_heads=32,
171
+ num_key_value_heads=None,
172
+ hidden_act="relu2",
173
+ max_position_embeddings=2048,
174
+ initializer_range=0.02,
175
+ norm_type="rmsnorm",
176
+ rms_norm_eps=1e-6,
177
+ use_cache=True,
178
+ pad_token_id=None,
179
+ bos_token_id=1,
180
+ eos_token_id=2,
181
+ pretraining_tp=1,
182
+ tie_word_embeddings=False,
183
+ rope_theta=10000.0,
184
+ rope_scaling=None,
185
+ attention_bias=False,
186
+ attention_dropout=0.0,
187
+ mlp_bias=False,
188
+ head_dim=None,
189
+ position_embedding_type="alibi",
190
+ use_mlp_gating=False,
191
+ embeddings_scale=1.0,
192
+ output_logits_scale=1.0,
193
+ mhsa_residual_scale=1.0,
194
+ mlp_residual_scale=1.0,
195
+ scale_qk_dot_by_d=True,
196
+ _attn_implementation="eager",
197
+ **kwargs,
198
+ ):
199
+ self.vocab_size = vocab_size
200
+ self.max_position_embeddings = max_position_embeddings
201
+ self.hidden_size = hidden_size
202
+ self.intermediate_size = intermediate_size
203
+ self.num_hidden_layers = num_hidden_layers
204
+ self.num_attention_heads = num_attention_heads
205
+
206
+ # for backward compatibility
207
+ if num_key_value_heads is None:
208
+ num_key_value_heads = num_attention_heads
209
+
210
+ self.num_key_value_heads = num_key_value_heads
211
+ self.hidden_act = hidden_act
212
+ self.initializer_range = initializer_range
213
+ self.norm_type = norm_type
214
+ self.rms_norm_eps = rms_norm_eps
215
+ self.pretraining_tp = pretraining_tp
216
+ self.use_cache = use_cache
217
+ self.rope_theta = rope_theta
218
+ self.rope_scaling = rope_scaling
219
+ self.attention_bias = attention_bias
220
+ self.attention_dropout = attention_dropout
221
+ self.mlp_bias = mlp_bias
222
+ self.head_dim = head_dim if head_dim is not None else self.hidden_size // self.num_attention_heads
223
+ # Validate the correctness of rotary position embeddings parameters
224
+ # BC: if there is a 'type' field, copy it it to 'rope_type'.
225
+ if self.rope_scaling is not None and "type" in self.rope_scaling:
226
+ self.rope_scaling["rope_type"] = self.rope_scaling["type"]
227
+ rope_config_validation(self)
228
+
229
+ self.position_embedding_type = position_embedding_type
230
+ self.use_mlp_gating = use_mlp_gating
231
+ self.embeddings_scale = embeddings_scale
232
+ self.output_logits_scale = output_logits_scale
233
+ self.mhsa_residual_scale = mhsa_residual_scale
234
+ self.mlp_residual_scale = mlp_residual_scale
235
+ self.scale_qk_dot_by_d = scale_qk_dot_by_d
236
+
237
+ super().__init__(
238
+ pad_token_id=pad_token_id,
239
+ bos_token_id=bos_token_id,
240
+ eos_token_id=eos_token_id,
241
+ tie_word_embeddings=tie_word_embeddings,
242
+ _attn_implementation=_attn_implementation,
243
+ **kwargs,
244
+ )
generation_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 128000,
3
+ "eos_token_id": 128001,
4
+ "do_sample": true,
5
+ "temperature": 0.6,
6
+ "max_length": 4096,
7
+ "top_p": 0.9,
8
+ "transformers_version": "4.40.0.dev0"
9
+ }
modeling_celerity.py ADDED
@@ -0,0 +1,1740 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved.
3
+ #
4
+ # This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX
5
+ # and OPT implementations in this library. It has been modified from its
6
+ # original forms to accommodate minor architectural differences compared
7
+ # to GPT-NeoX and OPT used by the Meta AI team that trained the model.
8
+ #
9
+ # Licensed under the Apache License, Version 2.0 (the "License");
10
+ # you may not use this file except in compliance with the License.
11
+ # You may obtain a copy of the License at
12
+ #
13
+ # http://www.apache.org/licenses/LICENSE-2.0
14
+ #
15
+ # Unless required by applicable law or agreed to in writing, software
16
+ # distributed under the License is distributed on an "AS IS" BASIS,
17
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ # See the License for the specific language governing permissions and
19
+ # limitations under the License.
20
+
21
+ # Adapted from https://github.com/huggingface/transformers/blob/v4.45.2/src/transformers/models/llama/modeling_llama.py
22
+
23
+ import math
24
+ from typing import List, Optional, Tuple, Union
25
+
26
+ import torch
27
+ import torch.nn.functional as F
28
+ import torch.utils.checkpoint
29
+ from torch import nn
30
+ from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
31
+
32
+ from transformers.activations import ACT2FN
33
+ from transformers.cache_utils import Cache, DynamicCache, StaticCache
34
+ from transformers.generation import GenerationMixin
35
+ from transformers.modeling_attn_mask_utils import AttentionMaskConverter
36
+ from transformers.modeling_flash_attention_utils import _flash_attention_forward
37
+ from transformers.modeling_outputs import (
38
+ BaseModelOutputWithPast,
39
+ CausalLMOutputWithPast,
40
+ QuestionAnsweringModelOutput,
41
+ SequenceClassifierOutputWithPast,
42
+ TokenClassifierOutput,
43
+ )
44
+ from transformers.modeling_rope_utils import ROPE_INIT_FUNCTIONS
45
+ from transformers.modeling_utils import PreTrainedModel
46
+ from transformers.pytorch_utils import ALL_LAYERNORM_LAYERS
47
+ from transformers.utils import (
48
+ add_start_docstrings,
49
+ add_start_docstrings_to_model_forward,
50
+ is_flash_attn_greater_or_equal_2_10,
51
+ is_torchdynamo_compiling,
52
+ logging,
53
+ replace_return_docstrings,
54
+ )
55
+ from .configuration_celerity import CelerityConfig
56
+
57
+ logger = logging.get_logger(__name__)
58
+
59
+ _CONFIG_FOR_DOC = "CelerityConfig"
60
+
61
+ def _prepare_4d_causal_attention_mask_with_cache_position(
62
+ attention_mask: torch.Tensor,
63
+ sequence_length: int,
64
+ target_length: int,
65
+ dtype: torch.dtype,
66
+ device: torch.device,
67
+ min_dtype: float,
68
+ cache_position: torch.Tensor,
69
+ batch_size: int,
70
+ ):
71
+ """
72
+ Creates a causal 4D mask of shape `(batch_size, 1, query_length, key_value_length)` from a 2D mask of shape
73
+ `(batch_size, key_value_length)`, or if the input `attention_mask` is already 4D, do nothing.
74
+
75
+ Args:
76
+ attention_mask (`torch.Tensor`):
77
+ A 2D attention mask of shape `(batch_size, key_value_length)` or a 4D attention mask of shape `(batch_size, 1, query_length, key_value_length)`.
78
+ sequence_length (`int`):
79
+ The sequence length being processed.
80
+ target_length (`int`):
81
+ The target length: when generating with static cache, the mask should be as long as the static cache, to account for the 0 padding, the part of the cache that is not filled yet.
82
+ dtype (`torch.dtype`):
83
+ The dtype to use for the 4D attention mask.
84
+ device (`torch.device`):
85
+ The device to plcae the 4D attention mask on.
86
+ min_dtype (`float`):
87
+ The minimum value representable with the dtype `dtype`.
88
+ cache_position (`torch.Tensor`):
89
+ Indices depicting the position of the input sequence tokens in the sequence.
90
+ batch_size (`torch.Tensor`):
91
+ Batch size.
92
+ """
93
+ if attention_mask is not None and attention_mask.dim() == 4:
94
+ # In this case we assume that the mask comes already in inverted form and requires no inversion or slicing.
95
+ causal_mask = attention_mask
96
+ else:
97
+ causal_mask = torch.full((sequence_length, target_length), fill_value=min_dtype, dtype=dtype, device=device)
98
+ if sequence_length != 1:
99
+ causal_mask = torch.triu(causal_mask, diagonal=1)
100
+ causal_mask *= torch.arange(target_length, device=device) > cache_position.reshape(-1, 1)
101
+ causal_mask = causal_mask[None, None, :, :].expand(batch_size, 1, -1, -1)
102
+ if attention_mask is not None:
103
+ causal_mask = causal_mask.clone() # copy to contiguous memory for in-place edit
104
+ mask_length = attention_mask.shape[-1]
105
+ padding_mask = causal_mask[:, :, :, :mask_length] + attention_mask[:, None, None, :]
106
+ padding_mask = padding_mask == 0
107
+ causal_mask[:, :, :, :mask_length] = causal_mask[:, :, :, :mask_length].masked_fill(
108
+ padding_mask, min_dtype
109
+ )
110
+
111
+ return causal_mask
112
+
113
+ def rotate_half(x):
114
+ """Rotates half the hidden dims of the input."""
115
+ x1 = x[..., : x.shape[-1] // 2]
116
+ x2 = x[..., x.shape[-1] // 2 :]
117
+ return torch.cat((-x2, x1), dim=-1)
118
+
119
+
120
+ def apply_rotary_pos_emb(q, k, cos, sin, position_ids=None, unsqueeze_dim=1):
121
+ """Applies Rotary Position Embedding to the query and key tensors.
122
+
123
+ Args:
124
+ q (`torch.Tensor`): The query tensor.
125
+ k (`torch.Tensor`): The key tensor.
126
+ cos (`torch.Tensor`): The cosine part of the rotary embedding.
127
+ sin (`torch.Tensor`): The sine part of the rotary embedding.
128
+ position_ids (`torch.Tensor`, *optional*):
129
+ Deprecated and unused.
130
+ unsqueeze_dim (`int`, *optional*, defaults to 1):
131
+ The 'unsqueeze_dim' argument specifies the dimension along which to unsqueeze cos[position_ids] and
132
+ sin[position_ids] so that they can be properly broadcasted to the dimensions of q and k. For example, note
133
+ that cos[position_ids] and sin[position_ids] have the shape [batch_size, seq_len, head_dim]. Then, if q and
134
+ k have the shape [batch_size, heads, seq_len, head_dim], then setting unsqueeze_dim=1 makes
135
+ cos[position_ids] and sin[position_ids] broadcastable to the shapes of q and k. Similarly, if q and k have
136
+ the shape [batch_size, seq_len, heads, head_dim], then set unsqueeze_dim=2.
137
+ Returns:
138
+ `tuple(torch.Tensor)` comprising of the query and key tensors rotated using the Rotary Position Embedding.
139
+ """
140
+ cos = cos.unsqueeze(unsqueeze_dim)
141
+ sin = sin.unsqueeze(unsqueeze_dim)
142
+ q_embed = (q * cos) + (rotate_half(q) * sin)
143
+ k_embed = (k * cos) + (rotate_half(k) * sin)
144
+ return q_embed, k_embed
145
+
146
+
147
+ class CelerityRMSNorm(nn.Module):
148
+ def __init__(self, hidden_size, eps=1e-6):
149
+ """
150
+ LlamaRMSNorm is equivalent to T5LayerNorm
151
+ """
152
+ super().__init__()
153
+ self.weight = nn.Parameter(torch.ones(hidden_size))
154
+ self.variance_epsilon = eps
155
+
156
+ def forward(self, hidden_states):
157
+ input_dtype = hidden_states.dtype
158
+ hidden_states = hidden_states.to(torch.float32)
159
+ variance = hidden_states.pow(2).mean(-1, keepdim=True)
160
+ hidden_states = hidden_states * torch.rsqrt(variance + self.variance_epsilon)
161
+ return self.weight * hidden_states.to(input_dtype)
162
+
163
+ def extra_repr(self):
164
+ return f"{tuple(self.weight.shape)}, eps={self.variance_epsilon}"
165
+
166
+
167
+ ALL_LAYERNORM_LAYERS.append(CelerityRMSNorm)
168
+
169
+ class CelerityRotaryEmbedding(nn.Module):
170
+ def __init__(
171
+ self,
172
+ dim=None,
173
+ max_position_embeddings=2048,
174
+ base=10000,
175
+ device=None,
176
+ scaling_factor=1.0,
177
+ rope_type="default",
178
+ config: Optional[CelerityConfig] = None,
179
+ ):
180
+ super().__init__()
181
+ # TODO (joao): remove the `if` below, only used for BC
182
+ self.rope_kwargs = {}
183
+ if config is None:
184
+ logger.warning_once(
185
+ "`CelerityRotaryEmbedding` can now be fully parameterized by passing the model config through the "
186
+ "`config` argument. All other arguments will be removed in v4.46"
187
+ )
188
+ self.rope_kwargs = {
189
+ "rope_type": rope_type,
190
+ "factor": scaling_factor,
191
+ "dim": dim,
192
+ "base": base,
193
+ "max_position_embeddings": max_position_embeddings,
194
+ }
195
+ self.rope_type = rope_type
196
+ self.max_seq_len_cached = max_position_embeddings
197
+ self.original_max_seq_len = max_position_embeddings
198
+ else:
199
+ # BC: "rope_type" was originally "type"
200
+ if config.rope_scaling is not None:
201
+ self.rope_type = config.rope_scaling.get("rope_type", config.rope_scaling.get("type"))
202
+ else:
203
+ self.rope_type = "default"
204
+ self.max_seq_len_cached = config.max_position_embeddings
205
+ self.original_max_seq_len = config.max_position_embeddings
206
+
207
+ self.config = config
208
+ self.rope_init_fn = ROPE_INIT_FUNCTIONS[self.rope_type]
209
+
210
+ inv_freq, self.attention_scaling = self.rope_init_fn(self.config, device, **self.rope_kwargs)
211
+ self.register_buffer("inv_freq", inv_freq, persistent=False)
212
+ self.original_inv_freq = self.inv_freq
213
+
214
+ def _dynamic_frequency_update(self, position_ids, device):
215
+ """
216
+ dynamic RoPE layers should recompute `inv_freq` in the following situations:
217
+ 1 - growing beyond the cached sequence length (allow scaling)
218
+ 2 - the current sequence length is in the original scale (avoid losing precision with small sequences)
219
+ """
220
+ seq_len = torch.max(position_ids) + 1
221
+ if seq_len > self.max_seq_len_cached: # growth
222
+ inv_freq, self.attention_scaling = self.rope_init_fn(
223
+ self.config, device, seq_len=seq_len, **self.rope_kwargs
224
+ )
225
+ self.register_buffer("inv_freq", inv_freq, persistent=False) # TODO joao: may break with compilation
226
+ self.max_seq_len_cached = seq_len
227
+
228
+ if seq_len < self.original_max_seq_len and self.max_seq_len_cached > self.original_max_seq_len: # reset
229
+ self.register_buffer("inv_freq", self.original_inv_freq, persistent=False)
230
+ self.max_seq_len_cached = self.original_max_seq_len
231
+
232
+ @torch.no_grad()
233
+ def forward(self, x, position_ids):
234
+ if "dynamic" in self.rope_type:
235
+ self._dynamic_frequency_update(position_ids, device=x.device)
236
+
237
+ # Core RoPE block
238
+ inv_freq_expanded = self.inv_freq[None, :, None].float().expand(position_ids.shape[0], -1, 1)
239
+ position_ids_expanded = position_ids[:, None, :].float()
240
+ # Force float32 (see https://github.com/huggingface/transformers/pull/29285)
241
+ device_type = x.device.type
242
+ device_type = device_type if isinstance(device_type, str) and device_type != "mps" else "cpu"
243
+ with torch.autocast(device_type=device_type, enabled=False):
244
+ freqs = (inv_freq_expanded.float() @ position_ids_expanded.float()).transpose(1, 2)
245
+ emb = torch.cat((freqs, freqs), dim=-1)
246
+ cos = emb.cos()
247
+ sin = emb.sin()
248
+
249
+ # Advanced RoPE types (e.g. yarn) apply a post-processing scaling factor, equivalent to scaling attention
250
+ cos = cos * self.attention_scaling
251
+ sin = sin * self.attention_scaling
252
+
253
+ return cos.to(dtype=x.dtype), sin.to(dtype=x.dtype)
254
+
255
+
256
+ class CelerityLinearScalingRotaryEmbedding(CelerityRotaryEmbedding):
257
+ """CelerityRotaryEmbedding extended with linear scaling. Credits to the Reddit user /u/kaiokendev"""
258
+
259
+ def __init__(self, *args, **kwargs):
260
+ logger.warning_once(
261
+ "`CelerityLinearScalingRotaryEmbedding` is deprecated an will be removed in v4.46. Please use "
262
+ "`CelerityRotaryEmbedding`, which now also does linear scaling (simply pass the model config to __init__)."
263
+ )
264
+ kwargs["rope_type"] = "linear"
265
+ super().__init__(*args, **kwargs)
266
+
267
+
268
+ class CelerityDynamicNTKScalingRotaryEmbedding(CelerityRotaryEmbedding):
269
+ """CelerityRotaryEmbedding extended with Dynamic NTK scaling. Credits to the Reddit users /u/bloc97 and /u/emozilla"""
270
+
271
+ def __init__(self, *args, **kwargs):
272
+ logger.warning_once(
273
+ "`CelerityDynamicNTKScalingRotaryEmbedding` is deprecated an will be removed in v4.46. Please use "
274
+ "`CelerityRotaryEmbedding`, which now also does dynamic ntk scaling (simply pass the model config to "
275
+ "__init__)."
276
+ )
277
+ kwargs["rope_type"] = "dynamic"
278
+ super().__init__(*args, **kwargs)
279
+
280
+
281
+ def build_norm(norm_type: str, *args, **kwargs):
282
+ if norm_type == "rmsnorm":
283
+ return CelerityRMSNorm(*args, **kwargs)
284
+ elif norm_type == "layernorm":
285
+ return torch.nn.LayerNorm(*args, **kwargs)
286
+ else:
287
+ raise ValueError(f"Unsupported norm_type {norm_type}.")
288
+
289
+ class CelerityMLP(nn.Module):
290
+ def __init__(self, config):
291
+ super().__init__()
292
+ self.config = config
293
+ self.hidden_size = config.hidden_size
294
+ self.intermediate_size = config.intermediate_size
295
+ self.use_gating = config.use_mlp_gating
296
+
297
+ self.gate_proj = nn.Linear(self.hidden_size, self.intermediate_size, bias=config.mlp_bias) if self.use_gating else None
298
+ self.up_proj = nn.Linear(self.hidden_size, self.intermediate_size, bias=config.mlp_bias)
299
+ self.down_proj = nn.Linear(self.intermediate_size, self.hidden_size, bias=config.mlp_bias)
300
+ self.act_fn = ACT2FN[config.hidden_act]
301
+
302
+ def forward(self, x):
303
+ if self.config.pretraining_tp > 1:
304
+ slice = self.intermediate_size // self.config.pretraining_tp
305
+ gate_proj_slices = self.gate_proj.weight.split(slice, dim=0)
306
+ up_proj_slices = self.up_proj.weight.split(slice, dim=0)
307
+ down_proj_slices = self.down_proj.weight.split(slice, dim=1)
308
+
309
+ up_proj = torch.cat([F.linear(x, up_proj_slices[i]) for i in range(self.config.pretraining_tp)], dim=-1)
310
+ if self.use_gating:
311
+ gate_proj = torch.cat(
312
+ [F.linear(x, gate_proj_slices[i]) for i in range(self.config.pretraining_tp)], dim=-1
313
+ )
314
+ intermediate_states = (self.act_fn(gate_proj) * up_proj).split(slice, dim=2)
315
+ else:
316
+ intermediate_states = self.act_fn(up_proj)
317
+ down_proj = [
318
+ F.linear(intermediate_states[i], down_proj_slices[i]) for i in range(self.config.pretraining_tp)
319
+ ]
320
+ down_proj = sum(down_proj)
321
+ else:
322
+ if self.use_gating:
323
+ down_proj = self.down_proj(self.act_fn(self.gate_proj(x)) * self.up_proj(x))
324
+ else:
325
+ down_proj = self.down_proj(self.act_fn(self.up_proj(x)))
326
+
327
+ return down_proj
328
+
329
+ class AlibiPositionEmbeddingLayer(nn.Module):
330
+ def __init__(self, num_heads):
331
+ super(AlibiPositionEmbeddingLayer, self).__init__()
332
+ self.num_heads = num_heads
333
+ slopes = torch.tensor(AlibiPositionEmbeddingLayer._get_alibi_slopes(num_heads)).unsqueeze(-1)
334
+ self.slopes = nn.parameter.Parameter(slopes, requires_grad=False)
335
+
336
+ def forward(
337
+ self,
338
+ seq_length,
339
+ key_length,
340
+ cached_qk_len,
341
+ ):
342
+ context_position = torch.arange(
343
+ cached_qk_len, cached_qk_len + seq_length, device=self.slopes.device
344
+ )[:, None]
345
+ memory_position = torch.arange(
346
+ key_length + cached_qk_len, device=self.slopes.device
347
+ )[None, :]
348
+ relative_position = memory_position - context_position
349
+ relative_position = torch.abs(relative_position).unsqueeze(0).expand(self.num_heads, -1, -1)
350
+
351
+ alibi = (- self.slopes).unsqueeze(1) * relative_position
352
+ return alibi
353
+
354
+ @staticmethod
355
+ def _get_alibi_slopes(n):
356
+ def get_slopes_power_of_2(n):
357
+ start = 2 ** (-(2 ** -(math.log2(n) - 3)))
358
+ ratio = start
359
+ return [start * ratio**i for i in range(n)]
360
+
361
+ if math.log2(n).is_integer():
362
+ return get_slopes_power_of_2(
363
+ n
364
+ ) # In the paper, we only train models that have 2^a heads for some a. This function has
365
+ else: # some good properties that only occur when the input is a power of 2. To maintain that even
366
+ closest_power_of_2 = 2 ** math.floor(
367
+ math.log2(n)
368
+ ) # when the number of heads is not a power of 2, we use this workaround.
369
+ return (
370
+ get_slopes_power_of_2(closest_power_of_2)
371
+ + AlibiPositionEmbeddingLayer._get_alibi_slopes(2 * closest_power_of_2)[0::2][: n - closest_power_of_2]
372
+ )
373
+
374
+
375
+ def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor:
376
+ """
377
+ This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch,
378
+ num_key_value_heads, seqlen, head_dim) to (batch, num_attention_heads, seqlen, head_dim)
379
+ """
380
+ batch, num_key_value_heads, slen, head_dim = hidden_states.shape
381
+ if n_rep == 1:
382
+ return hidden_states
383
+ hidden_states = hidden_states[:, :, None, :, :].expand(batch, num_key_value_heads, n_rep, slen, head_dim)
384
+ return hidden_states.reshape(batch, num_key_value_heads * n_rep, slen, head_dim)
385
+
386
+
387
+ class CelerityAttention(nn.Module):
388
+ """Multi-headed attention from 'Attention Is All You Need' paper"""
389
+
390
+ def __init__(self, config: CelerityConfig, layer_idx: Optional[int] = None):
391
+ super().__init__()
392
+ self.config = config
393
+ self.layer_idx = layer_idx
394
+ if layer_idx is None:
395
+ logger.warning_once(
396
+ f"Instantiating {self.__class__.__name__} without passing a `layer_idx` is not recommended and will "
397
+ "lead to errors during the forward call if caching is used. Please make sure to provide a `layer_idx` "
398
+ "when creating this class."
399
+ )
400
+
401
+ self.attention_dropout = config.attention_dropout
402
+ self.hidden_size = config.hidden_size
403
+ self.num_heads = config.num_attention_heads
404
+ self.head_dim = getattr(config, "head_dim", self.hidden_size // self.num_heads)
405
+ self.num_key_value_heads = config.num_key_value_heads
406
+ self.num_key_value_groups = self.num_heads // self.num_key_value_heads
407
+ self.max_position_embeddings = config.max_position_embeddings
408
+ self.use_rope = config.position_embedding_type == "rotary"
409
+ self.rope_theta = config.rope_theta
410
+ self.is_causal = True
411
+ self.attn_scale_power = 1.0 if config.scale_qk_dot_by_d else 0.5
412
+
413
+ self.q_proj = nn.Linear(self.hidden_size, self.num_heads * self.head_dim, bias=config.attention_bias)
414
+ self.k_proj = nn.Linear(self.hidden_size, self.num_key_value_heads * self.head_dim, bias=config.attention_bias)
415
+ self.v_proj = nn.Linear(self.hidden_size, self.num_key_value_heads * self.head_dim, bias=config.attention_bias)
416
+ self.o_proj = nn.Linear(self.num_heads * self.head_dim, self.hidden_size, bias=config.attention_bias)
417
+
418
+ # TODO (joao): remove in v4.46 (RoPE is computed in the model, not in the decoder layers)
419
+ self.rotary_emb = CelerityRotaryEmbedding(config=self.config)
420
+
421
+ def forward(
422
+ self,
423
+ hidden_states: torch.Tensor,
424
+ attention_mask: Optional[torch.Tensor] = None,
425
+ position_ids: Optional[torch.LongTensor] = None,
426
+ past_key_value: Optional[Cache] = None,
427
+ output_attentions: bool = False,
428
+ use_cache: bool = False,
429
+ cache_position: Optional[torch.LongTensor] = None,
430
+ position_embeddings: Optional[Tuple[torch.Tensor, torch.Tensor]] = None, # will become mandatory in v4.46
431
+ position_bias: Optional[torch.Tensor] = None,
432
+ **kwargs,
433
+ ) -> Tuple[torch.Tensor, Optional[torch.Tensor], Optional[Tuple[torch.Tensor]]]:
434
+ bsz, q_len, _ = hidden_states.size()
435
+
436
+ if self.config.pretraining_tp > 1:
437
+ key_value_slicing = (self.num_key_value_heads * self.head_dim) // self.config.pretraining_tp
438
+ query_slices = self.q_proj.weight.split(
439
+ (self.num_heads * self.head_dim) // self.config.pretraining_tp, dim=0
440
+ )
441
+ key_slices = self.k_proj.weight.split(key_value_slicing, dim=0)
442
+ value_slices = self.v_proj.weight.split(key_value_slicing, dim=0)
443
+
444
+ query_states = [F.linear(hidden_states, query_slices[i]) for i in range(self.config.pretraining_tp)]
445
+ query_states = torch.cat(query_states, dim=-1)
446
+
447
+ key_states = [F.linear(hidden_states, key_slices[i]) for i in range(self.config.pretraining_tp)]
448
+ key_states = torch.cat(key_states, dim=-1)
449
+
450
+ value_states = [F.linear(hidden_states, value_slices[i]) for i in range(self.config.pretraining_tp)]
451
+ value_states = torch.cat(value_states, dim=-1)
452
+
453
+ else:
454
+ query_states = self.q_proj(hidden_states)
455
+ key_states = self.k_proj(hidden_states)
456
+ value_states = self.v_proj(hidden_states)
457
+
458
+ query_states = query_states.view(bsz, q_len, self.num_heads, self.head_dim).transpose(1, 2)
459
+ key_states = key_states.view(bsz, q_len, self.num_key_value_heads, self.head_dim).transpose(1, 2)
460
+ value_states = value_states.view(bsz, q_len, self.num_key_value_heads, self.head_dim).transpose(1, 2)
461
+
462
+ cache_kwargs = {"cache_position": cache_position}
463
+ if self.use_rope:
464
+ if position_embeddings is None:
465
+ logger.warning_once(
466
+ "The attention layers in this model are transitioning from computing the RoPE embeddings internally "
467
+ "through `position_ids` (2D tensor with the indexes of the tokens), to using externally computed "
468
+ "`position_embeddings` (Tuple of tensors, containing cos and sin). In v4.46 `position_ids` will be "
469
+ "removed and `position_embeddings` will be mandatory."
470
+ )
471
+ cos, sin = self.rotary_emb(value_states, position_ids)
472
+ else:
473
+ cos, sin = position_embeddings
474
+ query_states, key_states = apply_rotary_pos_emb(query_states, key_states, cos, sin)
475
+ # sin and cos are specific to RoPE models; cache_position needed for the static cache
476
+ cache_kwargs["sin"] = sin
477
+ cache_kwargs["cos"] = cos
478
+
479
+ if past_key_value is not None:
480
+ key_states, value_states = past_key_value.update(key_states, value_states, self.layer_idx, cache_kwargs)
481
+
482
+ key_states = repeat_kv(key_states, self.num_key_value_groups)
483
+ value_states = repeat_kv(value_states, self.num_key_value_groups)
484
+ attn_weights = torch.matmul(query_states, key_states.transpose(2, 3)) / (self.head_dim ** self.attn_scale_power)
485
+
486
+ if attention_mask is not None: # no matter the length, we just slice it
487
+ causal_mask = attention_mask[:, :, :, : key_states.shape[-2]]
488
+ attn_weights = attn_weights + causal_mask
489
+
490
+ if position_bias is not None:
491
+ attn_weights += position_bias.type_as(attn_weights).unsqueeze(0)
492
+
493
+ # upcast attention to fp32
494
+ attn_weights = nn.functional.softmax(attn_weights, dim=-1, dtype=torch.float32).to(query_states.dtype)
495
+ attn_weights = nn.functional.dropout(attn_weights, p=self.attention_dropout, training=self.training)
496
+ attn_output = torch.matmul(attn_weights, value_states)
497
+
498
+ if attn_output.size() != (bsz, self.num_heads, q_len, self.head_dim):
499
+ raise ValueError(
500
+ f"`attn_output` should be of size {(bsz, self.num_heads, q_len, self.head_dim)}, but is"
501
+ f" {attn_output.size()}"
502
+ )
503
+
504
+ attn_output = attn_output.transpose(1, 2).contiguous()
505
+
506
+ attn_output = attn_output.reshape(bsz, q_len, -1)
507
+
508
+ if self.config.pretraining_tp > 1:
509
+ attn_output = attn_output.split(self.hidden_size // self.config.pretraining_tp, dim=2)
510
+ o_proj_slices = self.o_proj.weight.split(self.hidden_size // self.config.pretraining_tp, dim=1)
511
+ attn_output = sum([F.linear(attn_output[i], o_proj_slices[i]) for i in range(self.config.pretraining_tp)])
512
+ else:
513
+ attn_output = self.o_proj(attn_output)
514
+
515
+ if not output_attentions:
516
+ attn_weights = None
517
+
518
+ return attn_output, attn_weights, past_key_value
519
+
520
+
521
+ class CelerityFlashAttention2(CelerityAttention):
522
+ """
523
+ Celerity flash attention module. This module inherits from `CelerityAttention` as the weights of the module stays
524
+ untouched. The only required change would be on the forward pass where it needs to correctly call the public API of
525
+ flash attention and deal with padding tokens in case the input contains any of them.
526
+ """
527
+
528
+ def __init__(self, *args, **kwargs):
529
+ super().__init__(*args, **kwargs)
530
+
531
+ # TODO: Should be removed once Flash Attention for RoCm is bumped to 2.1.
532
+ # flash_attn<2.1 generates top-left aligned causal mask, while what is needed here is bottom-right alignement, that was made default for flash_attn>=2.1. This attribute is used to handle this difference. Reference: https://github.com/Dao-AILab/flash-attention/releases/tag/v2.1.0.
533
+ # Beware that with flash_attn<2.1, using q_seqlen != k_seqlen (except for the case q_seqlen == 1) produces a wrong mask (top-left).
534
+ self._flash_attn_uses_top_left_mask = not is_flash_attn_greater_or_equal_2_10()
535
+
536
+ def forward(
537
+ self,
538
+ hidden_states: torch.Tensor,
539
+ attention_mask: Optional[torch.LongTensor] = None,
540
+ position_ids: Optional[torch.LongTensor] = None,
541
+ past_key_value: Optional[Cache] = None,
542
+ output_attentions: bool = False,
543
+ use_cache: bool = False,
544
+ cache_position: Optional[torch.LongTensor] = None,
545
+ position_embeddings: Optional[Tuple[torch.Tensor, torch.Tensor]] = None, # will become mandatory in v4.46
546
+ position_bias: Optional[torch.Tensor] = None,
547
+ ) -> Tuple[torch.Tensor, Optional[torch.Tensor], Optional[Tuple[torch.Tensor]]]:
548
+ if isinstance(past_key_value, StaticCache):
549
+ raise ValueError(
550
+ "`static` cache implementation is not compatible with `attn_implementation==flash_attention_2` "
551
+ "make sure to use `sdpa` in the mean time, and open an issue at https://github.com/huggingface/transformers"
552
+ )
553
+
554
+ output_attentions = False
555
+
556
+ bsz, q_len, _ = hidden_states.size()
557
+
558
+ query_states = self.q_proj(hidden_states)
559
+ key_states = self.k_proj(hidden_states)
560
+ value_states = self.v_proj(hidden_states)
561
+
562
+ # Flash attention requires the input to have the shape
563
+ # batch_size x seq_length x head_dim x hidden_dim
564
+ # therefore we just need to keep the original shape
565
+ query_states = query_states.view(bsz, q_len, self.num_heads, self.head_dim).transpose(1, 2)
566
+ key_states = key_states.view(bsz, q_len, self.num_key_value_heads, self.head_dim).transpose(1, 2)
567
+ value_states = value_states.view(bsz, q_len, self.num_key_value_heads, self.head_dim).transpose(1, 2)
568
+
569
+ cache_kwargs = {"cache_position": cache_position}
570
+ if self.use_rope:
571
+ if position_embeddings is None:
572
+ logger.warning_once(
573
+ "The attention layers in this model are transitioning from computing the RoPE embeddings internally "
574
+ "through `position_ids` (2D tensor with the indexes of the tokens), to using externally computed "
575
+ "`position_embeddings` (Tuple of tensors, containing cos and sin). In v4.46 `position_ids` will be "
576
+ "removed and `position_embeddings` will be mandatory."
577
+ )
578
+ cos, sin = self.rotary_emb(value_states, position_ids)
579
+ else:
580
+ cos, sin = position_embeddings
581
+ query_states, key_states = apply_rotary_pos_emb(query_states, key_states, cos, sin)
582
+ # sin and cos are specific to RoPE models; cache_position needed for the static cache
583
+ cache_kwargs["sin"] = sin
584
+ cache_kwargs["cos"] = cos
585
+
586
+ if past_key_value is not None:
587
+ key_states, value_states = past_key_value.update(key_states, value_states, self.layer_idx, cache_kwargs)
588
+
589
+ # TODO: These transpose are quite inefficient but Flash Attention requires the layout [batch_size, sequence_length, num_heads, head_dim]. We would need to refactor the KV cache
590
+ # to be able to avoid many of these transpose/reshape/view.
591
+ query_states = query_states.transpose(1, 2)
592
+ key_states = key_states.transpose(1, 2)
593
+ value_states = value_states.transpose(1, 2)
594
+
595
+ dropout_rate = self.attention_dropout if self.training else 0.0
596
+
597
+ # In PEFT, usually we cast the layer norms in float32 for training stability reasons
598
+ # therefore the input hidden states gets silently casted in float32. Hence, we need
599
+ # cast them back in the correct dtype just to be sure everything works as expected.
600
+ # This might slowdown training & inference so it is recommended to not cast the LayerNorms
601
+ # in fp32. (LlamaRMSNorm handles it correctly)
602
+
603
+ input_dtype = query_states.dtype
604
+ if input_dtype == torch.float32:
605
+ if torch.is_autocast_enabled():
606
+ target_dtype = torch.get_autocast_gpu_dtype()
607
+ # Handle the case where the model is quantized
608
+ elif hasattr(self.config, "_pre_quantization_dtype"):
609
+ target_dtype = self.config._pre_quantization_dtype
610
+ else:
611
+ target_dtype = self.q_proj.weight.dtype
612
+
613
+ logger.warning_once(
614
+ f"The input hidden states seems to be silently casted in float32, this might be related to"
615
+ f" the fact you have upcasted embedding or layer norm layers in float32. We will cast back the input in"
616
+ f" {target_dtype}."
617
+ )
618
+
619
+ query_states = query_states.to(target_dtype)
620
+ key_states = key_states.to(target_dtype)
621
+ value_states = value_states.to(target_dtype)
622
+
623
+ if position_bias is not None:
624
+ attention_mask += position_bias.type_as(attention_mask).unsqueeze(0)
625
+
626
+ assert self.attn_scale_power == 0.5, f"_flash_attention_forward() only supports self.attn_scale_power=0.5 but got {self.attn_scale_power}"
627
+ attn_output = _flash_attention_forward(
628
+ query_states,
629
+ key_states,
630
+ value_states,
631
+ attention_mask,
632
+ q_len,
633
+ position_ids=position_ids,
634
+ dropout=dropout_rate,
635
+ sliding_window=getattr(self, "sliding_window", None),
636
+ use_top_left_mask=self._flash_attn_uses_top_left_mask,
637
+ is_causal=self.is_causal,
638
+ )
639
+
640
+ attn_output = attn_output.reshape(bsz, q_len, -1).contiguous()
641
+ attn_output = self.o_proj(attn_output)
642
+
643
+ if not output_attentions:
644
+ attn_weights = None
645
+
646
+ return attn_output, attn_weights, past_key_value
647
+
648
+
649
+ class CeleritySdpaAttention(CelerityAttention):
650
+ """
651
+ Celerity attention module using torch.nn.functional.scaled_dot_product_attention. This module inherits from
652
+ `CelerityAttention` as the weights of the module stays untouched. The only changes are on the forward pass to adapt to
653
+ SDPA API.
654
+ """
655
+
656
+ # Adapted from CelerityAttention.forward
657
+ def forward(
658
+ self,
659
+ hidden_states: torch.Tensor,
660
+ attention_mask: Optional[torch.Tensor] = None,
661
+ position_ids: Optional[torch.LongTensor] = None,
662
+ past_key_value: Optional[Cache] = None,
663
+ output_attentions: bool = False,
664
+ use_cache: bool = False,
665
+ cache_position: Optional[torch.LongTensor] = None,
666
+ position_embeddings: Optional[Tuple[torch.Tensor, torch.Tensor]] = None, # will become mandatory in v4.46
667
+ position_bias: Optional[torch.Tensor] = None,
668
+ **kwargs,
669
+ ) -> Tuple[torch.Tensor, Optional[torch.Tensor], Optional[Tuple[torch.Tensor]]]:
670
+ if output_attentions:
671
+ # TODO: Improve this warning with e.g. `model.config.attn_implementation = "manual"` once this is implemented.
672
+ logger.warning_once(
673
+ "CelerityModel is using CeleritySdpaAttention, but `torch.nn.functional.scaled_dot_product_attention` does not support `output_attentions=True`. Falling back to the manual attention implementation, "
674
+ 'but specifying the manual implementation will be required from Transformers version v5.0.0 onwards. This warning can be removed using the argument `attn_implementation="eager"` when loading the model.'
675
+ )
676
+ return super().forward(
677
+ hidden_states=hidden_states,
678
+ attention_mask=attention_mask,
679
+ position_ids=position_ids,
680
+ past_key_value=past_key_value,
681
+ output_attentions=output_attentions,
682
+ use_cache=use_cache,
683
+ cache_position=cache_position,
684
+ position_embeddings=position_embeddings,
685
+ )
686
+
687
+ bsz, q_len, _ = hidden_states.size()
688
+
689
+ query_states = self.q_proj(hidden_states)
690
+ key_states = self.k_proj(hidden_states)
691
+ value_states = self.v_proj(hidden_states)
692
+
693
+ query_states = query_states.view(bsz, q_len, self.num_heads, self.head_dim).transpose(1, 2)
694
+ key_states = key_states.view(bsz, q_len, self.num_key_value_heads, self.head_dim).transpose(1, 2)
695
+ value_states = value_states.view(bsz, q_len, self.num_key_value_heads, self.head_dim).transpose(1, 2)
696
+
697
+ cache_kwargs = {"cache_position": cache_position}
698
+ if self.use_rope:
699
+ if position_embeddings is None:
700
+ logger.warning_once(
701
+ "The attention layers in this model are transitioning from computing the RoPE embeddings internally "
702
+ "through `position_ids` (2D tensor with the indexes of the tokens), to using externally computed "
703
+ "`position_embeddings` (Tuple of tensors, containing cos and sin). In v4.46 `position_ids` will be "
704
+ "removed and `position_embeddings` will be mandatory."
705
+ )
706
+ cos, sin = self.rotary_emb(value_states, position_ids)
707
+ else:
708
+ cos, sin = position_embeddings
709
+ query_states, key_states = apply_rotary_pos_emb(query_states, key_states, cos, sin)
710
+ # sin and cos are specific to RoPE models; cache_position needed for the static cache
711
+ cache_kwargs["sin"] = sin
712
+ cache_kwargs["cos"] = cos
713
+
714
+ if past_key_value is not None:
715
+ key_states, value_states = past_key_value.update(key_states, value_states, self.layer_idx, cache_kwargs)
716
+
717
+ key_states = repeat_kv(key_states, self.num_key_value_groups)
718
+ value_states = repeat_kv(value_states, self.num_key_value_groups)
719
+
720
+ if attention_mask is not None:
721
+ attention_mask = attention_mask[:, :, :, : key_states.shape[-2]]
722
+
723
+ # SDPA with memory-efficient backend is currently (torch==2.1.2) bugged with non-contiguous inputs with custom attn_mask,
724
+ # Reference: https://github.com/pytorch/pytorch/issues/112577.
725
+ if query_states.device.type == "cuda" and attention_mask is not None:
726
+ query_states = query_states.contiguous()
727
+ key_states = key_states.contiguous()
728
+ value_states = value_states.contiguous()
729
+
730
+ if position_bias is not None:
731
+ position_bias = position_bias.unsqueeze(0)
732
+ attention_mask = position_bias if attention_mask is None else attention_mask + position_bias
733
+
734
+ # We dispatch to SDPA's Flash Attention or Efficient kernels via this `is_causal` if statement instead of an inline conditional assignment
735
+ # in SDPA to support both torch.compile's dynamic shapes and full graph options. An inline conditional prevents dynamic shapes from compiling.
736
+ is_causal = True if attention_mask is None and q_len > 1 else False
737
+
738
+ assert self.attn_scale_power == 0.5, f"torch.nn.functional.scaled_dot_product_attention only supports self.attn_scale_power=0.5 but got {self.attn_scale_power}"
739
+ attn_output = torch.nn.functional.scaled_dot_product_attention(
740
+ query_states,
741
+ key_states,
742
+ value_states,
743
+ attn_mask=attention_mask,
744
+ dropout_p=self.attention_dropout if self.training else 0.0,
745
+ is_causal=is_causal,
746
+ )
747
+
748
+ attn_output = attn_output.transpose(1, 2).contiguous()
749
+ attn_output = attn_output.view(bsz, q_len, -1)
750
+
751
+ attn_output = self.o_proj(attn_output)
752
+
753
+ return attn_output, None, past_key_value
754
+
755
+
756
+ CELERITY_ATTENTION_CLASSES = {
757
+ "eager": CelerityAttention,
758
+ "flash_attention_2": CelerityFlashAttention2,
759
+ "sdpa": CeleritySdpaAttention,
760
+ }
761
+
762
+
763
+ class CelerityDecoderLayer(nn.Module):
764
+ def __init__(self, config: CelerityConfig, layer_idx: int):
765
+ super().__init__()
766
+ self.hidden_size = config.hidden_size
767
+
768
+ self.mhsa_residual_scale = config.mhsa_residual_scale
769
+ self.mlp_residual_scale = config.mlp_residual_scale
770
+
771
+ assert not config.scale_qk_dot_by_d or config._attn_implementation == "eager", "Implementation only supports scale_qk_dot_by_d=True for _attn_implementation=eager"
772
+ self.self_attn = CELERITY_ATTENTION_CLASSES[config._attn_implementation](config=config, layer_idx=layer_idx)
773
+
774
+ self.mlp = CelerityMLP(config)
775
+ self.input_layernorm = build_norm(config.norm_type, config.hidden_size, eps=config.rms_norm_eps)
776
+ self.post_attention_layernorm = build_norm(config.norm_type, config.hidden_size, eps=config.rms_norm_eps)
777
+
778
+ def forward(
779
+ self,
780
+ hidden_states: torch.Tensor,
781
+ attention_mask: Optional[torch.Tensor] = None,
782
+ position_ids: Optional[torch.LongTensor] = None,
783
+ past_key_value: Optional[Cache] = None,
784
+ output_attentions: Optional[bool] = False,
785
+ use_cache: Optional[bool] = False,
786
+ cache_position: Optional[torch.LongTensor] = None,
787
+ position_embeddings: Optional[Tuple[torch.Tensor, torch.Tensor]] = None, # will become mandatory in v4.46
788
+ **kwargs,
789
+ ) -> Tuple[torch.FloatTensor, Optional[Tuple[torch.FloatTensor, torch.FloatTensor]]]:
790
+ """
791
+ Args:
792
+ hidden_states (`torch.FloatTensor`): input to the layer of shape `(batch, seq_len, embed_dim)`
793
+ attention_mask (`torch.FloatTensor`, *optional*):
794
+ attention mask of size `(batch_size, sequence_length)` if flash attention is used or `(batch_size, 1,
795
+ query_sequence_length, key_sequence_length)` if default attention is used.
796
+ output_attentions (`bool`, *optional*):
797
+ Whether or not to return the attentions tensors of all attention layers. See `attentions` under
798
+ returned tensors for more detail.
799
+ use_cache (`bool`, *optional*):
800
+ If set to `True`, `past_key_values` key value states are returned and can be used to speed up decoding
801
+ (see `past_key_values`).
802
+ past_key_value (`Tuple(torch.FloatTensor)`, *optional*): cached past key and value projection states
803
+ cache_position (`torch.LongTensor` of shape `(sequence_length)`, *optional*):
804
+ Indices depicting the position of the input sequence tokens in the sequence
805
+ position_embeddings (`Tuple[torch.FloatTensor, torch.FloatTensor]`, *optional*):
806
+ Tuple containing the cosine and sine positional embeddings of shape `(batch_size, seq_len, head_dim)`,
807
+ with `head_dim` being the embedding dimension of each attention head.
808
+ kwargs (`dict`, *optional*):
809
+ Arbitrary kwargs to be ignored, used for FSDP and other methods that injects code
810
+ into the model
811
+ """
812
+ residual = hidden_states
813
+
814
+ hidden_states = self.input_layernorm(hidden_states)
815
+
816
+ # Self Attention
817
+ hidden_states, self_attn_weights, present_key_value = self.self_attn(
818
+ hidden_states=hidden_states,
819
+ attention_mask=attention_mask,
820
+ position_ids=position_ids,
821
+ past_key_value=past_key_value,
822
+ output_attentions=output_attentions,
823
+ use_cache=use_cache,
824
+ cache_position=cache_position,
825
+ position_embeddings=position_embeddings,
826
+ **kwargs,
827
+ )
828
+ hidden_states = residual + self.mhsa_residual_scale * hidden_states
829
+
830
+ # Fully Connected
831
+ residual = hidden_states
832
+ hidden_states = self.post_attention_layernorm(hidden_states)
833
+ hidden_states = self.mlp(hidden_states)
834
+ hidden_states = residual + self.mlp_residual_scale * hidden_states
835
+
836
+ outputs = (hidden_states,)
837
+
838
+ if output_attentions:
839
+ outputs += (self_attn_weights,)
840
+
841
+ if use_cache:
842
+ outputs += (present_key_value,)
843
+
844
+ return outputs
845
+
846
+
847
+ CELERITY_START_DOCSTRING = r"""
848
+ This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the
849
+ library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
850
+ etc.)
851
+
852
+ This model is also a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) subclass.
853
+ Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
854
+ and behavior.
855
+
856
+ Parameters:
857
+ config ([`CelerityConfig`]):
858
+ Model configuration class with all the parameters of the model. Initializing with a config file does not
859
+ load the weights associated with the model, only the configuration. Check out the
860
+ [`~PreTrainedModel.from_pretrained`] method to load the model weights.
861
+ """
862
+
863
+
864
+ @add_start_docstrings(
865
+ "The bare LLaMA Model outputting raw hidden-states without any specific head on top.",
866
+ CELERITY_START_DOCSTRING,
867
+ )
868
+ class CelerityPreTrainedModel(PreTrainedModel):
869
+ config_class = CelerityConfig
870
+ base_model_prefix = "model"
871
+ supports_gradient_checkpointing = True
872
+ _no_split_modules = ["CelerityDecoderLayer"]
873
+ _skip_keys_device_placement = ["past_key_values"]
874
+ _supports_flash_attn_2 = True
875
+ _supports_sdpa = True
876
+ _supports_cache_class = True
877
+ _supports_quantized_cache = True
878
+ _supports_static_cache = True
879
+
880
+ def _init_weights(self, module):
881
+ std = self.config.initializer_range
882
+ if isinstance(module, nn.Linear):
883
+ module.weight.data.normal_(mean=0.0, std=std)
884
+ if module.bias is not None:
885
+ module.bias.data.zero_()
886
+ elif isinstance(module, nn.Embedding):
887
+ module.weight.data.normal_(mean=0.0, std=std)
888
+ if module.padding_idx is not None:
889
+ module.weight.data[module.padding_idx].zero_()
890
+
891
+
892
+ CELERITY_INPUTS_DOCSTRING = r"""
893
+ Args:
894
+ input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`):
895
+ Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
896
+ it.
897
+
898
+ Indices can be obtained using [`AutoTokenizer`]. See [`PreTrainedTokenizer.encode`] and
899
+ [`PreTrainedTokenizer.__call__`] for details.
900
+
901
+ [What are input IDs?](../glossary#input-ids)
902
+ attention_mask (`torch.Tensor` of shape `(batch_size, sequence_length)`, *optional*):
903
+ Mask to avoid performing attention on padding token indices. Mask values selected in `[0, 1]`:
904
+
905
+ - 1 for tokens that are **not masked**,
906
+ - 0 for tokens that are **masked**.
907
+
908
+ [What are attention masks?](../glossary#attention-mask)
909
+
910
+ Indices can be obtained using [`AutoTokenizer`]. See [`PreTrainedTokenizer.encode`] and
911
+ [`PreTrainedTokenizer.__call__`] for details.
912
+
913
+ If `past_key_values` is used, optionally only the last `input_ids` have to be input (see
914
+ `past_key_values`).
915
+
916
+ If you want to change padding behavior, you should read [`modeling_opt._prepare_decoder_attention_mask`]
917
+ and modify to your needs. See diagram 1 in [the paper](https://arxiv.org/abs/1910.13461) for more
918
+ information on the default strategy.
919
+
920
+ - 1 indicates the head is **not masked**,
921
+ - 0 indicates the head is **masked**.
922
+ position_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
923
+ Indices of positions of each input sequence tokens in the position embeddings. Selected in the range `[0,
924
+ config.n_positions - 1]`.
925
+
926
+ [What are position IDs?](../glossary#position-ids)
927
+ past_key_values (`Cache` or `tuple(tuple(torch.FloatTensor))`, *optional*):
928
+ Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
929
+ blocks) that can be used to speed up sequential decoding. This typically consists in the `past_key_values`
930
+ returned by the model at a previous stage of decoding, when `use_cache=True` or `config.use_cache=True`.
931
+
932
+ Two formats are allowed:
933
+ - a [`~cache_utils.Cache`] instance, see our
934
+ [kv cache guide](https://huggingface.co/docs/transformers/en/kv_cache);
935
+ - Tuple of `tuple(torch.FloatTensor)` of length `config.n_layers`, with each tuple having 2 tensors of
936
+ shape `(batch_size, num_heads, sequence_length, embed_size_per_head)`). This is also known as the legacy
937
+ cache format.
938
+
939
+ The model will output the same cache format that is fed as input. If no `past_key_values` are passed, the
940
+ legacy cache format will be returned.
941
+
942
+ If `past_key_values` are used, the user can optionally input only the last `input_ids` (those that don't
943
+ have their past key value states given to this model) of shape `(batch_size, 1)` instead of all `input_ids`
944
+ of shape `(batch_size, sequence_length)`.
945
+ inputs_embeds (`torch.FloatTensor` of shape `(batch_size, sequence_length, hidden_size)`, *optional*):
946
+ Optionally, instead of passing `input_ids` you can choose to directly pass an embedded representation. This
947
+ is useful if you want more control over how to convert `input_ids` indices into associated vectors than the
948
+ model's internal embedding lookup matrix.
949
+ use_cache (`bool`, *optional*):
950
+ If set to `True`, `past_key_values` key value states are returned and can be used to speed up decoding (see
951
+ `past_key_values`).
952
+ output_attentions (`bool`, *optional*):
953
+ Whether or not to return the attentions tensors of all attention layers. See `attentions` under returned
954
+ tensors for more detail.
955
+ output_hidden_states (`bool`, *optional*):
956
+ Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
957
+ more detail.
958
+ return_dict (`bool`, *optional*):
959
+ Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
960
+ cache_position (`torch.LongTensor` of shape `(sequence_length)`, *optional*):
961
+ Indices depicting the position of the input sequence tokens in the sequence. Contrarily to `position_ids`,
962
+ this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
963
+ the complete sequence length.
964
+ """
965
+
966
+
967
+ @add_start_docstrings(
968
+ "The bare Celerity Model outputting raw hidden-states without any specific head on top.",
969
+ CELERITY_START_DOCSTRING,
970
+ )
971
+ class CelerityModel(CelerityPreTrainedModel):
972
+ """
973
+ Transformer decoder consisting of *config.num_hidden_layers* layers. Each layer is a [`CelerityDecoderLayer`]
974
+
975
+ Args:
976
+ config: CelerityConfig
977
+ """
978
+
979
+ def __init__(self, config: CelerityConfig):
980
+ super().__init__(config)
981
+ self.padding_idx = config.pad_token_id
982
+ self.vocab_size = config.vocab_size
983
+
984
+ self.embed_tokens = nn.Embedding(config.vocab_size, config.hidden_size, self.padding_idx)
985
+ self.embeddings_scale = config.embeddings_scale
986
+ self.layers = nn.ModuleList(
987
+ [CelerityDecoderLayer(config, layer_idx) for layer_idx in range(config.num_hidden_layers)]
988
+ )
989
+ self.norm = build_norm(config.norm_type, config.hidden_size, eps=config.rms_norm_eps)
990
+ # TODO: Refactor so we don't need to position embedding layers. Perhaps use self.relative_pe. Consider using build_relative_pe() function?
991
+ self.alibi_emb = AlibiPositionEmbeddingLayer(config.num_attention_heads) if config.position_embedding_type == "alibi" else None
992
+ self.rotary_emb = CelerityRotaryEmbedding(config=config) if config.position_embedding_type == "rotary" else None
993
+ self.gradient_checkpointing = False
994
+
995
+ # Initialize weights and apply final processing
996
+ self.post_init()
997
+
998
+ def get_input_embeddings(self):
999
+ return self.embed_tokens
1000
+
1001
+ def set_input_embeddings(self, value):
1002
+ self.embed_tokens = value
1003
+
1004
+ @add_start_docstrings_to_model_forward(CELERITY_INPUTS_DOCSTRING)
1005
+ def forward(
1006
+ self,
1007
+ input_ids: torch.LongTensor = None,
1008
+ attention_mask: Optional[torch.Tensor] = None,
1009
+ position_ids: Optional[torch.LongTensor] = None,
1010
+ past_key_values: Optional[Union[Cache, List[torch.FloatTensor]]] = None,
1011
+ inputs_embeds: Optional[torch.FloatTensor] = None,
1012
+ use_cache: Optional[bool] = None,
1013
+ output_attentions: Optional[bool] = None,
1014
+ output_hidden_states: Optional[bool] = None,
1015
+ return_dict: Optional[bool] = None,
1016
+ cache_position: Optional[torch.LongTensor] = None,
1017
+ ) -> Union[Tuple, BaseModelOutputWithPast]:
1018
+ output_attentions = output_attentions if output_attentions is not None else self.config.output_attentions
1019
+ output_hidden_states = (
1020
+ output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
1021
+ )
1022
+ use_cache = use_cache if use_cache is not None else self.config.use_cache
1023
+ return_dict = return_dict if return_dict is not None else self.config.use_return_dict
1024
+
1025
+ if (input_ids is None) ^ (inputs_embeds is not None):
1026
+ raise ValueError(
1027
+ "You cannot specify both input_ids and inputs_embeds at the same time, and must specify either one"
1028
+ )
1029
+
1030
+ if self.gradient_checkpointing and self.training and use_cache:
1031
+ logger.warning_once(
1032
+ "`use_cache=True` is incompatible with gradient checkpointing. Setting `use_cache=False`."
1033
+ )
1034
+ use_cache = False
1035
+
1036
+ if inputs_embeds is None:
1037
+ inputs_embeds = self.embed_tokens(input_ids)
1038
+
1039
+ # kept for BC (non `Cache` `past_key_values` inputs)
1040
+ return_legacy_cache = False
1041
+ if use_cache and not isinstance(past_key_values, Cache):
1042
+ return_legacy_cache = True
1043
+ if past_key_values is None:
1044
+ past_key_values = DynamicCache()
1045
+ else:
1046
+ past_key_values = DynamicCache.from_legacy_cache(past_key_values)
1047
+ logger.warning_once(
1048
+ "We detected that you are passing `past_key_values` as a tuple of tuples. This is deprecated and "
1049
+ "will be removed in v4.47. Please convert your cache or use an appropriate `Cache` class "
1050
+ "(https://huggingface.co/docs/transformers/kv_cache#legacy-cache-format)"
1051
+ )
1052
+
1053
+ if cache_position is None:
1054
+ past_seen_tokens = past_key_values.get_seq_length() if past_key_values is not None else 0
1055
+ cache_position = torch.arange(
1056
+ past_seen_tokens, past_seen_tokens + inputs_embeds.shape[1], device=inputs_embeds.device
1057
+ )
1058
+ if position_ids is None:
1059
+ position_ids = cache_position.unsqueeze(0)
1060
+
1061
+ causal_mask = self._update_causal_mask(
1062
+ attention_mask, inputs_embeds, cache_position, past_key_values, output_attentions
1063
+ )
1064
+ hidden_states = inputs_embeds
1065
+
1066
+ # create position embeddings to be shared across the decoder layers
1067
+ # TODO: Refactor
1068
+ position_embeddings = None
1069
+ position_bias = None
1070
+ if self.rotary_emb is not None:
1071
+ position_embeddings = self.rotary_emb(hidden_states, position_ids)
1072
+ if self.alibi_emb is not None:
1073
+ length = input_ids.shape[1]
1074
+ cached_kv_length = 0
1075
+ if past_key_values is not None and len(past_key_values) > 0:
1076
+ cached_kv = past_key_values[0]
1077
+ if cached_kv is not None:
1078
+ cached_kv_length = cached_kv[0].shape[-2]
1079
+ position_bias = self.alibi_emb(length, length, cached_kv_length)
1080
+
1081
+
1082
+ # mup scaling
1083
+ hidden_states *= torch.tensor(
1084
+ float(self.embeddings_scale), dtype=hidden_states.dtype, device=hidden_states.device
1085
+ )
1086
+
1087
+ # decoder layers
1088
+ all_hidden_states = () if output_hidden_states else None
1089
+ all_self_attns = () if output_attentions else None
1090
+ next_decoder_cache = None
1091
+
1092
+ for decoder_layer in self.layers:
1093
+ if output_hidden_states:
1094
+ all_hidden_states += (hidden_states,)
1095
+
1096
+ if self.gradient_checkpointing and self.training:
1097
+ layer_outputs = self._gradient_checkpointing_func(
1098
+ decoder_layer.__call__,
1099
+ hidden_states,
1100
+ causal_mask,
1101
+ position_ids,
1102
+ past_key_values,
1103
+ output_attentions,
1104
+ use_cache,
1105
+ cache_position,
1106
+ position_embeddings,
1107
+ position_bias,
1108
+ )
1109
+ else:
1110
+ layer_outputs = decoder_layer(
1111
+ hidden_states,
1112
+ attention_mask=causal_mask,
1113
+ position_ids=position_ids,
1114
+ past_key_value=past_key_values,
1115
+ output_attentions=output_attentions,
1116
+ use_cache=use_cache,
1117
+ cache_position=cache_position,
1118
+ position_embeddings=position_embeddings,
1119
+ position_bias=position_bias,
1120
+ )
1121
+
1122
+ hidden_states = layer_outputs[0]
1123
+
1124
+ if use_cache:
1125
+ next_decoder_cache = layer_outputs[2 if output_attentions else 1]
1126
+
1127
+ if output_attentions:
1128
+ all_self_attns += (layer_outputs[1],)
1129
+
1130
+ hidden_states = self.norm(hidden_states)
1131
+
1132
+ # add hidden states from the last decoder layer
1133
+ if output_hidden_states:
1134
+ all_hidden_states += (hidden_states,)
1135
+
1136
+ next_cache = next_decoder_cache if use_cache else None
1137
+ if return_legacy_cache:
1138
+ next_cache = next_cache.to_legacy_cache()
1139
+
1140
+ if not return_dict:
1141
+ return tuple(v for v in [hidden_states, next_cache, all_hidden_states, all_self_attns] if v is not None)
1142
+ return BaseModelOutputWithPast(
1143
+ last_hidden_state=hidden_states,
1144
+ past_key_values=next_cache,
1145
+ hidden_states=all_hidden_states,
1146
+ attentions=all_self_attns,
1147
+ )
1148
+
1149
+ def _update_causal_mask(
1150
+ self,
1151
+ attention_mask: torch.Tensor,
1152
+ input_tensor: torch.Tensor,
1153
+ cache_position: torch.Tensor,
1154
+ past_key_values: Cache,
1155
+ output_attentions: bool,
1156
+ ):
1157
+ if self.config._attn_implementation == "flash_attention_2":
1158
+ if attention_mask is not None and 0.0 in attention_mask:
1159
+ return attention_mask
1160
+ return None
1161
+
1162
+ # For SDPA, when possible, we will rely on its `is_causal` argument instead of its `attn_mask` argument, in
1163
+ # order to dispatch on Flash Attention 2. This feature is not compatible with static cache, as SDPA will fail
1164
+ # to infer the attention mask.
1165
+ past_seen_tokens = past_key_values.get_seq_length() if past_key_values is not None else 0
1166
+ using_static_cache = isinstance(past_key_values, StaticCache)
1167
+
1168
+ # When output attentions is True, sdpa implementation's forward method calls the eager implementation's forward
1169
+ if self.config._attn_implementation == "sdpa" and not using_static_cache and not output_attentions:
1170
+ if AttentionMaskConverter._ignore_causal_mask_sdpa(
1171
+ attention_mask,
1172
+ inputs_embeds=input_tensor,
1173
+ past_key_values_length=past_seen_tokens,
1174
+ is_training=self.training,
1175
+ ):
1176
+ return None
1177
+
1178
+ dtype, device = input_tensor.dtype, input_tensor.device
1179
+ min_dtype = torch.finfo(dtype).min
1180
+ sequence_length = input_tensor.shape[1]
1181
+ if using_static_cache:
1182
+ target_length = past_key_values.get_max_length()
1183
+ else:
1184
+ target_length = (
1185
+ attention_mask.shape[-1]
1186
+ if isinstance(attention_mask, torch.Tensor)
1187
+ else past_seen_tokens + sequence_length + 1
1188
+ )
1189
+
1190
+ # In case the provided `attention` mask is 2D, we generate a causal mask here (4D).
1191
+ causal_mask = _prepare_4d_causal_attention_mask_with_cache_position(
1192
+ attention_mask,
1193
+ sequence_length=sequence_length,
1194
+ target_length=target_length,
1195
+ dtype=dtype,
1196
+ device=device,
1197
+ min_dtype=min_dtype,
1198
+ cache_position=cache_position,
1199
+ batch_size=input_tensor.shape[0],
1200
+ )
1201
+
1202
+ if (
1203
+ self.config._attn_implementation == "sdpa"
1204
+ and attention_mask is not None
1205
+ and attention_mask.device.type == "cuda"
1206
+ and not output_attentions
1207
+ ):
1208
+ # Attend to all tokens in fully masked rows in the causal_mask, for example the relevant first rows when
1209
+ # using left padding. This is required by F.scaled_dot_product_attention memory-efficient attention path.
1210
+ # Details: https://github.com/pytorch/pytorch/issues/110213
1211
+ causal_mask = AttentionMaskConverter._unmask_unattended(causal_mask, min_dtype)
1212
+
1213
+ return causal_mask
1214
+
1215
+
1216
+ class CelerityForCausalLM(CelerityPreTrainedModel, GenerationMixin):
1217
+ _tied_weights_keys = ["lm_head.weight"]
1218
+
1219
+ def __init__(self, config):
1220
+ super().__init__(config)
1221
+ self.model = CelerityModel(config)
1222
+ self.vocab_size = config.vocab_size
1223
+ self.lm_head = nn.Linear(config.hidden_size, config.vocab_size, bias=False)
1224
+ self.output_logits_scale = config.output_logits_scale
1225
+
1226
+ # Initialize weights and apply final processing
1227
+ self.post_init()
1228
+
1229
+ def get_input_embeddings(self):
1230
+ return self.model.embed_tokens
1231
+
1232
+ def set_input_embeddings(self, value):
1233
+ self.model.embed_tokens = value
1234
+
1235
+ def get_output_embeddings(self):
1236
+ return self.lm_head
1237
+
1238
+ def set_output_embeddings(self, new_embeddings):
1239
+ self.lm_head = new_embeddings
1240
+
1241
+ def set_decoder(self, decoder):
1242
+ self.model = decoder
1243
+
1244
+ def get_decoder(self):
1245
+ return self.model
1246
+
1247
+ @add_start_docstrings_to_model_forward(CELERITY_INPUTS_DOCSTRING)
1248
+ @replace_return_docstrings(output_type=CausalLMOutputWithPast, config_class=_CONFIG_FOR_DOC)
1249
+ def forward(
1250
+ self,
1251
+ input_ids: torch.LongTensor = None,
1252
+ attention_mask: Optional[torch.Tensor] = None,
1253
+ position_ids: Optional[torch.LongTensor] = None,
1254
+ past_key_values: Optional[Union[Cache, List[torch.FloatTensor]]] = None,
1255
+ inputs_embeds: Optional[torch.FloatTensor] = None,
1256
+ labels: Optional[torch.LongTensor] = None,
1257
+ use_cache: Optional[bool] = None,
1258
+ output_attentions: Optional[bool] = None,
1259
+ output_hidden_states: Optional[bool] = None,
1260
+ return_dict: Optional[bool] = None,
1261
+ cache_position: Optional[torch.LongTensor] = None,
1262
+ num_logits_to_keep: int = 0,
1263
+ ) -> Union[Tuple, CausalLMOutputWithPast]:
1264
+ r"""
1265
+ Args:
1266
+ labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
1267
+ Labels for computing the masked language modeling loss. Indices should either be in `[0, ...,
1268
+ config.vocab_size]` or -100 (see `input_ids` docstring). Tokens with indices set to `-100` are ignored
1269
+ (masked), the loss is only computed for the tokens with labels in `[0, ..., config.vocab_size]`.
1270
+
1271
+ num_logits_to_keep (`int`, *optional*):
1272
+ Calculate logits for the last `num_logits_to_keep` tokens. If `0`, calculate logits for all
1273
+ `input_ids` (special case). Only last token logits are needed for generation, and calculating them only for that
1274
+ token can save memory, which becomes pretty significant for long sequences or large vocabulary size.
1275
+
1276
+ Returns:
1277
+
1278
+ Example:
1279
+
1280
+ ```python
1281
+ >>> from transformers import AutoTokenizer, LlamaForCausalLM
1282
+
1283
+ >>> model = CelerityForCausalLM.from_pretrained("meta-llama/Llama-2-7b-hf")
1284
+ >>> tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-2-7b-hf")
1285
+
1286
+ >>> prompt = "Hey, are you conscious? Can you talk to me?"
1287
+ >>> inputs = tokenizer(prompt, return_tensors="pt")
1288
+
1289
+ >>> # Generate
1290
+ >>> generate_ids = model.generate(inputs.input_ids, max_length=30)
1291
+ >>> tokenizer.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
1292
+ "Hey, are you conscious? Can you talk to me?\nI'm not conscious, but I can talk to you."
1293
+ ```"""
1294
+ output_attentions = output_attentions if output_attentions is not None else self.config.output_attentions
1295
+ output_hidden_states = (
1296
+ output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
1297
+ )
1298
+ return_dict = return_dict if return_dict is not None else self.config.use_return_dict
1299
+
1300
+ # decoder outputs consists of (dec_features, layer_state, dec_hidden, dec_attn)
1301
+ outputs = self.model(
1302
+ input_ids=input_ids,
1303
+ attention_mask=attention_mask,
1304
+ position_ids=position_ids,
1305
+ past_key_values=past_key_values,
1306
+ inputs_embeds=inputs_embeds,
1307
+ use_cache=use_cache,
1308
+ output_attentions=output_attentions,
1309
+ output_hidden_states=output_hidden_states,
1310
+ return_dict=return_dict,
1311
+ cache_position=cache_position,
1312
+ )
1313
+
1314
+ hidden_states = outputs[0]
1315
+ if self.config.pretraining_tp > 1:
1316
+ lm_head_slices = self.lm_head.weight.split(self.vocab_size // self.config.pretraining_tp, dim=0)
1317
+ logits = [F.linear(hidden_states, lm_head_slices[i]) for i in range(self.config.pretraining_tp)]
1318
+ logits = torch.cat(logits, dim=-1)
1319
+ else:
1320
+ if labels is None and not is_torchdynamo_compiling():
1321
+ logger.warning_once(
1322
+ "Starting from v4.46, the `logits` model output will have the same type as the model (except at train time, where it will always be FP32)"
1323
+ )
1324
+ # Only compute necessary logits, and do not upcast them to float if we are not computing the loss
1325
+ # TODO: remove the float() operation in v4.46
1326
+ logits = self.lm_head(hidden_states[:, -num_logits_to_keep:, :]).float()
1327
+ logits *= torch.tensor(float(self.output_logits_scale), dtype=logits.dtype, device=logits.device)
1328
+
1329
+ loss = None
1330
+ if labels is not None:
1331
+ # Upcast to float if we need to compute the loss to avoid potential precision issues
1332
+ logits = logits.float()
1333
+ # Shift so that tokens < n predict n
1334
+ shift_logits = logits[..., :-1, :].contiguous()
1335
+ shift_labels = labels[..., 1:].contiguous()
1336
+ # Flatten the tokens
1337
+ loss_fct = CrossEntropyLoss()
1338
+ shift_logits = shift_logits.view(-1, self.config.vocab_size)
1339
+ shift_labels = shift_labels.view(-1)
1340
+ # Enable model parallelism
1341
+ shift_labels = shift_labels.to(shift_logits.device)
1342
+ loss = loss_fct(shift_logits, shift_labels)
1343
+
1344
+ if not return_dict:
1345
+ output = (logits,) + outputs[1:]
1346
+ return (loss,) + output if loss is not None else output
1347
+
1348
+ return CausalLMOutputWithPast(
1349
+ loss=loss,
1350
+ logits=logits,
1351
+ past_key_values=outputs.past_key_values,
1352
+ hidden_states=outputs.hidden_states,
1353
+ attentions=outputs.attentions,
1354
+ )
1355
+
1356
+ def prepare_inputs_for_generation(
1357
+ self,
1358
+ input_ids,
1359
+ past_key_values=None,
1360
+ attention_mask=None,
1361
+ inputs_embeds=None,
1362
+ cache_position=None,
1363
+ position_ids=None,
1364
+ use_cache=True,
1365
+ num_logits_to_keep=None,
1366
+ **kwargs,
1367
+ ):
1368
+ # If we have cache: let's slice `input_ids` through `cache_position`, to keep only the unprocessed tokens
1369
+ # Exception 1: when passing input_embeds, input_ids may be missing entries
1370
+ # Exception 2: some generation methods do special slicing of input_ids, so we don't need to do it here
1371
+ if past_key_values is not None:
1372
+ if inputs_embeds is not None: # Exception 1
1373
+ input_ids = input_ids[:, -cache_position.shape[0] :]
1374
+ elif input_ids.shape[1] != cache_position.shape[0]: # Default case (the "else", a no op, is Exception 2)
1375
+ input_ids = input_ids[:, cache_position]
1376
+
1377
+ if attention_mask is not None and position_ids is None:
1378
+ # create position_ids on the fly for batch generation
1379
+ position_ids = attention_mask.long().cumsum(-1) - 1
1380
+ position_ids.masked_fill_(attention_mask == 0, 1)
1381
+ if past_key_values:
1382
+ position_ids = position_ids[:, -input_ids.shape[1] :]
1383
+
1384
+ # 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.
1385
+ position_ids = position_ids.clone(memory_format=torch.contiguous_format)
1386
+
1387
+ # if `inputs_embeds` are passed, we only want to use them in the 1st generation step
1388
+ if inputs_embeds is not None and cache_position[0] == 0:
1389
+ model_inputs = {"inputs_embeds": inputs_embeds, "input_ids": None}
1390
+ else:
1391
+ # The clone here is for the same reason as for `position_ids`.
1392
+ model_inputs = {"input_ids": input_ids.clone(memory_format=torch.contiguous_format), "inputs_embeds": None}
1393
+
1394
+ if isinstance(past_key_values, StaticCache) and attention_mask.ndim == 2:
1395
+ if model_inputs["inputs_embeds"] is not None:
1396
+ batch_size, sequence_length, _ = model_inputs["inputs_embeds"].shape
1397
+ device = model_inputs["inputs_embeds"].device
1398
+ else:
1399
+ batch_size, sequence_length = model_inputs["input_ids"].shape
1400
+ device = model_inputs["input_ids"].device
1401
+
1402
+ dtype = self.lm_head.weight.dtype
1403
+ min_dtype = torch.finfo(dtype).min
1404
+
1405
+ attention_mask = _prepare_4d_causal_attention_mask_with_cache_position(
1406
+ attention_mask,
1407
+ sequence_length=sequence_length,
1408
+ target_length=past_key_values.get_max_length(),
1409
+ dtype=dtype,
1410
+ device=device,
1411
+ min_dtype=min_dtype,
1412
+ cache_position=cache_position,
1413
+ batch_size=batch_size,
1414
+ )
1415
+
1416
+ if num_logits_to_keep is not None:
1417
+ model_inputs["num_logits_to_keep"] = num_logits_to_keep
1418
+
1419
+ model_inputs.update(
1420
+ {
1421
+ "position_ids": position_ids,
1422
+ "cache_position": cache_position,
1423
+ "past_key_values": past_key_values,
1424
+ "use_cache": use_cache,
1425
+ "attention_mask": attention_mask,
1426
+ }
1427
+ )
1428
+ return model_inputs
1429
+
1430
+
1431
+ @add_start_docstrings(
1432
+ """
1433
+ The Celerity Model transformer with a sequence classification head on top (linear layer).
1434
+
1435
+ [`CelerityForSequenceClassification`] uses the last token in order to do the classification, as other causal models
1436
+ (e.g. GPT-2) do.
1437
+
1438
+ Since it does classification on the last token, it requires to know the position of the last token. If a
1439
+ `pad_token_id` is defined in the configuration, it finds the last token that is not a padding token in each row. If
1440
+ no `pad_token_id` is defined, it simply takes the last value in each row of the batch. Since it cannot guess the
1441
+ padding tokens when `inputs_embeds` are passed instead of `input_ids`, it does the same (take the last value in
1442
+ each row of the batch).
1443
+ """,
1444
+ CELERITY_START_DOCSTRING,
1445
+ )
1446
+ class CelerityForSequenceClassification(CelerityPreTrainedModel):
1447
+ def __init__(self, config):
1448
+ super().__init__(config)
1449
+ self.num_labels = config.num_labels
1450
+ self.model = CelerityModel(config)
1451
+ self.score = nn.Linear(config.hidden_size, self.num_labels, bias=False)
1452
+ self.output_logits_scale = config.output_logits_scale
1453
+
1454
+ # Initialize weights and apply final processing
1455
+ self.post_init()
1456
+
1457
+ def get_input_embeddings(self):
1458
+ return self.model.embed_tokens
1459
+
1460
+ def set_input_embeddings(self, value):
1461
+ self.model.embed_tokens = value
1462
+
1463
+ @add_start_docstrings_to_model_forward(CELERITY_INPUTS_DOCSTRING)
1464
+ def forward(
1465
+ self,
1466
+ input_ids: Optional[torch.LongTensor] = None,
1467
+ attention_mask: Optional[torch.Tensor] = None,
1468
+ position_ids: Optional[torch.LongTensor] = None,
1469
+ past_key_values: Optional[Union[Cache, List[torch.FloatTensor]]] = None,
1470
+ inputs_embeds: Optional[torch.FloatTensor] = None,
1471
+ labels: Optional[torch.LongTensor] = None,
1472
+ use_cache: Optional[bool] = None,
1473
+ output_attentions: Optional[bool] = None,
1474
+ output_hidden_states: Optional[bool] = None,
1475
+ return_dict: Optional[bool] = None,
1476
+ ) -> Union[Tuple, SequenceClassifierOutputWithPast]:
1477
+ r"""
1478
+ labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*):
1479
+ Labels for computing the sequence classification/regression loss. Indices should be in `[0, ...,
1480
+ config.num_labels - 1]`. If `config.num_labels == 1` a regression loss is computed (Mean-Square loss), If
1481
+ `config.num_labels > 1` a classification loss is computed (Cross-Entropy).
1482
+ """
1483
+ return_dict = return_dict if return_dict is not None else self.config.use_return_dict
1484
+
1485
+ transformer_outputs = self.model(
1486
+ input_ids,
1487
+ attention_mask=attention_mask,
1488
+ position_ids=position_ids,
1489
+ past_key_values=past_key_values,
1490
+ inputs_embeds=inputs_embeds,
1491
+ use_cache=use_cache,
1492
+ output_attentions=output_attentions,
1493
+ output_hidden_states=output_hidden_states,
1494
+ return_dict=return_dict,
1495
+ )
1496
+ hidden_states = transformer_outputs[0]
1497
+ logits = self.score(hidden_states)
1498
+ logits *= torch.tensor(float(self.output_logits_scale), dtype=logits.dtype, device=logits.device)
1499
+
1500
+ if input_ids is not None:
1501
+ batch_size = input_ids.shape[0]
1502
+ else:
1503
+ batch_size = inputs_embeds.shape[0]
1504
+
1505
+ if self.config.pad_token_id is None and batch_size != 1:
1506
+ raise ValueError("Cannot handle batch sizes > 1 if no padding token is defined.")
1507
+ if self.config.pad_token_id is None:
1508
+ sequence_lengths = -1
1509
+ else:
1510
+ if input_ids is not None:
1511
+ # if no pad token found, use modulo instead of reverse indexing for ONNX compatibility
1512
+ sequence_lengths = torch.eq(input_ids, self.config.pad_token_id).int().argmax(-1) - 1
1513
+ sequence_lengths = sequence_lengths % input_ids.shape[-1]
1514
+ sequence_lengths = sequence_lengths.to(logits.device)
1515
+ else:
1516
+ sequence_lengths = -1
1517
+
1518
+ pooled_logits = logits[torch.arange(batch_size, device=logits.device), sequence_lengths]
1519
+
1520
+ loss = None
1521
+ if labels is not None:
1522
+ labels = labels.to(logits.device)
1523
+ if self.config.problem_type is None:
1524
+ if self.num_labels == 1:
1525
+ self.config.problem_type = "regression"
1526
+ elif self.num_labels > 1 and (labels.dtype == torch.long or labels.dtype == torch.int):
1527
+ self.config.problem_type = "single_label_classification"
1528
+ else:
1529
+ self.config.problem_type = "multi_label_classification"
1530
+
1531
+ if self.config.problem_type == "regression":
1532
+ loss_fct = MSELoss()
1533
+ if self.num_labels == 1:
1534
+ loss = loss_fct(pooled_logits.squeeze(), labels.squeeze())
1535
+ else:
1536
+ loss = loss_fct(pooled_logits, labels)
1537
+ elif self.config.problem_type == "single_label_classification":
1538
+ loss_fct = CrossEntropyLoss()
1539
+ loss = loss_fct(pooled_logits.view(-1, self.num_labels), labels.view(-1))
1540
+ elif self.config.problem_type == "multi_label_classification":
1541
+ loss_fct = BCEWithLogitsLoss()
1542
+ loss = loss_fct(pooled_logits, labels)
1543
+ if not return_dict:
1544
+ output = (pooled_logits,) + transformer_outputs[1:]
1545
+ return ((loss,) + output) if loss is not None else output
1546
+
1547
+ return SequenceClassifierOutputWithPast(
1548
+ loss=loss,
1549
+ logits=pooled_logits,
1550
+ past_key_values=transformer_outputs.past_key_values,
1551
+ hidden_states=transformer_outputs.hidden_states,
1552
+ attentions=transformer_outputs.attentions,
1553
+ )
1554
+
1555
+
1556
+ @add_start_docstrings(
1557
+ """
1558
+ The Celerity Model transformer with a span classification head on top for extractive question-answering tasks like
1559
+ SQuAD (a linear layer on top of the hidden-states output to compute `span start logits` and `span end logits`).
1560
+ """,
1561
+ CELERITY_START_DOCSTRING,
1562
+ )
1563
+ class CelerityForQuestionAnswering(CelerityPreTrainedModel):
1564
+ base_model_prefix = "transformer"
1565
+
1566
+ # Copied from transformers.models.bloom.modeling_bloom.BloomForQuestionAnswering.__init__ with Bloom->Llama
1567
+ def __init__(self, config):
1568
+ super().__init__(config)
1569
+ self.transformer = CelerityModel(config)
1570
+ self.qa_outputs = nn.Linear(config.hidden_size, 2)
1571
+ self.output_logits_scale = config.output_logits_scale
1572
+
1573
+ # Initialize weights and apply final processing
1574
+ self.post_init()
1575
+
1576
+ def get_input_embeddings(self):
1577
+ return self.transformer.embed_tokens
1578
+
1579
+ def set_input_embeddings(self, value):
1580
+ self.transformer.embed_tokens = value
1581
+
1582
+ @add_start_docstrings_to_model_forward(CELERITY_INPUTS_DOCSTRING)
1583
+ def forward(
1584
+ self,
1585
+ input_ids: Optional[torch.LongTensor] = None,
1586
+ attention_mask: Optional[torch.FloatTensor] = None,
1587
+ position_ids: Optional[torch.LongTensor] = None,
1588
+ past_key_values: Optional[Union[Cache, List[torch.FloatTensor]]] = None,
1589
+ inputs_embeds: Optional[torch.FloatTensor] = None,
1590
+ start_positions: Optional[torch.LongTensor] = None,
1591
+ end_positions: Optional[torch.LongTensor] = None,
1592
+ output_attentions: Optional[bool] = None,
1593
+ output_hidden_states: Optional[bool] = None,
1594
+ return_dict: Optional[bool] = None,
1595
+ ) -> Union[Tuple, QuestionAnsweringModelOutput]:
1596
+ r"""
1597
+ start_positions (`torch.LongTensor` of shape `(batch_size,)`, *optional*):
1598
+ Labels for position (index) of the start of the labelled span for computing the token classification loss.
1599
+ Positions are clamped to the length of the sequence (`sequence_length`). Position outside of the sequence
1600
+ are not taken into account for computing the loss.
1601
+ end_positions (`torch.LongTensor` of shape `(batch_size,)`, *optional*):
1602
+ Labels for position (index) of the end of the labelled span for computing the token classification loss.
1603
+ Positions are clamped to the length of the sequence (`sequence_length`). Position outside of the sequence
1604
+ are not taken into account for computing the loss.
1605
+ """
1606
+ return_dict = return_dict if return_dict is not None else self.config.use_return_dict
1607
+
1608
+ outputs = self.transformer(
1609
+ input_ids,
1610
+ attention_mask=attention_mask,
1611
+ position_ids=position_ids,
1612
+ past_key_values=past_key_values,
1613
+ inputs_embeds=inputs_embeds,
1614
+ output_attentions=output_attentions,
1615
+ output_hidden_states=output_hidden_states,
1616
+ return_dict=return_dict,
1617
+ )
1618
+
1619
+ sequence_output = outputs[0]
1620
+
1621
+ logits = self.qa_outputs(sequence_output)
1622
+ logits *= torch.tensor(float(self.output_logits_scale), dtype=logits.dtype, device=logits.device)
1623
+ start_logits, end_logits = logits.split(1, dim=-1)
1624
+ start_logits = start_logits.squeeze(-1).contiguous()
1625
+ end_logits = end_logits.squeeze(-1).contiguous()
1626
+
1627
+ total_loss = None
1628
+ if start_positions is not None and end_positions is not None:
1629
+ # If we are on multi-GPU, split add a dimension
1630
+ if len(start_positions.size()) > 1:
1631
+ start_positions = start_positions.squeeze(-1).to(start_logits.device)
1632
+ if len(end_positions.size()) > 1:
1633
+ end_positions = end_positions.squeeze(-1).to(end_logits.device)
1634
+ # sometimes the start/end positions are outside our model inputs, we ignore these terms
1635
+ ignored_index = start_logits.size(1)
1636
+ start_positions = start_positions.clamp(0, ignored_index)
1637
+ end_positions = end_positions.clamp(0, ignored_index)
1638
+
1639
+ loss_fct = CrossEntropyLoss(ignore_index=ignored_index)
1640
+ start_loss = loss_fct(start_logits, start_positions)
1641
+ end_loss = loss_fct(end_logits, end_positions)
1642
+ total_loss = (start_loss + end_loss) / 2
1643
+
1644
+ if not return_dict:
1645
+ output = (start_logits, end_logits) + outputs[2:]
1646
+ return ((total_loss,) + output) if total_loss is not None else output
1647
+
1648
+ return QuestionAnsweringModelOutput(
1649
+ loss=total_loss,
1650
+ start_logits=start_logits,
1651
+ end_logits=end_logits,
1652
+ hidden_states=outputs.hidden_states,
1653
+ attentions=outputs.attentions,
1654
+ )
1655
+
1656
+
1657
+ @add_start_docstrings(
1658
+ """
1659
+ The Celerity Model transformer with a token classification head on top (a linear layer on top of the hidden-states
1660
+ output) e.g. for Named-Entity-Recognition (NER) tasks.
1661
+ """,
1662
+ CELERITY_START_DOCSTRING,
1663
+ )
1664
+ class CelerityForTokenClassification(CelerityPreTrainedModel):
1665
+ def __init__(self, config):
1666
+ super().__init__(config)
1667
+ self.num_labels = config.num_labels
1668
+ self.model = CelerityModel(config)
1669
+ if getattr(config, "classifier_dropout", None) is not None:
1670
+ classifier_dropout = config.classifier_dropout
1671
+ elif getattr(config, "hidden_dropout", None) is not None:
1672
+ classifier_dropout = config.hidden_dropout
1673
+ else:
1674
+ classifier_dropout = 0.1
1675
+ self.dropout = nn.Dropout(classifier_dropout)
1676
+ self.score = nn.Linear(config.hidden_size, config.num_labels)
1677
+ self.output_logits_scale = config.output_logits_scale
1678
+
1679
+ # Initialize weights and apply final processing
1680
+ self.post_init()
1681
+
1682
+ def get_input_embeddings(self):
1683
+ return self.model.embed_tokens
1684
+
1685
+ def set_input_embeddings(self, value):
1686
+ self.model.embed_tokens = value
1687
+
1688
+ @add_start_docstrings_to_model_forward(CELERITY_INPUTS_DOCSTRING)
1689
+ def forward(
1690
+ self,
1691
+ input_ids: Optional[torch.LongTensor] = None,
1692
+ attention_mask: Optional[torch.Tensor] = None,
1693
+ position_ids: Optional[torch.LongTensor] = None,
1694
+ past_key_values: Optional[List[torch.FloatTensor]] = None,
1695
+ inputs_embeds: Optional[torch.FloatTensor] = None,
1696
+ labels: Optional[torch.LongTensor] = None,
1697
+ use_cache: Optional[bool] = None,
1698
+ output_attentions: Optional[bool] = None,
1699
+ output_hidden_states: Optional[bool] = None,
1700
+ return_dict: Optional[bool] = None,
1701
+ ) -> Union[Tuple, TokenClassifierOutput]:
1702
+ r"""
1703
+ labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*):
1704
+ Labels for computing the sequence classification/regression loss. Indices should be in `[0, ...,
1705
+ config.num_labels - 1]`. If `config.num_labels == 1` a regression loss is computed (Mean-Square loss), If
1706
+ `config.num_labels > 1` a classification loss is computed (Cross-Entropy).
1707
+ """
1708
+ return_dict = return_dict if return_dict is not None else self.config.use_return_dict
1709
+
1710
+ outputs = self.model(
1711
+ input_ids,
1712
+ attention_mask=attention_mask,
1713
+ position_ids=position_ids,
1714
+ past_key_values=past_key_values,
1715
+ inputs_embeds=inputs_embeds,
1716
+ use_cache=use_cache,
1717
+ output_attentions=output_attentions,
1718
+ output_hidden_states=output_hidden_states,
1719
+ return_dict=return_dict,
1720
+ )
1721
+ sequence_output = outputs[0]
1722
+ sequence_output = self.dropout(sequence_output)
1723
+ logits = self.score(sequence_output)
1724
+ logits *= torch.tensor(float(self.output_logits_scale), dtype=logits.dtype, device=logits.device)
1725
+
1726
+ loss = None
1727
+ if labels is not None:
1728
+ loss_fct = CrossEntropyLoss()
1729
+ loss = loss_fct(logits.view(-1, self.num_labels), labels.view(-1))
1730
+
1731
+ if not return_dict:
1732
+ output = (logits,) + outputs[2:]
1733
+ return ((loss,) + output) if loss is not None else output
1734
+
1735
+ return TokenClassifierOutput(
1736
+ loss=loss,
1737
+ logits=logits,
1738
+ hidden_states=outputs.hidden_states,
1739
+ attentions=outputs.attentions,
1740
+ )
pytorch_model-00001-of-00001.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8ecb7f8d132bc4c0bf4159d20aa3c4b3b4735e6862fbcfdcbc5491ea05375e0d
3
+ size 1812969634
pytorch_model.bin.index.json ADDED
@@ -0,0 +1,379 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 1812844800
4
+ },
5
+ "weight_map": {
6
+ "model.embed_tokens.weight": "pytorch_model-00001-of-00001.bin",
7
+ "model.layers.0.self_attn.q_proj.weight": "pytorch_model-00001-of-00001.bin",
8
+ "model.layers.0.self_attn.q_proj.bias": "pytorch_model-00001-of-00001.bin",
9
+ "model.layers.0.self_attn.k_proj.weight": "pytorch_model-00001-of-00001.bin",
10
+ "model.layers.0.self_attn.k_proj.bias": "pytorch_model-00001-of-00001.bin",
11
+ "model.layers.0.self_attn.v_proj.weight": "pytorch_model-00001-of-00001.bin",
12
+ "model.layers.0.self_attn.v_proj.bias": "pytorch_model-00001-of-00001.bin",
13
+ "model.layers.0.self_attn.o_proj.weight": "pytorch_model-00001-of-00001.bin",
14
+ "model.layers.0.self_attn.o_proj.bias": "pytorch_model-00001-of-00001.bin",
15
+ "model.layers.0.input_layernorm.weight": "pytorch_model-00001-of-00001.bin",
16
+ "model.layers.0.input_layernorm.bias": "pytorch_model-00001-of-00001.bin",
17
+ "model.layers.0.post_attention_layernorm.weight": "pytorch_model-00001-of-00001.bin",
18
+ "model.layers.0.post_attention_layernorm.bias": "pytorch_model-00001-of-00001.bin",
19
+ "model.layers.0.mlp.up_proj.weight": "pytorch_model-00001-of-00001.bin",
20
+ "model.layers.0.mlp.up_proj.bias": "pytorch_model-00001-of-00001.bin",
21
+ "model.layers.0.mlp.down_proj.weight": "pytorch_model-00001-of-00001.bin",
22
+ "model.layers.0.mlp.down_proj.bias": "pytorch_model-00001-of-00001.bin",
23
+ "model.layers.1.self_attn.q_proj.weight": "pytorch_model-00001-of-00001.bin",
24
+ "model.layers.1.self_attn.q_proj.bias": "pytorch_model-00001-of-00001.bin",
25
+ "model.layers.1.self_attn.k_proj.weight": "pytorch_model-00001-of-00001.bin",
26
+ "model.layers.1.self_attn.k_proj.bias": "pytorch_model-00001-of-00001.bin",
27
+ "model.layers.1.self_attn.v_proj.weight": "pytorch_model-00001-of-00001.bin",
28
+ "model.layers.1.self_attn.v_proj.bias": "pytorch_model-00001-of-00001.bin",
29
+ "model.layers.1.self_attn.o_proj.weight": "pytorch_model-00001-of-00001.bin",
30
+ "model.layers.1.self_attn.o_proj.bias": "pytorch_model-00001-of-00001.bin",
31
+ "model.layers.1.input_layernorm.weight": "pytorch_model-00001-of-00001.bin",
32
+ "model.layers.1.input_layernorm.bias": "pytorch_model-00001-of-00001.bin",
33
+ "model.layers.1.post_attention_layernorm.weight": "pytorch_model-00001-of-00001.bin",
34
+ "model.layers.1.post_attention_layernorm.bias": "pytorch_model-00001-of-00001.bin",
35
+ "model.layers.1.mlp.up_proj.weight": "pytorch_model-00001-of-00001.bin",
36
+ "model.layers.1.mlp.up_proj.bias": "pytorch_model-00001-of-00001.bin",
37
+ "model.layers.1.mlp.down_proj.weight": "pytorch_model-00001-of-00001.bin",
38
+ "model.layers.1.mlp.down_proj.bias": "pytorch_model-00001-of-00001.bin",
39
+ "model.layers.2.self_attn.q_proj.weight": "pytorch_model-00001-of-00001.bin",
40
+ "model.layers.2.self_attn.q_proj.bias": "pytorch_model-00001-of-00001.bin",
41
+ "model.layers.2.self_attn.k_proj.weight": "pytorch_model-00001-of-00001.bin",
42
+ "model.layers.2.self_attn.k_proj.bias": "pytorch_model-00001-of-00001.bin",
43
+ "model.layers.2.self_attn.v_proj.weight": "pytorch_model-00001-of-00001.bin",
44
+ "model.layers.2.self_attn.v_proj.bias": "pytorch_model-00001-of-00001.bin",
45
+ "model.layers.2.self_attn.o_proj.weight": "pytorch_model-00001-of-00001.bin",
46
+ "model.layers.2.self_attn.o_proj.bias": "pytorch_model-00001-of-00001.bin",
47
+ "model.layers.2.input_layernorm.weight": "pytorch_model-00001-of-00001.bin",
48
+ "model.layers.2.input_layernorm.bias": "pytorch_model-00001-of-00001.bin",
49
+ "model.layers.2.post_attention_layernorm.weight": "pytorch_model-00001-of-00001.bin",
50
+ "model.layers.2.post_attention_layernorm.bias": "pytorch_model-00001-of-00001.bin",
51
+ "model.layers.2.mlp.up_proj.weight": "pytorch_model-00001-of-00001.bin",
52
+ "model.layers.2.mlp.up_proj.bias": "pytorch_model-00001-of-00001.bin",
53
+ "model.layers.2.mlp.down_proj.weight": "pytorch_model-00001-of-00001.bin",
54
+ "model.layers.2.mlp.down_proj.bias": "pytorch_model-00001-of-00001.bin",
55
+ "model.layers.3.self_attn.q_proj.weight": "pytorch_model-00001-of-00001.bin",
56
+ "model.layers.3.self_attn.q_proj.bias": "pytorch_model-00001-of-00001.bin",
57
+ "model.layers.3.self_attn.k_proj.weight": "pytorch_model-00001-of-00001.bin",
58
+ "model.layers.3.self_attn.k_proj.bias": "pytorch_model-00001-of-00001.bin",
59
+ "model.layers.3.self_attn.v_proj.weight": "pytorch_model-00001-of-00001.bin",
60
+ "model.layers.3.self_attn.v_proj.bias": "pytorch_model-00001-of-00001.bin",
61
+ "model.layers.3.self_attn.o_proj.weight": "pytorch_model-00001-of-00001.bin",
62
+ "model.layers.3.self_attn.o_proj.bias": "pytorch_model-00001-of-00001.bin",
63
+ "model.layers.3.input_layernorm.weight": "pytorch_model-00001-of-00001.bin",
64
+ "model.layers.3.input_layernorm.bias": "pytorch_model-00001-of-00001.bin",
65
+ "model.layers.3.post_attention_layernorm.weight": "pytorch_model-00001-of-00001.bin",
66
+ "model.layers.3.post_attention_layernorm.bias": "pytorch_model-00001-of-00001.bin",
67
+ "model.layers.3.mlp.up_proj.weight": "pytorch_model-00001-of-00001.bin",
68
+ "model.layers.3.mlp.up_proj.bias": "pytorch_model-00001-of-00001.bin",
69
+ "model.layers.3.mlp.down_proj.weight": "pytorch_model-00001-of-00001.bin",
70
+ "model.layers.3.mlp.down_proj.bias": "pytorch_model-00001-of-00001.bin",
71
+ "model.layers.4.self_attn.q_proj.weight": "pytorch_model-00001-of-00001.bin",
72
+ "model.layers.4.self_attn.q_proj.bias": "pytorch_model-00001-of-00001.bin",
73
+ "model.layers.4.self_attn.k_proj.weight": "pytorch_model-00001-of-00001.bin",
74
+ "model.layers.4.self_attn.k_proj.bias": "pytorch_model-00001-of-00001.bin",
75
+ "model.layers.4.self_attn.v_proj.weight": "pytorch_model-00001-of-00001.bin",
76
+ "model.layers.4.self_attn.v_proj.bias": "pytorch_model-00001-of-00001.bin",
77
+ "model.layers.4.self_attn.o_proj.weight": "pytorch_model-00001-of-00001.bin",
78
+ "model.layers.4.self_attn.o_proj.bias": "pytorch_model-00001-of-00001.bin",
79
+ "model.layers.4.input_layernorm.weight": "pytorch_model-00001-of-00001.bin",
80
+ "model.layers.4.input_layernorm.bias": "pytorch_model-00001-of-00001.bin",
81
+ "model.layers.4.post_attention_layernorm.weight": "pytorch_model-00001-of-00001.bin",
82
+ "model.layers.4.post_attention_layernorm.bias": "pytorch_model-00001-of-00001.bin",
83
+ "model.layers.4.mlp.up_proj.weight": "pytorch_model-00001-of-00001.bin",
84
+ "model.layers.4.mlp.up_proj.bias": "pytorch_model-00001-of-00001.bin",
85
+ "model.layers.4.mlp.down_proj.weight": "pytorch_model-00001-of-00001.bin",
86
+ "model.layers.4.mlp.down_proj.bias": "pytorch_model-00001-of-00001.bin",
87
+ "model.layers.5.self_attn.q_proj.weight": "pytorch_model-00001-of-00001.bin",
88
+ "model.layers.5.self_attn.q_proj.bias": "pytorch_model-00001-of-00001.bin",
89
+ "model.layers.5.self_attn.k_proj.weight": "pytorch_model-00001-of-00001.bin",
90
+ "model.layers.5.self_attn.k_proj.bias": "pytorch_model-00001-of-00001.bin",
91
+ "model.layers.5.self_attn.v_proj.weight": "pytorch_model-00001-of-00001.bin",
92
+ "model.layers.5.self_attn.v_proj.bias": "pytorch_model-00001-of-00001.bin",
93
+ "model.layers.5.self_attn.o_proj.weight": "pytorch_model-00001-of-00001.bin",
94
+ "model.layers.5.self_attn.o_proj.bias": "pytorch_model-00001-of-00001.bin",
95
+ "model.layers.5.input_layernorm.weight": "pytorch_model-00001-of-00001.bin",
96
+ "model.layers.5.input_layernorm.bias": "pytorch_model-00001-of-00001.bin",
97
+ "model.layers.5.post_attention_layernorm.weight": "pytorch_model-00001-of-00001.bin",
98
+ "model.layers.5.post_attention_layernorm.bias": "pytorch_model-00001-of-00001.bin",
99
+ "model.layers.5.mlp.up_proj.weight": "pytorch_model-00001-of-00001.bin",
100
+ "model.layers.5.mlp.up_proj.bias": "pytorch_model-00001-of-00001.bin",
101
+ "model.layers.5.mlp.down_proj.weight": "pytorch_model-00001-of-00001.bin",
102
+ "model.layers.5.mlp.down_proj.bias": "pytorch_model-00001-of-00001.bin",
103
+ "model.layers.6.self_attn.q_proj.weight": "pytorch_model-00001-of-00001.bin",
104
+ "model.layers.6.self_attn.q_proj.bias": "pytorch_model-00001-of-00001.bin",
105
+ "model.layers.6.self_attn.k_proj.weight": "pytorch_model-00001-of-00001.bin",
106
+ "model.layers.6.self_attn.k_proj.bias": "pytorch_model-00001-of-00001.bin",
107
+ "model.layers.6.self_attn.v_proj.weight": "pytorch_model-00001-of-00001.bin",
108
+ "model.layers.6.self_attn.v_proj.bias": "pytorch_model-00001-of-00001.bin",
109
+ "model.layers.6.self_attn.o_proj.weight": "pytorch_model-00001-of-00001.bin",
110
+ "model.layers.6.self_attn.o_proj.bias": "pytorch_model-00001-of-00001.bin",
111
+ "model.layers.6.input_layernorm.weight": "pytorch_model-00001-of-00001.bin",
112
+ "model.layers.6.input_layernorm.bias": "pytorch_model-00001-of-00001.bin",
113
+ "model.layers.6.post_attention_layernorm.weight": "pytorch_model-00001-of-00001.bin",
114
+ "model.layers.6.post_attention_layernorm.bias": "pytorch_model-00001-of-00001.bin",
115
+ "model.layers.6.mlp.up_proj.weight": "pytorch_model-00001-of-00001.bin",
116
+ "model.layers.6.mlp.up_proj.bias": "pytorch_model-00001-of-00001.bin",
117
+ "model.layers.6.mlp.down_proj.weight": "pytorch_model-00001-of-00001.bin",
118
+ "model.layers.6.mlp.down_proj.bias": "pytorch_model-00001-of-00001.bin",
119
+ "model.layers.7.self_attn.q_proj.weight": "pytorch_model-00001-of-00001.bin",
120
+ "model.layers.7.self_attn.q_proj.bias": "pytorch_model-00001-of-00001.bin",
121
+ "model.layers.7.self_attn.k_proj.weight": "pytorch_model-00001-of-00001.bin",
122
+ "model.layers.7.self_attn.k_proj.bias": "pytorch_model-00001-of-00001.bin",
123
+ "model.layers.7.self_attn.v_proj.weight": "pytorch_model-00001-of-00001.bin",
124
+ "model.layers.7.self_attn.v_proj.bias": "pytorch_model-00001-of-00001.bin",
125
+ "model.layers.7.self_attn.o_proj.weight": "pytorch_model-00001-of-00001.bin",
126
+ "model.layers.7.self_attn.o_proj.bias": "pytorch_model-00001-of-00001.bin",
127
+ "model.layers.7.input_layernorm.weight": "pytorch_model-00001-of-00001.bin",
128
+ "model.layers.7.input_layernorm.bias": "pytorch_model-00001-of-00001.bin",
129
+ "model.layers.7.post_attention_layernorm.weight": "pytorch_model-00001-of-00001.bin",
130
+ "model.layers.7.post_attention_layernorm.bias": "pytorch_model-00001-of-00001.bin",
131
+ "model.layers.7.mlp.up_proj.weight": "pytorch_model-00001-of-00001.bin",
132
+ "model.layers.7.mlp.up_proj.bias": "pytorch_model-00001-of-00001.bin",
133
+ "model.layers.7.mlp.down_proj.weight": "pytorch_model-00001-of-00001.bin",
134
+ "model.layers.7.mlp.down_proj.bias": "pytorch_model-00001-of-00001.bin",
135
+ "model.layers.8.self_attn.q_proj.weight": "pytorch_model-00001-of-00001.bin",
136
+ "model.layers.8.self_attn.q_proj.bias": "pytorch_model-00001-of-00001.bin",
137
+ "model.layers.8.self_attn.k_proj.weight": "pytorch_model-00001-of-00001.bin",
138
+ "model.layers.8.self_attn.k_proj.bias": "pytorch_model-00001-of-00001.bin",
139
+ "model.layers.8.self_attn.v_proj.weight": "pytorch_model-00001-of-00001.bin",
140
+ "model.layers.8.self_attn.v_proj.bias": "pytorch_model-00001-of-00001.bin",
141
+ "model.layers.8.self_attn.o_proj.weight": "pytorch_model-00001-of-00001.bin",
142
+ "model.layers.8.self_attn.o_proj.bias": "pytorch_model-00001-of-00001.bin",
143
+ "model.layers.8.input_layernorm.weight": "pytorch_model-00001-of-00001.bin",
144
+ "model.layers.8.input_layernorm.bias": "pytorch_model-00001-of-00001.bin",
145
+ "model.layers.8.post_attention_layernorm.weight": "pytorch_model-00001-of-00001.bin",
146
+ "model.layers.8.post_attention_layernorm.bias": "pytorch_model-00001-of-00001.bin",
147
+ "model.layers.8.mlp.up_proj.weight": "pytorch_model-00001-of-00001.bin",
148
+ "model.layers.8.mlp.up_proj.bias": "pytorch_model-00001-of-00001.bin",
149
+ "model.layers.8.mlp.down_proj.weight": "pytorch_model-00001-of-00001.bin",
150
+ "model.layers.8.mlp.down_proj.bias": "pytorch_model-00001-of-00001.bin",
151
+ "model.layers.9.self_attn.q_proj.weight": "pytorch_model-00001-of-00001.bin",
152
+ "model.layers.9.self_attn.q_proj.bias": "pytorch_model-00001-of-00001.bin",
153
+ "model.layers.9.self_attn.k_proj.weight": "pytorch_model-00001-of-00001.bin",
154
+ "model.layers.9.self_attn.k_proj.bias": "pytorch_model-00001-of-00001.bin",
155
+ "model.layers.9.self_attn.v_proj.weight": "pytorch_model-00001-of-00001.bin",
156
+ "model.layers.9.self_attn.v_proj.bias": "pytorch_model-00001-of-00001.bin",
157
+ "model.layers.9.self_attn.o_proj.weight": "pytorch_model-00001-of-00001.bin",
158
+ "model.layers.9.self_attn.o_proj.bias": "pytorch_model-00001-of-00001.bin",
159
+ "model.layers.9.input_layernorm.weight": "pytorch_model-00001-of-00001.bin",
160
+ "model.layers.9.input_layernorm.bias": "pytorch_model-00001-of-00001.bin",
161
+ "model.layers.9.post_attention_layernorm.weight": "pytorch_model-00001-of-00001.bin",
162
+ "model.layers.9.post_attention_layernorm.bias": "pytorch_model-00001-of-00001.bin",
163
+ "model.layers.9.mlp.up_proj.weight": "pytorch_model-00001-of-00001.bin",
164
+ "model.layers.9.mlp.up_proj.bias": "pytorch_model-00001-of-00001.bin",
165
+ "model.layers.9.mlp.down_proj.weight": "pytorch_model-00001-of-00001.bin",
166
+ "model.layers.9.mlp.down_proj.bias": "pytorch_model-00001-of-00001.bin",
167
+ "model.layers.10.self_attn.q_proj.weight": "pytorch_model-00001-of-00001.bin",
168
+ "model.layers.10.self_attn.q_proj.bias": "pytorch_model-00001-of-00001.bin",
169
+ "model.layers.10.self_attn.k_proj.weight": "pytorch_model-00001-of-00001.bin",
170
+ "model.layers.10.self_attn.k_proj.bias": "pytorch_model-00001-of-00001.bin",
171
+ "model.layers.10.self_attn.v_proj.weight": "pytorch_model-00001-of-00001.bin",
172
+ "model.layers.10.self_attn.v_proj.bias": "pytorch_model-00001-of-00001.bin",
173
+ "model.layers.10.self_attn.o_proj.weight": "pytorch_model-00001-of-00001.bin",
174
+ "model.layers.10.self_attn.o_proj.bias": "pytorch_model-00001-of-00001.bin",
175
+ "model.layers.10.input_layernorm.weight": "pytorch_model-00001-of-00001.bin",
176
+ "model.layers.10.input_layernorm.bias": "pytorch_model-00001-of-00001.bin",
177
+ "model.layers.10.post_attention_layernorm.weight": "pytorch_model-00001-of-00001.bin",
178
+ "model.layers.10.post_attention_layernorm.bias": "pytorch_model-00001-of-00001.bin",
179
+ "model.layers.10.mlp.up_proj.weight": "pytorch_model-00001-of-00001.bin",
180
+ "model.layers.10.mlp.up_proj.bias": "pytorch_model-00001-of-00001.bin",
181
+ "model.layers.10.mlp.down_proj.weight": "pytorch_model-00001-of-00001.bin",
182
+ "model.layers.10.mlp.down_proj.bias": "pytorch_model-00001-of-00001.bin",
183
+ "model.layers.11.self_attn.q_proj.weight": "pytorch_model-00001-of-00001.bin",
184
+ "model.layers.11.self_attn.q_proj.bias": "pytorch_model-00001-of-00001.bin",
185
+ "model.layers.11.self_attn.k_proj.weight": "pytorch_model-00001-of-00001.bin",
186
+ "model.layers.11.self_attn.k_proj.bias": "pytorch_model-00001-of-00001.bin",
187
+ "model.layers.11.self_attn.v_proj.weight": "pytorch_model-00001-of-00001.bin",
188
+ "model.layers.11.self_attn.v_proj.bias": "pytorch_model-00001-of-00001.bin",
189
+ "model.layers.11.self_attn.o_proj.weight": "pytorch_model-00001-of-00001.bin",
190
+ "model.layers.11.self_attn.o_proj.bias": "pytorch_model-00001-of-00001.bin",
191
+ "model.layers.11.input_layernorm.weight": "pytorch_model-00001-of-00001.bin",
192
+ "model.layers.11.input_layernorm.bias": "pytorch_model-00001-of-00001.bin",
193
+ "model.layers.11.post_attention_layernorm.weight": "pytorch_model-00001-of-00001.bin",
194
+ "model.layers.11.post_attention_layernorm.bias": "pytorch_model-00001-of-00001.bin",
195
+ "model.layers.11.mlp.up_proj.weight": "pytorch_model-00001-of-00001.bin",
196
+ "model.layers.11.mlp.up_proj.bias": "pytorch_model-00001-of-00001.bin",
197
+ "model.layers.11.mlp.down_proj.weight": "pytorch_model-00001-of-00001.bin",
198
+ "model.layers.11.mlp.down_proj.bias": "pytorch_model-00001-of-00001.bin",
199
+ "model.layers.12.self_attn.q_proj.weight": "pytorch_model-00001-of-00001.bin",
200
+ "model.layers.12.self_attn.q_proj.bias": "pytorch_model-00001-of-00001.bin",
201
+ "model.layers.12.self_attn.k_proj.weight": "pytorch_model-00001-of-00001.bin",
202
+ "model.layers.12.self_attn.k_proj.bias": "pytorch_model-00001-of-00001.bin",
203
+ "model.layers.12.self_attn.v_proj.weight": "pytorch_model-00001-of-00001.bin",
204
+ "model.layers.12.self_attn.v_proj.bias": "pytorch_model-00001-of-00001.bin",
205
+ "model.layers.12.self_attn.o_proj.weight": "pytorch_model-00001-of-00001.bin",
206
+ "model.layers.12.self_attn.o_proj.bias": "pytorch_model-00001-of-00001.bin",
207
+ "model.layers.12.input_layernorm.weight": "pytorch_model-00001-of-00001.bin",
208
+ "model.layers.12.input_layernorm.bias": "pytorch_model-00001-of-00001.bin",
209
+ "model.layers.12.post_attention_layernorm.weight": "pytorch_model-00001-of-00001.bin",
210
+ "model.layers.12.post_attention_layernorm.bias": "pytorch_model-00001-of-00001.bin",
211
+ "model.layers.12.mlp.up_proj.weight": "pytorch_model-00001-of-00001.bin",
212
+ "model.layers.12.mlp.up_proj.bias": "pytorch_model-00001-of-00001.bin",
213
+ "model.layers.12.mlp.down_proj.weight": "pytorch_model-00001-of-00001.bin",
214
+ "model.layers.12.mlp.down_proj.bias": "pytorch_model-00001-of-00001.bin",
215
+ "model.layers.13.self_attn.q_proj.weight": "pytorch_model-00001-of-00001.bin",
216
+ "model.layers.13.self_attn.q_proj.bias": "pytorch_model-00001-of-00001.bin",
217
+ "model.layers.13.self_attn.k_proj.weight": "pytorch_model-00001-of-00001.bin",
218
+ "model.layers.13.self_attn.k_proj.bias": "pytorch_model-00001-of-00001.bin",
219
+ "model.layers.13.self_attn.v_proj.weight": "pytorch_model-00001-of-00001.bin",
220
+ "model.layers.13.self_attn.v_proj.bias": "pytorch_model-00001-of-00001.bin",
221
+ "model.layers.13.self_attn.o_proj.weight": "pytorch_model-00001-of-00001.bin",
222
+ "model.layers.13.self_attn.o_proj.bias": "pytorch_model-00001-of-00001.bin",
223
+ "model.layers.13.input_layernorm.weight": "pytorch_model-00001-of-00001.bin",
224
+ "model.layers.13.input_layernorm.bias": "pytorch_model-00001-of-00001.bin",
225
+ "model.layers.13.post_attention_layernorm.weight": "pytorch_model-00001-of-00001.bin",
226
+ "model.layers.13.post_attention_layernorm.bias": "pytorch_model-00001-of-00001.bin",
227
+ "model.layers.13.mlp.up_proj.weight": "pytorch_model-00001-of-00001.bin",
228
+ "model.layers.13.mlp.up_proj.bias": "pytorch_model-00001-of-00001.bin",
229
+ "model.layers.13.mlp.down_proj.weight": "pytorch_model-00001-of-00001.bin",
230
+ "model.layers.13.mlp.down_proj.bias": "pytorch_model-00001-of-00001.bin",
231
+ "model.layers.14.self_attn.q_proj.weight": "pytorch_model-00001-of-00001.bin",
232
+ "model.layers.14.self_attn.q_proj.bias": "pytorch_model-00001-of-00001.bin",
233
+ "model.layers.14.self_attn.k_proj.weight": "pytorch_model-00001-of-00001.bin",
234
+ "model.layers.14.self_attn.k_proj.bias": "pytorch_model-00001-of-00001.bin",
235
+ "model.layers.14.self_attn.v_proj.weight": "pytorch_model-00001-of-00001.bin",
236
+ "model.layers.14.self_attn.v_proj.bias": "pytorch_model-00001-of-00001.bin",
237
+ "model.layers.14.self_attn.o_proj.weight": "pytorch_model-00001-of-00001.bin",
238
+ "model.layers.14.self_attn.o_proj.bias": "pytorch_model-00001-of-00001.bin",
239
+ "model.layers.14.input_layernorm.weight": "pytorch_model-00001-of-00001.bin",
240
+ "model.layers.14.input_layernorm.bias": "pytorch_model-00001-of-00001.bin",
241
+ "model.layers.14.post_attention_layernorm.weight": "pytorch_model-00001-of-00001.bin",
242
+ "model.layers.14.post_attention_layernorm.bias": "pytorch_model-00001-of-00001.bin",
243
+ "model.layers.14.mlp.up_proj.weight": "pytorch_model-00001-of-00001.bin",
244
+ "model.layers.14.mlp.up_proj.bias": "pytorch_model-00001-of-00001.bin",
245
+ "model.layers.14.mlp.down_proj.weight": "pytorch_model-00001-of-00001.bin",
246
+ "model.layers.14.mlp.down_proj.bias": "pytorch_model-00001-of-00001.bin",
247
+ "model.layers.15.self_attn.q_proj.weight": "pytorch_model-00001-of-00001.bin",
248
+ "model.layers.15.self_attn.q_proj.bias": "pytorch_model-00001-of-00001.bin",
249
+ "model.layers.15.self_attn.k_proj.weight": "pytorch_model-00001-of-00001.bin",
250
+ "model.layers.15.self_attn.k_proj.bias": "pytorch_model-00001-of-00001.bin",
251
+ "model.layers.15.self_attn.v_proj.weight": "pytorch_model-00001-of-00001.bin",
252
+ "model.layers.15.self_attn.v_proj.bias": "pytorch_model-00001-of-00001.bin",
253
+ "model.layers.15.self_attn.o_proj.weight": "pytorch_model-00001-of-00001.bin",
254
+ "model.layers.15.self_attn.o_proj.bias": "pytorch_model-00001-of-00001.bin",
255
+ "model.layers.15.input_layernorm.weight": "pytorch_model-00001-of-00001.bin",
256
+ "model.layers.15.input_layernorm.bias": "pytorch_model-00001-of-00001.bin",
257
+ "model.layers.15.post_attention_layernorm.weight": "pytorch_model-00001-of-00001.bin",
258
+ "model.layers.15.post_attention_layernorm.bias": "pytorch_model-00001-of-00001.bin",
259
+ "model.layers.15.mlp.up_proj.weight": "pytorch_model-00001-of-00001.bin",
260
+ "model.layers.15.mlp.up_proj.bias": "pytorch_model-00001-of-00001.bin",
261
+ "model.layers.15.mlp.down_proj.weight": "pytorch_model-00001-of-00001.bin",
262
+ "model.layers.15.mlp.down_proj.bias": "pytorch_model-00001-of-00001.bin",
263
+ "model.layers.16.self_attn.q_proj.weight": "pytorch_model-00001-of-00001.bin",
264
+ "model.layers.16.self_attn.q_proj.bias": "pytorch_model-00001-of-00001.bin",
265
+ "model.layers.16.self_attn.k_proj.weight": "pytorch_model-00001-of-00001.bin",
266
+ "model.layers.16.self_attn.k_proj.bias": "pytorch_model-00001-of-00001.bin",
267
+ "model.layers.16.self_attn.v_proj.weight": "pytorch_model-00001-of-00001.bin",
268
+ "model.layers.16.self_attn.v_proj.bias": "pytorch_model-00001-of-00001.bin",
269
+ "model.layers.16.self_attn.o_proj.weight": "pytorch_model-00001-of-00001.bin",
270
+ "model.layers.16.self_attn.o_proj.bias": "pytorch_model-00001-of-00001.bin",
271
+ "model.layers.16.input_layernorm.weight": "pytorch_model-00001-of-00001.bin",
272
+ "model.layers.16.input_layernorm.bias": "pytorch_model-00001-of-00001.bin",
273
+ "model.layers.16.post_attention_layernorm.weight": "pytorch_model-00001-of-00001.bin",
274
+ "model.layers.16.post_attention_layernorm.bias": "pytorch_model-00001-of-00001.bin",
275
+ "model.layers.16.mlp.up_proj.weight": "pytorch_model-00001-of-00001.bin",
276
+ "model.layers.16.mlp.up_proj.bias": "pytorch_model-00001-of-00001.bin",
277
+ "model.layers.16.mlp.down_proj.weight": "pytorch_model-00001-of-00001.bin",
278
+ "model.layers.16.mlp.down_proj.bias": "pytorch_model-00001-of-00001.bin",
279
+ "model.layers.17.self_attn.q_proj.weight": "pytorch_model-00001-of-00001.bin",
280
+ "model.layers.17.self_attn.q_proj.bias": "pytorch_model-00001-of-00001.bin",
281
+ "model.layers.17.self_attn.k_proj.weight": "pytorch_model-00001-of-00001.bin",
282
+ "model.layers.17.self_attn.k_proj.bias": "pytorch_model-00001-of-00001.bin",
283
+ "model.layers.17.self_attn.v_proj.weight": "pytorch_model-00001-of-00001.bin",
284
+ "model.layers.17.self_attn.v_proj.bias": "pytorch_model-00001-of-00001.bin",
285
+ "model.layers.17.self_attn.o_proj.weight": "pytorch_model-00001-of-00001.bin",
286
+ "model.layers.17.self_attn.o_proj.bias": "pytorch_model-00001-of-00001.bin",
287
+ "model.layers.17.input_layernorm.weight": "pytorch_model-00001-of-00001.bin",
288
+ "model.layers.17.input_layernorm.bias": "pytorch_model-00001-of-00001.bin",
289
+ "model.layers.17.post_attention_layernorm.weight": "pytorch_model-00001-of-00001.bin",
290
+ "model.layers.17.post_attention_layernorm.bias": "pytorch_model-00001-of-00001.bin",
291
+ "model.layers.17.mlp.up_proj.weight": "pytorch_model-00001-of-00001.bin",
292
+ "model.layers.17.mlp.up_proj.bias": "pytorch_model-00001-of-00001.bin",
293
+ "model.layers.17.mlp.down_proj.weight": "pytorch_model-00001-of-00001.bin",
294
+ "model.layers.17.mlp.down_proj.bias": "pytorch_model-00001-of-00001.bin",
295
+ "model.layers.18.self_attn.q_proj.weight": "pytorch_model-00001-of-00001.bin",
296
+ "model.layers.18.self_attn.q_proj.bias": "pytorch_model-00001-of-00001.bin",
297
+ "model.layers.18.self_attn.k_proj.weight": "pytorch_model-00001-of-00001.bin",
298
+ "model.layers.18.self_attn.k_proj.bias": "pytorch_model-00001-of-00001.bin",
299
+ "model.layers.18.self_attn.v_proj.weight": "pytorch_model-00001-of-00001.bin",
300
+ "model.layers.18.self_attn.v_proj.bias": "pytorch_model-00001-of-00001.bin",
301
+ "model.layers.18.self_attn.o_proj.weight": "pytorch_model-00001-of-00001.bin",
302
+ "model.layers.18.self_attn.o_proj.bias": "pytorch_model-00001-of-00001.bin",
303
+ "model.layers.18.input_layernorm.weight": "pytorch_model-00001-of-00001.bin",
304
+ "model.layers.18.input_layernorm.bias": "pytorch_model-00001-of-00001.bin",
305
+ "model.layers.18.post_attention_layernorm.weight": "pytorch_model-00001-of-00001.bin",
306
+ "model.layers.18.post_attention_layernorm.bias": "pytorch_model-00001-of-00001.bin",
307
+ "model.layers.18.mlp.up_proj.weight": "pytorch_model-00001-of-00001.bin",
308
+ "model.layers.18.mlp.up_proj.bias": "pytorch_model-00001-of-00001.bin",
309
+ "model.layers.18.mlp.down_proj.weight": "pytorch_model-00001-of-00001.bin",
310
+ "model.layers.18.mlp.down_proj.bias": "pytorch_model-00001-of-00001.bin",
311
+ "model.layers.19.self_attn.q_proj.weight": "pytorch_model-00001-of-00001.bin",
312
+ "model.layers.19.self_attn.q_proj.bias": "pytorch_model-00001-of-00001.bin",
313
+ "model.layers.19.self_attn.k_proj.weight": "pytorch_model-00001-of-00001.bin",
314
+ "model.layers.19.self_attn.k_proj.bias": "pytorch_model-00001-of-00001.bin",
315
+ "model.layers.19.self_attn.v_proj.weight": "pytorch_model-00001-of-00001.bin",
316
+ "model.layers.19.self_attn.v_proj.bias": "pytorch_model-00001-of-00001.bin",
317
+ "model.layers.19.self_attn.o_proj.weight": "pytorch_model-00001-of-00001.bin",
318
+ "model.layers.19.self_attn.o_proj.bias": "pytorch_model-00001-of-00001.bin",
319
+ "model.layers.19.input_layernorm.weight": "pytorch_model-00001-of-00001.bin",
320
+ "model.layers.19.input_layernorm.bias": "pytorch_model-00001-of-00001.bin",
321
+ "model.layers.19.post_attention_layernorm.weight": "pytorch_model-00001-of-00001.bin",
322
+ "model.layers.19.post_attention_layernorm.bias": "pytorch_model-00001-of-00001.bin",
323
+ "model.layers.19.mlp.up_proj.weight": "pytorch_model-00001-of-00001.bin",
324
+ "model.layers.19.mlp.up_proj.bias": "pytorch_model-00001-of-00001.bin",
325
+ "model.layers.19.mlp.down_proj.weight": "pytorch_model-00001-of-00001.bin",
326
+ "model.layers.19.mlp.down_proj.bias": "pytorch_model-00001-of-00001.bin",
327
+ "model.layers.20.self_attn.q_proj.weight": "pytorch_model-00001-of-00001.bin",
328
+ "model.layers.20.self_attn.q_proj.bias": "pytorch_model-00001-of-00001.bin",
329
+ "model.layers.20.self_attn.k_proj.weight": "pytorch_model-00001-of-00001.bin",
330
+ "model.layers.20.self_attn.k_proj.bias": "pytorch_model-00001-of-00001.bin",
331
+ "model.layers.20.self_attn.v_proj.weight": "pytorch_model-00001-of-00001.bin",
332
+ "model.layers.20.self_attn.v_proj.bias": "pytorch_model-00001-of-00001.bin",
333
+ "model.layers.20.self_attn.o_proj.weight": "pytorch_model-00001-of-00001.bin",
334
+ "model.layers.20.self_attn.o_proj.bias": "pytorch_model-00001-of-00001.bin",
335
+ "model.layers.20.input_layernorm.weight": "pytorch_model-00001-of-00001.bin",
336
+ "model.layers.20.input_layernorm.bias": "pytorch_model-00001-of-00001.bin",
337
+ "model.layers.20.post_attention_layernorm.weight": "pytorch_model-00001-of-00001.bin",
338
+ "model.layers.20.post_attention_layernorm.bias": "pytorch_model-00001-of-00001.bin",
339
+ "model.layers.20.mlp.up_proj.weight": "pytorch_model-00001-of-00001.bin",
340
+ "model.layers.20.mlp.up_proj.bias": "pytorch_model-00001-of-00001.bin",
341
+ "model.layers.20.mlp.down_proj.weight": "pytorch_model-00001-of-00001.bin",
342
+ "model.layers.20.mlp.down_proj.bias": "pytorch_model-00001-of-00001.bin",
343
+ "model.layers.21.self_attn.q_proj.weight": "pytorch_model-00001-of-00001.bin",
344
+ "model.layers.21.self_attn.q_proj.bias": "pytorch_model-00001-of-00001.bin",
345
+ "model.layers.21.self_attn.k_proj.weight": "pytorch_model-00001-of-00001.bin",
346
+ "model.layers.21.self_attn.k_proj.bias": "pytorch_model-00001-of-00001.bin",
347
+ "model.layers.21.self_attn.v_proj.weight": "pytorch_model-00001-of-00001.bin",
348
+ "model.layers.21.self_attn.v_proj.bias": "pytorch_model-00001-of-00001.bin",
349
+ "model.layers.21.self_attn.o_proj.weight": "pytorch_model-00001-of-00001.bin",
350
+ "model.layers.21.self_attn.o_proj.bias": "pytorch_model-00001-of-00001.bin",
351
+ "model.layers.21.input_layernorm.weight": "pytorch_model-00001-of-00001.bin",
352
+ "model.layers.21.input_layernorm.bias": "pytorch_model-00001-of-00001.bin",
353
+ "model.layers.21.post_attention_layernorm.weight": "pytorch_model-00001-of-00001.bin",
354
+ "model.layers.21.post_attention_layernorm.bias": "pytorch_model-00001-of-00001.bin",
355
+ "model.layers.21.mlp.up_proj.weight": "pytorch_model-00001-of-00001.bin",
356
+ "model.layers.21.mlp.up_proj.bias": "pytorch_model-00001-of-00001.bin",
357
+ "model.layers.21.mlp.down_proj.weight": "pytorch_model-00001-of-00001.bin",
358
+ "model.layers.21.mlp.down_proj.bias": "pytorch_model-00001-of-00001.bin",
359
+ "model.layers.22.self_attn.q_proj.weight": "pytorch_model-00001-of-00001.bin",
360
+ "model.layers.22.self_attn.q_proj.bias": "pytorch_model-00001-of-00001.bin",
361
+ "model.layers.22.self_attn.k_proj.weight": "pytorch_model-00001-of-00001.bin",
362
+ "model.layers.22.self_attn.k_proj.bias": "pytorch_model-00001-of-00001.bin",
363
+ "model.layers.22.self_attn.v_proj.weight": "pytorch_model-00001-of-00001.bin",
364
+ "model.layers.22.self_attn.v_proj.bias": "pytorch_model-00001-of-00001.bin",
365
+ "model.layers.22.self_attn.o_proj.weight": "pytorch_model-00001-of-00001.bin",
366
+ "model.layers.22.self_attn.o_proj.bias": "pytorch_model-00001-of-00001.bin",
367
+ "model.layers.22.input_layernorm.weight": "pytorch_model-00001-of-00001.bin",
368
+ "model.layers.22.input_layernorm.bias": "pytorch_model-00001-of-00001.bin",
369
+ "model.layers.22.post_attention_layernorm.weight": "pytorch_model-00001-of-00001.bin",
370
+ "model.layers.22.post_attention_layernorm.bias": "pytorch_model-00001-of-00001.bin",
371
+ "model.layers.22.mlp.up_proj.weight": "pytorch_model-00001-of-00001.bin",
372
+ "model.layers.22.mlp.up_proj.bias": "pytorch_model-00001-of-00001.bin",
373
+ "model.layers.22.mlp.down_proj.weight": "pytorch_model-00001-of-00001.bin",
374
+ "model.layers.22.mlp.down_proj.bias": "pytorch_model-00001-of-00001.bin",
375
+ "model.norm.weight": "pytorch_model-00001-of-00001.bin",
376
+ "model.norm.bias": "pytorch_model-00001-of-00001.bin",
377
+ "lm_head.weight": "pytorch_model-00001-of-00001.bin"
378
+ }
379
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "bos_token": "<|begin_of_text|>",
3
+ "eos_token": "<|end_of_text|>"
4
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,2061 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "<|reserved_special_token_2|>",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ },
43
+ "128005": {
44
+ "content": "<|reserved_special_token_3|>",
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": "<|reserved_special_token_4|>",
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": "<|reserved_special_token_5|>",
85
+ "lstrip": false,
86
+ "normalized": false,
87
+ "rstrip": false,
88
+ "single_word": false,
89
+ "special": true
90
+ },
91
+ "128011": {
92
+ "content": "<|reserved_special_token_6|>",
93
+ "lstrip": false,
94
+ "normalized": false,
95
+ "rstrip": false,
96
+ "single_word": false,
97
+ "special": true
98
+ },
99
+ "128012": {
100
+ "content": "<|reserved_special_token_7|>",
101
+ "lstrip": false,
102
+ "normalized": false,
103
+ "rstrip": false,
104
+ "single_word": false,
105
+ "special": true
106
+ },
107
+ "128013": {
108
+ "content": "<|reserved_special_token_8|>",
109
+ "lstrip": false,
110
+ "normalized": false,
111
+ "rstrip": false,
112
+ "single_word": false,
113
+ "special": true
114
+ },
115
+ "128014": {
116
+ "content": "<|reserved_special_token_9|>",
117
+ "lstrip": false,
118
+ "normalized": false,
119
+ "rstrip": false,
120
+ "single_word": false,
121
+ "special": true
122
+ },
123
+ "128015": {
124
+ "content": "<|reserved_special_token_10|>",
125
+ "lstrip": false,
126
+ "normalized": false,
127
+ "rstrip": false,
128
+ "single_word": false,
129
+ "special": true
130
+ },
131
+ "128016": {
132
+ "content": "<|reserved_special_token_11|>",
133
+ "lstrip": false,
134
+ "normalized": false,
135
+ "rstrip": false,
136
+ "single_word": false,
137
+ "special": true
138
+ },
139
+ "128017": {
140
+ "content": "<|reserved_special_token_12|>",
141
+ "lstrip": false,
142
+ "normalized": false,
143
+ "rstrip": false,
144
+ "single_word": false,
145
+ "special": true
146
+ },
147
+ "128018": {
148
+ "content": "<|reserved_special_token_13|>",
149
+ "lstrip": false,
150
+ "normalized": false,
151
+ "rstrip": false,
152
+ "single_word": false,
153
+ "special": true
154
+ },
155
+ "128019": {
156
+ "content": "<|reserved_special_token_14|>",
157
+ "lstrip": false,
158
+ "normalized": false,
159
+ "rstrip": false,
160
+ "single_word": false,
161
+ "special": true
162
+ },
163
+ "128020": {
164
+ "content": "<|reserved_special_token_15|>",
165
+ "lstrip": false,
166
+ "normalized": false,
167
+ "rstrip": false,
168
+ "single_word": false,
169
+ "special": true
170
+ },
171
+ "128021": {
172
+ "content": "<|reserved_special_token_16|>",
173
+ "lstrip": false,
174
+ "normalized": false,
175
+ "rstrip": false,
176
+ "single_word": false,
177
+ "special": true
178
+ },
179
+ "128022": {
180
+ "content": "<|reserved_special_token_17|>",
181
+ "lstrip": false,
182
+ "normalized": false,
183
+ "rstrip": false,
184
+ "single_word": false,
185
+ "special": true
186
+ },
187
+ "128023": {
188
+ "content": "<|reserved_special_token_18|>",
189
+ "lstrip": false,
190
+ "normalized": false,
191
+ "rstrip": false,
192
+ "single_word": false,
193
+ "special": true
194
+ },
195
+ "128024": {
196
+ "content": "<|reserved_special_token_19|>",
197
+ "lstrip": false,
198
+ "normalized": false,
199
+ "rstrip": false,
200
+ "single_word": false,
201
+ "special": true
202
+ },
203
+ "128025": {
204
+ "content": "<|reserved_special_token_20|>",
205
+ "lstrip": false,
206
+ "normalized": false,
207
+ "rstrip": false,
208
+ "single_word": false,
209
+ "special": true
210
+ },
211
+ "128026": {
212
+ "content": "<|reserved_special_token_21|>",
213
+ "lstrip": false,
214
+ "normalized": false,
215
+ "rstrip": false,
216
+ "single_word": false,
217
+ "special": true
218
+ },
219
+ "128027": {
220
+ "content": "<|reserved_special_token_22|>",
221
+ "lstrip": false,
222
+ "normalized": false,
223
+ "rstrip": false,
224
+ "single_word": false,
225
+ "special": true
226
+ },
227
+ "128028": {
228
+ "content": "<|reserved_special_token_23|>",
229
+ "lstrip": false,
230
+ "normalized": false,
231
+ "rstrip": false,
232
+ "single_word": false,
233
+ "special": true
234
+ },
235
+ "128029": {
236
+ "content": "<|reserved_special_token_24|>",
237
+ "lstrip": false,
238
+ "normalized": false,
239
+ "rstrip": false,
240
+ "single_word": false,
241
+ "special": true
242
+ },
243
+ "128030": {
244
+ "content": "<|reserved_special_token_25|>",
245
+ "lstrip": false,
246
+ "normalized": false,
247
+ "rstrip": false,
248
+ "single_word": false,
249
+ "special": true
250
+ },
251
+ "128031": {
252
+ "content": "<|reserved_special_token_26|>",
253
+ "lstrip": false,
254
+ "normalized": false,
255
+ "rstrip": false,
256
+ "single_word": false,
257
+ "special": true
258
+ },
259
+ "128032": {
260
+ "content": "<|reserved_special_token_27|>",
261
+ "lstrip": false,
262
+ "normalized": false,
263
+ "rstrip": false,
264
+ "single_word": false,
265
+ "special": true
266
+ },
267
+ "128033": {
268
+ "content": "<|reserved_special_token_28|>",
269
+ "lstrip": false,
270
+ "normalized": false,
271
+ "rstrip": false,
272
+ "single_word": false,
273
+ "special": true
274
+ },
275
+ "128034": {
276
+ "content": "<|reserved_special_token_29|>",
277
+ "lstrip": false,
278
+ "normalized": false,
279
+ "rstrip": false,
280
+ "single_word": false,
281
+ "special": true
282
+ },
283
+ "128035": {
284
+ "content": "<|reserved_special_token_30|>",
285
+ "lstrip": false,
286
+ "normalized": false,
287
+ "rstrip": false,
288
+ "single_word": false,
289
+ "special": true
290
+ },
291
+ "128036": {
292
+ "content": "<|reserved_special_token_31|>",
293
+ "lstrip": false,
294
+ "normalized": false,
295
+ "rstrip": false,
296
+ "single_word": false,
297
+ "special": true
298
+ },
299
+ "128037": {
300
+ "content": "<|reserved_special_token_32|>",
301
+ "lstrip": false,
302
+ "normalized": false,
303
+ "rstrip": false,
304
+ "single_word": false,
305
+ "special": true
306
+ },
307
+ "128038": {
308
+ "content": "<|reserved_special_token_33|>",
309
+ "lstrip": false,
310
+ "normalized": false,
311
+ "rstrip": false,
312
+ "single_word": false,
313
+ "special": true
314
+ },
315
+ "128039": {
316
+ "content": "<|reserved_special_token_34|>",
317
+ "lstrip": false,
318
+ "normalized": false,
319
+ "rstrip": false,
320
+ "single_word": false,
321
+ "special": true
322
+ },
323
+ "128040": {
324
+ "content": "<|reserved_special_token_35|>",
325
+ "lstrip": false,
326
+ "normalized": false,
327
+ "rstrip": false,
328
+ "single_word": false,
329
+ "special": true
330
+ },
331
+ "128041": {
332
+ "content": "<|reserved_special_token_36|>",
333
+ "lstrip": false,
334
+ "normalized": false,
335
+ "rstrip": false,
336
+ "single_word": false,
337
+ "special": true
338
+ },
339
+ "128042": {
340
+ "content": "<|reserved_special_token_37|>",
341
+ "lstrip": false,
342
+ "normalized": false,
343
+ "rstrip": false,
344
+ "single_word": false,
345
+ "special": true
346
+ },
347
+ "128043": {
348
+ "content": "<|reserved_special_token_38|>",
349
+ "lstrip": false,
350
+ "normalized": false,
351
+ "rstrip": false,
352
+ "single_word": false,
353
+ "special": true
354
+ },
355
+ "128044": {
356
+ "content": "<|reserved_special_token_39|>",
357
+ "lstrip": false,
358
+ "normalized": false,
359
+ "rstrip": false,
360
+ "single_word": false,
361
+ "special": true
362
+ },
363
+ "128045": {
364
+ "content": "<|reserved_special_token_40|>",
365
+ "lstrip": false,
366
+ "normalized": false,
367
+ "rstrip": false,
368
+ "single_word": false,
369
+ "special": true
370
+ },
371
+ "128046": {
372
+ "content": "<|reserved_special_token_41|>",
373
+ "lstrip": false,
374
+ "normalized": false,
375
+ "rstrip": false,
376
+ "single_word": false,
377
+ "special": true
378
+ },
379
+ "128047": {
380
+ "content": "<|reserved_special_token_42|>",
381
+ "lstrip": false,
382
+ "normalized": false,
383
+ "rstrip": false,
384
+ "single_word": false,
385
+ "special": true
386
+ },
387
+ "128048": {
388
+ "content": "<|reserved_special_token_43|>",
389
+ "lstrip": false,
390
+ "normalized": false,
391
+ "rstrip": false,
392
+ "single_word": false,
393
+ "special": true
394
+ },
395
+ "128049": {
396
+ "content": "<|reserved_special_token_44|>",
397
+ "lstrip": false,
398
+ "normalized": false,
399
+ "rstrip": false,
400
+ "single_word": false,
401
+ "special": true
402
+ },
403
+ "128050": {
404
+ "content": "<|reserved_special_token_45|>",
405
+ "lstrip": false,
406
+ "normalized": false,
407
+ "rstrip": false,
408
+ "single_word": false,
409
+ "special": true
410
+ },
411
+ "128051": {
412
+ "content": "<|reserved_special_token_46|>",
413
+ "lstrip": false,
414
+ "normalized": false,
415
+ "rstrip": false,
416
+ "single_word": false,
417
+ "special": true
418
+ },
419
+ "128052": {
420
+ "content": "<|reserved_special_token_47|>",
421
+ "lstrip": false,
422
+ "normalized": false,
423
+ "rstrip": false,
424
+ "single_word": false,
425
+ "special": true
426
+ },
427
+ "128053": {
428
+ "content": "<|reserved_special_token_48|>",
429
+ "lstrip": false,
430
+ "normalized": false,
431
+ "rstrip": false,
432
+ "single_word": false,
433
+ "special": true
434
+ },
435
+ "128054": {
436
+ "content": "<|reserved_special_token_49|>",
437
+ "lstrip": false,
438
+ "normalized": false,
439
+ "rstrip": false,
440
+ "single_word": false,
441
+ "special": true
442
+ },
443
+ "128055": {
444
+ "content": "<|reserved_special_token_50|>",
445
+ "lstrip": false,
446
+ "normalized": false,
447
+ "rstrip": false,
448
+ "single_word": false,
449
+ "special": true
450
+ },
451
+ "128056": {
452
+ "content": "<|reserved_special_token_51|>",
453
+ "lstrip": false,
454
+ "normalized": false,
455
+ "rstrip": false,
456
+ "single_word": false,
457
+ "special": true
458
+ },
459
+ "128057": {
460
+ "content": "<|reserved_special_token_52|>",
461
+ "lstrip": false,
462
+ "normalized": false,
463
+ "rstrip": false,
464
+ "single_word": false,
465
+ "special": true
466
+ },
467
+ "128058": {
468
+ "content": "<|reserved_special_token_53|>",
469
+ "lstrip": false,
470
+ "normalized": false,
471
+ "rstrip": false,
472
+ "single_word": false,
473
+ "special": true
474
+ },
475
+ "128059": {
476
+ "content": "<|reserved_special_token_54|>",
477
+ "lstrip": false,
478
+ "normalized": false,
479
+ "rstrip": false,
480
+ "single_word": false,
481
+ "special": true
482
+ },
483
+ "128060": {
484
+ "content": "<|reserved_special_token_55|>",
485
+ "lstrip": false,
486
+ "normalized": false,
487
+ "rstrip": false,
488
+ "single_word": false,
489
+ "special": true
490
+ },
491
+ "128061": {
492
+ "content": "<|reserved_special_token_56|>",
493
+ "lstrip": false,
494
+ "normalized": false,
495
+ "rstrip": false,
496
+ "single_word": false,
497
+ "special": true
498
+ },
499
+ "128062": {
500
+ "content": "<|reserved_special_token_57|>",
501
+ "lstrip": false,
502
+ "normalized": false,
503
+ "rstrip": false,
504
+ "single_word": false,
505
+ "special": true
506
+ },
507
+ "128063": {
508
+ "content": "<|reserved_special_token_58|>",
509
+ "lstrip": false,
510
+ "normalized": false,
511
+ "rstrip": false,
512
+ "single_word": false,
513
+ "special": true
514
+ },
515
+ "128064": {
516
+ "content": "<|reserved_special_token_59|>",
517
+ "lstrip": false,
518
+ "normalized": false,
519
+ "rstrip": false,
520
+ "single_word": false,
521
+ "special": true
522
+ },
523
+ "128065": {
524
+ "content": "<|reserved_special_token_60|>",
525
+ "lstrip": false,
526
+ "normalized": false,
527
+ "rstrip": false,
528
+ "single_word": false,
529
+ "special": true
530
+ },
531
+ "128066": {
532
+ "content": "<|reserved_special_token_61|>",
533
+ "lstrip": false,
534
+ "normalized": false,
535
+ "rstrip": false,
536
+ "single_word": false,
537
+ "special": true
538
+ },
539
+ "128067": {
540
+ "content": "<|reserved_special_token_62|>",
541
+ "lstrip": false,
542
+ "normalized": false,
543
+ "rstrip": false,
544
+ "single_word": false,
545
+ "special": true
546
+ },
547
+ "128068": {
548
+ "content": "<|reserved_special_token_63|>",
549
+ "lstrip": false,
550
+ "normalized": false,
551
+ "rstrip": false,
552
+ "single_word": false,
553
+ "special": true
554
+ },
555
+ "128069": {
556
+ "content": "<|reserved_special_token_64|>",
557
+ "lstrip": false,
558
+ "normalized": false,
559
+ "rstrip": false,
560
+ "single_word": false,
561
+ "special": true
562
+ },
563
+ "128070": {
564
+ "content": "<|reserved_special_token_65|>",
565
+ "lstrip": false,
566
+ "normalized": false,
567
+ "rstrip": false,
568
+ "single_word": false,
569
+ "special": true
570
+ },
571
+ "128071": {
572
+ "content": "<|reserved_special_token_66|>",
573
+ "lstrip": false,
574
+ "normalized": false,
575
+ "rstrip": false,
576
+ "single_word": false,
577
+ "special": true
578
+ },
579
+ "128072": {
580
+ "content": "<|reserved_special_token_67|>",
581
+ "lstrip": false,
582
+ "normalized": false,
583
+ "rstrip": false,
584
+ "single_word": false,
585
+ "special": true
586
+ },
587
+ "128073": {
588
+ "content": "<|reserved_special_token_68|>",
589
+ "lstrip": false,
590
+ "normalized": false,
591
+ "rstrip": false,
592
+ "single_word": false,
593
+ "special": true
594
+ },
595
+ "128074": {
596
+ "content": "<|reserved_special_token_69|>",
597
+ "lstrip": false,
598
+ "normalized": false,
599
+ "rstrip": false,
600
+ "single_word": false,
601
+ "special": true
602
+ },
603
+ "128075": {
604
+ "content": "<|reserved_special_token_70|>",
605
+ "lstrip": false,
606
+ "normalized": false,
607
+ "rstrip": false,
608
+ "single_word": false,
609
+ "special": true
610
+ },
611
+ "128076": {
612
+ "content": "<|reserved_special_token_71|>",
613
+ "lstrip": false,
614
+ "normalized": false,
615
+ "rstrip": false,
616
+ "single_word": false,
617
+ "special": true
618
+ },
619
+ "128077": {
620
+ "content": "<|reserved_special_token_72|>",
621
+ "lstrip": false,
622
+ "normalized": false,
623
+ "rstrip": false,
624
+ "single_word": false,
625
+ "special": true
626
+ },
627
+ "128078": {
628
+ "content": "<|reserved_special_token_73|>",
629
+ "lstrip": false,
630
+ "normalized": false,
631
+ "rstrip": false,
632
+ "single_word": false,
633
+ "special": true
634
+ },
635
+ "128079": {
636
+ "content": "<|reserved_special_token_74|>",
637
+ "lstrip": false,
638
+ "normalized": false,
639
+ "rstrip": false,
640
+ "single_word": false,
641
+ "special": true
642
+ },
643
+ "128080": {
644
+ "content": "<|reserved_special_token_75|>",
645
+ "lstrip": false,
646
+ "normalized": false,
647
+ "rstrip": false,
648
+ "single_word": false,
649
+ "special": true
650
+ },
651
+ "128081": {
652
+ "content": "<|reserved_special_token_76|>",
653
+ "lstrip": false,
654
+ "normalized": false,
655
+ "rstrip": false,
656
+ "single_word": false,
657
+ "special": true
658
+ },
659
+ "128082": {
660
+ "content": "<|reserved_special_token_77|>",
661
+ "lstrip": false,
662
+ "normalized": false,
663
+ "rstrip": false,
664
+ "single_word": false,
665
+ "special": true
666
+ },
667
+ "128083": {
668
+ "content": "<|reserved_special_token_78|>",
669
+ "lstrip": false,
670
+ "normalized": false,
671
+ "rstrip": false,
672
+ "single_word": false,
673
+ "special": true
674
+ },
675
+ "128084": {
676
+ "content": "<|reserved_special_token_79|>",
677
+ "lstrip": false,
678
+ "normalized": false,
679
+ "rstrip": false,
680
+ "single_word": false,
681
+ "special": true
682
+ },
683
+ "128085": {
684
+ "content": "<|reserved_special_token_80|>",
685
+ "lstrip": false,
686
+ "normalized": false,
687
+ "rstrip": false,
688
+ "single_word": false,
689
+ "special": true
690
+ },
691
+ "128086": {
692
+ "content": "<|reserved_special_token_81|>",
693
+ "lstrip": false,
694
+ "normalized": false,
695
+ "rstrip": false,
696
+ "single_word": false,
697
+ "special": true
698
+ },
699
+ "128087": {
700
+ "content": "<|reserved_special_token_82|>",
701
+ "lstrip": false,
702
+ "normalized": false,
703
+ "rstrip": false,
704
+ "single_word": false,
705
+ "special": true
706
+ },
707
+ "128088": {
708
+ "content": "<|reserved_special_token_83|>",
709
+ "lstrip": false,
710
+ "normalized": false,
711
+ "rstrip": false,
712
+ "single_word": false,
713
+ "special": true
714
+ },
715
+ "128089": {
716
+ "content": "<|reserved_special_token_84|>",
717
+ "lstrip": false,
718
+ "normalized": false,
719
+ "rstrip": false,
720
+ "single_word": false,
721
+ "special": true
722
+ },
723
+ "128090": {
724
+ "content": "<|reserved_special_token_85|>",
725
+ "lstrip": false,
726
+ "normalized": false,
727
+ "rstrip": false,
728
+ "single_word": false,
729
+ "special": true
730
+ },
731
+ "128091": {
732
+ "content": "<|reserved_special_token_86|>",
733
+ "lstrip": false,
734
+ "normalized": false,
735
+ "rstrip": false,
736
+ "single_word": false,
737
+ "special": true
738
+ },
739
+ "128092": {
740
+ "content": "<|reserved_special_token_87|>",
741
+ "lstrip": false,
742
+ "normalized": false,
743
+ "rstrip": false,
744
+ "single_word": false,
745
+ "special": true
746
+ },
747
+ "128093": {
748
+ "content": "<|reserved_special_token_88|>",
749
+ "lstrip": false,
750
+ "normalized": false,
751
+ "rstrip": false,
752
+ "single_word": false,
753
+ "special": true
754
+ },
755
+ "128094": {
756
+ "content": "<|reserved_special_token_89|>",
757
+ "lstrip": false,
758
+ "normalized": false,
759
+ "rstrip": false,
760
+ "single_word": false,
761
+ "special": true
762
+ },
763
+ "128095": {
764
+ "content": "<|reserved_special_token_90|>",
765
+ "lstrip": false,
766
+ "normalized": false,
767
+ "rstrip": false,
768
+ "single_word": false,
769
+ "special": true
770
+ },
771
+ "128096": {
772
+ "content": "<|reserved_special_token_91|>",
773
+ "lstrip": false,
774
+ "normalized": false,
775
+ "rstrip": false,
776
+ "single_word": false,
777
+ "special": true
778
+ },
779
+ "128097": {
780
+ "content": "<|reserved_special_token_92|>",
781
+ "lstrip": false,
782
+ "normalized": false,
783
+ "rstrip": false,
784
+ "single_word": false,
785
+ "special": true
786
+ },
787
+ "128098": {
788
+ "content": "<|reserved_special_token_93|>",
789
+ "lstrip": false,
790
+ "normalized": false,
791
+ "rstrip": false,
792
+ "single_word": false,
793
+ "special": true
794
+ },
795
+ "128099": {
796
+ "content": "<|reserved_special_token_94|>",
797
+ "lstrip": false,
798
+ "normalized": false,
799
+ "rstrip": false,
800
+ "single_word": false,
801
+ "special": true
802
+ },
803
+ "128100": {
804
+ "content": "<|reserved_special_token_95|>",
805
+ "lstrip": false,
806
+ "normalized": false,
807
+ "rstrip": false,
808
+ "single_word": false,
809
+ "special": true
810
+ },
811
+ "128101": {
812
+ "content": "<|reserved_special_token_96|>",
813
+ "lstrip": false,
814
+ "normalized": false,
815
+ "rstrip": false,
816
+ "single_word": false,
817
+ "special": true
818
+ },
819
+ "128102": {
820
+ "content": "<|reserved_special_token_97|>",
821
+ "lstrip": false,
822
+ "normalized": false,
823
+ "rstrip": false,
824
+ "single_word": false,
825
+ "special": true
826
+ },
827
+ "128103": {
828
+ "content": "<|reserved_special_token_98|>",
829
+ "lstrip": false,
830
+ "normalized": false,
831
+ "rstrip": false,
832
+ "single_word": false,
833
+ "special": true
834
+ },
835
+ "128104": {
836
+ "content": "<|reserved_special_token_99|>",
837
+ "lstrip": false,
838
+ "normalized": false,
839
+ "rstrip": false,
840
+ "single_word": false,
841
+ "special": true
842
+ },
843
+ "128105": {
844
+ "content": "<|reserved_special_token_100|>",
845
+ "lstrip": false,
846
+ "normalized": false,
847
+ "rstrip": false,
848
+ "single_word": false,
849
+ "special": true
850
+ },
851
+ "128106": {
852
+ "content": "<|reserved_special_token_101|>",
853
+ "lstrip": false,
854
+ "normalized": false,
855
+ "rstrip": false,
856
+ "single_word": false,
857
+ "special": true
858
+ },
859
+ "128107": {
860
+ "content": "<|reserved_special_token_102|>",
861
+ "lstrip": false,
862
+ "normalized": false,
863
+ "rstrip": false,
864
+ "single_word": false,
865
+ "special": true
866
+ },
867
+ "128108": {
868
+ "content": "<|reserved_special_token_103|>",
869
+ "lstrip": false,
870
+ "normalized": false,
871
+ "rstrip": false,
872
+ "single_word": false,
873
+ "special": true
874
+ },
875
+ "128109": {
876
+ "content": "<|reserved_special_token_104|>",
877
+ "lstrip": false,
878
+ "normalized": false,
879
+ "rstrip": false,
880
+ "single_word": false,
881
+ "special": true
882
+ },
883
+ "128110": {
884
+ "content": "<|reserved_special_token_105|>",
885
+ "lstrip": false,
886
+ "normalized": false,
887
+ "rstrip": false,
888
+ "single_word": false,
889
+ "special": true
890
+ },
891
+ "128111": {
892
+ "content": "<|reserved_special_token_106|>",
893
+ "lstrip": false,
894
+ "normalized": false,
895
+ "rstrip": false,
896
+ "single_word": false,
897
+ "special": true
898
+ },
899
+ "128112": {
900
+ "content": "<|reserved_special_token_107|>",
901
+ "lstrip": false,
902
+ "normalized": false,
903
+ "rstrip": false,
904
+ "single_word": false,
905
+ "special": true
906
+ },
907
+ "128113": {
908
+ "content": "<|reserved_special_token_108|>",
909
+ "lstrip": false,
910
+ "normalized": false,
911
+ "rstrip": false,
912
+ "single_word": false,
913
+ "special": true
914
+ },
915
+ "128114": {
916
+ "content": "<|reserved_special_token_109|>",
917
+ "lstrip": false,
918
+ "normalized": false,
919
+ "rstrip": false,
920
+ "single_word": false,
921
+ "special": true
922
+ },
923
+ "128115": {
924
+ "content": "<|reserved_special_token_110|>",
925
+ "lstrip": false,
926
+ "normalized": false,
927
+ "rstrip": false,
928
+ "single_word": false,
929
+ "special": true
930
+ },
931
+ "128116": {
932
+ "content": "<|reserved_special_token_111|>",
933
+ "lstrip": false,
934
+ "normalized": false,
935
+ "rstrip": false,
936
+ "single_word": false,
937
+ "special": true
938
+ },
939
+ "128117": {
940
+ "content": "<|reserved_special_token_112|>",
941
+ "lstrip": false,
942
+ "normalized": false,
943
+ "rstrip": false,
944
+ "single_word": false,
945
+ "special": true
946
+ },
947
+ "128118": {
948
+ "content": "<|reserved_special_token_113|>",
949
+ "lstrip": false,
950
+ "normalized": false,
951
+ "rstrip": false,
952
+ "single_word": false,
953
+ "special": true
954
+ },
955
+ "128119": {
956
+ "content": "<|reserved_special_token_114|>",
957
+ "lstrip": false,
958
+ "normalized": false,
959
+ "rstrip": false,
960
+ "single_word": false,
961
+ "special": true
962
+ },
963
+ "128120": {
964
+ "content": "<|reserved_special_token_115|>",
965
+ "lstrip": false,
966
+ "normalized": false,
967
+ "rstrip": false,
968
+ "single_word": false,
969
+ "special": true
970
+ },
971
+ "128121": {
972
+ "content": "<|reserved_special_token_116|>",
973
+ "lstrip": false,
974
+ "normalized": false,
975
+ "rstrip": false,
976
+ "single_word": false,
977
+ "special": true
978
+ },
979
+ "128122": {
980
+ "content": "<|reserved_special_token_117|>",
981
+ "lstrip": false,
982
+ "normalized": false,
983
+ "rstrip": false,
984
+ "single_word": false,
985
+ "special": true
986
+ },
987
+ "128123": {
988
+ "content": "<|reserved_special_token_118|>",
989
+ "lstrip": false,
990
+ "normalized": false,
991
+ "rstrip": false,
992
+ "single_word": false,
993
+ "special": true
994
+ },
995
+ "128124": {
996
+ "content": "<|reserved_special_token_119|>",
997
+ "lstrip": false,
998
+ "normalized": false,
999
+ "rstrip": false,
1000
+ "single_word": false,
1001
+ "special": true
1002
+ },
1003
+ "128125": {
1004
+ "content": "<|reserved_special_token_120|>",
1005
+ "lstrip": false,
1006
+ "normalized": false,
1007
+ "rstrip": false,
1008
+ "single_word": false,
1009
+ "special": true
1010
+ },
1011
+ "128126": {
1012
+ "content": "<|reserved_special_token_121|>",
1013
+ "lstrip": false,
1014
+ "normalized": false,
1015
+ "rstrip": false,
1016
+ "single_word": false,
1017
+ "special": true
1018
+ },
1019
+ "128127": {
1020
+ "content": "<|reserved_special_token_122|>",
1021
+ "lstrip": false,
1022
+ "normalized": false,
1023
+ "rstrip": false,
1024
+ "single_word": false,
1025
+ "special": true
1026
+ },
1027
+ "128128": {
1028
+ "content": "<|reserved_special_token_123|>",
1029
+ "lstrip": false,
1030
+ "normalized": false,
1031
+ "rstrip": false,
1032
+ "single_word": false,
1033
+ "special": true
1034
+ },
1035
+ "128129": {
1036
+ "content": "<|reserved_special_token_124|>",
1037
+ "lstrip": false,
1038
+ "normalized": false,
1039
+ "rstrip": false,
1040
+ "single_word": false,
1041
+ "special": true
1042
+ },
1043
+ "128130": {
1044
+ "content": "<|reserved_special_token_125|>",
1045
+ "lstrip": false,
1046
+ "normalized": false,
1047
+ "rstrip": false,
1048
+ "single_word": false,
1049
+ "special": true
1050
+ },
1051
+ "128131": {
1052
+ "content": "<|reserved_special_token_126|>",
1053
+ "lstrip": false,
1054
+ "normalized": false,
1055
+ "rstrip": false,
1056
+ "single_word": false,
1057
+ "special": true
1058
+ },
1059
+ "128132": {
1060
+ "content": "<|reserved_special_token_127|>",
1061
+ "lstrip": false,
1062
+ "normalized": false,
1063
+ "rstrip": false,
1064
+ "single_word": false,
1065
+ "special": true
1066
+ },
1067
+ "128133": {
1068
+ "content": "<|reserved_special_token_128|>",
1069
+ "lstrip": false,
1070
+ "normalized": false,
1071
+ "rstrip": false,
1072
+ "single_word": false,
1073
+ "special": true
1074
+ },
1075
+ "128134": {
1076
+ "content": "<|reserved_special_token_129|>",
1077
+ "lstrip": false,
1078
+ "normalized": false,
1079
+ "rstrip": false,
1080
+ "single_word": false,
1081
+ "special": true
1082
+ },
1083
+ "128135": {
1084
+ "content": "<|reserved_special_token_130|>",
1085
+ "lstrip": false,
1086
+ "normalized": false,
1087
+ "rstrip": false,
1088
+ "single_word": false,
1089
+ "special": true
1090
+ },
1091
+ "128136": {
1092
+ "content": "<|reserved_special_token_131|>",
1093
+ "lstrip": false,
1094
+ "normalized": false,
1095
+ "rstrip": false,
1096
+ "single_word": false,
1097
+ "special": true
1098
+ },
1099
+ "128137": {
1100
+ "content": "<|reserved_special_token_132|>",
1101
+ "lstrip": false,
1102
+ "normalized": false,
1103
+ "rstrip": false,
1104
+ "single_word": false,
1105
+ "special": true
1106
+ },
1107
+ "128138": {
1108
+ "content": "<|reserved_special_token_133|>",
1109
+ "lstrip": false,
1110
+ "normalized": false,
1111
+ "rstrip": false,
1112
+ "single_word": false,
1113
+ "special": true
1114
+ },
1115
+ "128139": {
1116
+ "content": "<|reserved_special_token_134|>",
1117
+ "lstrip": false,
1118
+ "normalized": false,
1119
+ "rstrip": false,
1120
+ "single_word": false,
1121
+ "special": true
1122
+ },
1123
+ "128140": {
1124
+ "content": "<|reserved_special_token_135|>",
1125
+ "lstrip": false,
1126
+ "normalized": false,
1127
+ "rstrip": false,
1128
+ "single_word": false,
1129
+ "special": true
1130
+ },
1131
+ "128141": {
1132
+ "content": "<|reserved_special_token_136|>",
1133
+ "lstrip": false,
1134
+ "normalized": false,
1135
+ "rstrip": false,
1136
+ "single_word": false,
1137
+ "special": true
1138
+ },
1139
+ "128142": {
1140
+ "content": "<|reserved_special_token_137|>",
1141
+ "lstrip": false,
1142
+ "normalized": false,
1143
+ "rstrip": false,
1144
+ "single_word": false,
1145
+ "special": true
1146
+ },
1147
+ "128143": {
1148
+ "content": "<|reserved_special_token_138|>",
1149
+ "lstrip": false,
1150
+ "normalized": false,
1151
+ "rstrip": false,
1152
+ "single_word": false,
1153
+ "special": true
1154
+ },
1155
+ "128144": {
1156
+ "content": "<|reserved_special_token_139|>",
1157
+ "lstrip": false,
1158
+ "normalized": false,
1159
+ "rstrip": false,
1160
+ "single_word": false,
1161
+ "special": true
1162
+ },
1163
+ "128145": {
1164
+ "content": "<|reserved_special_token_140|>",
1165
+ "lstrip": false,
1166
+ "normalized": false,
1167
+ "rstrip": false,
1168
+ "single_word": false,
1169
+ "special": true
1170
+ },
1171
+ "128146": {
1172
+ "content": "<|reserved_special_token_141|>",
1173
+ "lstrip": false,
1174
+ "normalized": false,
1175
+ "rstrip": false,
1176
+ "single_word": false,
1177
+ "special": true
1178
+ },
1179
+ "128147": {
1180
+ "content": "<|reserved_special_token_142|>",
1181
+ "lstrip": false,
1182
+ "normalized": false,
1183
+ "rstrip": false,
1184
+ "single_word": false,
1185
+ "special": true
1186
+ },
1187
+ "128148": {
1188
+ "content": "<|reserved_special_token_143|>",
1189
+ "lstrip": false,
1190
+ "normalized": false,
1191
+ "rstrip": false,
1192
+ "single_word": false,
1193
+ "special": true
1194
+ },
1195
+ "128149": {
1196
+ "content": "<|reserved_special_token_144|>",
1197
+ "lstrip": false,
1198
+ "normalized": false,
1199
+ "rstrip": false,
1200
+ "single_word": false,
1201
+ "special": true
1202
+ },
1203
+ "128150": {
1204
+ "content": "<|reserved_special_token_145|>",
1205
+ "lstrip": false,
1206
+ "normalized": false,
1207
+ "rstrip": false,
1208
+ "single_word": false,
1209
+ "special": true
1210
+ },
1211
+ "128151": {
1212
+ "content": "<|reserved_special_token_146|>",
1213
+ "lstrip": false,
1214
+ "normalized": false,
1215
+ "rstrip": false,
1216
+ "single_word": false,
1217
+ "special": true
1218
+ },
1219
+ "128152": {
1220
+ "content": "<|reserved_special_token_147|>",
1221
+ "lstrip": false,
1222
+ "normalized": false,
1223
+ "rstrip": false,
1224
+ "single_word": false,
1225
+ "special": true
1226
+ },
1227
+ "128153": {
1228
+ "content": "<|reserved_special_token_148|>",
1229
+ "lstrip": false,
1230
+ "normalized": false,
1231
+ "rstrip": false,
1232
+ "single_word": false,
1233
+ "special": true
1234
+ },
1235
+ "128154": {
1236
+ "content": "<|reserved_special_token_149|>",
1237
+ "lstrip": false,
1238
+ "normalized": false,
1239
+ "rstrip": false,
1240
+ "single_word": false,
1241
+ "special": true
1242
+ },
1243
+ "128155": {
1244
+ "content": "<|reserved_special_token_150|>",
1245
+ "lstrip": false,
1246
+ "normalized": false,
1247
+ "rstrip": false,
1248
+ "single_word": false,
1249
+ "special": true
1250
+ },
1251
+ "128156": {
1252
+ "content": "<|reserved_special_token_151|>",
1253
+ "lstrip": false,
1254
+ "normalized": false,
1255
+ "rstrip": false,
1256
+ "single_word": false,
1257
+ "special": true
1258
+ },
1259
+ "128157": {
1260
+ "content": "<|reserved_special_token_152|>",
1261
+ "lstrip": false,
1262
+ "normalized": false,
1263
+ "rstrip": false,
1264
+ "single_word": false,
1265
+ "special": true
1266
+ },
1267
+ "128158": {
1268
+ "content": "<|reserved_special_token_153|>",
1269
+ "lstrip": false,
1270
+ "normalized": false,
1271
+ "rstrip": false,
1272
+ "single_word": false,
1273
+ "special": true
1274
+ },
1275
+ "128159": {
1276
+ "content": "<|reserved_special_token_154|>",
1277
+ "lstrip": false,
1278
+ "normalized": false,
1279
+ "rstrip": false,
1280
+ "single_word": false,
1281
+ "special": true
1282
+ },
1283
+ "128160": {
1284
+ "content": "<|reserved_special_token_155|>",
1285
+ "lstrip": false,
1286
+ "normalized": false,
1287
+ "rstrip": false,
1288
+ "single_word": false,
1289
+ "special": true
1290
+ },
1291
+ "128161": {
1292
+ "content": "<|reserved_special_token_156|>",
1293
+ "lstrip": false,
1294
+ "normalized": false,
1295
+ "rstrip": false,
1296
+ "single_word": false,
1297
+ "special": true
1298
+ },
1299
+ "128162": {
1300
+ "content": "<|reserved_special_token_157|>",
1301
+ "lstrip": false,
1302
+ "normalized": false,
1303
+ "rstrip": false,
1304
+ "single_word": false,
1305
+ "special": true
1306
+ },
1307
+ "128163": {
1308
+ "content": "<|reserved_special_token_158|>",
1309
+ "lstrip": false,
1310
+ "normalized": false,
1311
+ "rstrip": false,
1312
+ "single_word": false,
1313
+ "special": true
1314
+ },
1315
+ "128164": {
1316
+ "content": "<|reserved_special_token_159|>",
1317
+ "lstrip": false,
1318
+ "normalized": false,
1319
+ "rstrip": false,
1320
+ "single_word": false,
1321
+ "special": true
1322
+ },
1323
+ "128165": {
1324
+ "content": "<|reserved_special_token_160|>",
1325
+ "lstrip": false,
1326
+ "normalized": false,
1327
+ "rstrip": false,
1328
+ "single_word": false,
1329
+ "special": true
1330
+ },
1331
+ "128166": {
1332
+ "content": "<|reserved_special_token_161|>",
1333
+ "lstrip": false,
1334
+ "normalized": false,
1335
+ "rstrip": false,
1336
+ "single_word": false,
1337
+ "special": true
1338
+ },
1339
+ "128167": {
1340
+ "content": "<|reserved_special_token_162|>",
1341
+ "lstrip": false,
1342
+ "normalized": false,
1343
+ "rstrip": false,
1344
+ "single_word": false,
1345
+ "special": true
1346
+ },
1347
+ "128168": {
1348
+ "content": "<|reserved_special_token_163|>",
1349
+ "lstrip": false,
1350
+ "normalized": false,
1351
+ "rstrip": false,
1352
+ "single_word": false,
1353
+ "special": true
1354
+ },
1355
+ "128169": {
1356
+ "content": "<|reserved_special_token_164|>",
1357
+ "lstrip": false,
1358
+ "normalized": false,
1359
+ "rstrip": false,
1360
+ "single_word": false,
1361
+ "special": true
1362
+ },
1363
+ "128170": {
1364
+ "content": "<|reserved_special_token_165|>",
1365
+ "lstrip": false,
1366
+ "normalized": false,
1367
+ "rstrip": false,
1368
+ "single_word": false,
1369
+ "special": true
1370
+ },
1371
+ "128171": {
1372
+ "content": "<|reserved_special_token_166|>",
1373
+ "lstrip": false,
1374
+ "normalized": false,
1375
+ "rstrip": false,
1376
+ "single_word": false,
1377
+ "special": true
1378
+ },
1379
+ "128172": {
1380
+ "content": "<|reserved_special_token_167|>",
1381
+ "lstrip": false,
1382
+ "normalized": false,
1383
+ "rstrip": false,
1384
+ "single_word": false,
1385
+ "special": true
1386
+ },
1387
+ "128173": {
1388
+ "content": "<|reserved_special_token_168|>",
1389
+ "lstrip": false,
1390
+ "normalized": false,
1391
+ "rstrip": false,
1392
+ "single_word": false,
1393
+ "special": true
1394
+ },
1395
+ "128174": {
1396
+ "content": "<|reserved_special_token_169|>",
1397
+ "lstrip": false,
1398
+ "normalized": false,
1399
+ "rstrip": false,
1400
+ "single_word": false,
1401
+ "special": true
1402
+ },
1403
+ "128175": {
1404
+ "content": "<|reserved_special_token_170|>",
1405
+ "lstrip": false,
1406
+ "normalized": false,
1407
+ "rstrip": false,
1408
+ "single_word": false,
1409
+ "special": true
1410
+ },
1411
+ "128176": {
1412
+ "content": "<|reserved_special_token_171|>",
1413
+ "lstrip": false,
1414
+ "normalized": false,
1415
+ "rstrip": false,
1416
+ "single_word": false,
1417
+ "special": true
1418
+ },
1419
+ "128177": {
1420
+ "content": "<|reserved_special_token_172|>",
1421
+ "lstrip": false,
1422
+ "normalized": false,
1423
+ "rstrip": false,
1424
+ "single_word": false,
1425
+ "special": true
1426
+ },
1427
+ "128178": {
1428
+ "content": "<|reserved_special_token_173|>",
1429
+ "lstrip": false,
1430
+ "normalized": false,
1431
+ "rstrip": false,
1432
+ "single_word": false,
1433
+ "special": true
1434
+ },
1435
+ "128179": {
1436
+ "content": "<|reserved_special_token_174|>",
1437
+ "lstrip": false,
1438
+ "normalized": false,
1439
+ "rstrip": false,
1440
+ "single_word": false,
1441
+ "special": true
1442
+ },
1443
+ "128180": {
1444
+ "content": "<|reserved_special_token_175|>",
1445
+ "lstrip": false,
1446
+ "normalized": false,
1447
+ "rstrip": false,
1448
+ "single_word": false,
1449
+ "special": true
1450
+ },
1451
+ "128181": {
1452
+ "content": "<|reserved_special_token_176|>",
1453
+ "lstrip": false,
1454
+ "normalized": false,
1455
+ "rstrip": false,
1456
+ "single_word": false,
1457
+ "special": true
1458
+ },
1459
+ "128182": {
1460
+ "content": "<|reserved_special_token_177|>",
1461
+ "lstrip": false,
1462
+ "normalized": false,
1463
+ "rstrip": false,
1464
+ "single_word": false,
1465
+ "special": true
1466
+ },
1467
+ "128183": {
1468
+ "content": "<|reserved_special_token_178|>",
1469
+ "lstrip": false,
1470
+ "normalized": false,
1471
+ "rstrip": false,
1472
+ "single_word": false,
1473
+ "special": true
1474
+ },
1475
+ "128184": {
1476
+ "content": "<|reserved_special_token_179|>",
1477
+ "lstrip": false,
1478
+ "normalized": false,
1479
+ "rstrip": false,
1480
+ "single_word": false,
1481
+ "special": true
1482
+ },
1483
+ "128185": {
1484
+ "content": "<|reserved_special_token_180|>",
1485
+ "lstrip": false,
1486
+ "normalized": false,
1487
+ "rstrip": false,
1488
+ "single_word": false,
1489
+ "special": true
1490
+ },
1491
+ "128186": {
1492
+ "content": "<|reserved_special_token_181|>",
1493
+ "lstrip": false,
1494
+ "normalized": false,
1495
+ "rstrip": false,
1496
+ "single_word": false,
1497
+ "special": true
1498
+ },
1499
+ "128187": {
1500
+ "content": "<|reserved_special_token_182|>",
1501
+ "lstrip": false,
1502
+ "normalized": false,
1503
+ "rstrip": false,
1504
+ "single_word": false,
1505
+ "special": true
1506
+ },
1507
+ "128188": {
1508
+ "content": "<|reserved_special_token_183|>",
1509
+ "lstrip": false,
1510
+ "normalized": false,
1511
+ "rstrip": false,
1512
+ "single_word": false,
1513
+ "special": true
1514
+ },
1515
+ "128189": {
1516
+ "content": "<|reserved_special_token_184|>",
1517
+ "lstrip": false,
1518
+ "normalized": false,
1519
+ "rstrip": false,
1520
+ "single_word": false,
1521
+ "special": true
1522
+ },
1523
+ "128190": {
1524
+ "content": "<|reserved_special_token_185|>",
1525
+ "lstrip": false,
1526
+ "normalized": false,
1527
+ "rstrip": false,
1528
+ "single_word": false,
1529
+ "special": true
1530
+ },
1531
+ "128191": {
1532
+ "content": "<|reserved_special_token_186|>",
1533
+ "lstrip": false,
1534
+ "normalized": false,
1535
+ "rstrip": false,
1536
+ "single_word": false,
1537
+ "special": true
1538
+ },
1539
+ "128192": {
1540
+ "content": "<|reserved_special_token_187|>",
1541
+ "lstrip": false,
1542
+ "normalized": false,
1543
+ "rstrip": false,
1544
+ "single_word": false,
1545
+ "special": true
1546
+ },
1547
+ "128193": {
1548
+ "content": "<|reserved_special_token_188|>",
1549
+ "lstrip": false,
1550
+ "normalized": false,
1551
+ "rstrip": false,
1552
+ "single_word": false,
1553
+ "special": true
1554
+ },
1555
+ "128194": {
1556
+ "content": "<|reserved_special_token_189|>",
1557
+ "lstrip": false,
1558
+ "normalized": false,
1559
+ "rstrip": false,
1560
+ "single_word": false,
1561
+ "special": true
1562
+ },
1563
+ "128195": {
1564
+ "content": "<|reserved_special_token_190|>",
1565
+ "lstrip": false,
1566
+ "normalized": false,
1567
+ "rstrip": false,
1568
+ "single_word": false,
1569
+ "special": true
1570
+ },
1571
+ "128196": {
1572
+ "content": "<|reserved_special_token_191|>",
1573
+ "lstrip": false,
1574
+ "normalized": false,
1575
+ "rstrip": false,
1576
+ "single_word": false,
1577
+ "special": true
1578
+ },
1579
+ "128197": {
1580
+ "content": "<|reserved_special_token_192|>",
1581
+ "lstrip": false,
1582
+ "normalized": false,
1583
+ "rstrip": false,
1584
+ "single_word": false,
1585
+ "special": true
1586
+ },
1587
+ "128198": {
1588
+ "content": "<|reserved_special_token_193|>",
1589
+ "lstrip": false,
1590
+ "normalized": false,
1591
+ "rstrip": false,
1592
+ "single_word": false,
1593
+ "special": true
1594
+ },
1595
+ "128199": {
1596
+ "content": "<|reserved_special_token_194|>",
1597
+ "lstrip": false,
1598
+ "normalized": false,
1599
+ "rstrip": false,
1600
+ "single_word": false,
1601
+ "special": true
1602
+ },
1603
+ "128200": {
1604
+ "content": "<|reserved_special_token_195|>",
1605
+ "lstrip": false,
1606
+ "normalized": false,
1607
+ "rstrip": false,
1608
+ "single_word": false,
1609
+ "special": true
1610
+ },
1611
+ "128201": {
1612
+ "content": "<|reserved_special_token_196|>",
1613
+ "lstrip": false,
1614
+ "normalized": false,
1615
+ "rstrip": false,
1616
+ "single_word": false,
1617
+ "special": true
1618
+ },
1619
+ "128202": {
1620
+ "content": "<|reserved_special_token_197|>",
1621
+ "lstrip": false,
1622
+ "normalized": false,
1623
+ "rstrip": false,
1624
+ "single_word": false,
1625
+ "special": true
1626
+ },
1627
+ "128203": {
1628
+ "content": "<|reserved_special_token_198|>",
1629
+ "lstrip": false,
1630
+ "normalized": false,
1631
+ "rstrip": false,
1632
+ "single_word": false,
1633
+ "special": true
1634
+ },
1635
+ "128204": {
1636
+ "content": "<|reserved_special_token_199|>",
1637
+ "lstrip": false,
1638
+ "normalized": false,
1639
+ "rstrip": false,
1640
+ "single_word": false,
1641
+ "special": true
1642
+ },
1643
+ "128205": {
1644
+ "content": "<|reserved_special_token_200|>",
1645
+ "lstrip": false,
1646
+ "normalized": false,
1647
+ "rstrip": false,
1648
+ "single_word": false,
1649
+ "special": true
1650
+ },
1651
+ "128206": {
1652
+ "content": "<|reserved_special_token_201|>",
1653
+ "lstrip": false,
1654
+ "normalized": false,
1655
+ "rstrip": false,
1656
+ "single_word": false,
1657
+ "special": true
1658
+ },
1659
+ "128207": {
1660
+ "content": "<|reserved_special_token_202|>",
1661
+ "lstrip": false,
1662
+ "normalized": false,
1663
+ "rstrip": false,
1664
+ "single_word": false,
1665
+ "special": true
1666
+ },
1667
+ "128208": {
1668
+ "content": "<|reserved_special_token_203|>",
1669
+ "lstrip": false,
1670
+ "normalized": false,
1671
+ "rstrip": false,
1672
+ "single_word": false,
1673
+ "special": true
1674
+ },
1675
+ "128209": {
1676
+ "content": "<|reserved_special_token_204|>",
1677
+ "lstrip": false,
1678
+ "normalized": false,
1679
+ "rstrip": false,
1680
+ "single_word": false,
1681
+ "special": true
1682
+ },
1683
+ "128210": {
1684
+ "content": "<|reserved_special_token_205|>",
1685
+ "lstrip": false,
1686
+ "normalized": false,
1687
+ "rstrip": false,
1688
+ "single_word": false,
1689
+ "special": true
1690
+ },
1691
+ "128211": {
1692
+ "content": "<|reserved_special_token_206|>",
1693
+ "lstrip": false,
1694
+ "normalized": false,
1695
+ "rstrip": false,
1696
+ "single_word": false,
1697
+ "special": true
1698
+ },
1699
+ "128212": {
1700
+ "content": "<|reserved_special_token_207|>",
1701
+ "lstrip": false,
1702
+ "normalized": false,
1703
+ "rstrip": false,
1704
+ "single_word": false,
1705
+ "special": true
1706
+ },
1707
+ "128213": {
1708
+ "content": "<|reserved_special_token_208|>",
1709
+ "lstrip": false,
1710
+ "normalized": false,
1711
+ "rstrip": false,
1712
+ "single_word": false,
1713
+ "special": true
1714
+ },
1715
+ "128214": {
1716
+ "content": "<|reserved_special_token_209|>",
1717
+ "lstrip": false,
1718
+ "normalized": false,
1719
+ "rstrip": false,
1720
+ "single_word": false,
1721
+ "special": true
1722
+ },
1723
+ "128215": {
1724
+ "content": "<|reserved_special_token_210|>",
1725
+ "lstrip": false,
1726
+ "normalized": false,
1727
+ "rstrip": false,
1728
+ "single_word": false,
1729
+ "special": true
1730
+ },
1731
+ "128216": {
1732
+ "content": "<|reserved_special_token_211|>",
1733
+ "lstrip": false,
1734
+ "normalized": false,
1735
+ "rstrip": false,
1736
+ "single_word": false,
1737
+ "special": true
1738
+ },
1739
+ "128217": {
1740
+ "content": "<|reserved_special_token_212|>",
1741
+ "lstrip": false,
1742
+ "normalized": false,
1743
+ "rstrip": false,
1744
+ "single_word": false,
1745
+ "special": true
1746
+ },
1747
+ "128218": {
1748
+ "content": "<|reserved_special_token_213|>",
1749
+ "lstrip": false,
1750
+ "normalized": false,
1751
+ "rstrip": false,
1752
+ "single_word": false,
1753
+ "special": true
1754
+ },
1755
+ "128219": {
1756
+ "content": "<|reserved_special_token_214|>",
1757
+ "lstrip": false,
1758
+ "normalized": false,
1759
+ "rstrip": false,
1760
+ "single_word": false,
1761
+ "special": true
1762
+ },
1763
+ "128220": {
1764
+ "content": "<|reserved_special_token_215|>",
1765
+ "lstrip": false,
1766
+ "normalized": false,
1767
+ "rstrip": false,
1768
+ "single_word": false,
1769
+ "special": true
1770
+ },
1771
+ "128221": {
1772
+ "content": "<|reserved_special_token_216|>",
1773
+ "lstrip": false,
1774
+ "normalized": false,
1775
+ "rstrip": false,
1776
+ "single_word": false,
1777
+ "special": true
1778
+ },
1779
+ "128222": {
1780
+ "content": "<|reserved_special_token_217|>",
1781
+ "lstrip": false,
1782
+ "normalized": false,
1783
+ "rstrip": false,
1784
+ "single_word": false,
1785
+ "special": true
1786
+ },
1787
+ "128223": {
1788
+ "content": "<|reserved_special_token_218|>",
1789
+ "lstrip": false,
1790
+ "normalized": false,
1791
+ "rstrip": false,
1792
+ "single_word": false,
1793
+ "special": true
1794
+ },
1795
+ "128224": {
1796
+ "content": "<|reserved_special_token_219|>",
1797
+ "lstrip": false,
1798
+ "normalized": false,
1799
+ "rstrip": false,
1800
+ "single_word": false,
1801
+ "special": true
1802
+ },
1803
+ "128225": {
1804
+ "content": "<|reserved_special_token_220|>",
1805
+ "lstrip": false,
1806
+ "normalized": false,
1807
+ "rstrip": false,
1808
+ "single_word": false,
1809
+ "special": true
1810
+ },
1811
+ "128226": {
1812
+ "content": "<|reserved_special_token_221|>",
1813
+ "lstrip": false,
1814
+ "normalized": false,
1815
+ "rstrip": false,
1816
+ "single_word": false,
1817
+ "special": true
1818
+ },
1819
+ "128227": {
1820
+ "content": "<|reserved_special_token_222|>",
1821
+ "lstrip": false,
1822
+ "normalized": false,
1823
+ "rstrip": false,
1824
+ "single_word": false,
1825
+ "special": true
1826
+ },
1827
+ "128228": {
1828
+ "content": "<|reserved_special_token_223|>",
1829
+ "lstrip": false,
1830
+ "normalized": false,
1831
+ "rstrip": false,
1832
+ "single_word": false,
1833
+ "special": true
1834
+ },
1835
+ "128229": {
1836
+ "content": "<|reserved_special_token_224|>",
1837
+ "lstrip": false,
1838
+ "normalized": false,
1839
+ "rstrip": false,
1840
+ "single_word": false,
1841
+ "special": true
1842
+ },
1843
+ "128230": {
1844
+ "content": "<|reserved_special_token_225|>",
1845
+ "lstrip": false,
1846
+ "normalized": false,
1847
+ "rstrip": false,
1848
+ "single_word": false,
1849
+ "special": true
1850
+ },
1851
+ "128231": {
1852
+ "content": "<|reserved_special_token_226|>",
1853
+ "lstrip": false,
1854
+ "normalized": false,
1855
+ "rstrip": false,
1856
+ "single_word": false,
1857
+ "special": true
1858
+ },
1859
+ "128232": {
1860
+ "content": "<|reserved_special_token_227|>",
1861
+ "lstrip": false,
1862
+ "normalized": false,
1863
+ "rstrip": false,
1864
+ "single_word": false,
1865
+ "special": true
1866
+ },
1867
+ "128233": {
1868
+ "content": "<|reserved_special_token_228|>",
1869
+ "lstrip": false,
1870
+ "normalized": false,
1871
+ "rstrip": false,
1872
+ "single_word": false,
1873
+ "special": true
1874
+ },
1875
+ "128234": {
1876
+ "content": "<|reserved_special_token_229|>",
1877
+ "lstrip": false,
1878
+ "normalized": false,
1879
+ "rstrip": false,
1880
+ "single_word": false,
1881
+ "special": true
1882
+ },
1883
+ "128235": {
1884
+ "content": "<|reserved_special_token_230|>",
1885
+ "lstrip": false,
1886
+ "normalized": false,
1887
+ "rstrip": false,
1888
+ "single_word": false,
1889
+ "special": true
1890
+ },
1891
+ "128236": {
1892
+ "content": "<|reserved_special_token_231|>",
1893
+ "lstrip": false,
1894
+ "normalized": false,
1895
+ "rstrip": false,
1896
+ "single_word": false,
1897
+ "special": true
1898
+ },
1899
+ "128237": {
1900
+ "content": "<|reserved_special_token_232|>",
1901
+ "lstrip": false,
1902
+ "normalized": false,
1903
+ "rstrip": false,
1904
+ "single_word": false,
1905
+ "special": true
1906
+ },
1907
+ "128238": {
1908
+ "content": "<|reserved_special_token_233|>",
1909
+ "lstrip": false,
1910
+ "normalized": false,
1911
+ "rstrip": false,
1912
+ "single_word": false,
1913
+ "special": true
1914
+ },
1915
+ "128239": {
1916
+ "content": "<|reserved_special_token_234|>",
1917
+ "lstrip": false,
1918
+ "normalized": false,
1919
+ "rstrip": false,
1920
+ "single_word": false,
1921
+ "special": true
1922
+ },
1923
+ "128240": {
1924
+ "content": "<|reserved_special_token_235|>",
1925
+ "lstrip": false,
1926
+ "normalized": false,
1927
+ "rstrip": false,
1928
+ "single_word": false,
1929
+ "special": true
1930
+ },
1931
+ "128241": {
1932
+ "content": "<|reserved_special_token_236|>",
1933
+ "lstrip": false,
1934
+ "normalized": false,
1935
+ "rstrip": false,
1936
+ "single_word": false,
1937
+ "special": true
1938
+ },
1939
+ "128242": {
1940
+ "content": "<|reserved_special_token_237|>",
1941
+ "lstrip": false,
1942
+ "normalized": false,
1943
+ "rstrip": false,
1944
+ "single_word": false,
1945
+ "special": true
1946
+ },
1947
+ "128243": {
1948
+ "content": "<|reserved_special_token_238|>",
1949
+ "lstrip": false,
1950
+ "normalized": false,
1951
+ "rstrip": false,
1952
+ "single_word": false,
1953
+ "special": true
1954
+ },
1955
+ "128244": {
1956
+ "content": "<|reserved_special_token_239|>",
1957
+ "lstrip": false,
1958
+ "normalized": false,
1959
+ "rstrip": false,
1960
+ "single_word": false,
1961
+ "special": true
1962
+ },
1963
+ "128245": {
1964
+ "content": "<|reserved_special_token_240|>",
1965
+ "lstrip": false,
1966
+ "normalized": false,
1967
+ "rstrip": false,
1968
+ "single_word": false,
1969
+ "special": true
1970
+ },
1971
+ "128246": {
1972
+ "content": "<|reserved_special_token_241|>",
1973
+ "lstrip": false,
1974
+ "normalized": false,
1975
+ "rstrip": false,
1976
+ "single_word": false,
1977
+ "special": true
1978
+ },
1979
+ "128247": {
1980
+ "content": "<|reserved_special_token_242|>",
1981
+ "lstrip": false,
1982
+ "normalized": false,
1983
+ "rstrip": false,
1984
+ "single_word": false,
1985
+ "special": true
1986
+ },
1987
+ "128248": {
1988
+ "content": "<|reserved_special_token_243|>",
1989
+ "lstrip": false,
1990
+ "normalized": false,
1991
+ "rstrip": false,
1992
+ "single_word": false,
1993
+ "special": true
1994
+ },
1995
+ "128249": {
1996
+ "content": "<|reserved_special_token_244|>",
1997
+ "lstrip": false,
1998
+ "normalized": false,
1999
+ "rstrip": false,
2000
+ "single_word": false,
2001
+ "special": true
2002
+ },
2003
+ "128250": {
2004
+ "content": "<|reserved_special_token_245|>",
2005
+ "lstrip": false,
2006
+ "normalized": false,
2007
+ "rstrip": false,
2008
+ "single_word": false,
2009
+ "special": true
2010
+ },
2011
+ "128251": {
2012
+ "content": "<|reserved_special_token_246|>",
2013
+ "lstrip": false,
2014
+ "normalized": false,
2015
+ "rstrip": false,
2016
+ "single_word": false,
2017
+ "special": true
2018
+ },
2019
+ "128252": {
2020
+ "content": "<|reserved_special_token_247|>",
2021
+ "lstrip": false,
2022
+ "normalized": false,
2023
+ "rstrip": false,
2024
+ "single_word": false,
2025
+ "special": true
2026
+ },
2027
+ "128253": {
2028
+ "content": "<|reserved_special_token_248|>",
2029
+ "lstrip": false,
2030
+ "normalized": false,
2031
+ "rstrip": false,
2032
+ "single_word": false,
2033
+ "special": true
2034
+ },
2035
+ "128254": {
2036
+ "content": "<|reserved_special_token_249|>",
2037
+ "lstrip": false,
2038
+ "normalized": false,
2039
+ "rstrip": false,
2040
+ "single_word": false,
2041
+ "special": true
2042
+ },
2043
+ "128255": {
2044
+ "content": "<|reserved_special_token_250|>",
2045
+ "lstrip": false,
2046
+ "normalized": false,
2047
+ "rstrip": false,
2048
+ "single_word": false,
2049
+ "special": true
2050
+ }
2051
+ },
2052
+ "bos_token": "<|begin_of_text|>",
2053
+ "clean_up_tokenization_spaces": true,
2054
+ "eos_token": "<|end_of_text|>",
2055
+ "model_input_names": [
2056
+ "input_ids",
2057
+ "attention_mask"
2058
+ ],
2059
+ "model_max_length": 1000000000000000019884624838656,
2060
+ "tokenizer_class": "PreTrainedTokenizerFast"
2061
+ }