googlefan commited on
Commit
d315780
1 Parent(s): b059990

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
config.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "UltravoxModel"
4
+ ],
5
+ "audio_model_id": "kotoba-tech/kotoba-whisper-v2.2",
6
+ "audio_model_lora_config": {
7
+ "lora_alpha": 8,
8
+ "r": 0,
9
+ "target_modules": [
10
+ "k_proj",
11
+ "q_proj",
12
+ "linear_k",
13
+ "linear_q"
14
+ ]
15
+ },
16
+ "auto_map": {
17
+ "AutoConfig": "ultravox_config.UltravoxConfig",
18
+ "AutoModel": "ultravox_model.UltravoxModel"
19
+ },
20
+ "hidden_size": 4096,
21
+ "ignore_index": -100,
22
+ "initializer_range": 0.02,
23
+ "model_type": "ultravox",
24
+ "norm_init": 0.4,
25
+ "pad_token_id": 1,
26
+ "projector_act": "swiglu",
27
+ "stack_factor": 8,
28
+ "text_model_id": "google/gemma-2-9b-it",
29
+ "text_model_lora_config": {
30
+ "lora_alpha": 8,
31
+ "r": 0,
32
+ "target_modules": [
33
+ "k_proj",
34
+ "q_proj",
35
+ "linear_k",
36
+ "linear_q"
37
+ ]
38
+ },
39
+ "torch_dtype": "bfloat16",
40
+ "transformers_version": "4.44.0",
41
+ "vocab_size": 256000
42
+ }
generation_config.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 2,
4
+ "cache_implementation": "hybrid",
5
+ "eos_token_id": 1,
6
+ "pad_token_id": 1,
7
+ "transformers_version": "4.44.0"
8
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7287a044c945ad4f1903cef5887e534c70cddb3852b1a2bd80a230e61d00b22f
3
+ size 98594264
optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2b3fde1382a141c8b9075d0038d9b4ecfa526a15bca7e0b376ced5c550dce6db
3
+ size 197192018
rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:50406e2683fae845a67d2522407cfd71c13ce88867a1aac0dc9d26a8b3a5f840
3
+ size 14244
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ae7d1df7fbe282a2a1f6e0263b266c20c101d0f96ff5d77217fca16dab8166f9
3
+ size 1064
special_tokens_map.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<start_of_turn>",
4
+ "<end_of_turn>"
5
+ ],
6
+ "bos_token": {
7
+ "content": "<bos>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false
12
+ },
13
+ "eos_token": {
14
+ "content": "<eos>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false
19
+ },
20
+ "pad_token": "<eos>",
21
+ "unk_token": {
22
+ "content": "<unk>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false
27
+ }
28
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3f289bc05132635a8bc7aca7aa21255efd5e18f3710f43e3cdb96bcd41be4922
3
+ size 17525357
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:61a7b147390c64585d6c3543dd6fc636906c9af3865a5548f27f31aee1d4c8e2
3
+ size 4241003
tokenizer_config.json ADDED
@@ -0,0 +1,2013 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "added_tokens_decoder": {
5
+ "0": {
6
+ "content": "<pad>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false,
11
+ "special": true
12
+ },
13
+ "1": {
14
+ "content": "<eos>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false,
19
+ "special": true
20
+ },
21
+ "2": {
22
+ "content": "<bos>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false,
27
+ "special": true
28
+ },
29
+ "3": {
30
+ "content": "<unk>",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false,
35
+ "special": true
36
+ },
37
+ "4": {
38
+ "content": "<mask>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false,
43
+ "special": false
44
+ },
45
+ "5": {
46
+ "content": "<2mass>",
47
+ "lstrip": false,
48
+ "normalized": false,
49
+ "rstrip": false,
50
+ "single_word": false,
51
+ "special": false
52
+ },
53
+ "6": {
54
+ "content": "[@BOS@]",
55
+ "lstrip": false,
56
+ "normalized": false,
57
+ "rstrip": false,
58
+ "single_word": false,
59
+ "special": false
60
+ },
61
+ "7": {
62
+ "content": "<unused0>",
63
+ "lstrip": false,
64
+ "normalized": false,
65
+ "rstrip": false,
66
+ "single_word": false,
67
+ "special": false
68
+ },
69
+ "8": {
70
+ "content": "<unused1>",
71
+ "lstrip": false,
72
+ "normalized": false,
73
+ "rstrip": false,
74
+ "single_word": false,
75
+ "special": false
76
+ },
77
+ "9": {
78
+ "content": "<unused2>",
79
+ "lstrip": false,
80
+ "normalized": false,
81
+ "rstrip": false,
82
+ "single_word": false,
83
+ "special": false
84
+ },
85
+ "10": {
86
+ "content": "<unused3>",
87
+ "lstrip": false,
88
+ "normalized": false,
89
+ "rstrip": false,
90
+ "single_word": false,
91
+ "special": false
92
+ },
93
+ "11": {
94
+ "content": "<unused4>",
95
+ "lstrip": false,
96
+ "normalized": false,
97
+ "rstrip": false,
98
+ "single_word": false,
99
+ "special": false
100
+ },
101
+ "12": {
102
+ "content": "<unused5>",
103
+ "lstrip": false,
104
+ "normalized": false,
105
+ "rstrip": false,
106
+ "single_word": false,
107
+ "special": false
108
+ },
109
+ "13": {
110
+ "content": "<unused6>",
111
+ "lstrip": false,
112
+ "normalized": false,
113
+ "rstrip": false,
114
+ "single_word": false,
115
+ "special": false
116
+ },
117
+ "14": {
118
+ "content": "<unused7>",
119
+ "lstrip": false,
120
+ "normalized": false,
121
+ "rstrip": false,
122
+ "single_word": false,
123
+ "special": false
124
+ },
125
+ "15": {
126
+ "content": "<unused8>",
127
+ "lstrip": false,
128
+ "normalized": false,
129
+ "rstrip": false,
130
+ "single_word": false,
131
+ "special": false
132
+ },
133
+ "16": {
134
+ "content": "<unused9>",
135
+ "lstrip": false,
136
+ "normalized": false,
137
+ "rstrip": false,
138
+ "single_word": false,
139
+ "special": false
140
+ },
141
+ "17": {
142
+ "content": "<unused10>",
143
+ "lstrip": false,
144
+ "normalized": false,
145
+ "rstrip": false,
146
+ "single_word": false,
147
+ "special": false
148
+ },
149
+ "18": {
150
+ "content": "<unused11>",
151
+ "lstrip": false,
152
+ "normalized": false,
153
+ "rstrip": false,
154
+ "single_word": false,
155
+ "special": false
156
+ },
157
+ "19": {
158
+ "content": "<unused12>",
159
+ "lstrip": false,
160
+ "normalized": false,
161
+ "rstrip": false,
162
+ "single_word": false,
163
+ "special": false
164
+ },
165
+ "20": {
166
+ "content": "<unused13>",
167
+ "lstrip": false,
168
+ "normalized": false,
169
+ "rstrip": false,
170
+ "single_word": false,
171
+ "special": false
172
+ },
173
+ "21": {
174
+ "content": "<unused14>",
175
+ "lstrip": false,
176
+ "normalized": false,
177
+ "rstrip": false,
178
+ "single_word": false,
179
+ "special": false
180
+ },
181
+ "22": {
182
+ "content": "<unused15>",
183
+ "lstrip": false,
184
+ "normalized": false,
185
+ "rstrip": false,
186
+ "single_word": false,
187
+ "special": false
188
+ },
189
+ "23": {
190
+ "content": "<unused16>",
191
+ "lstrip": false,
192
+ "normalized": false,
193
+ "rstrip": false,
194
+ "single_word": false,
195
+ "special": false
196
+ },
197
+ "24": {
198
+ "content": "<unused17>",
199
+ "lstrip": false,
200
+ "normalized": false,
201
+ "rstrip": false,
202
+ "single_word": false,
203
+ "special": false
204
+ },
205
+ "25": {
206
+ "content": "<unused18>",
207
+ "lstrip": false,
208
+ "normalized": false,
209
+ "rstrip": false,
210
+ "single_word": false,
211
+ "special": false
212
+ },
213
+ "26": {
214
+ "content": "<unused19>",
215
+ "lstrip": false,
216
+ "normalized": false,
217
+ "rstrip": false,
218
+ "single_word": false,
219
+ "special": false
220
+ },
221
+ "27": {
222
+ "content": "<unused20>",
223
+ "lstrip": false,
224
+ "normalized": false,
225
+ "rstrip": false,
226
+ "single_word": false,
227
+ "special": false
228
+ },
229
+ "28": {
230
+ "content": "<unused21>",
231
+ "lstrip": false,
232
+ "normalized": false,
233
+ "rstrip": false,
234
+ "single_word": false,
235
+ "special": false
236
+ },
237
+ "29": {
238
+ "content": "<unused22>",
239
+ "lstrip": false,
240
+ "normalized": false,
241
+ "rstrip": false,
242
+ "single_word": false,
243
+ "special": false
244
+ },
245
+ "30": {
246
+ "content": "<unused23>",
247
+ "lstrip": false,
248
+ "normalized": false,
249
+ "rstrip": false,
250
+ "single_word": false,
251
+ "special": false
252
+ },
253
+ "31": {
254
+ "content": "<unused24>",
255
+ "lstrip": false,
256
+ "normalized": false,
257
+ "rstrip": false,
258
+ "single_word": false,
259
+ "special": false
260
+ },
261
+ "32": {
262
+ "content": "<unused25>",
263
+ "lstrip": false,
264
+ "normalized": false,
265
+ "rstrip": false,
266
+ "single_word": false,
267
+ "special": false
268
+ },
269
+ "33": {
270
+ "content": "<unused26>",
271
+ "lstrip": false,
272
+ "normalized": false,
273
+ "rstrip": false,
274
+ "single_word": false,
275
+ "special": false
276
+ },
277
+ "34": {
278
+ "content": "<unused27>",
279
+ "lstrip": false,
280
+ "normalized": false,
281
+ "rstrip": false,
282
+ "single_word": false,
283
+ "special": false
284
+ },
285
+ "35": {
286
+ "content": "<unused28>",
287
+ "lstrip": false,
288
+ "normalized": false,
289
+ "rstrip": false,
290
+ "single_word": false,
291
+ "special": false
292
+ },
293
+ "36": {
294
+ "content": "<unused29>",
295
+ "lstrip": false,
296
+ "normalized": false,
297
+ "rstrip": false,
298
+ "single_word": false,
299
+ "special": false
300
+ },
301
+ "37": {
302
+ "content": "<unused30>",
303
+ "lstrip": false,
304
+ "normalized": false,
305
+ "rstrip": false,
306
+ "single_word": false,
307
+ "special": false
308
+ },
309
+ "38": {
310
+ "content": "<unused31>",
311
+ "lstrip": false,
312
+ "normalized": false,
313
+ "rstrip": false,
314
+ "single_word": false,
315
+ "special": false
316
+ },
317
+ "39": {
318
+ "content": "<unused32>",
319
+ "lstrip": false,
320
+ "normalized": false,
321
+ "rstrip": false,
322
+ "single_word": false,
323
+ "special": false
324
+ },
325
+ "40": {
326
+ "content": "<unused33>",
327
+ "lstrip": false,
328
+ "normalized": false,
329
+ "rstrip": false,
330
+ "single_word": false,
331
+ "special": false
332
+ },
333
+ "41": {
334
+ "content": "<unused34>",
335
+ "lstrip": false,
336
+ "normalized": false,
337
+ "rstrip": false,
338
+ "single_word": false,
339
+ "special": false
340
+ },
341
+ "42": {
342
+ "content": "<unused35>",
343
+ "lstrip": false,
344
+ "normalized": false,
345
+ "rstrip": false,
346
+ "single_word": false,
347
+ "special": false
348
+ },
349
+ "43": {
350
+ "content": "<unused36>",
351
+ "lstrip": false,
352
+ "normalized": false,
353
+ "rstrip": false,
354
+ "single_word": false,
355
+ "special": false
356
+ },
357
+ "44": {
358
+ "content": "<unused37>",
359
+ "lstrip": false,
360
+ "normalized": false,
361
+ "rstrip": false,
362
+ "single_word": false,
363
+ "special": false
364
+ },
365
+ "45": {
366
+ "content": "<unused38>",
367
+ "lstrip": false,
368
+ "normalized": false,
369
+ "rstrip": false,
370
+ "single_word": false,
371
+ "special": false
372
+ },
373
+ "46": {
374
+ "content": "<unused39>",
375
+ "lstrip": false,
376
+ "normalized": false,
377
+ "rstrip": false,
378
+ "single_word": false,
379
+ "special": false
380
+ },
381
+ "47": {
382
+ "content": "<unused40>",
383
+ "lstrip": false,
384
+ "normalized": false,
385
+ "rstrip": false,
386
+ "single_word": false,
387
+ "special": false
388
+ },
389
+ "48": {
390
+ "content": "<unused41>",
391
+ "lstrip": false,
392
+ "normalized": false,
393
+ "rstrip": false,
394
+ "single_word": false,
395
+ "special": false
396
+ },
397
+ "49": {
398
+ "content": "<unused42>",
399
+ "lstrip": false,
400
+ "normalized": false,
401
+ "rstrip": false,
402
+ "single_word": false,
403
+ "special": false
404
+ },
405
+ "50": {
406
+ "content": "<unused43>",
407
+ "lstrip": false,
408
+ "normalized": false,
409
+ "rstrip": false,
410
+ "single_word": false,
411
+ "special": false
412
+ },
413
+ "51": {
414
+ "content": "<unused44>",
415
+ "lstrip": false,
416
+ "normalized": false,
417
+ "rstrip": false,
418
+ "single_word": false,
419
+ "special": false
420
+ },
421
+ "52": {
422
+ "content": "<unused45>",
423
+ "lstrip": false,
424
+ "normalized": false,
425
+ "rstrip": false,
426
+ "single_word": false,
427
+ "special": false
428
+ },
429
+ "53": {
430
+ "content": "<unused46>",
431
+ "lstrip": false,
432
+ "normalized": false,
433
+ "rstrip": false,
434
+ "single_word": false,
435
+ "special": false
436
+ },
437
+ "54": {
438
+ "content": "<unused47>",
439
+ "lstrip": false,
440
+ "normalized": false,
441
+ "rstrip": false,
442
+ "single_word": false,
443
+ "special": false
444
+ },
445
+ "55": {
446
+ "content": "<unused48>",
447
+ "lstrip": false,
448
+ "normalized": false,
449
+ "rstrip": false,
450
+ "single_word": false,
451
+ "special": false
452
+ },
453
+ "56": {
454
+ "content": "<unused49>",
455
+ "lstrip": false,
456
+ "normalized": false,
457
+ "rstrip": false,
458
+ "single_word": false,
459
+ "special": false
460
+ },
461
+ "57": {
462
+ "content": "<unused50>",
463
+ "lstrip": false,
464
+ "normalized": false,
465
+ "rstrip": false,
466
+ "single_word": false,
467
+ "special": false
468
+ },
469
+ "58": {
470
+ "content": "<unused51>",
471
+ "lstrip": false,
472
+ "normalized": false,
473
+ "rstrip": false,
474
+ "single_word": false,
475
+ "special": false
476
+ },
477
+ "59": {
478
+ "content": "<unused52>",
479
+ "lstrip": false,
480
+ "normalized": false,
481
+ "rstrip": false,
482
+ "single_word": false,
483
+ "special": false
484
+ },
485
+ "60": {
486
+ "content": "<unused53>",
487
+ "lstrip": false,
488
+ "normalized": false,
489
+ "rstrip": false,
490
+ "single_word": false,
491
+ "special": false
492
+ },
493
+ "61": {
494
+ "content": "<unused54>",
495
+ "lstrip": false,
496
+ "normalized": false,
497
+ "rstrip": false,
498
+ "single_word": false,
499
+ "special": false
500
+ },
501
+ "62": {
502
+ "content": "<unused55>",
503
+ "lstrip": false,
504
+ "normalized": false,
505
+ "rstrip": false,
506
+ "single_word": false,
507
+ "special": false
508
+ },
509
+ "63": {
510
+ "content": "<unused56>",
511
+ "lstrip": false,
512
+ "normalized": false,
513
+ "rstrip": false,
514
+ "single_word": false,
515
+ "special": false
516
+ },
517
+ "64": {
518
+ "content": "<unused57>",
519
+ "lstrip": false,
520
+ "normalized": false,
521
+ "rstrip": false,
522
+ "single_word": false,
523
+ "special": false
524
+ },
525
+ "65": {
526
+ "content": "<unused58>",
527
+ "lstrip": false,
528
+ "normalized": false,
529
+ "rstrip": false,
530
+ "single_word": false,
531
+ "special": false
532
+ },
533
+ "66": {
534
+ "content": "<unused59>",
535
+ "lstrip": false,
536
+ "normalized": false,
537
+ "rstrip": false,
538
+ "single_word": false,
539
+ "special": false
540
+ },
541
+ "67": {
542
+ "content": "<unused60>",
543
+ "lstrip": false,
544
+ "normalized": false,
545
+ "rstrip": false,
546
+ "single_word": false,
547
+ "special": false
548
+ },
549
+ "68": {
550
+ "content": "<unused61>",
551
+ "lstrip": false,
552
+ "normalized": false,
553
+ "rstrip": false,
554
+ "single_word": false,
555
+ "special": false
556
+ },
557
+ "69": {
558
+ "content": "<unused62>",
559
+ "lstrip": false,
560
+ "normalized": false,
561
+ "rstrip": false,
562
+ "single_word": false,
563
+ "special": false
564
+ },
565
+ "70": {
566
+ "content": "<unused63>",
567
+ "lstrip": false,
568
+ "normalized": false,
569
+ "rstrip": false,
570
+ "single_word": false,
571
+ "special": false
572
+ },
573
+ "71": {
574
+ "content": "<unused64>",
575
+ "lstrip": false,
576
+ "normalized": false,
577
+ "rstrip": false,
578
+ "single_word": false,
579
+ "special": false
580
+ },
581
+ "72": {
582
+ "content": "<unused65>",
583
+ "lstrip": false,
584
+ "normalized": false,
585
+ "rstrip": false,
586
+ "single_word": false,
587
+ "special": false
588
+ },
589
+ "73": {
590
+ "content": "<unused66>",
591
+ "lstrip": false,
592
+ "normalized": false,
593
+ "rstrip": false,
594
+ "single_word": false,
595
+ "special": false
596
+ },
597
+ "74": {
598
+ "content": "<unused67>",
599
+ "lstrip": false,
600
+ "normalized": false,
601
+ "rstrip": false,
602
+ "single_word": false,
603
+ "special": false
604
+ },
605
+ "75": {
606
+ "content": "<unused68>",
607
+ "lstrip": false,
608
+ "normalized": false,
609
+ "rstrip": false,
610
+ "single_word": false,
611
+ "special": false
612
+ },
613
+ "76": {
614
+ "content": "<unused69>",
615
+ "lstrip": false,
616
+ "normalized": false,
617
+ "rstrip": false,
618
+ "single_word": false,
619
+ "special": false
620
+ },
621
+ "77": {
622
+ "content": "<unused70>",
623
+ "lstrip": false,
624
+ "normalized": false,
625
+ "rstrip": false,
626
+ "single_word": false,
627
+ "special": false
628
+ },
629
+ "78": {
630
+ "content": "<unused71>",
631
+ "lstrip": false,
632
+ "normalized": false,
633
+ "rstrip": false,
634
+ "single_word": false,
635
+ "special": false
636
+ },
637
+ "79": {
638
+ "content": "<unused72>",
639
+ "lstrip": false,
640
+ "normalized": false,
641
+ "rstrip": false,
642
+ "single_word": false,
643
+ "special": false
644
+ },
645
+ "80": {
646
+ "content": "<unused73>",
647
+ "lstrip": false,
648
+ "normalized": false,
649
+ "rstrip": false,
650
+ "single_word": false,
651
+ "special": false
652
+ },
653
+ "81": {
654
+ "content": "<unused74>",
655
+ "lstrip": false,
656
+ "normalized": false,
657
+ "rstrip": false,
658
+ "single_word": false,
659
+ "special": false
660
+ },
661
+ "82": {
662
+ "content": "<unused75>",
663
+ "lstrip": false,
664
+ "normalized": false,
665
+ "rstrip": false,
666
+ "single_word": false,
667
+ "special": false
668
+ },
669
+ "83": {
670
+ "content": "<unused76>",
671
+ "lstrip": false,
672
+ "normalized": false,
673
+ "rstrip": false,
674
+ "single_word": false,
675
+ "special": false
676
+ },
677
+ "84": {
678
+ "content": "<unused77>",
679
+ "lstrip": false,
680
+ "normalized": false,
681
+ "rstrip": false,
682
+ "single_word": false,
683
+ "special": false
684
+ },
685
+ "85": {
686
+ "content": "<unused78>",
687
+ "lstrip": false,
688
+ "normalized": false,
689
+ "rstrip": false,
690
+ "single_word": false,
691
+ "special": false
692
+ },
693
+ "86": {
694
+ "content": "<unused79>",
695
+ "lstrip": false,
696
+ "normalized": false,
697
+ "rstrip": false,
698
+ "single_word": false,
699
+ "special": false
700
+ },
701
+ "87": {
702
+ "content": "<unused80>",
703
+ "lstrip": false,
704
+ "normalized": false,
705
+ "rstrip": false,
706
+ "single_word": false,
707
+ "special": false
708
+ },
709
+ "88": {
710
+ "content": "<unused81>",
711
+ "lstrip": false,
712
+ "normalized": false,
713
+ "rstrip": false,
714
+ "single_word": false,
715
+ "special": false
716
+ },
717
+ "89": {
718
+ "content": "<unused82>",
719
+ "lstrip": false,
720
+ "normalized": false,
721
+ "rstrip": false,
722
+ "single_word": false,
723
+ "special": false
724
+ },
725
+ "90": {
726
+ "content": "<unused83>",
727
+ "lstrip": false,
728
+ "normalized": false,
729
+ "rstrip": false,
730
+ "single_word": false,
731
+ "special": false
732
+ },
733
+ "91": {
734
+ "content": "<unused84>",
735
+ "lstrip": false,
736
+ "normalized": false,
737
+ "rstrip": false,
738
+ "single_word": false,
739
+ "special": false
740
+ },
741
+ "92": {
742
+ "content": "<unused85>",
743
+ "lstrip": false,
744
+ "normalized": false,
745
+ "rstrip": false,
746
+ "single_word": false,
747
+ "special": false
748
+ },
749
+ "93": {
750
+ "content": "<unused86>",
751
+ "lstrip": false,
752
+ "normalized": false,
753
+ "rstrip": false,
754
+ "single_word": false,
755
+ "special": false
756
+ },
757
+ "94": {
758
+ "content": "<unused87>",
759
+ "lstrip": false,
760
+ "normalized": false,
761
+ "rstrip": false,
762
+ "single_word": false,
763
+ "special": false
764
+ },
765
+ "95": {
766
+ "content": "<unused88>",
767
+ "lstrip": false,
768
+ "normalized": false,
769
+ "rstrip": false,
770
+ "single_word": false,
771
+ "special": false
772
+ },
773
+ "96": {
774
+ "content": "<unused89>",
775
+ "lstrip": false,
776
+ "normalized": false,
777
+ "rstrip": false,
778
+ "single_word": false,
779
+ "special": false
780
+ },
781
+ "97": {
782
+ "content": "<unused90>",
783
+ "lstrip": false,
784
+ "normalized": false,
785
+ "rstrip": false,
786
+ "single_word": false,
787
+ "special": false
788
+ },
789
+ "98": {
790
+ "content": "<unused91>",
791
+ "lstrip": false,
792
+ "normalized": false,
793
+ "rstrip": false,
794
+ "single_word": false,
795
+ "special": false
796
+ },
797
+ "99": {
798
+ "content": "<unused92>",
799
+ "lstrip": false,
800
+ "normalized": false,
801
+ "rstrip": false,
802
+ "single_word": false,
803
+ "special": false
804
+ },
805
+ "100": {
806
+ "content": "<unused93>",
807
+ "lstrip": false,
808
+ "normalized": false,
809
+ "rstrip": false,
810
+ "single_word": false,
811
+ "special": false
812
+ },
813
+ "101": {
814
+ "content": "<unused94>",
815
+ "lstrip": false,
816
+ "normalized": false,
817
+ "rstrip": false,
818
+ "single_word": false,
819
+ "special": false
820
+ },
821
+ "102": {
822
+ "content": "<unused95>",
823
+ "lstrip": false,
824
+ "normalized": false,
825
+ "rstrip": false,
826
+ "single_word": false,
827
+ "special": false
828
+ },
829
+ "103": {
830
+ "content": "<unused96>",
831
+ "lstrip": false,
832
+ "normalized": false,
833
+ "rstrip": false,
834
+ "single_word": false,
835
+ "special": false
836
+ },
837
+ "104": {
838
+ "content": "<unused97>",
839
+ "lstrip": false,
840
+ "normalized": false,
841
+ "rstrip": false,
842
+ "single_word": false,
843
+ "special": false
844
+ },
845
+ "105": {
846
+ "content": "<unused98>",
847
+ "lstrip": false,
848
+ "normalized": false,
849
+ "rstrip": false,
850
+ "single_word": false,
851
+ "special": false
852
+ },
853
+ "106": {
854
+ "content": "<start_of_turn>",
855
+ "lstrip": false,
856
+ "normalized": false,
857
+ "rstrip": false,
858
+ "single_word": false,
859
+ "special": true
860
+ },
861
+ "107": {
862
+ "content": "<end_of_turn>",
863
+ "lstrip": false,
864
+ "normalized": false,
865
+ "rstrip": false,
866
+ "single_word": false,
867
+ "special": true
868
+ },
869
+ "108": {
870
+ "content": "\n",
871
+ "lstrip": false,
872
+ "normalized": false,
873
+ "rstrip": false,
874
+ "single_word": false,
875
+ "special": false
876
+ },
877
+ "109": {
878
+ "content": "\n\n",
879
+ "lstrip": false,
880
+ "normalized": false,
881
+ "rstrip": false,
882
+ "single_word": false,
883
+ "special": false
884
+ },
885
+ "110": {
886
+ "content": "\n\n\n",
887
+ "lstrip": false,
888
+ "normalized": false,
889
+ "rstrip": false,
890
+ "single_word": false,
891
+ "special": false
892
+ },
893
+ "111": {
894
+ "content": "\n\n\n\n",
895
+ "lstrip": false,
896
+ "normalized": false,
897
+ "rstrip": false,
898
+ "single_word": false,
899
+ "special": false
900
+ },
901
+ "112": {
902
+ "content": "\n\n\n\n\n",
903
+ "lstrip": false,
904
+ "normalized": false,
905
+ "rstrip": false,
906
+ "single_word": false,
907
+ "special": false
908
+ },
909
+ "113": {
910
+ "content": "\n\n\n\n\n\n",
911
+ "lstrip": false,
912
+ "normalized": false,
913
+ "rstrip": false,
914
+ "single_word": false,
915
+ "special": false
916
+ },
917
+ "114": {
918
+ "content": "\n\n\n\n\n\n\n",
919
+ "lstrip": false,
920
+ "normalized": false,
921
+ "rstrip": false,
922
+ "single_word": false,
923
+ "special": false
924
+ },
925
+ "115": {
926
+ "content": "\n\n\n\n\n\n\n\n",
927
+ "lstrip": false,
928
+ "normalized": false,
929
+ "rstrip": false,
930
+ "single_word": false,
931
+ "special": false
932
+ },
933
+ "116": {
934
+ "content": "\n\n\n\n\n\n\n\n\n",
935
+ "lstrip": false,
936
+ "normalized": false,
937
+ "rstrip": false,
938
+ "single_word": false,
939
+ "special": false
940
+ },
941
+ "117": {
942
+ "content": "\n\n\n\n\n\n\n\n\n\n",
943
+ "lstrip": false,
944
+ "normalized": false,
945
+ "rstrip": false,
946
+ "single_word": false,
947
+ "special": false
948
+ },
949
+ "118": {
950
+ "content": "\n\n\n\n\n\n\n\n\n\n\n",
951
+ "lstrip": false,
952
+ "normalized": false,
953
+ "rstrip": false,
954
+ "single_word": false,
955
+ "special": false
956
+ },
957
+ "119": {
958
+ "content": "\n\n\n\n\n\n\n\n\n\n\n\n",
959
+ "lstrip": false,
960
+ "normalized": false,
961
+ "rstrip": false,
962
+ "single_word": false,
963
+ "special": false
964
+ },
965
+ "120": {
966
+ "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n",
967
+ "lstrip": false,
968
+ "normalized": false,
969
+ "rstrip": false,
970
+ "single_word": false,
971
+ "special": false
972
+ },
973
+ "121": {
974
+ "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
975
+ "lstrip": false,
976
+ "normalized": false,
977
+ "rstrip": false,
978
+ "single_word": false,
979
+ "special": false
980
+ },
981
+ "122": {
982
+ "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
983
+ "lstrip": false,
984
+ "normalized": false,
985
+ "rstrip": false,
986
+ "single_word": false,
987
+ "special": false
988
+ },
989
+ "123": {
990
+ "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
991
+ "lstrip": false,
992
+ "normalized": false,
993
+ "rstrip": false,
994
+ "single_word": false,
995
+ "special": false
996
+ },
997
+ "124": {
998
+ "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
999
+ "lstrip": false,
1000
+ "normalized": false,
1001
+ "rstrip": false,
1002
+ "single_word": false,
1003
+ "special": false
1004
+ },
1005
+ "125": {
1006
+ "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
1007
+ "lstrip": false,
1008
+ "normalized": false,
1009
+ "rstrip": false,
1010
+ "single_word": false,
1011
+ "special": false
1012
+ },
1013
+ "126": {
1014
+ "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
1015
+ "lstrip": false,
1016
+ "normalized": false,
1017
+ "rstrip": false,
1018
+ "single_word": false,
1019
+ "special": false
1020
+ },
1021
+ "127": {
1022
+ "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
1023
+ "lstrip": false,
1024
+ "normalized": false,
1025
+ "rstrip": false,
1026
+ "single_word": false,
1027
+ "special": false
1028
+ },
1029
+ "128": {
1030
+ "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
1031
+ "lstrip": false,
1032
+ "normalized": false,
1033
+ "rstrip": false,
1034
+ "single_word": false,
1035
+ "special": false
1036
+ },
1037
+ "129": {
1038
+ "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
1039
+ "lstrip": false,
1040
+ "normalized": false,
1041
+ "rstrip": false,
1042
+ "single_word": false,
1043
+ "special": false
1044
+ },
1045
+ "130": {
1046
+ "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
1047
+ "lstrip": false,
1048
+ "normalized": false,
1049
+ "rstrip": false,
1050
+ "single_word": false,
1051
+ "special": false
1052
+ },
1053
+ "131": {
1054
+ "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
1055
+ "lstrip": false,
1056
+ "normalized": false,
1057
+ "rstrip": false,
1058
+ "single_word": false,
1059
+ "special": false
1060
+ },
1061
+ "132": {
1062
+ "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
1063
+ "lstrip": false,
1064
+ "normalized": false,
1065
+ "rstrip": false,
1066
+ "single_word": false,
1067
+ "special": false
1068
+ },
1069
+ "133": {
1070
+ "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
1071
+ "lstrip": false,
1072
+ "normalized": false,
1073
+ "rstrip": false,
1074
+ "single_word": false,
1075
+ "special": false
1076
+ },
1077
+ "134": {
1078
+ "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
1079
+ "lstrip": false,
1080
+ "normalized": false,
1081
+ "rstrip": false,
1082
+ "single_word": false,
1083
+ "special": false
1084
+ },
1085
+ "135": {
1086
+ "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
1087
+ "lstrip": false,
1088
+ "normalized": false,
1089
+ "rstrip": false,
1090
+ "single_word": false,
1091
+ "special": false
1092
+ },
1093
+ "136": {
1094
+ "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
1095
+ "lstrip": false,
1096
+ "normalized": false,
1097
+ "rstrip": false,
1098
+ "single_word": false,
1099
+ "special": false
1100
+ },
1101
+ "137": {
1102
+ "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
1103
+ "lstrip": false,
1104
+ "normalized": false,
1105
+ "rstrip": false,
1106
+ "single_word": false,
1107
+ "special": false
1108
+ },
1109
+ "138": {
1110
+ "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
1111
+ "lstrip": false,
1112
+ "normalized": false,
1113
+ "rstrip": false,
1114
+ "single_word": false,
1115
+ "special": false
1116
+ },
1117
+ "139": {
1118
+ "content": "▁▁",
1119
+ "lstrip": false,
1120
+ "normalized": false,
1121
+ "rstrip": false,
1122
+ "single_word": false,
1123
+ "special": false
1124
+ },
1125
+ "140": {
1126
+ "content": "▁▁▁",
1127
+ "lstrip": false,
1128
+ "normalized": false,
1129
+ "rstrip": false,
1130
+ "single_word": false,
1131
+ "special": false
1132
+ },
1133
+ "141": {
1134
+ "content": "▁▁▁▁",
1135
+ "lstrip": false,
1136
+ "normalized": false,
1137
+ "rstrip": false,
1138
+ "single_word": false,
1139
+ "special": false
1140
+ },
1141
+ "142": {
1142
+ "content": "▁▁▁▁▁",
1143
+ "lstrip": false,
1144
+ "normalized": false,
1145
+ "rstrip": false,
1146
+ "single_word": false,
1147
+ "special": false
1148
+ },
1149
+ "143": {
1150
+ "content": "▁▁▁▁▁▁",
1151
+ "lstrip": false,
1152
+ "normalized": false,
1153
+ "rstrip": false,
1154
+ "single_word": false,
1155
+ "special": false
1156
+ },
1157
+ "144": {
1158
+ "content": "▁▁▁▁▁▁▁",
1159
+ "lstrip": false,
1160
+ "normalized": false,
1161
+ "rstrip": false,
1162
+ "single_word": false,
1163
+ "special": false
1164
+ },
1165
+ "145": {
1166
+ "content": "▁▁▁▁▁▁▁▁",
1167
+ "lstrip": false,
1168
+ "normalized": false,
1169
+ "rstrip": false,
1170
+ "single_word": false,
1171
+ "special": false
1172
+ },
1173
+ "146": {
1174
+ "content": "▁▁▁▁▁▁▁▁▁",
1175
+ "lstrip": false,
1176
+ "normalized": false,
1177
+ "rstrip": false,
1178
+ "single_word": false,
1179
+ "special": false
1180
+ },
1181
+ "147": {
1182
+ "content": "▁▁▁▁▁▁▁▁▁▁",
1183
+ "lstrip": false,
1184
+ "normalized": false,
1185
+ "rstrip": false,
1186
+ "single_word": false,
1187
+ "special": false
1188
+ },
1189
+ "148": {
1190
+ "content": "▁▁▁▁▁▁▁▁▁▁▁",
1191
+ "lstrip": false,
1192
+ "normalized": false,
1193
+ "rstrip": false,
1194
+ "single_word": false,
1195
+ "special": false
1196
+ },
1197
+ "149": {
1198
+ "content": "▁▁▁▁▁▁▁▁▁▁▁▁",
1199
+ "lstrip": false,
1200
+ "normalized": false,
1201
+ "rstrip": false,
1202
+ "single_word": false,
1203
+ "special": false
1204
+ },
1205
+ "150": {
1206
+ "content": "▁▁▁▁▁▁▁▁▁▁▁▁▁",
1207
+ "lstrip": false,
1208
+ "normalized": false,
1209
+ "rstrip": false,
1210
+ "single_word": false,
1211
+ "special": false
1212
+ },
1213
+ "151": {
1214
+ "content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1215
+ "lstrip": false,
1216
+ "normalized": false,
1217
+ "rstrip": false,
1218
+ "single_word": false,
1219
+ "special": false
1220
+ },
1221
+ "152": {
1222
+ "content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1223
+ "lstrip": false,
1224
+ "normalized": false,
1225
+ "rstrip": false,
1226
+ "single_word": false,
1227
+ "special": false
1228
+ },
1229
+ "153": {
1230
+ "content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1231
+ "lstrip": false,
1232
+ "normalized": false,
1233
+ "rstrip": false,
1234
+ "single_word": false,
1235
+ "special": false
1236
+ },
1237
+ "154": {
1238
+ "content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1239
+ "lstrip": false,
1240
+ "normalized": false,
1241
+ "rstrip": false,
1242
+ "single_word": false,
1243
+ "special": false
1244
+ },
1245
+ "155": {
1246
+ "content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1247
+ "lstrip": false,
1248
+ "normalized": false,
1249
+ "rstrip": false,
1250
+ "single_word": false,
1251
+ "special": false
1252
+ },
1253
+ "156": {
1254
+ "content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1255
+ "lstrip": false,
1256
+ "normalized": false,
1257
+ "rstrip": false,
1258
+ "single_word": false,
1259
+ "special": false
1260
+ },
1261
+ "157": {
1262
+ "content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1263
+ "lstrip": false,
1264
+ "normalized": false,
1265
+ "rstrip": false,
1266
+ "single_word": false,
1267
+ "special": false
1268
+ },
1269
+ "158": {
1270
+ "content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1271
+ "lstrip": false,
1272
+ "normalized": false,
1273
+ "rstrip": false,
1274
+ "single_word": false,
1275
+ "special": false
1276
+ },
1277
+ "159": {
1278
+ "content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1279
+ "lstrip": false,
1280
+ "normalized": false,
1281
+ "rstrip": false,
1282
+ "single_word": false,
1283
+ "special": false
1284
+ },
1285
+ "160": {
1286
+ "content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1287
+ "lstrip": false,
1288
+ "normalized": false,
1289
+ "rstrip": false,
1290
+ "single_word": false,
1291
+ "special": false
1292
+ },
1293
+ "161": {
1294
+ "content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1295
+ "lstrip": false,
1296
+ "normalized": false,
1297
+ "rstrip": false,
1298
+ "single_word": false,
1299
+ "special": false
1300
+ },
1301
+ "162": {
1302
+ "content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1303
+ "lstrip": false,
1304
+ "normalized": false,
1305
+ "rstrip": false,
1306
+ "single_word": false,
1307
+ "special": false
1308
+ },
1309
+ "163": {
1310
+ "content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1311
+ "lstrip": false,
1312
+ "normalized": false,
1313
+ "rstrip": false,
1314
+ "single_word": false,
1315
+ "special": false
1316
+ },
1317
+ "164": {
1318
+ "content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1319
+ "lstrip": false,
1320
+ "normalized": false,
1321
+ "rstrip": false,
1322
+ "single_word": false,
1323
+ "special": false
1324
+ },
1325
+ "165": {
1326
+ "content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1327
+ "lstrip": false,
1328
+ "normalized": false,
1329
+ "rstrip": false,
1330
+ "single_word": false,
1331
+ "special": false
1332
+ },
1333
+ "166": {
1334
+ "content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1335
+ "lstrip": false,
1336
+ "normalized": false,
1337
+ "rstrip": false,
1338
+ "single_word": false,
1339
+ "special": false
1340
+ },
1341
+ "167": {
1342
+ "content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1343
+ "lstrip": false,
1344
+ "normalized": false,
1345
+ "rstrip": false,
1346
+ "single_word": false,
1347
+ "special": false
1348
+ },
1349
+ "168": {
1350
+ "content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1351
+ "lstrip": false,
1352
+ "normalized": false,
1353
+ "rstrip": false,
1354
+ "single_word": false,
1355
+ "special": false
1356
+ },
1357
+ "169": {
1358
+ "content": "<table>",
1359
+ "lstrip": false,
1360
+ "normalized": false,
1361
+ "rstrip": false,
1362
+ "single_word": false,
1363
+ "special": false
1364
+ },
1365
+ "170": {
1366
+ "content": "<caption>",
1367
+ "lstrip": false,
1368
+ "normalized": false,
1369
+ "rstrip": false,
1370
+ "single_word": false,
1371
+ "special": false
1372
+ },
1373
+ "171": {
1374
+ "content": "<thead>",
1375
+ "lstrip": false,
1376
+ "normalized": false,
1377
+ "rstrip": false,
1378
+ "single_word": false,
1379
+ "special": false
1380
+ },
1381
+ "172": {
1382
+ "content": "<tbody>",
1383
+ "lstrip": false,
1384
+ "normalized": false,
1385
+ "rstrip": false,
1386
+ "single_word": false,
1387
+ "special": false
1388
+ },
1389
+ "173": {
1390
+ "content": "<tfoot>",
1391
+ "lstrip": false,
1392
+ "normalized": false,
1393
+ "rstrip": false,
1394
+ "single_word": false,
1395
+ "special": false
1396
+ },
1397
+ "174": {
1398
+ "content": "<tr>",
1399
+ "lstrip": false,
1400
+ "normalized": false,
1401
+ "rstrip": false,
1402
+ "single_word": false,
1403
+ "special": false
1404
+ },
1405
+ "175": {
1406
+ "content": "<th>",
1407
+ "lstrip": false,
1408
+ "normalized": false,
1409
+ "rstrip": false,
1410
+ "single_word": false,
1411
+ "special": false
1412
+ },
1413
+ "176": {
1414
+ "content": "<td>",
1415
+ "lstrip": false,
1416
+ "normalized": false,
1417
+ "rstrip": false,
1418
+ "single_word": false,
1419
+ "special": false
1420
+ },
1421
+ "177": {
1422
+ "content": "</table>",
1423
+ "lstrip": false,
1424
+ "normalized": false,
1425
+ "rstrip": false,
1426
+ "single_word": false,
1427
+ "special": false
1428
+ },
1429
+ "178": {
1430
+ "content": "</caption>",
1431
+ "lstrip": false,
1432
+ "normalized": false,
1433
+ "rstrip": false,
1434
+ "single_word": false,
1435
+ "special": false
1436
+ },
1437
+ "179": {
1438
+ "content": "</thead>",
1439
+ "lstrip": false,
1440
+ "normalized": false,
1441
+ "rstrip": false,
1442
+ "single_word": false,
1443
+ "special": false
1444
+ },
1445
+ "180": {
1446
+ "content": "</tbody>",
1447
+ "lstrip": false,
1448
+ "normalized": false,
1449
+ "rstrip": false,
1450
+ "single_word": false,
1451
+ "special": false
1452
+ },
1453
+ "181": {
1454
+ "content": "</tfoot>",
1455
+ "lstrip": false,
1456
+ "normalized": false,
1457
+ "rstrip": false,
1458
+ "single_word": false,
1459
+ "special": false
1460
+ },
1461
+ "182": {
1462
+ "content": "</tr>",
1463
+ "lstrip": false,
1464
+ "normalized": false,
1465
+ "rstrip": false,
1466
+ "single_word": false,
1467
+ "special": false
1468
+ },
1469
+ "183": {
1470
+ "content": "</th>",
1471
+ "lstrip": false,
1472
+ "normalized": false,
1473
+ "rstrip": false,
1474
+ "single_word": false,
1475
+ "special": false
1476
+ },
1477
+ "184": {
1478
+ "content": "</td>",
1479
+ "lstrip": false,
1480
+ "normalized": false,
1481
+ "rstrip": false,
1482
+ "single_word": false,
1483
+ "special": false
1484
+ },
1485
+ "185": {
1486
+ "content": "<h1>",
1487
+ "lstrip": false,
1488
+ "normalized": false,
1489
+ "rstrip": false,
1490
+ "single_word": false,
1491
+ "special": false
1492
+ },
1493
+ "186": {
1494
+ "content": "<h2>",
1495
+ "lstrip": false,
1496
+ "normalized": false,
1497
+ "rstrip": false,
1498
+ "single_word": false,
1499
+ "special": false
1500
+ },
1501
+ "187": {
1502
+ "content": "<h3>",
1503
+ "lstrip": false,
1504
+ "normalized": false,
1505
+ "rstrip": false,
1506
+ "single_word": false,
1507
+ "special": false
1508
+ },
1509
+ "188": {
1510
+ "content": "<h4>",
1511
+ "lstrip": false,
1512
+ "normalized": false,
1513
+ "rstrip": false,
1514
+ "single_word": false,
1515
+ "special": false
1516
+ },
1517
+ "189": {
1518
+ "content": "<h5>",
1519
+ "lstrip": false,
1520
+ "normalized": false,
1521
+ "rstrip": false,
1522
+ "single_word": false,
1523
+ "special": false
1524
+ },
1525
+ "190": {
1526
+ "content": "<h6>",
1527
+ "lstrip": false,
1528
+ "normalized": false,
1529
+ "rstrip": false,
1530
+ "single_word": false,
1531
+ "special": false
1532
+ },
1533
+ "191": {
1534
+ "content": "<blockquote>",
1535
+ "lstrip": false,
1536
+ "normalized": false,
1537
+ "rstrip": false,
1538
+ "single_word": false,
1539
+ "special": false
1540
+ },
1541
+ "192": {
1542
+ "content": "</h1>",
1543
+ "lstrip": false,
1544
+ "normalized": false,
1545
+ "rstrip": false,
1546
+ "single_word": false,
1547
+ "special": false
1548
+ },
1549
+ "193": {
1550
+ "content": "</h2>",
1551
+ "lstrip": false,
1552
+ "normalized": false,
1553
+ "rstrip": false,
1554
+ "single_word": false,
1555
+ "special": false
1556
+ },
1557
+ "194": {
1558
+ "content": "</h3>",
1559
+ "lstrip": false,
1560
+ "normalized": false,
1561
+ "rstrip": false,
1562
+ "single_word": false,
1563
+ "special": false
1564
+ },
1565
+ "195": {
1566
+ "content": "</h4>",
1567
+ "lstrip": false,
1568
+ "normalized": false,
1569
+ "rstrip": false,
1570
+ "single_word": false,
1571
+ "special": false
1572
+ },
1573
+ "196": {
1574
+ "content": "</h5>",
1575
+ "lstrip": false,
1576
+ "normalized": false,
1577
+ "rstrip": false,
1578
+ "single_word": false,
1579
+ "special": false
1580
+ },
1581
+ "197": {
1582
+ "content": "</h6>",
1583
+ "lstrip": false,
1584
+ "normalized": false,
1585
+ "rstrip": false,
1586
+ "single_word": false,
1587
+ "special": false
1588
+ },
1589
+ "198": {
1590
+ "content": "</blockquote>",
1591
+ "lstrip": false,
1592
+ "normalized": false,
1593
+ "rstrip": false,
1594
+ "single_word": false,
1595
+ "special": false
1596
+ },
1597
+ "199": {
1598
+ "content": "<strong>",
1599
+ "lstrip": false,
1600
+ "normalized": false,
1601
+ "rstrip": false,
1602
+ "single_word": false,
1603
+ "special": false
1604
+ },
1605
+ "200": {
1606
+ "content": "<em>",
1607
+ "lstrip": false,
1608
+ "normalized": false,
1609
+ "rstrip": false,
1610
+ "single_word": false,
1611
+ "special": false
1612
+ },
1613
+ "201": {
1614
+ "content": "<b>",
1615
+ "lstrip": false,
1616
+ "normalized": false,
1617
+ "rstrip": false,
1618
+ "single_word": false,
1619
+ "special": false
1620
+ },
1621
+ "202": {
1622
+ "content": "<i>",
1623
+ "lstrip": false,
1624
+ "normalized": false,
1625
+ "rstrip": false,
1626
+ "single_word": false,
1627
+ "special": false
1628
+ },
1629
+ "203": {
1630
+ "content": "<u>",
1631
+ "lstrip": false,
1632
+ "normalized": false,
1633
+ "rstrip": false,
1634
+ "single_word": false,
1635
+ "special": false
1636
+ },
1637
+ "204": {
1638
+ "content": "<s>",
1639
+ "lstrip": false,
1640
+ "normalized": false,
1641
+ "rstrip": false,
1642
+ "single_word": false,
1643
+ "special": false
1644
+ },
1645
+ "205": {
1646
+ "content": "<sub>",
1647
+ "lstrip": false,
1648
+ "normalized": false,
1649
+ "rstrip": false,
1650
+ "single_word": false,
1651
+ "special": false
1652
+ },
1653
+ "206": {
1654
+ "content": "<sup>",
1655
+ "lstrip": false,
1656
+ "normalized": false,
1657
+ "rstrip": false,
1658
+ "single_word": false,
1659
+ "special": false
1660
+ },
1661
+ "207": {
1662
+ "content": "<code>",
1663
+ "lstrip": false,
1664
+ "normalized": false,
1665
+ "rstrip": false,
1666
+ "single_word": false,
1667
+ "special": false
1668
+ },
1669
+ "208": {
1670
+ "content": "</strong>",
1671
+ "lstrip": false,
1672
+ "normalized": false,
1673
+ "rstrip": false,
1674
+ "single_word": false,
1675
+ "special": false
1676
+ },
1677
+ "209": {
1678
+ "content": "</em>",
1679
+ "lstrip": false,
1680
+ "normalized": false,
1681
+ "rstrip": false,
1682
+ "single_word": false,
1683
+ "special": false
1684
+ },
1685
+ "210": {
1686
+ "content": "</b>",
1687
+ "lstrip": false,
1688
+ "normalized": false,
1689
+ "rstrip": false,
1690
+ "single_word": false,
1691
+ "special": false
1692
+ },
1693
+ "211": {
1694
+ "content": "</i>",
1695
+ "lstrip": false,
1696
+ "normalized": false,
1697
+ "rstrip": false,
1698
+ "single_word": false,
1699
+ "special": false
1700
+ },
1701
+ "212": {
1702
+ "content": "</u>",
1703
+ "lstrip": false,
1704
+ "normalized": false,
1705
+ "rstrip": false,
1706
+ "single_word": false,
1707
+ "special": false
1708
+ },
1709
+ "213": {
1710
+ "content": "</s>",
1711
+ "lstrip": false,
1712
+ "normalized": false,
1713
+ "rstrip": false,
1714
+ "single_word": false,
1715
+ "special": false
1716
+ },
1717
+ "214": {
1718
+ "content": "</sub>",
1719
+ "lstrip": false,
1720
+ "normalized": false,
1721
+ "rstrip": false,
1722
+ "single_word": false,
1723
+ "special": false
1724
+ },
1725
+ "215": {
1726
+ "content": "</sup>",
1727
+ "lstrip": false,
1728
+ "normalized": false,
1729
+ "rstrip": false,
1730
+ "single_word": false,
1731
+ "special": false
1732
+ },
1733
+ "216": {
1734
+ "content": "</code>",
1735
+ "lstrip": false,
1736
+ "normalized": false,
1737
+ "rstrip": false,
1738
+ "single_word": false,
1739
+ "special": false
1740
+ },
1741
+ "255968": {
1742
+ "content": "[toxicity=0]",
1743
+ "lstrip": false,
1744
+ "normalized": false,
1745
+ "rstrip": false,
1746
+ "single_word": false,
1747
+ "special": false
1748
+ },
1749
+ "255969": {
1750
+ "content": "\t\t",
1751
+ "lstrip": false,
1752
+ "normalized": false,
1753
+ "rstrip": false,
1754
+ "single_word": false,
1755
+ "special": false
1756
+ },
1757
+ "255970": {
1758
+ "content": "\t\t\t",
1759
+ "lstrip": false,
1760
+ "normalized": false,
1761
+ "rstrip": false,
1762
+ "single_word": false,
1763
+ "special": false
1764
+ },
1765
+ "255971": {
1766
+ "content": "\t\t\t\t",
1767
+ "lstrip": false,
1768
+ "normalized": false,
1769
+ "rstrip": false,
1770
+ "single_word": false,
1771
+ "special": false
1772
+ },
1773
+ "255972": {
1774
+ "content": "\t\t\t\t\t",
1775
+ "lstrip": false,
1776
+ "normalized": false,
1777
+ "rstrip": false,
1778
+ "single_word": false,
1779
+ "special": false
1780
+ },
1781
+ "255973": {
1782
+ "content": "\t\t\t\t\t\t",
1783
+ "lstrip": false,
1784
+ "normalized": false,
1785
+ "rstrip": false,
1786
+ "single_word": false,
1787
+ "special": false
1788
+ },
1789
+ "255974": {
1790
+ "content": "\t\t\t\t\t\t\t",
1791
+ "lstrip": false,
1792
+ "normalized": false,
1793
+ "rstrip": false,
1794
+ "single_word": false,
1795
+ "special": false
1796
+ },
1797
+ "255975": {
1798
+ "content": "\t\t\t\t\t\t\t\t",
1799
+ "lstrip": false,
1800
+ "normalized": false,
1801
+ "rstrip": false,
1802
+ "single_word": false,
1803
+ "special": false
1804
+ },
1805
+ "255976": {
1806
+ "content": "\t\t\t\t\t\t\t\t\t",
1807
+ "lstrip": false,
1808
+ "normalized": false,
1809
+ "rstrip": false,
1810
+ "single_word": false,
1811
+ "special": false
1812
+ },
1813
+ "255977": {
1814
+ "content": "\t\t\t\t\t\t\t\t\t\t",
1815
+ "lstrip": false,
1816
+ "normalized": false,
1817
+ "rstrip": false,
1818
+ "single_word": false,
1819
+ "special": false
1820
+ },
1821
+ "255978": {
1822
+ "content": "\t\t\t\t\t\t\t\t\t\t\t",
1823
+ "lstrip": false,
1824
+ "normalized": false,
1825
+ "rstrip": false,
1826
+ "single_word": false,
1827
+ "special": false
1828
+ },
1829
+ "255979": {
1830
+ "content": "\t\t\t\t\t\t\t\t\t\t\t\t",
1831
+ "lstrip": false,
1832
+ "normalized": false,
1833
+ "rstrip": false,
1834
+ "single_word": false,
1835
+ "special": false
1836
+ },
1837
+ "255980": {
1838
+ "content": "\t\t\t\t\t\t\t\t\t\t\t\t\t",
1839
+ "lstrip": false,
1840
+ "normalized": false,
1841
+ "rstrip": false,
1842
+ "single_word": false,
1843
+ "special": false
1844
+ },
1845
+ "255981": {
1846
+ "content": "\t\t\t\t\t\t\t\t\t\t\t\t\t\t",
1847
+ "lstrip": false,
1848
+ "normalized": false,
1849
+ "rstrip": false,
1850
+ "single_word": false,
1851
+ "special": false
1852
+ },
1853
+ "255982": {
1854
+ "content": "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",
1855
+ "lstrip": false,
1856
+ "normalized": false,
1857
+ "rstrip": false,
1858
+ "single_word": false,
1859
+ "special": false
1860
+ },
1861
+ "255983": {
1862
+ "content": "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",
1863
+ "lstrip": false,
1864
+ "normalized": false,
1865
+ "rstrip": false,
1866
+ "single_word": false,
1867
+ "special": false
1868
+ },
1869
+ "255984": {
1870
+ "content": "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",
1871
+ "lstrip": false,
1872
+ "normalized": false,
1873
+ "rstrip": false,
1874
+ "single_word": false,
1875
+ "special": false
1876
+ },
1877
+ "255985": {
1878
+ "content": "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",
1879
+ "lstrip": false,
1880
+ "normalized": false,
1881
+ "rstrip": false,
1882
+ "single_word": false,
1883
+ "special": false
1884
+ },
1885
+ "255986": {
1886
+ "content": "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",
1887
+ "lstrip": false,
1888
+ "normalized": false,
1889
+ "rstrip": false,
1890
+ "single_word": false,
1891
+ "special": false
1892
+ },
1893
+ "255987": {
1894
+ "content": "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",
1895
+ "lstrip": false,
1896
+ "normalized": false,
1897
+ "rstrip": false,
1898
+ "single_word": false,
1899
+ "special": false
1900
+ },
1901
+ "255988": {
1902
+ "content": "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",
1903
+ "lstrip": false,
1904
+ "normalized": false,
1905
+ "rstrip": false,
1906
+ "single_word": false,
1907
+ "special": false
1908
+ },
1909
+ "255989": {
1910
+ "content": "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",
1911
+ "lstrip": false,
1912
+ "normalized": false,
1913
+ "rstrip": false,
1914
+ "single_word": false,
1915
+ "special": false
1916
+ },
1917
+ "255990": {
1918
+ "content": "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",
1919
+ "lstrip": false,
1920
+ "normalized": false,
1921
+ "rstrip": false,
1922
+ "single_word": false,
1923
+ "special": false
1924
+ },
1925
+ "255991": {
1926
+ "content": "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",
1927
+ "lstrip": false,
1928
+ "normalized": false,
1929
+ "rstrip": false,
1930
+ "single_word": false,
1931
+ "special": false
1932
+ },
1933
+ "255992": {
1934
+ "content": "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",
1935
+ "lstrip": false,
1936
+ "normalized": false,
1937
+ "rstrip": false,
1938
+ "single_word": false,
1939
+ "special": false
1940
+ },
1941
+ "255993": {
1942
+ "content": "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",
1943
+ "lstrip": false,
1944
+ "normalized": false,
1945
+ "rstrip": false,
1946
+ "single_word": false,
1947
+ "special": false
1948
+ },
1949
+ "255994": {
1950
+ "content": "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",
1951
+ "lstrip": false,
1952
+ "normalized": false,
1953
+ "rstrip": false,
1954
+ "single_word": false,
1955
+ "special": false
1956
+ },
1957
+ "255995": {
1958
+ "content": "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",
1959
+ "lstrip": false,
1960
+ "normalized": false,
1961
+ "rstrip": false,
1962
+ "single_word": false,
1963
+ "special": false
1964
+ },
1965
+ "255996": {
1966
+ "content": "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",
1967
+ "lstrip": false,
1968
+ "normalized": false,
1969
+ "rstrip": false,
1970
+ "single_word": false,
1971
+ "special": false
1972
+ },
1973
+ "255997": {
1974
+ "content": "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",
1975
+ "lstrip": false,
1976
+ "normalized": false,
1977
+ "rstrip": false,
1978
+ "single_word": false,
1979
+ "special": false
1980
+ },
1981
+ "255998": {
1982
+ "content": "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",
1983
+ "lstrip": false,
1984
+ "normalized": false,
1985
+ "rstrip": false,
1986
+ "single_word": false,
1987
+ "special": false
1988
+ },
1989
+ "255999": {
1990
+ "content": "<unused99>",
1991
+ "lstrip": false,
1992
+ "normalized": false,
1993
+ "rstrip": false,
1994
+ "single_word": false,
1995
+ "special": false
1996
+ }
1997
+ },
1998
+ "additional_special_tokens": [
1999
+ "<start_of_turn>",
2000
+ "<end_of_turn>"
2001
+ ],
2002
+ "bos_token": "<bos>",
2003
+ "chat_template": "{{ bos_token }}{% if messages[0]['role'] == 'system' %}{{ raise_exception('System role not supported') }}{% endif %}{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if (message['role'] == 'assistant') %}{% set role = 'model' %}{% else %}{% set role = message['role'] %}{% endif %}{{ '<start_of_turn>' + role + '\n' + message['content'] | trim + '<end_of_turn>\n' }}{% endfor %}{% if add_generation_prompt %}{{'<start_of_turn>model\n'}}{% endif %}",
2004
+ "clean_up_tokenization_spaces": false,
2005
+ "eos_token": "<eos>",
2006
+ "model_max_length": 1000000000000000019884624838656,
2007
+ "pad_token": "<eos>",
2008
+ "sp_model_kwargs": {},
2009
+ "spaces_between_special_tokens": false,
2010
+ "tokenizer_class": "GemmaTokenizer",
2011
+ "unk_token": "<unk>",
2012
+ "use_default_system_prompt": false
2013
+ }
trainer_state.json ADDED
@@ -0,0 +1,460 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 3.5842293906810037,
5
+ "eval_steps": 1000,
6
+ "global_step": 6000,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "epoch": 0.0005973715651135006,
13
+ "grad_norm": 8.9375,
14
+ "learning_rate": 2e-06,
15
+ "loss": 1.3168,
16
+ "step": 1
17
+ },
18
+ {
19
+ "epoch": 0.05973715651135006,
20
+ "grad_norm": 0.625,
21
+ "learning_rate": 0.0002,
22
+ "loss": 0.5498,
23
+ "step": 100
24
+ },
25
+ {
26
+ "epoch": 0.11947431302270012,
27
+ "grad_norm": 0.322265625,
28
+ "learning_rate": 0.0004,
29
+ "loss": 0.3884,
30
+ "step": 200
31
+ },
32
+ {
33
+ "epoch": 0.17921146953405018,
34
+ "grad_norm": 0.302734375,
35
+ "learning_rate": 0.0006,
36
+ "loss": 0.376,
37
+ "step": 300
38
+ },
39
+ {
40
+ "epoch": 0.23894862604540024,
41
+ "grad_norm": 0.12353515625,
42
+ "learning_rate": 0.0008,
43
+ "loss": 0.3635,
44
+ "step": 400
45
+ },
46
+ {
47
+ "epoch": 0.2986857825567503,
48
+ "grad_norm": 0.1826171875,
49
+ "learning_rate": 0.001,
50
+ "loss": 0.3559,
51
+ "step": 500
52
+ },
53
+ {
54
+ "epoch": 0.35842293906810035,
55
+ "grad_norm": 0.10888671875,
56
+ "learning_rate": 0.0012,
57
+ "loss": 0.3438,
58
+ "step": 600
59
+ },
60
+ {
61
+ "epoch": 0.41816009557945044,
62
+ "grad_norm": 0.11572265625,
63
+ "learning_rate": 0.0014,
64
+ "loss": 0.3412,
65
+ "step": 700
66
+ },
67
+ {
68
+ "epoch": 0.4778972520908005,
69
+ "grad_norm": 0.08984375,
70
+ "learning_rate": 0.0016,
71
+ "loss": 0.3392,
72
+ "step": 800
73
+ },
74
+ {
75
+ "epoch": 0.5376344086021505,
76
+ "grad_norm": 0.11376953125,
77
+ "learning_rate": 0.0018000000000000002,
78
+ "loss": 0.346,
79
+ "step": 900
80
+ },
81
+ {
82
+ "epoch": 0.5973715651135006,
83
+ "grad_norm": 0.08251953125,
84
+ "learning_rate": 0.002,
85
+ "loss": 0.3174,
86
+ "step": 1000
87
+ },
88
+ {
89
+ "epoch": 0.6571087216248507,
90
+ "grad_norm": 0.0703125,
91
+ "learning_rate": 0.0019998292504580526,
92
+ "loss": 0.3309,
93
+ "step": 1100
94
+ },
95
+ {
96
+ "epoch": 0.7168458781362007,
97
+ "grad_norm": 0.1533203125,
98
+ "learning_rate": 0.001999317060143023,
99
+ "loss": 0.323,
100
+ "step": 1200
101
+ },
102
+ {
103
+ "epoch": 0.7765830346475507,
104
+ "grad_norm": 0.09228515625,
105
+ "learning_rate": 0.001998463603967434,
106
+ "loss": 0.3157,
107
+ "step": 1300
108
+ },
109
+ {
110
+ "epoch": 0.8363201911589009,
111
+ "grad_norm": 0.072265625,
112
+ "learning_rate": 0.0019972691733857882,
113
+ "loss": 0.3155,
114
+ "step": 1400
115
+ },
116
+ {
117
+ "epoch": 0.8960573476702509,
118
+ "grad_norm": 0.12890625,
119
+ "learning_rate": 0.0019957341762950344,
120
+ "loss": 0.3148,
121
+ "step": 1500
122
+ },
123
+ {
124
+ "epoch": 0.955794504181601,
125
+ "grad_norm": 0.10205078125,
126
+ "learning_rate": 0.001993859136895274,
127
+ "loss": 0.3013,
128
+ "step": 1600
129
+ },
130
+ {
131
+ "epoch": 1.015531660692951,
132
+ "grad_norm": 0.11474609375,
133
+ "learning_rate": 0.0019916446955107426,
134
+ "loss": 0.3009,
135
+ "step": 1700
136
+ },
137
+ {
138
+ "epoch": 1.075268817204301,
139
+ "grad_norm": 0.12890625,
140
+ "learning_rate": 0.001989091608371146,
141
+ "loss": 0.3005,
142
+ "step": 1800
143
+ },
144
+ {
145
+ "epoch": 1.135005973715651,
146
+ "grad_norm": 0.087890625,
147
+ "learning_rate": 0.0019862007473534027,
148
+ "loss": 0.3028,
149
+ "step": 1900
150
+ },
151
+ {
152
+ "epoch": 1.1947431302270013,
153
+ "grad_norm": 0.10546875,
154
+ "learning_rate": 0.001982973099683902,
155
+ "loss": 0.3006,
156
+ "step": 2000
157
+ },
158
+ {
159
+ "epoch": 1.2544802867383513,
160
+ "grad_norm": 0.1044921875,
161
+ "learning_rate": 0.001979409767601366,
162
+ "loss": 0.2981,
163
+ "step": 2100
164
+ },
165
+ {
166
+ "epoch": 1.3142174432497014,
167
+ "grad_norm": 0.10888671875,
168
+ "learning_rate": 0.001975511967980437,
169
+ "loss": 0.2917,
170
+ "step": 2200
171
+ },
172
+ {
173
+ "epoch": 1.3739545997610514,
174
+ "grad_norm": 0.10107421875,
175
+ "learning_rate": 0.001971281031916114,
176
+ "loss": 0.2816,
177
+ "step": 2300
178
+ },
179
+ {
180
+ "epoch": 1.4336917562724014,
181
+ "grad_norm": 0.1337890625,
182
+ "learning_rate": 0.0019667184042691877,
183
+ "loss": 0.2754,
184
+ "step": 2400
185
+ },
186
+ {
187
+ "epoch": 1.4934289127837514,
188
+ "grad_norm": 0.08203125,
189
+ "learning_rate": 0.001961825643172819,
190
+ "loss": 0.2775,
191
+ "step": 2500
192
+ },
193
+ {
194
+ "epoch": 1.5531660692951015,
195
+ "grad_norm": 0.0634765625,
196
+ "learning_rate": 0.0019566044195004407,
197
+ "loss": 0.2756,
198
+ "step": 2600
199
+ },
200
+ {
201
+ "epoch": 1.6129032258064515,
202
+ "grad_norm": 0.1142578125,
203
+ "learning_rate": 0.0019510565162951536,
204
+ "loss": 0.27,
205
+ "step": 2700
206
+ },
207
+ {
208
+ "epoch": 1.6726403823178018,
209
+ "grad_norm": 0.09423828125,
210
+ "learning_rate": 0.0019451838281608197,
211
+ "loss": 0.2616,
212
+ "step": 2800
213
+ },
214
+ {
215
+ "epoch": 1.7323775388291518,
216
+ "grad_norm": 0.095703125,
217
+ "learning_rate": 0.0019389883606150567,
218
+ "loss": 0.2589,
219
+ "step": 2900
220
+ },
221
+ {
222
+ "epoch": 1.7921146953405018,
223
+ "grad_norm": 0.12353515625,
224
+ "learning_rate": 0.0019324722294043557,
225
+ "loss": 0.2567,
226
+ "step": 3000
227
+ },
228
+ {
229
+ "epoch": 1.8518518518518519,
230
+ "grad_norm": 0.138671875,
231
+ "learning_rate": 0.0019256376597815564,
232
+ "loss": 0.2462,
233
+ "step": 3100
234
+ },
235
+ {
236
+ "epoch": 1.911589008363202,
237
+ "grad_norm": 0.10205078125,
238
+ "learning_rate": 0.001918486985745923,
239
+ "loss": 0.246,
240
+ "step": 3200
241
+ },
242
+ {
243
+ "epoch": 1.971326164874552,
244
+ "grad_norm": 0.07861328125,
245
+ "learning_rate": 0.0019110226492460884,
246
+ "loss": 0.2378,
247
+ "step": 3300
248
+ },
249
+ {
250
+ "epoch": 2.031063321385902,
251
+ "grad_norm": 0.091796875,
252
+ "learning_rate": 0.0019032471993461289,
253
+ "loss": 0.2322,
254
+ "step": 3400
255
+ },
256
+ {
257
+ "epoch": 2.090800477897252,
258
+ "grad_norm": 0.09814453125,
259
+ "learning_rate": 0.0018951632913550625,
260
+ "loss": 0.2341,
261
+ "step": 3500
262
+ },
263
+ {
264
+ "epoch": 2.150537634408602,
265
+ "grad_norm": 0.0859375,
266
+ "learning_rate": 0.0018867736859200619,
267
+ "loss": 0.2314,
268
+ "step": 3600
269
+ },
270
+ {
271
+ "epoch": 2.2102747909199523,
272
+ "grad_norm": 0.09765625,
273
+ "learning_rate": 0.0018780812480836979,
274
+ "loss": 0.2297,
275
+ "step": 3700
276
+ },
277
+ {
278
+ "epoch": 2.270011947431302,
279
+ "grad_norm": 0.087890625,
280
+ "learning_rate": 0.0018690889463055284,
281
+ "loss": 0.224,
282
+ "step": 3800
283
+ },
284
+ {
285
+ "epoch": 2.3297491039426523,
286
+ "grad_norm": 0.0693359375,
287
+ "learning_rate": 0.0018597998514483724,
288
+ "loss": 0.2193,
289
+ "step": 3900
290
+ },
291
+ {
292
+ "epoch": 2.3894862604540026,
293
+ "grad_norm": 0.11669921875,
294
+ "learning_rate": 0.0018502171357296143,
295
+ "loss": 0.2158,
296
+ "step": 4000
297
+ },
298
+ {
299
+ "epoch": 2.4492234169653524,
300
+ "grad_norm": 0.07568359375,
301
+ "learning_rate": 0.0018403440716378927,
302
+ "loss": 0.2081,
303
+ "step": 4100
304
+ },
305
+ {
306
+ "epoch": 2.5089605734767026,
307
+ "grad_norm": 0.10498046875,
308
+ "learning_rate": 0.0018301840308155505,
309
+ "loss": 0.2092,
310
+ "step": 4200
311
+ },
312
+ {
313
+ "epoch": 2.5686977299880525,
314
+ "grad_norm": 0.10107421875,
315
+ "learning_rate": 0.0018197404829072212,
316
+ "loss": 0.2038,
317
+ "step": 4300
318
+ },
319
+ {
320
+ "epoch": 2.6284348864994027,
321
+ "grad_norm": 0.103515625,
322
+ "learning_rate": 0.0018090169943749475,
323
+ "loss": 0.199,
324
+ "step": 4400
325
+ },
326
+ {
327
+ "epoch": 2.6881720430107525,
328
+ "grad_norm": 0.087890625,
329
+ "learning_rate": 0.0017980172272802398,
330
+ "loss": 0.1955,
331
+ "step": 4500
332
+ },
333
+ {
334
+ "epoch": 2.7479091995221028,
335
+ "grad_norm": 0.0986328125,
336
+ "learning_rate": 0.0017867449380334832,
337
+ "loss": 0.1937,
338
+ "step": 4600
339
+ },
340
+ {
341
+ "epoch": 2.807646356033453,
342
+ "grad_norm": 0.1044921875,
343
+ "learning_rate": 0.0017752039761111298,
344
+ "loss": 0.1914,
345
+ "step": 4700
346
+ },
347
+ {
348
+ "epoch": 2.867383512544803,
349
+ "grad_norm": 0.0947265625,
350
+ "learning_rate": 0.001763398282741103,
351
+ "loss": 0.1875,
352
+ "step": 4800
353
+ },
354
+ {
355
+ "epoch": 2.927120669056153,
356
+ "grad_norm": 0.09765625,
357
+ "learning_rate": 0.0017513318895568735,
358
+ "loss": 0.1855,
359
+ "step": 4900
360
+ },
361
+ {
362
+ "epoch": 2.986857825567503,
363
+ "grad_norm": 0.08056640625,
364
+ "learning_rate": 0.001739008917220659,
365
+ "loss": 0.1795,
366
+ "step": 5000
367
+ },
368
+ {
369
+ "epoch": 3.046594982078853,
370
+ "grad_norm": 0.1259765625,
371
+ "learning_rate": 0.0017264335740162242,
372
+ "loss": 0.1742,
373
+ "step": 5100
374
+ },
375
+ {
376
+ "epoch": 3.106332138590203,
377
+ "grad_norm": 0.09228515625,
378
+ "learning_rate": 0.0017136101544117524,
379
+ "loss": 0.1759,
380
+ "step": 5200
381
+ },
382
+ {
383
+ "epoch": 3.166069295101553,
384
+ "grad_norm": 0.1259765625,
385
+ "learning_rate": 0.0017005430375932908,
386
+ "loss": 0.1756,
387
+ "step": 5300
388
+ },
389
+ {
390
+ "epoch": 3.225806451612903,
391
+ "grad_norm": 0.07470703125,
392
+ "learning_rate": 0.0016872366859692627,
393
+ "loss": 0.1766,
394
+ "step": 5400
395
+ },
396
+ {
397
+ "epoch": 3.2855436081242533,
398
+ "grad_norm": 0.087890625,
399
+ "learning_rate": 0.0016736956436465573,
400
+ "loss": 0.1666,
401
+ "step": 5500
402
+ },
403
+ {
404
+ "epoch": 3.3452807646356035,
405
+ "grad_norm": 0.0869140625,
406
+ "learning_rate": 0.0016599245348787228,
407
+ "loss": 0.169,
408
+ "step": 5600
409
+ },
410
+ {
411
+ "epoch": 3.4050179211469533,
412
+ "grad_norm": 0.08740234375,
413
+ "learning_rate": 0.0016459280624867873,
414
+ "loss": 0.1616,
415
+ "step": 5700
416
+ },
417
+ {
418
+ "epoch": 3.4647550776583036,
419
+ "grad_norm": 0.158203125,
420
+ "learning_rate": 0.001631711006253251,
421
+ "loss": 0.1595,
422
+ "step": 5800
423
+ },
424
+ {
425
+ "epoch": 3.5244922341696534,
426
+ "grad_norm": 0.078125,
427
+ "learning_rate": 0.001617278221289793,
428
+ "loss": 0.1626,
429
+ "step": 5900
430
+ },
431
+ {
432
+ "epoch": 3.5842293906810037,
433
+ "grad_norm": 0.0908203125,
434
+ "learning_rate": 0.0016026346363792565,
435
+ "loss": 0.1546,
436
+ "step": 6000
437
+ }
438
+ ],
439
+ "logging_steps": 100,
440
+ "max_steps": 18000,
441
+ "num_input_tokens_seen": 0,
442
+ "num_train_epochs": 11,
443
+ "save_steps": 3000,
444
+ "stateful_callbacks": {
445
+ "TrainerControl": {
446
+ "args": {
447
+ "should_epoch_stop": false,
448
+ "should_evaluate": true,
449
+ "should_log": false,
450
+ "should_save": true,
451
+ "should_training_stop": false
452
+ },
453
+ "attributes": {}
454
+ }
455
+ },
456
+ "total_flos": 1.1559951680731546e+17,
457
+ "train_batch_size": 6,
458
+ "trial_name": null,
459
+ "trial_params": null
460
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:91ac30b0e25fa5ad714bc4133367d871d355eb2cd2241f526ea5e733bbb709de
3
+ size 5560
ultravox_config.py ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import dataclasses
2
+ from enum import Enum
3
+ from typing import Any, Dict, List, Optional
4
+
5
+ import transformers
6
+
7
+
8
+ @dataclasses.dataclass
9
+ class LoraConfigSimplified:
10
+ """
11
+ Low Rank Approximation (LoRA) configuration.
12
+
13
+ Used for language and audio models separately.
14
+ """
15
+
16
+ # The rank of the approximation
17
+ r: int = 0
18
+ lora_alpha: float = 8
19
+ target_modules: Optional[List[str]] = dataclasses.field(
20
+ default_factory=lambda: ["k_proj", "q_proj", "linear_k", "linear_q"]
21
+ )
22
+
23
+
24
+ class LossFunction(str, Enum):
25
+ CrossEntropy = "ce"
26
+ KL_Divergence = "kl"
27
+
28
+
29
+ @dataclasses.dataclass
30
+ class LossConfig:
31
+ loss_function: LossFunction = LossFunction.KL_Divergence
32
+ kl_temperature: float = 2.0
33
+
34
+ @property
35
+ def requires_alt_fields(self):
36
+ return self.loss_function == LossFunction.KL_Divergence
37
+
38
+
39
+ class UltravoxConfig(transformers.PretrainedConfig):
40
+ r"""
41
+ This is the configuration class to store the configuration of a [`UltravoxForConditionalGeneration`]. It is used to instantiate an
42
+ Ultravox model according to the specified arguments, defining the model architecture.
43
+
44
+ Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
45
+ documentation from [`PretrainedConfig`] for more information.
46
+
47
+ Args:
48
+ audio_config (`Wav2Vec2Config`, *optional*):
49
+ Custom audio config or dict
50
+ text_config (`Union[AutoConfig, dict]`, *optional*):
51
+ The config object of the text backbone. Can be any of `LlamaConfig` or `MistralConfig`.
52
+ ignore_index (`int`, *optional*, defaults to -100):
53
+ The ignore index for the loss function.
54
+ audio_token_index (`int`, *optional*, defaults to 32000):
55
+ The audio token index to encode the audio prompt.
56
+ stack_factor (`int`, *optional*, defaults to 8):
57
+ Audio downsampling factor for the multimodal projector.
58
+ norm_init (`float`, *optional*, defaults to 0.4):
59
+ The initialization value for the layer normalization.
60
+ projector_act (`str`, *optional*, defaults to `"swiglu"`):
61
+ The activation function used by the multimodal projector.
62
+ text_model_lora_config (`LoraConfigSimplified`, *optional*):
63
+ The LoRA configuration for finetuning the text model.
64
+ audio_model_lora_config (`LoraConfigSimplified`, *optional*):
65
+ The LoRA configuration for finetuning the audio model.
66
+
67
+
68
+ Example:
69
+
70
+ ```python
71
+ >>> from transformers import UltravoxForConditionalGeneration, Wav2Vec2Config, UltravoxConfig, LlamaConfig
72
+
73
+ >>> # Initializing an audio encoder config
74
+ >>> audio_config = Wav2Vec2Config()
75
+
76
+ >>> # Initializing a Llama config
77
+ >>> text_config = LlamaConfig()
78
+
79
+ >>> # Initializing a default configuration
80
+ >>> configuration = UltravoxConfig(audio_config, text_config)
81
+
82
+ >>> # Initializing a completely untrained model from the configuration
83
+ >>> model = UltravoxForConditionalGeneration(configuration)
84
+
85
+ >>> # Accessing the model configuration
86
+ >>> configuration = model.config
87
+
88
+ >>> # Initialize a model from pretrained checkpoints and random projector weights
89
+ >>> config = UltravoxConfig(audio_model_id="facebook/wav2vec2-base-960h", text_model_id="meta-llama/Llama-2-7b-chat-hf")
90
+ ```"""
91
+
92
+ model_type = "ultravox"
93
+ is_composition = False
94
+
95
+ def __init__(
96
+ self,
97
+ audio_config: Optional[Dict[str, Any]] = None,
98
+ text_config: Optional[Dict[str, Any]] = None,
99
+ audio_model_id: Optional[str] = None,
100
+ text_model_id: Optional[str] = None,
101
+ ignore_index: int = -100,
102
+ hidden_size: int = 4096,
103
+ stack_factor: int = 8,
104
+ norm_init: float = 0.4,
105
+ projector_act: str = "swiglu",
106
+ text_model_lora_config: Optional[LoraConfigSimplified] = None,
107
+ audio_model_lora_config: Optional[LoraConfigSimplified] = None,
108
+ **kwargs,
109
+ ):
110
+ self.ignore_index = ignore_index
111
+
112
+ self.audio_model_id = audio_model_id
113
+ self.text_model_id = text_model_id
114
+
115
+ self.hidden_size = hidden_size
116
+ self.stack_factor = stack_factor
117
+ self.norm_init = norm_init
118
+ self.projector_act = projector_act
119
+
120
+ if text_model_id is not None:
121
+ self.text_config: transformers.LlamaConfig = (
122
+ transformers.AutoConfig.from_pretrained(text_model_id)
123
+ )
124
+ else:
125
+ text_config = text_config or {}
126
+ self.text_config = transformers.CONFIG_MAPPING[
127
+ text_config.get("model_type", "llama")
128
+ ](**text_config)
129
+
130
+ if audio_model_id is not None:
131
+ self.audio_config: transformers.PretrainedConfig = (
132
+ transformers.AutoConfig.from_pretrained(audio_model_id)
133
+ )
134
+ else:
135
+ audio_config = audio_config or {}
136
+ self.audio_config = transformers.CONFIG_MAPPING[
137
+ audio_config.get("model_type", "wav2vec2")
138
+ ](**audio_config)
139
+
140
+ self.text_model_lora_config = (
141
+ text_model_lora_config
142
+ if isinstance(text_model_lora_config, dict)
143
+ else dataclasses.asdict(text_model_lora_config or LoraConfigSimplified())
144
+ )
145
+ self.audio_model_lora_config = (
146
+ audio_model_lora_config
147
+ if isinstance(audio_model_lora_config, dict)
148
+ else dataclasses.asdict(audio_model_lora_config or LoraConfigSimplified())
149
+ )
150
+
151
+ self.vocab_size = self.text_config.vocab_size
152
+
153
+ self.initializer_range = self.text_config.initializer_range
154
+
155
+ super().__init__(**kwargs)
156
+
157
+ def to_diff_dict(self) -> Dict[str, Any]:
158
+ diff_dict = super().to_diff_dict()
159
+
160
+ # remove text_config and audio_config if text_model_id and audio_model_id are present
161
+ if self.text_model_id is not None:
162
+ diff_dict.pop("text_config", None)
163
+ if self.audio_model_id is not None:
164
+ diff_dict.pop("audio_config", None)
165
+
166
+ return diff_dict
ultravox_model.py ADDED
@@ -0,0 +1,669 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import logging
2
+ from typing import Any, Dict, Optional, Set, Tuple, Union
3
+
4
+ import peft
5
+ import torch
6
+ import torch.nn as nn
7
+ import torch.nn.functional as F
8
+ import transformers
9
+ import transformers.activations
10
+ import transformers.modeling_outputs
11
+ import transformers.models
12
+ from transformers.models.whisper import modeling_whisper as whisper
13
+
14
+ # We must use relative import in this directory to allow uploading to HF Hub
15
+ # Even "from . import X" pattern doesn't work (undocumented and unclear why)
16
+ from .ultravox_config import LossConfig
17
+ from .ultravox_config import LossFunction
18
+ from .ultravox_config import UltravoxConfig
19
+
20
+
21
+ class UltravoxModel(transformers.LlamaPreTrainedModel):
22
+ """
23
+ The Ultravox model which consists of an audio encoder and a language model.
24
+
25
+ Audio input is processed by the audio encoder, then every `stack_factor` frames are stacked together and
26
+ projected to the language model's embedding space using a few linear layers.
27
+ The text is embedded by the language model as usual and then the audio and text embeddings are merged together.
28
+
29
+ A special token `<|audio|>` is used to indicate the start of the audio embeddings in the merged embeddings.
30
+
31
+ Parameters:
32
+ config: Model configuration class with all the parameters of the model.
33
+ """
34
+
35
+ config_class = UltravoxConfig
36
+ config: UltravoxConfig # for type hinting
37
+ # Usually we load encoder and LLM weights from a pretrained model separately, so they are allowed to be missing
38
+ _keys_to_ignore_on_load_missing = ["audio_tower.*", "language_model.*"]
39
+
40
+ def __init__(self, config: UltravoxConfig):
41
+ super().__init__(config)
42
+ self._register_load_state_dict_pre_hook(self._pre_load_state_dict_hook)
43
+
44
+ self.keep_params: Set[str] = set()
45
+ self.vocab_size = config.vocab_size
46
+
47
+ self.audio_tower = self._create_audio_tower(config)
48
+ self.multi_modal_projector = self._create_multi_modal_projector(config)
49
+ self.language_model = self._create_language_model(config)
50
+
51
+ # Determine no_split_modules dynamically to use with FSDP auto_wrap policy.
52
+ # FSDP throws an error if some of the layer types are not found in the model.
53
+ # This would be something like ["LlamaDecoderLayer", "WhisperEncoderLayer"]
54
+ self._no_split_modules = (self.language_model._no_split_modules or []) + (
55
+ self.audio_tower._no_split_modules or []
56
+ )
57
+
58
+ self.loss_config = LossConfig()
59
+ self.post_init()
60
+
61
+ def get_input_embeddings(self):
62
+ return self.language_model.get_input_embeddings()
63
+
64
+ def set_input_embeddings(self, value):
65
+ self.language_model.set_input_embeddings(value)
66
+
67
+ def get_output_embeddings(self):
68
+ return self.language_model.get_output_embeddings()
69
+
70
+ def set_output_embeddings(self, new_embeddings):
71
+ self.language_model.set_output_embeddings(new_embeddings)
72
+
73
+ def set_decoder(self, decoder):
74
+ self.language_model.set_decoder(decoder)
75
+
76
+ def get_decoder(self):
77
+ return self.language_model.get_decoder()
78
+
79
+ def tie_weights(self):
80
+ return self.language_model.tie_weights()
81
+
82
+ def set_loss_config(self, loss_config: LossConfig):
83
+ self.loss_config = loss_config
84
+
85
+ def _setup_cache(
86
+ self, cache_cls, max_batch_size: int, max_cache_len: Optional[int] = None
87
+ ):
88
+ self.language_model._setup_cache(cache_cls, max_batch_size, max_cache_len)
89
+
90
+ def _reorder_cache(self, past_key_values, beam_idx):
91
+ return self.language_model._reorder_cache(past_key_values, beam_idx)
92
+
93
+ def resize_token_embeddings(
94
+ self,
95
+ new_num_tokens: Optional[int] = None,
96
+ pad_to_multiple_of: Optional[int] = None,
97
+ ) -> nn.Embedding:
98
+ model_embeds = self.language_model.resize_token_embeddings(
99
+ new_num_tokens, pad_to_multiple_of
100
+ )
101
+ # update vocab size
102
+ self.config.text_config.vocab_size = model_embeds.num_embeddings
103
+ self.config.vocab_size = model_embeds.num_embeddings
104
+ self.vocab_size = model_embeds.num_embeddings
105
+ return model_embeds
106
+
107
+ def _compute_kl_loss(
108
+ self,
109
+ lm_output: transformers.modeling_outputs.CausalLMOutputWithPast,
110
+ labels: Optional[torch.Tensor] = None,
111
+ past_key_values: Optional[Union[Tuple, transformers.cache_utils.Cache]] = None,
112
+ alt_input_ids: Optional[torch.Tensor] = None,
113
+ alt_attention_mask: Optional[torch.Tensor] = None,
114
+ alt_labels: Optional[torch.Tensor] = None,
115
+ **kwargs,
116
+ ):
117
+ # disable gradient computation for the teacher model
118
+ with torch.no_grad():
119
+ # compute the teacher (text-only) model's distribution
120
+ alt_inputs_embeds = self.get_input_embeddings().forward(alt_input_ids)
121
+ alt_lm_output = self.language_model.forward(
122
+ inputs_embeds=alt_inputs_embeds,
123
+ labels=alt_labels,
124
+ attention_mask=alt_attention_mask,
125
+ past_key_values=past_key_values,
126
+ **kwargs,
127
+ )
128
+ # compute the KL divergence loss between the two models
129
+ kl_loss = F.kl_div(
130
+ F.log_softmax(
131
+ lm_output.logits[labels != -100] / self.loss_config.kl_temperature,
132
+ dim=-1,
133
+ ),
134
+ F.softmax(
135
+ alt_lm_output.logits[alt_labels != -100]
136
+ / self.loss_config.kl_temperature,
137
+ dim=-1,
138
+ ),
139
+ reduction="batchmean",
140
+ )
141
+ return {"loss": kl_loss}
142
+
143
+ def forward(
144
+ self,
145
+ input_ids: torch.Tensor,
146
+ audio_values: Optional[torch.FloatTensor] = None,
147
+ inputs_embeds: Optional[torch.FloatTensor] = None,
148
+ labels: Optional[torch.Tensor] = None,
149
+ attention_mask: Optional[torch.Tensor] = None,
150
+ audio_token_start_idx: Optional[torch.Tensor] = None,
151
+ audio_len: Optional[torch.Tensor] = None,
152
+ audio_token_len: Optional[torch.Tensor] = None,
153
+ past_key_values: Optional[Union[Tuple, transformers.cache_utils.Cache]] = None,
154
+ # the alt_* fields are needed for KL divergence loss
155
+ alt_input_ids: Optional[torch.Tensor] = None,
156
+ alt_attention_mask: Optional[torch.Tensor] = None,
157
+ alt_labels: Optional[torch.Tensor] = None,
158
+ **kwargs,
159
+ ) -> Union[Tuple, transformers.modeling_outputs.CausalLMOutputWithPast]:
160
+ """
161
+ Forward pass for the Ultravox model.
162
+
163
+ `input_ids` are the tokenized text input. They are embedded by the language model as usual.
164
+ `audio_values` are processed by the audio encoder and then every `stack_factor` frames are stacked together and
165
+ projected to the language model's embedding space using a few linear layers.
166
+ The audio and text embeddings are merged together. A special token `<|audio|>` is used to indicate the start
167
+ of the audio embeddings in the merged embeddings.
168
+
169
+ Args:
170
+ input_ids: The tokenized text input.
171
+ audio_values: The processed audio values.
172
+ inputs_embeds: The embeddings for the input tokens.
173
+ labels: The tokenized text labels.
174
+ attention_mask: The attention mask for the input.
175
+ position_ids: The position ids for the input.
176
+ past_key_values: The past key value cache for the language model attention layers.
177
+ **kwargs: Additional keyword arguments. Passed directly to the language model.
178
+ """
179
+ if inputs_embeds is None:
180
+ # B x T -> B x T x D
181
+ inputs_embeds = self.get_input_embeddings().forward(input_ids)
182
+
183
+ if audio_values is not None:
184
+ assert (
185
+ audio_token_start_idx is not None and audio_token_len is not None
186
+ ), "audio_token_start_idx and audio_token_len must be provided if audio_values are provided."
187
+ assert (
188
+ len(audio_token_start_idx) == len(audio_token_len) == len(audio_values)
189
+ ), "audio_token_start_idx, audio_token_len, and audio_values must have the same batch size."
190
+
191
+ # B x A/3200 x D
192
+ audio_tower_output = self.audio_tower.forward(
193
+ audio_values.to(self.audio_tower.dtype), audio_len=audio_len
194
+ ).last_hidden_state
195
+ audio_tower_output = audio_tower_output.to(inputs_embeds.dtype)
196
+
197
+ audio_embeds = self.multi_modal_projector.forward(audio_tower_output)
198
+
199
+ # combine audio and text embeddings
200
+ for i, (audio, start, length) in enumerate(
201
+ zip(audio_embeds, audio_token_start_idx, audio_token_len)
202
+ ):
203
+ length = min(length, audio.shape[0])
204
+ inputs_embeds[i, start : start + length] = audio[:length]
205
+
206
+ lm_output = self.language_model.forward(
207
+ inputs_embeds=inputs_embeds,
208
+ labels=labels,
209
+ attention_mask=attention_mask,
210
+ past_key_values=past_key_values,
211
+ **kwargs,
212
+ )
213
+ if self.training:
214
+ if self.loss_config.loss_function == LossFunction.CrossEntropy:
215
+ return lm_output
216
+ elif self.loss_config.loss_function == LossFunction.KL_Divergence:
217
+ return self._compute_kl_loss(
218
+ lm_output=lm_output,
219
+ labels=labels,
220
+ past_key_values=past_key_values,
221
+ alt_input_ids=alt_input_ids,
222
+ alt_attention_mask=alt_attention_mask,
223
+ alt_labels=alt_labels,
224
+ **kwargs,
225
+ )
226
+ else:
227
+ raise ValueError(
228
+ f"Unsupported loss function: {self.loss_config.loss_function}"
229
+ )
230
+ else:
231
+ return lm_output
232
+
233
+ def prepare_inputs_for_generation(
234
+ self,
235
+ input_ids: torch.Tensor,
236
+ audio_values: Optional[torch.FloatTensor] = None,
237
+ audio_token_start_idx: Optional[torch.Tensor] = None,
238
+ audio_token_len: Optional[torch.Tensor] = None,
239
+ audio_len: Optional[torch.Tensor] = None,
240
+ past_key_values: Optional[Union[Tuple, transformers.cache_utils.Cache]] = None,
241
+ attention_mask: Optional[torch.Tensor] = None,
242
+ inputs_embeds: Optional[torch.Tensor] = None,
243
+ cache_position: Optional[torch.Tensor] = None,
244
+ **kwargs,
245
+ ) -> Dict[str, Any]:
246
+ model_input = self.language_model.prepare_inputs_for_generation(
247
+ input_ids=input_ids,
248
+ past_key_values=past_key_values,
249
+ attention_mask=attention_mask,
250
+ inputs_embeds=inputs_embeds,
251
+ cache_position=cache_position,
252
+ **kwargs,
253
+ )
254
+
255
+ # include audio information in model_input only when it is needed during prefilling
256
+ # audio_token_start_idx should always be relative to the current cache position
257
+ prefill_start_idx = 0 if cache_position is None else cache_position[0]
258
+ if (
259
+ audio_values is not None
260
+ and audio_token_start_idx is not None
261
+ and prefill_start_idx <= torch.max(audio_token_start_idx)
262
+ ):
263
+ model_input["audio_values"] = audio_values
264
+ model_input["audio_token_start_idx"] = (
265
+ audio_token_start_idx - prefill_start_idx
266
+ )
267
+ model_input["audio_token_len"] = audio_token_len
268
+ model_input["audio_len"] = audio_len
269
+
270
+ return model_input
271
+
272
+ @classmethod
273
+ def _create_multi_modal_projector(
274
+ cls, config: UltravoxConfig
275
+ ) -> "UltravoxProjector":
276
+ projector = UltravoxProjector(config)
277
+ projector.to(config.torch_dtype)
278
+ return projector
279
+
280
+ @classmethod
281
+ def _create_audio_tower(
282
+ cls, config: UltravoxConfig
283
+ ) -> Union[transformers.Wav2Vec2Model, "ModifiedWhisperEncoder"]:
284
+ if config.audio_model_id is not None:
285
+ if "whisper" in config.audio_model_id is not None:
286
+ audio_tower = ModifiedWhisperEncoder.from_pretrained(
287
+ config.audio_model_id, torch_dtype=config.torch_dtype
288
+ )
289
+ else:
290
+ audio_tower = transformers.AutoModel.from_pretrained(
291
+ config.audio_model_id, torch_dtype=config.torch_dtype
292
+ )
293
+ else:
294
+ if "whisper" in config.audio_config._name_or_path:
295
+ audio_tower = ModifiedWhisperEncoder(config.audio_config)
296
+ else:
297
+ with transformers.modeling_utils.no_init_weights():
298
+ # we only ever use from_config if the weights are retrained, hence initializing is not
299
+ # required. This makes the model quite creation faster since init on CPU is quite slow.
300
+ audio_tower = transformers.AutoModel.from_config(
301
+ config.audio_config
302
+ )
303
+
304
+ if isinstance(
305
+ audio_tower,
306
+ (transformers.Wav2Vec2BertModel, transformers.WhisperModel),
307
+ ):
308
+ # For these models we only need the encoder part
309
+ # Wav2Vec2BertModel -> Wav2Vec2BertEncoder
310
+ # WhisperModel -> WhisperEncoder
311
+ audio_tower = audio_tower.encoder
312
+
313
+ audio_tower = apply_lora(audio_tower, config.audio_model_lora_config)
314
+ return audio_tower
315
+
316
+ @classmethod
317
+ def _create_language_model(
318
+ cls, config: UltravoxConfig
319
+ ) -> transformers.LlamaForCausalLM:
320
+ if config.text_model_id is not None:
321
+ language_model = transformers.AutoModelForCausalLM.from_pretrained(
322
+ config.text_model_id,
323
+ attn_implementation=config._attn_implementation,
324
+ torch_dtype=config.torch_dtype,
325
+ load_in_4bit=True,
326
+ )
327
+ else:
328
+ with transformers.modeling_utils.no_init_weights():
329
+ # we only ever use from_config if the weights are retrained, hence initializing is not
330
+ # required. This makes the model quite creation faster since init on CPU is quite slow.
331
+ language_model = transformers.AutoModelForCausalLM.from_config(
332
+ config.text_config,
333
+ attn_implementation=config._attn_implementation,
334
+ torch_dtype=config.torch_dtype,
335
+ )
336
+
337
+ language_model = apply_lora(language_model, config.text_model_lora_config)
338
+ return language_model
339
+
340
+ def merge_and_unload(self):
341
+ if isinstance(self.language_model, peft.PeftModel):
342
+ self.language_model = self.language_model.merge_and_unload()
343
+ # no need to download base language model weights anymore, so we can remove the id
344
+ self.config.text_model_id = None
345
+ self.keep_params.update(
346
+ set(
347
+ [
348
+ f"language_model.{name}"
349
+ for name, _ in self.language_model.named_parameters()
350
+ ]
351
+ )
352
+ )
353
+
354
+ if isinstance(self.audio_tower, peft.PeftModel):
355
+ self.audio_tower = self.audio_tower.merge_and_unload()
356
+ # no need to download base audio model weights anymore, so we can remove the id
357
+ self.config.audio_model_id = None
358
+ self.keep_params.update(
359
+ set(
360
+ [
361
+ f"audio_tower.{name}"
362
+ for name, _ in self.audio_tower.named_parameters()
363
+ ]
364
+ )
365
+ )
366
+
367
+ for param in ["text_model_lora_config", "audio_model_lora_config"]:
368
+ if hasattr(self.config, param):
369
+ delattr(self.config, param)
370
+
371
+ def push_to_hub(self, *args, **kwargs):
372
+ self.merge_and_unload()
373
+ self.to(self.language_model.dtype)
374
+ return super().push_to_hub(*args, **kwargs)
375
+
376
+ def save_pretrained(
377
+ self, *args, state_dict: Optional[Dict[str, Any]] = None, **kwargs
378
+ ):
379
+ if state_dict is None:
380
+ state_dict = super().state_dict()
381
+
382
+ named_params = dict(self.named_parameters())
383
+
384
+ state_dict = {
385
+ k: v
386
+ for k, v in state_dict.items()
387
+ if k in self.keep_params
388
+ or (k in named_params and named_params[k].requires_grad)
389
+ }
390
+
391
+ super().save_pretrained(*args, state_dict=state_dict, **kwargs)
392
+
393
+ def _pre_load_state_dict_hook(self, state_dict: Dict[str, Any], *args, **kwargs):
394
+ self.keep_params.update(set(state_dict.keys()))
395
+
396
+ def print_trainable_parameters(self):
397
+ """
398
+ Prints the number of trainable parameters in the model (reuses Peft model's method)
399
+ """
400
+ count_params = peft.peft_model.PeftModel.get_nb_trainable_parameters
401
+
402
+ trainable_params, all_param = count_params(self)
403
+
404
+ logging.info(
405
+ f"trainable params: {trainable_params:,d} || all params: {all_param:,d}"
406
+ f" || trainable%: {100 * trainable_params / all_param:.1f}%"
407
+ )
408
+
409
+ lm_trainable_params, lm_all_params = count_params(self.language_model)
410
+ audio_trainable_params, audio_all_params = count_params(self.audio_tower)
411
+
412
+ projector_trainable_params = (
413
+ trainable_params - lm_trainable_params - audio_trainable_params
414
+ )
415
+ projector_all_params = all_param - lm_all_params - audio_all_params
416
+
417
+ logging.info(
418
+ f"Trainable%: "
419
+ f" LLM: {100 * lm_trainable_params / lm_all_params:.1f}%"
420
+ f" || Audio Encoder: {100 * audio_trainable_params / audio_all_params:.1f}%"
421
+ f" || Projector: {100 * projector_trainable_params / projector_all_params:.1f}%"
422
+ )
423
+
424
+
425
+ def is_cache_empty(
426
+ past_key_values: Optional[Union[Tuple, transformers.cache_utils.Cache]]
427
+ ) -> bool:
428
+ """
429
+ Check if the cache is empty.
430
+ """
431
+ if past_key_values is None:
432
+ return True
433
+ if isinstance(past_key_values, tuple):
434
+ return all(len(c) == 0 for c in past_key_values)
435
+ return past_key_values.get_seq_length() == 0
436
+
437
+
438
+ def apply_lora(model: torch.nn.Module, lora_config: dict) -> torch.nn.Module:
439
+ """
440
+ Applies LoRA finetuning to the model. If the `r` parameter is set to 0, the model is frozen instead.
441
+ """
442
+ lora_config = peft.LoraConfig(**lora_config or {})
443
+
444
+ if lora_config.r == 0:
445
+ # freeze the model entirely
446
+ for param in model.parameters():
447
+ param.requires_grad = False
448
+ else:
449
+ model = peft.get_peft_model(model, lora_config)
450
+
451
+ return model
452
+
453
+
454
+ class StackAudioFrames(nn.Module):
455
+ """
456
+ Stack the audio embedding frames to reduce the sequence length by a factor of `stack_factor`.
457
+
458
+ The number of output frames will be `ceil(T / stack_factor) + 1` where `T` is the number of input frames.
459
+ NOTE: the extra +1 is intentional: in case the number of audio tokens are over-estimated by the processor,
460
+ we want to make sure `processor.audio_token_replacement` (i.e. EOS) doesn't get leaked into the middle of embeddings.
461
+ In most cases this extra padding will get removed in the model's forward function so it has no effect.
462
+ """
463
+
464
+ def __init__(self, stack_factor: int = 8):
465
+ super().__init__()
466
+ self.stack_factor = stack_factor
467
+
468
+ def forward(self, audio_embeds: torch.Tensor) -> torch.Tensor:
469
+ B, T, C = audio_embeds.shape
470
+ T_pad = (T + self.stack_factor - 1) // self.stack_factor * self.stack_factor
471
+ audio_embeds = F.pad(audio_embeds, (0, 0, 0, T_pad - T + self.stack_factor))
472
+ B, T, C = audio_embeds.shape
473
+ audio_embeds = audio_embeds.view(
474
+ B, T // self.stack_factor, C * self.stack_factor
475
+ )
476
+ return audio_embeds
477
+
478
+
479
+ class RMSNorm(transformers.models.llama.modeling_llama.LlamaRMSNorm):
480
+ def __init__(self, hidden_size: int, init: float = 1, eps: float = 1e-6):
481
+ super().__init__(hidden_size=hidden_size, eps=eps)
482
+ self.weight.data.fill_(init)
483
+
484
+
485
+ class SwiGLU(nn.Module):
486
+ def forward(self, x):
487
+ x, gate = x.chunk(2, dim=-1)
488
+ return F.silu(gate) * x
489
+
490
+
491
+ class UltravoxProjector(nn.Sequential):
492
+ def __init__(self, config: UltravoxConfig):
493
+ super().__init__()
494
+ self.hidden_dim = config.hidden_size
495
+ self._pad_and_stack = StackAudioFrames(config.stack_factor)
496
+ dim = config.audio_config.hidden_size * config.stack_factor
497
+ self.ln_pre = RMSNorm(dim, init=config.norm_init)
498
+ self.linear_1 = nn.Linear(dim, self.hidden_dim, bias=False)
499
+ dim = self.hidden_dim
500
+ self.act = transformers.activations.get_activation(config.projector_act)
501
+ dim = dim // 2 if config.projector_act == "swiglu" else dim
502
+ self.linear_2 = nn.Linear(dim, config.text_config.hidden_size, bias=False)
503
+ self.ln_post = RMSNorm(config.text_config.hidden_size, init=config.norm_init)
504
+
505
+ def forward(self, audio_features: torch.Tensor) -> torch.Tensor:
506
+ audio_features = self._pad_and_stack(audio_features)
507
+ audio_features = self.ln_pre(audio_features)
508
+ hidden_states = self.linear_1(audio_features)
509
+ hidden_states = self.act(hidden_states)
510
+ hidden_states = self.linear_2(hidden_states)
511
+ hidden_states = self.ln_post(hidden_states)
512
+ return hidden_states
513
+
514
+
515
+ class ModifiedWhisperEncoder(
516
+ whisper.WhisperEncoder, transformers.modeling_utils.ModuleUtilsMixin
517
+ ):
518
+ """
519
+ Encoder portion of OpenAI's Whisper model.
520
+
521
+ This implementation is a slightly modified version of HF Transformers' Whisper Encoder, with only a few fixes:
522
+ 1. base_model_prefix updated to allow for doing `.from_pretrained` directly on the encoder
523
+ 2. allow less than 30 second of audio padding to be passed in:
524
+ - relaxed ValueError check for `input_features` length to be less than or equal to `expected_seq_length` instead of strictly equal
525
+ - embed_pos is now sliced to match the length of `inputs_embeds`
526
+
527
+ Original: https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_whisper.py
528
+ """
529
+
530
+ base_model_prefix = "model.encoder"
531
+ _no_split_modules = ["WhisperEncoderLayer"]
532
+
533
+ def forward(
534
+ self,
535
+ input_features,
536
+ audio_len=None,
537
+ head_mask=None,
538
+ output_attentions=None,
539
+ output_hidden_states=None,
540
+ return_dict=None,
541
+ ):
542
+ expected_seq_length = (
543
+ self.config.max_source_positions
544
+ * self.conv1.stride[0]
545
+ * self.conv2.stride[0]
546
+ )
547
+ if input_features.shape[-1] > expected_seq_length:
548
+ raise ValueError(
549
+ f"Whisper expects the mel input features to be of length {expected_seq_length} or less, but found {input_features.shape[-1]}. Make sure to pad the input mel features to {expected_seq_length}."
550
+ )
551
+
552
+ output_attentions = (
553
+ output_attentions
554
+ if output_attentions is not None
555
+ else self.config.output_attentions
556
+ )
557
+ output_hidden_states = (
558
+ output_hidden_states
559
+ if output_hidden_states is not None
560
+ else self.config.output_hidden_states
561
+ )
562
+ return_dict = (
563
+ return_dict if return_dict is not None else self.config.use_return_dict
564
+ )
565
+ inputs_embeds = nn.functional.gelu(self.conv1(input_features))
566
+ inputs_embeds = nn.functional.gelu(self.conv2(inputs_embeds))
567
+
568
+ inputs_embeds = inputs_embeds.permute(0, 2, 1)
569
+ embed_pos = self.embed_positions.weight[: inputs_embeds.size(-2)]
570
+
571
+ hidden_states = inputs_embeds + embed_pos
572
+ hidden_states = nn.functional.dropout(
573
+ hidden_states, p=self.dropout, training=self.training
574
+ )
575
+
576
+ encoder_states = () if output_hidden_states else None
577
+ all_attentions = () if output_attentions else None
578
+
579
+ # Create attention mask based on audio lengths to mask out padding tokens
580
+ # For each sample in batch:
581
+ # - Convert raw audio length to feature length after convolutions
582
+ # - Create boolean mask that is True for valid positions and False for padding
583
+ # - Convert to extended attention mask format expected by transformer layers
584
+ # (1.0 for positions to attend to, large negative for positions to ignore)
585
+ # This masking ensures consistent behavior between training and inference
586
+ # by preventing the model from attending to padding tokens in both cases
587
+ attention_mask = None
588
+ if audio_len != None:
589
+ audio_feature_len = self._get_feat_extract_output_lengths(audio_len)
590
+ batch_size = hidden_states.shape[0]
591
+ max_seq_len = hidden_states.shape[1]
592
+ attention_mask = (
593
+ torch.arange(max_seq_len, device=hidden_states.device)[None, :]
594
+ .expand(batch_size, -1)
595
+ .lt(audio_feature_len.view(batch_size, 1))
596
+ )
597
+ attention_mask = self.get_extended_attention_mask(
598
+ attention_mask,
599
+ None,
600
+ device=hidden_states.device,
601
+ dtype=hidden_states.dtype,
602
+ )
603
+
604
+ # check if head_mask has a correct number of layers specified if desired
605
+ if head_mask is not None:
606
+ assert head_mask.size()[0] == (
607
+ len(self.layers)
608
+ ), f"The head_mask should be specified for {len(self.layers)} layers, but it is for {head_mask.size()[0]}."
609
+
610
+ for idx, encoder_layer in enumerate(self.layers):
611
+ if output_hidden_states:
612
+ encoder_states = encoder_states + (hidden_states,)
613
+ # add LayerDrop (see https://arxiv.org/abs/1909.11556 for description)
614
+ to_drop = False
615
+ if self.training:
616
+ dropout_probability = torch.rand([])
617
+ if dropout_probability < self.layerdrop: # skip the layer
618
+ to_drop = True
619
+
620
+ if to_drop:
621
+ layer_outputs = (None, None)
622
+ else:
623
+ if self.gradient_checkpointing and self.training:
624
+ layer_outputs = self._gradient_checkpointing_func(
625
+ encoder_layer.__call__,
626
+ hidden_states,
627
+ attention_mask,
628
+ (head_mask[idx] if head_mask is not None else None),
629
+ output_attentions,
630
+ )
631
+ else:
632
+ layer_outputs = encoder_layer(
633
+ hidden_states,
634
+ attention_mask,
635
+ layer_head_mask=(
636
+ head_mask[idx] if head_mask is not None else None
637
+ ),
638
+ output_attentions=output_attentions,
639
+ )
640
+
641
+ hidden_states = layer_outputs[0]
642
+
643
+ if output_attentions:
644
+ all_attentions = all_attentions + (layer_outputs[1],)
645
+
646
+ hidden_states = self.layer_norm(hidden_states)
647
+ if output_hidden_states:
648
+ encoder_states = encoder_states + (hidden_states,)
649
+
650
+ if not return_dict:
651
+ return tuple(
652
+ v
653
+ for v in [hidden_states, encoder_states, all_attentions]
654
+ if v is not None
655
+ )
656
+ return transformers.modeling_outputs.BaseModelOutput(
657
+ last_hidden_state=hidden_states,
658
+ hidden_states=encoder_states,
659
+ attentions=all_attentions,
660
+ )
661
+
662
+
663
+ UltravoxConfig.register_for_auto_class()
664
+ UltravoxModel.register_for_auto_class()
665
+
666
+ transformers.AutoConfig.register("ultravox", UltravoxConfig)
667
+ transformers.AutoModel.register(UltravoxConfig, UltravoxModel)
668
+
669
+ transformers.activations.ACT2FN["swiglu"] = SwiGLU