ddwang2000 commited on
Commit
b6d2bc8
·
verified ·
1 Parent(s): 1580364

Upload EchoChat model components

Browse files

Add inference weights, tokenizer, audio encoder, configuration, and applicable third-party notices.

LICENSE ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ EchoChat components retain their applicable upstream licenses.
2
+ Model weights and model-specific components: MIT, as declared by their upstream distribution.
3
+ Derived framework code and audio encoder: Apache License 2.0.
4
+ See licenses/ and THIRD_PARTY_NOTICES.md; source-file copyright notices remain applicable.
README.md ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: EchoChat
3
+ language:
4
+ - en
5
+ tags:
6
+ - audio
7
+ - speech
8
+ - conversational
9
+ library_name: transformers
10
+ license: other
11
+ license_name: echochat-component-licenses
12
+ license_link: LICENSE
13
+ ---
14
+
15
+ # EchoChat
16
+
17
+ EchoChat is an audio-conditioned conversational model with text and speech-token
18
+ outputs. This repository provides the language model, tokenizer, and audio
19
+ encoder weights.
20
+
21
+ ## Files and loading
22
+
23
+ - Root: language model weights, tokenizer, configuration and custom model code.
24
+ - `audio_encoder/`: complete audio encoder weights, configuration and its custom implementation.
25
+ - `LICENSE`, `licenses/`, `THIRD_PARTY_NOTICES.md`: applicable licenses and notices.
26
+
27
+ ```python
28
+ import torch
29
+ from transformers import AutoModelForCausalLM, AutoTokenizer
30
+
31
+ repo = "ddwang2000/EchoChat"
32
+ tokenizer = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
33
+ model = AutoModelForCausalLM.from_pretrained(
34
+ repo, trust_remote_code=True,
35
+ torch_dtype=torch.bfloat16,
36
+ attn_implementation="flash_attention_2",
37
+ ).to("cuda").eval()
38
+ ```
39
+
40
+ The custom audio encoder class is `WhisperEncoder` in
41
+ `audio_encoder/modeling_audio_encoder.py`. Instantiate it with the supplied
42
+ configuration and strictly load `audio_encoder/model.safetensors`. Its custom
43
+ attention implementation requires a compatible CUDA/FlashAttention runtime.
44
+
45
+ This is a component checkpoint, not a standard Transformers text-generation
46
+ pipeline. End-to-end audio use requires compatible feature extraction, prompting,
47
+ and text/speech-token generation logic. Waveform synthesis additionally requires
48
+ a separately licensed compatible decoder, which is not included here.
49
+
50
+ ## Dependencies
51
+
52
+ The component configuration targets Transformers 4.51.3. Runtime dependencies
53
+ include PyTorch, Transformers, safetensors, tiktoken, einops, and a compatible
54
+ FlashAttention build for CUDA execution. Inspect the custom code before enabling
55
+ `trust_remote_code=True`.
THIRD_PARTY_NOTICES.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Third-party notices
2
+
3
+ Model components include code and materials from Moonshot AI / Kimi-Audio, Qwen and Hugging Face. Original source notices are preserved. The upstream distribution declares MIT for its model-specific materials and Apache 2.0 for code derived from Qwen.
4
+
5
+ The audio encoder uses OpenAI Whisper materials and Hugging Face implementation components under Apache 2.0. Tokenizer code preserves its NVIDIA copyright notice.
6
+
7
+ Public Python entry points were renamed for this distribution; numeric weight and token interfaces are retained. No waveform decoder is included.
audio_encoder/config.json ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "vocab_size": 51866,
3
+ "num_mel_bins": 128,
4
+ "d_model": 1280,
5
+ "encoder_layers": 32,
6
+ "encoder_attention_heads": 20,
7
+ "decoder_layers": 32,
8
+ "decoder_attention_heads": 20,
9
+ "decoder_ffn_dim": 5120,
10
+ "encoder_ffn_dim": 5120,
11
+ "dropout": 0.0,
12
+ "attention_dropout": 0.0,
13
+ "activation_dropout": 0.0,
14
+ "activation_function": "gelu",
15
+ "init_std": 0.02,
16
+ "encoder_layerdrop": 0.0,
17
+ "decoder_layerdrop": 0.0,
18
+ "use_cache": true,
19
+ "num_hidden_layers": 32,
20
+ "scale_embedding": false,
21
+ "max_source_positions": 1500,
22
+ "max_target_positions": 448,
23
+ "classifier_proj_size": 256,
24
+ "use_weighted_layer_sum": false,
25
+ "apply_spec_augment": false,
26
+ "mask_time_prob": 0.05,
27
+ "mask_time_length": 10,
28
+ "mask_time_min_masks": 2,
29
+ "mask_feature_prob": 0.0,
30
+ "mask_feature_length": 10,
31
+ "mask_feature_min_masks": 0,
32
+ "median_filter_width": 7,
33
+ "return_dict": true,
34
+ "output_hidden_states": false,
35
+ "output_attentions": false,
36
+ "torchscript": false,
37
+ "torch_dtype": "bfloat16",
38
+ "use_bfloat16": false,
39
+ "tf_legacy_loss": false,
40
+ "pruned_heads": {},
41
+ "tie_word_embeddings": true,
42
+ "chunk_size_feed_forward": 0,
43
+ "is_encoder_decoder": true,
44
+ "is_decoder": false,
45
+ "cross_attention_hidden_size": null,
46
+ "add_cross_attention": false,
47
+ "tie_encoder_decoder": false,
48
+ "max_length": 448,
49
+ "min_length": 0,
50
+ "do_sample": false,
51
+ "early_stopping": false,
52
+ "num_beams": 1,
53
+ "num_beam_groups": 1,
54
+ "diversity_penalty": 0.0,
55
+ "temperature": 1.0,
56
+ "top_k": 50,
57
+ "top_p": 1.0,
58
+ "typical_p": 1.0,
59
+ "repetition_penalty": 1.0,
60
+ "length_penalty": 1.0,
61
+ "no_repeat_ngram_size": 0,
62
+ "encoder_no_repeat_ngram_size": 0,
63
+ "bad_words_ids": null,
64
+ "num_return_sequences": 1,
65
+ "output_scores": false,
66
+ "return_dict_in_generate": false,
67
+ "forced_bos_token_id": null,
68
+ "forced_eos_token_id": null,
69
+ "remove_invalid_values": false,
70
+ "exponential_decay_length_penalty": null,
71
+ "suppress_tokens": null,
72
+ "begin_suppress_tokens": [
73
+ 220,
74
+ 50257
75
+ ],
76
+ "architectures": [
77
+ "WhisperEncoder"
78
+ ],
79
+ "id2label": {
80
+ "0": "LABEL_0",
81
+ "1": "LABEL_1"
82
+ },
83
+ "label2id": {
84
+ "LABEL_0": 0,
85
+ "LABEL_1": 1
86
+ },
87
+ "tokenizer_class": null,
88
+ "prefix": null,
89
+ "bos_token_id": 50257,
90
+ "pad_token_id": 50256,
91
+ "eos_token_id": 50257,
92
+ "sep_token_id": null,
93
+ "decoder_start_token_id": 50258,
94
+ "problem_type": null,
95
+ "_attn_implementation_autoset": true,
96
+ "transformers_version": "4.51.3",
97
+ "model_type": "whisper"
98
+ }
audio_encoder/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b8365fdce897a4853c454bbabfce6fcfa16b87233d90d419c6a74a7b3e1269f3
3
+ size 1273988176
audio_encoder/modeling_audio_encoder.py ADDED
@@ -0,0 +1,1641 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This script is based on https://github.com/huggingface/transformers/blob/v4.29.1/src/transformers/models/whisper/modeling_whisper.py
2
+
3
+ # coding=utf-8
4
+ # Copyright 2022 The OpenAI Authors and The HuggingFace Inc. team. All rights reserved.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+
18
+ """PyTorch Whisper model."""
19
+
20
+ import math
21
+ import random
22
+ from typing import Optional, Tuple, Union
23
+
24
+ import numpy as np
25
+ import torch
26
+ import torch.utils.checkpoint
27
+ from torch import nn
28
+ from torch.nn import CrossEntropyLoss
29
+ from torch.nn.utils.rnn import pad_sequence
30
+ from flash_attn import (
31
+ flash_attn_qkvpacked_func,
32
+ flash_attn_func,
33
+ flash_attn_varlen_func,
34
+ flash_attn_varlen_qkvpacked_func,
35
+ )
36
+
37
+ try:
38
+ is_fa3_ready = True
39
+ from flash_attn_interface import (
40
+ flash_attn_varlen_func as fa3_varlen_func,
41
+ flash_attn_func as fa3_func,
42
+ )
43
+ except:
44
+ is_fa3_ready = False
45
+
46
+ from transformers.activations import ACT2FN
47
+ from transformers.generation.logits_process import WhisperTimeStampLogitsProcessor
48
+ from transformers.modeling_outputs import (
49
+ BaseModelOutput,
50
+ BaseModelOutputWithPastAndCrossAttentions,
51
+ Seq2SeqLMOutput,
52
+ Seq2SeqModelOutput,
53
+ SequenceClassifierOutput,
54
+ )
55
+ from transformers.modeling_utils import PreTrainedModel
56
+ from transformers.utils import (
57
+ add_start_docstrings,
58
+ add_start_docstrings_to_model_forward,
59
+ logging,
60
+ replace_return_docstrings,
61
+ )
62
+ from transformers.models.whisper.configuration_whisper import WhisperConfig
63
+ from transformers.models.whisper.tokenization_whisper import TASK_IDS, TO_LANGUAGE_CODE
64
+
65
+
66
+ logger = logging.get_logger(__name__)
67
+
68
+ _CONFIG_FOR_DOC = "WhisperConfig"
69
+ _CHECKPOINT_FOR_DOC = "openai/whisper-tiny"
70
+
71
+
72
+ WHISPER_PRETRAINED_MODEL_ARCHIVE_LIST = [
73
+ "openai/whisper-base",
74
+ # See all Whisper models at https://huggingface.co/models?filter=whisper
75
+ ]
76
+
77
+
78
+ # Copied from transformers.models.bart.modeling_bart.shift_tokens_right
79
+ def shift_tokens_right(
80
+ input_ids: torch.Tensor, pad_token_id: int, decoder_start_token_id: int
81
+ ):
82
+ """
83
+ Shift input ids one token to the right.
84
+ """
85
+ shifted_input_ids = input_ids.new_zeros(input_ids.shape)
86
+ shifted_input_ids[:, 1:] = input_ids[:, :-1].clone()
87
+ shifted_input_ids[:, 0] = decoder_start_token_id
88
+
89
+ if pad_token_id is None:
90
+ raise ValueError("self.model.config.pad_token_id has to be defined.")
91
+ # replace possible -100 values in labels by `pad_token_id`
92
+ shifted_input_ids.masked_fill_(shifted_input_ids == -100, pad_token_id)
93
+
94
+ return shifted_input_ids
95
+
96
+
97
+ # Copied from transformers.models.bart.modeling_bart._make_causal_mask
98
+ def _make_causal_mask(
99
+ input_ids_shape: torch.Size,
100
+ dtype: torch.dtype,
101
+ device: torch.device,
102
+ past_key_values_length: int = 0,
103
+ ):
104
+ """
105
+ Make causal mask used for bi-directional self-attention.
106
+ """
107
+ bsz, tgt_len = input_ids_shape
108
+ mask = torch.full(
109
+ (tgt_len, tgt_len),
110
+ torch.tensor(torch.finfo(dtype).min, device=device),
111
+ device=device,
112
+ )
113
+ mask_cond = torch.arange(mask.size(-1), device=device)
114
+ mask.masked_fill_(mask_cond < (mask_cond + 1).view(mask.size(-1), 1), 0)
115
+ mask = mask.to(dtype)
116
+
117
+ if past_key_values_length > 0:
118
+ mask = torch.cat(
119
+ [
120
+ torch.zeros(
121
+ tgt_len, past_key_values_length, dtype=dtype, device=device
122
+ ),
123
+ mask,
124
+ ],
125
+ dim=-1,
126
+ )
127
+ return mask[None, None, :, :].expand(
128
+ bsz, 1, tgt_len, tgt_len + past_key_values_length
129
+ )
130
+
131
+
132
+ # Copied from transformers.models.bart.modeling_bart._expand_mask
133
+ def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Optional[int] = None):
134
+ """
135
+ Expands attention_mask from `[bsz, seq_len]` to `[bsz, 1, tgt_seq_len, src_seq_len]`.
136
+ """
137
+ bsz, src_len = mask.size()
138
+ tgt_len = tgt_len if tgt_len is not None else src_len
139
+
140
+ expanded_mask = mask[:, None, None, :].expand(bsz, 1, tgt_len, src_len).to(dtype)
141
+
142
+ inverted_mask = 1.0 - expanded_mask
143
+
144
+ return inverted_mask.masked_fill(
145
+ inverted_mask.to(torch.bool), torch.finfo(dtype).min
146
+ )
147
+
148
+
149
+ # Copied from transformers.models.wav2vec2.modeling_wav2vec2._compute_mask_indices
150
+ def _compute_mask_indices(
151
+ shape: Tuple[int, int],
152
+ mask_prob: float,
153
+ mask_length: int,
154
+ attention_mask: Optional[torch.LongTensor] = None,
155
+ min_masks: int = 0,
156
+ ) -> np.ndarray:
157
+ """
158
+ Computes random mask spans for a given shape. Used to implement [SpecAugment: A Simple Data Augmentation Method for
159
+ ASR](https://arxiv.org/abs/1904.08779). Note that this method is not optimized to run on TPU and should be run on
160
+ CPU as part of the preprocessing during training.
161
+
162
+ Args:
163
+ shape: The shape for which to compute masks. This should be of a tuple of size 2 where
164
+ the first element is the batch size and the second element is the length of the axis to span.
165
+ mask_prob: The percentage of the whole axis (between 0 and 1) which will be masked. The number of
166
+ independently generated mask spans of length `mask_length` is computed by
167
+ `mask_prob*shape[1]/mask_length`. Note that due to overlaps, `mask_prob` is an upper bound and the
168
+ actual percentage will be smaller.
169
+ mask_length: size of the mask
170
+ min_masks: minimum number of masked spans
171
+ attention_mask: A (right-padded) attention mask which independently shortens the feature axis of
172
+ each batch dimension.
173
+ """
174
+ batch_size, sequence_length = shape
175
+
176
+ if mask_length < 1:
177
+ raise ValueError("`mask_length` has to be bigger than 0.")
178
+
179
+ if mask_length > sequence_length:
180
+ raise ValueError(
181
+ f"`mask_length` has to be smaller than `sequence_length`, but got `mask_length`: {mask_length}"
182
+ f" and `sequence_length`: {sequence_length}`"
183
+ )
184
+
185
+ # epsilon is used for probabilistic rounding
186
+ epsilon = np.random.rand(1).item()
187
+
188
+ def compute_num_masked_span(input_length):
189
+ """Given input length, compute how many spans should be masked"""
190
+ num_masked_span = int(mask_prob * input_length / mask_length + epsilon)
191
+ num_masked_span = max(num_masked_span, min_masks)
192
+
193
+ # make sure num masked span <= sequence_length
194
+ if num_masked_span * mask_length > sequence_length:
195
+ num_masked_span = sequence_length // mask_length
196
+
197
+ # make sure num_masked span is also <= input_length - (mask_length - 1)
198
+ if input_length - (mask_length - 1) < num_masked_span:
199
+ num_masked_span = max(input_length - (mask_length - 1), 0)
200
+
201
+ return num_masked_span
202
+
203
+ # compute number of masked spans in batch
204
+ input_lengths = (
205
+ attention_mask.sum(-1).detach().tolist()
206
+ if attention_mask is not None
207
+ else [sequence_length for _ in range(batch_size)]
208
+ )
209
+
210
+ # SpecAugment mask to fill
211
+ spec_aug_mask = np.zeros((batch_size, sequence_length), dtype=bool)
212
+ spec_aug_mask_idxs = []
213
+
214
+ max_num_masked_span = compute_num_masked_span(sequence_length)
215
+
216
+ if max_num_masked_span == 0:
217
+ return spec_aug_mask
218
+
219
+ for input_length in input_lengths:
220
+ # compute num of masked spans for this input
221
+ num_masked_span = compute_num_masked_span(input_length)
222
+
223
+ # get random indices to mask
224
+ spec_aug_mask_idx = np.random.choice(
225
+ np.arange(input_length - (mask_length - 1)), num_masked_span, replace=False
226
+ )
227
+
228
+ # pick first sampled index that will serve as a dummy index to pad vector
229
+ # to ensure same dimension for all batches due to probabilistic rounding
230
+ # Picking first sample just pads those vectors twice.
231
+ if len(spec_aug_mask_idx) == 0:
232
+ # this case can only happen if `input_length` is strictly smaller then
233
+ # `sequence_length` in which case the last token has to be a padding
234
+ # token which we can use as a dummy mask id
235
+ dummy_mask_idx = sequence_length - 1
236
+ else:
237
+ dummy_mask_idx = spec_aug_mask_idx[0]
238
+
239
+ spec_aug_mask_idx = np.concatenate(
240
+ [
241
+ spec_aug_mask_idx,
242
+ np.ones(max_num_masked_span - num_masked_span, dtype=np.int32)
243
+ * dummy_mask_idx,
244
+ ]
245
+ )
246
+ spec_aug_mask_idxs.append(spec_aug_mask_idx)
247
+
248
+ spec_aug_mask_idxs = np.array(spec_aug_mask_idxs)
249
+
250
+ # expand masked indices to masked spans
251
+ spec_aug_mask_idxs = np.broadcast_to(
252
+ spec_aug_mask_idxs[:, :, None], (batch_size, max_num_masked_span, mask_length)
253
+ )
254
+ spec_aug_mask_idxs = spec_aug_mask_idxs.reshape(
255
+ batch_size, max_num_masked_span * mask_length
256
+ )
257
+
258
+ # add offset to the starting indexes so that indexes now create a span
259
+ offsets = np.arange(mask_length)[None, None, :]
260
+ offsets = np.broadcast_to(
261
+ offsets, (batch_size, max_num_masked_span, mask_length)
262
+ ).reshape(batch_size, max_num_masked_span * mask_length)
263
+ spec_aug_mask_idxs = spec_aug_mask_idxs + offsets
264
+
265
+ # ensure that we cannot have indices larger than sequence_length
266
+ if spec_aug_mask_idxs.max() > sequence_length - 1:
267
+ spec_aug_mask_idxs[spec_aug_mask_idxs > sequence_length - 1] = (
268
+ sequence_length - 1
269
+ )
270
+
271
+ # scatter indices to mask
272
+ np.put_along_axis(spec_aug_mask, spec_aug_mask_idxs, 1, -1)
273
+
274
+ return spec_aug_mask
275
+
276
+
277
+ class WhisperPositionalEmbedding(nn.Embedding):
278
+ def __init__(
279
+ self, num_positions: int, embedding_dim: int, padding_idx: Optional[int] = None
280
+ ):
281
+ super().__init__(num_positions, embedding_dim)
282
+
283
+ def forward(self, input_ids, past_key_values_length=0):
284
+ return self.weight[
285
+ past_key_values_length : past_key_values_length + input_ids.shape[1]
286
+ ]
287
+
288
+
289
+ class WhisperAttention(nn.Module):
290
+ """Multi-headed attention from 'Attention Is All You Need' paper"""
291
+
292
+ def __init__(
293
+ self,
294
+ embed_dim: int,
295
+ num_heads: int,
296
+ dropout: float = 0.0,
297
+ is_decoder: bool = False,
298
+ bias: bool = True,
299
+ ):
300
+ super().__init__()
301
+ self.embed_dim = embed_dim
302
+ self.num_heads = num_heads
303
+ self.dropout = dropout
304
+ self.head_dim = embed_dim // num_heads
305
+
306
+ if (self.head_dim * num_heads) != self.embed_dim:
307
+ raise ValueError(
308
+ f"embed_dim must be divisible by num_heads (got `embed_dim`: {self.embed_dim}"
309
+ f" and `num_heads`: {num_heads})."
310
+ )
311
+ self.scaling = self.head_dim**-0.5
312
+ self.is_decoder = is_decoder
313
+
314
+ self.k_proj = nn.Linear(embed_dim, embed_dim, bias=False)
315
+ self.v_proj = nn.Linear(embed_dim, embed_dim, bias=bias)
316
+ self.q_proj = nn.Linear(embed_dim, embed_dim, bias=bias)
317
+ self.out_proj = nn.Linear(embed_dim, embed_dim, bias=bias)
318
+
319
+ # Copied from transformers.models.bart.modeling_bart.BartAttention._shape with BART->whisper
320
+ def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int):
321
+ return (
322
+ tensor.view(bsz, seq_len, self.num_heads, self.head_dim)
323
+ .transpose(1, 2)
324
+ .contiguous()
325
+ )
326
+
327
+ def forward_flash_attn(
328
+ self,
329
+ hidden_states,
330
+ cu_seqlens_q=None,
331
+ cu_seqlens_kv=None,
332
+ max_seqlen_q=None,
333
+ max_seqlen_kv=None,
334
+ output_attentions=False,
335
+ ):
336
+ """
337
+ hidden_states: [bsz, tgt_len, embed_dim]
338
+ seq_lens: Optinal, [bsz]
339
+ """
340
+ ### use flash_attn_func when seq_lens is None
341
+
342
+ query_states = self.q_proj(hidden_states)
343
+ key_states = self.k_proj(hidden_states)
344
+ value_states = self.v_proj(hidden_states)
345
+ if cu_seqlens_q is None:
346
+ bsz, tgt_len, _ = hidden_states.size()
347
+ query_states = query_states.view(
348
+ bsz, tgt_len, self.num_heads, self.head_dim
349
+ )
350
+ key_states = key_states.view(bsz, tgt_len, self.num_heads, self.head_dim)
351
+ value_states = value_states.view(
352
+ bsz, tgt_len, self.num_heads, self.head_dim
353
+ )
354
+
355
+ if is_fa3_ready:
356
+ attn_output, attn_probs_ret = fa3_func(
357
+ query_states,
358
+ key_states,
359
+ value_states,
360
+ softmax_scale=self.scaling,
361
+ causal=self.is_decoder,
362
+ )
363
+ if output_attentions:
364
+ attn_probs = attn_probs_ret
365
+ else:
366
+ attn_probs = None
367
+ else:
368
+ attn_output = flash_attn_func(
369
+ query_states,
370
+ key_states,
371
+ value_states,
372
+ dropout_p=self.dropout,
373
+ softmax_scale=self.scaling,
374
+ causal=self.is_decoder,
375
+ return_attn_probs=output_attentions,
376
+ )
377
+ if output_attentions:
378
+ attn_output, attn_probs = attn_output
379
+ else:
380
+ attn_probs = None
381
+ attn_output = attn_output.view(bsz, tgt_len, self.embed_dim)
382
+ else:
383
+ query_states = query_states.view(-1, self.num_heads, self.head_dim)
384
+ key_states = key_states.view(-1, self.num_heads, self.head_dim)
385
+ value_states = value_states.view(-1, self.num_heads, self.head_dim)
386
+ if is_fa3_ready:
387
+ attn_output, attn_probs_ret = fa3_varlen_func(
388
+ q=query_states,
389
+ k=key_states,
390
+ v=value_states,
391
+ cu_seqlens_q=cu_seqlens_q,
392
+ cu_seqlens_k=cu_seqlens_kv,
393
+ max_seqlen_q=max_seqlen_q,
394
+ max_seqlen_k=max_seqlen_kv,
395
+ softmax_scale=self.scaling,
396
+ causal=self.is_decoder,
397
+ )
398
+ if output_attentions:
399
+ attn_probs = attn_probs_ret
400
+ else:
401
+ attn_probs = None
402
+ else:
403
+ attn_output = flash_attn_varlen_func(
404
+ q=query_states,
405
+ k=key_states,
406
+ v=value_states,
407
+ cu_seqlens_q=cu_seqlens_q,
408
+ cu_seqlens_k=cu_seqlens_kv,
409
+ max_seqlen_q=max_seqlen_q,
410
+ max_seqlen_k=max_seqlen_kv,
411
+ dropout_p=self.dropout,
412
+ softmax_scale=self.scaling,
413
+ causal=self.is_decoder,
414
+ return_attn_probs=output_attentions,
415
+ )
416
+ if output_attentions:
417
+ attn_output, attn_probs = attn_output
418
+ else:
419
+ attn_probs = None
420
+ attn_output = attn_output.view(-1, self.embed_dim)
421
+
422
+ ret = self.out_proj(attn_output)
423
+
424
+ return ret, attn_probs
425
+
426
+ # Copied from transformers.models.bart.modeling_bart.BartAttention.forward with BART->whisper
427
+ def forward(
428
+ self,
429
+ hidden_states: torch.Tensor,
430
+ key_value_states: Optional[torch.Tensor] = None,
431
+ past_key_value: Optional[Tuple[torch.Tensor]] = None,
432
+ attention_mask: Optional[torch.Tensor] = None,
433
+ layer_head_mask: Optional[torch.Tensor] = None,
434
+ output_attentions: bool = False,
435
+ ) -> Tuple[torch.Tensor, Optional[torch.Tensor], Optional[Tuple[torch.Tensor]]]:
436
+ """Input shape: Batch x Time x Channel"""
437
+
438
+ # if key_value_states are provided this layer is used as a cross-attention layer
439
+ # for the decoder
440
+ is_cross_attention = key_value_states is not None
441
+
442
+ bsz, tgt_len, _ = hidden_states.size()
443
+
444
+ # get query proj
445
+ query_states = self.q_proj(hidden_states) * self.scaling
446
+ # get key, value proj
447
+ # `past_key_value[0].shape[2] == key_value_states.shape[1]`
448
+ # is checking that the `sequence_length` of the `past_key_value` is the same as
449
+ # the provided `key_value_states` to support prefix tuning
450
+ if (
451
+ is_cross_attention
452
+ and past_key_value is not None
453
+ and past_key_value[0].shape[2] == key_value_states.shape[1]
454
+ ):
455
+ # reuse k,v, cross_attentions
456
+ key_states = past_key_value[0]
457
+ value_states = past_key_value[1]
458
+ elif is_cross_attention:
459
+ # cross_attentions
460
+ key_states = self._shape(self.k_proj(key_value_states), -1, bsz)
461
+ value_states = self._shape(self.v_proj(key_value_states), -1, bsz)
462
+ elif past_key_value is not None:
463
+ # reuse k, v, self_attention
464
+ key_states = self._shape(self.k_proj(hidden_states), -1, bsz)
465
+ value_states = self._shape(self.v_proj(hidden_states), -1, bsz)
466
+ key_states = torch.cat([past_key_value[0], key_states], dim=2)
467
+ value_states = torch.cat([past_key_value[1], value_states], dim=2)
468
+ else:
469
+ # self_attention
470
+ key_states = self._shape(self.k_proj(hidden_states), -1, bsz)
471
+ value_states = self._shape(self.v_proj(hidden_states), -1, bsz)
472
+
473
+ if self.is_decoder:
474
+ # if cross_attention save Tuple(torch.Tensor, torch.Tensor) of all cross attention key/value_states.
475
+ # Further calls to cross_attention layer can then reuse all cross-attention
476
+ # key/value_states (first "if" case)
477
+ # if uni-directional self-attention (decoder) save Tuple(torch.Tensor, torch.Tensor) of
478
+ # all previous decoder key/value_states. Further calls to uni-directional self-attention
479
+ # can concat previous decoder key/value_states to current projected key/value_states (third "elif" case)
480
+ # if encoder bi-directional self-attention `past_key_value` is always `None`
481
+ past_key_value = (key_states, value_states)
482
+
483
+ proj_shape = (bsz * self.num_heads, -1, self.head_dim)
484
+ query_states = self._shape(query_states, tgt_len, bsz).view(*proj_shape)
485
+ key_states = key_states.reshape(*proj_shape)
486
+ value_states = value_states.reshape(*proj_shape)
487
+
488
+ src_len = key_states.size(1)
489
+ attn_weights = torch.bmm(query_states, key_states.transpose(1, 2))
490
+
491
+ if attn_weights.size() != (bsz * self.num_heads, tgt_len, src_len):
492
+ raise ValueError(
493
+ f"Attention weights should be of size {(bsz * self.num_heads, tgt_len, src_len)}, but is"
494
+ f" {attn_weights.size()}"
495
+ )
496
+
497
+ if attention_mask is not None:
498
+ if attention_mask.size() != (bsz, 1, tgt_len, src_len):
499
+ raise ValueError(
500
+ f"Attention mask should be of size {(bsz, 1, tgt_len, src_len)}, but is {attention_mask.size()}"
501
+ )
502
+ attn_weights = (
503
+ attn_weights.view(bsz, self.num_heads, tgt_len, src_len)
504
+ + attention_mask
505
+ )
506
+ attn_weights = attn_weights.view(bsz * self.num_heads, tgt_len, src_len)
507
+
508
+ attn_weights = nn.functional.softmax(attn_weights, dim=-1)
509
+
510
+ if layer_head_mask is not None:
511
+ if layer_head_mask.size() != (self.num_heads,):
512
+ raise ValueError(
513
+ f"Head mask for a single layer should be of size {(self.num_heads,)}, but is"
514
+ f" {layer_head_mask.size()}"
515
+ )
516
+ attn_weights = layer_head_mask.view(1, -1, 1, 1) * attn_weights.view(
517
+ bsz, self.num_heads, tgt_len, src_len
518
+ )
519
+ attn_weights = attn_weights.view(bsz * self.num_heads, tgt_len, src_len)
520
+
521
+ if output_attentions:
522
+ # this operation is a bit awkward, but it's required to
523
+ # make sure that attn_weights keeps its gradient.
524
+ # In order to do so, attn_weights have to be reshaped
525
+ # twice and have to be reused in the following
526
+ attn_weights_reshaped = attn_weights.view(
527
+ bsz, self.num_heads, tgt_len, src_len
528
+ )
529
+ attn_weights = attn_weights_reshaped.view(
530
+ bsz * self.num_heads, tgt_len, src_len
531
+ )
532
+ else:
533
+ attn_weights_reshaped = None
534
+
535
+ attn_probs = nn.functional.dropout(
536
+ attn_weights, p=self.dropout, training=self.training
537
+ )
538
+
539
+ attn_output = torch.bmm(attn_probs, value_states)
540
+
541
+ if attn_output.size() != (bsz * self.num_heads, tgt_len, self.head_dim):
542
+ raise ValueError(
543
+ f"`attn_output` should be of size {(bsz * self.num_heads, tgt_len, self.head_dim)}, but is"
544
+ f" {attn_output.size()}"
545
+ )
546
+
547
+ attn_output = attn_output.view(bsz, self.num_heads, tgt_len, self.head_dim)
548
+ attn_output = attn_output.transpose(1, 2)
549
+
550
+ # Use the `embed_dim` from the config (stored in the class) rather than `hidden_state` because `attn_output` can be
551
+ # partitioned across GPUs when using tensor-parallelism.
552
+ attn_output = attn_output.reshape(bsz, tgt_len, self.embed_dim)
553
+
554
+ attn_output = self.out_proj(attn_output)
555
+
556
+ return attn_output, attn_weights_reshaped, past_key_value
557
+
558
+
559
+ # Copied from transformers.models.mbart.modeling_mbart.MBartEncoderLayer with MBart->Whisper
560
+ class WhisperEncoderLayer(nn.Module):
561
+ def __init__(self, config: WhisperConfig):
562
+ super().__init__()
563
+ self.embed_dim = config.d_model
564
+ self.self_attn = WhisperAttention(
565
+ embed_dim=self.embed_dim,
566
+ num_heads=config.encoder_attention_heads,
567
+ dropout=config.attention_dropout,
568
+ )
569
+ self.self_attn_layer_norm = nn.LayerNorm(self.embed_dim)
570
+ self.dropout = config.dropout
571
+ self.activation_fn = ACT2FN[config.activation_function]
572
+ self.activation_dropout = config.activation_dropout
573
+ self.fc1 = nn.Linear(self.embed_dim, config.encoder_ffn_dim)
574
+ self.fc2 = nn.Linear(config.encoder_ffn_dim, self.embed_dim)
575
+ self.final_layer_norm = nn.LayerNorm(self.embed_dim)
576
+
577
+ def forward(
578
+ self,
579
+ hidden_states: torch.Tensor,
580
+ cu_seqlens_q: torch.Tensor = None,
581
+ cu_seqlens_kv: torch.Tensor = None,
582
+ max_seqlen_q: int = None,
583
+ max_seqlen_kv: int = None,
584
+ output_attentions: bool = False,
585
+ ) -> torch.Tensor:
586
+ """
587
+ Args:
588
+ hidden_states (`torch.FloatTensor`): input to the layer of shape `(seq_len, batch, embed_dim)`
589
+ attention_mask (`torch.FloatTensor`): attention mask of size
590
+ `(batch, 1, tgt_len, src_len)` where padding elements are indicated by very large negative values.
591
+ layer_head_mask (`torch.FloatTensor`): mask for attention heads in a given layer of size
592
+ `(encoder_attention_heads,)`.
593
+ output_attentions (`bool`, *optional*):
594
+ Whether or not to return the attentions tensors of all attention layers. See `attentions` under
595
+ returned tensors for more detail.
596
+ """
597
+ residual = hidden_states
598
+ hidden_states = self.self_attn_layer_norm(hidden_states)
599
+
600
+ hidden_states, attn_weights = self.self_attn.forward_flash_attn(
601
+ hidden_states=hidden_states,
602
+ cu_seqlens_q=cu_seqlens_q,
603
+ cu_seqlens_kv=cu_seqlens_kv,
604
+ max_seqlen_q=max_seqlen_q,
605
+ max_seqlen_kv=max_seqlen_kv,
606
+ output_attentions=output_attentions,
607
+ )
608
+ # ret_vallina_attn, attn_weights, _ = self.self_attn(
609
+ # hidden_states=hidden_states,
610
+ # attention_mask=attention_mask,
611
+ # layer_head_mask=layer_head_mask,
612
+ # output_attentions=output_attentions,
613
+ # )
614
+
615
+ # hidden_states, attn_weights, _ = self.self_attn(
616
+ # hidden_states=hidden_states,
617
+ # attention_mask=attention_mask,
618
+ # layer_head_mask=layer_head_mask,
619
+ # output_attentions=output_attentions,
620
+ # )
621
+ hidden_states = nn.functional.dropout(
622
+ hidden_states, p=self.dropout, training=self.training
623
+ )
624
+ hidden_states = residual + hidden_states
625
+
626
+ residual = hidden_states
627
+ hidden_states = self.final_layer_norm(hidden_states)
628
+ hidden_states = self.activation_fn(self.fc1(hidden_states))
629
+ hidden_states = nn.functional.dropout(
630
+ hidden_states, p=self.activation_dropout, training=self.training
631
+ )
632
+ hidden_states = self.fc2(hidden_states)
633
+ hidden_states = nn.functional.dropout(
634
+ hidden_states, p=self.dropout, training=self.training
635
+ )
636
+ hidden_states = residual + hidden_states
637
+
638
+ if hidden_states.dtype == torch.float16 and (
639
+ torch.isinf(hidden_states).any() or torch.isnan(hidden_states).any()
640
+ ):
641
+ clamp_value = torch.finfo(hidden_states.dtype).max - 1000
642
+ hidden_states = torch.clamp(
643
+ hidden_states, min=-clamp_value, max=clamp_value
644
+ )
645
+
646
+ outputs = (hidden_states,)
647
+
648
+ if output_attentions:
649
+ outputs += (attn_weights,)
650
+
651
+ return outputs
652
+
653
+
654
+ # Copied from transformers.models.mbart.modeling_mbart.MBartDecoderLayer with MBart->Whisper
655
+ class WhisperDecoderLayer(nn.Module):
656
+ def __init__(self, config: WhisperConfig):
657
+ super().__init__()
658
+ self.embed_dim = config.d_model
659
+
660
+ self.self_attn = WhisperAttention(
661
+ embed_dim=self.embed_dim,
662
+ num_heads=config.decoder_attention_heads,
663
+ dropout=config.attention_dropout,
664
+ is_decoder=True,
665
+ )
666
+ self.dropout = config.dropout
667
+ self.activation_fn = ACT2FN[config.activation_function]
668
+ self.activation_dropout = config.activation_dropout
669
+
670
+ self.self_attn_layer_norm = nn.LayerNorm(self.embed_dim)
671
+ self.encoder_attn = WhisperAttention(
672
+ self.embed_dim,
673
+ config.decoder_attention_heads,
674
+ dropout=config.attention_dropout,
675
+ is_decoder=True,
676
+ )
677
+ self.encoder_attn_layer_norm = nn.LayerNorm(self.embed_dim)
678
+ self.fc1 = nn.Linear(self.embed_dim, config.decoder_ffn_dim)
679
+ self.fc2 = nn.Linear(config.decoder_ffn_dim, self.embed_dim)
680
+ self.final_layer_norm = nn.LayerNorm(self.embed_dim)
681
+
682
+ def forward(
683
+ self,
684
+ hidden_states: torch.Tensor,
685
+ attention_mask: Optional[torch.Tensor] = None,
686
+ encoder_hidden_states: Optional[torch.Tensor] = None,
687
+ encoder_attention_mask: Optional[torch.Tensor] = None,
688
+ layer_head_mask: Optional[torch.Tensor] = None,
689
+ cross_attn_layer_head_mask: Optional[torch.Tensor] = None,
690
+ past_key_value: Optional[Tuple[torch.Tensor]] = None,
691
+ output_attentions: Optional[bool] = False,
692
+ use_cache: Optional[bool] = True,
693
+ ) -> torch.Tensor:
694
+ """
695
+ Args:
696
+ hidden_states (`torch.FloatTensor`): input to the layer of shape `(batch, seq_len, embed_dim)`
697
+ attention_mask (`torch.FloatTensor`): attention mask of size
698
+ `(batch, 1, tgt_len, src_len)` where padding elements are indicated by very large negative values.
699
+ encoder_hidden_states (`torch.FloatTensor`):
700
+ cross attention input to the layer of shape `(batch, seq_len, embed_dim)`
701
+ encoder_attention_mask (`torch.FloatTensor`): encoder attention mask of size
702
+ `(batch, 1, tgt_len, src_len)` where padding elements are indicated by very large negative values.
703
+ layer_head_mask (`torch.FloatTensor`): mask for attention heads in a given layer of size
704
+ `(encoder_attention_heads,)`.
705
+ cross_attn_layer_head_mask (`torch.FloatTensor`): mask for cross-attention heads in a given layer of
706
+ size `(decoder_attention_heads,)`.
707
+ past_key_value (`Tuple(torch.FloatTensor)`): cached past key and value projection states
708
+ output_attentions (`bool`, *optional*):
709
+ Whether or not to return the attentions tensors of all attention layers. See `attentions` under
710
+ returned tensors for more detail.
711
+ """
712
+ residual = hidden_states
713
+ hidden_states = self.self_attn_layer_norm(hidden_states)
714
+
715
+ # Self Attention
716
+ # decoder uni-directional self-attention cached key/values tuple is at positions 1,2
717
+ self_attn_past_key_value = (
718
+ past_key_value[:2] if past_key_value is not None else None
719
+ )
720
+ # add present self-attn cache to positions 1,2 of present_key_value tuple
721
+ hidden_states, self_attn_weights, present_key_value = self.self_attn(
722
+ hidden_states=hidden_states,
723
+ past_key_value=self_attn_past_key_value,
724
+ attention_mask=attention_mask,
725
+ layer_head_mask=layer_head_mask,
726
+ output_attentions=output_attentions,
727
+ )
728
+ hidden_states = nn.functional.dropout(
729
+ hidden_states, p=self.dropout, training=self.training
730
+ )
731
+ hidden_states = residual + hidden_states
732
+
733
+ # Cross-Attention Block
734
+ cross_attn_present_key_value = None
735
+ cross_attn_weights = None
736
+ if encoder_hidden_states is not None:
737
+ residual = hidden_states
738
+ hidden_states = self.encoder_attn_layer_norm(hidden_states)
739
+
740
+ # cross_attn cached key/values tuple is at positions 3,4 of present_key_value tuple
741
+ cross_attn_past_key_value = (
742
+ past_key_value[-2:] if past_key_value is not None else None
743
+ )
744
+ hidden_states, cross_attn_weights, cross_attn_present_key_value = (
745
+ self.encoder_attn(
746
+ hidden_states=hidden_states,
747
+ key_value_states=encoder_hidden_states,
748
+ attention_mask=encoder_attention_mask,
749
+ layer_head_mask=cross_attn_layer_head_mask,
750
+ past_key_value=cross_attn_past_key_value,
751
+ output_attentions=output_attentions,
752
+ )
753
+ )
754
+ hidden_states = nn.functional.dropout(
755
+ hidden_states, p=self.dropout, training=self.training
756
+ )
757
+ hidden_states = residual + hidden_states
758
+
759
+ # add cross-attn to positions 3,4 of present_key_value tuple
760
+ present_key_value = present_key_value + cross_attn_present_key_value
761
+
762
+ # Fully Connected
763
+ residual = hidden_states
764
+ hidden_states = self.final_layer_norm(hidden_states)
765
+ hidden_states = self.activation_fn(self.fc1(hidden_states))
766
+ hidden_states = nn.functional.dropout(
767
+ hidden_states, p=self.activation_dropout, training=self.training
768
+ )
769
+ hidden_states = self.fc2(hidden_states)
770
+ hidden_states = nn.functional.dropout(
771
+ hidden_states, p=self.dropout, training=self.training
772
+ )
773
+ hidden_states = residual + hidden_states
774
+
775
+ outputs = (hidden_states,)
776
+
777
+ if output_attentions:
778
+ outputs += (self_attn_weights, cross_attn_weights)
779
+
780
+ if use_cache:
781
+ outputs += (present_key_value,)
782
+
783
+ return outputs
784
+
785
+
786
+ class WhisperPreTrainedModel(PreTrainedModel):
787
+ config_class = WhisperConfig
788
+ base_model_prefix = "model"
789
+ main_input_name = "input_features"
790
+ supports_gradient_checkpointing = True
791
+ _no_split_modules = ["WhisperEncoderLayer", "WhisperDecoderLayer"]
792
+
793
+ def _init_weights(self, module):
794
+ std = self.config.init_std
795
+ if isinstance(module, (nn.Linear, nn.Conv1d)):
796
+ module.weight.data.normal_(mean=0.0, std=std)
797
+ if module.bias is not None:
798
+ module.bias.data.zero_()
799
+ elif isinstance(module, nn.Embedding):
800
+ module.weight.data.normal_(mean=0.0, std=std)
801
+ if module.padding_idx is not None:
802
+ module.weight.data[module.padding_idx].zero_()
803
+
804
+ def _set_gradient_checkpointing(self, module, value=False):
805
+ if isinstance(module, (WhisperDecoder, WhisperEncoder)):
806
+ module.gradient_checkpointing = value
807
+
808
+ def _get_feat_extract_output_lengths(self, input_lengths: torch.LongTensor):
809
+ """
810
+ Computes the output length of the convolutional layers
811
+ """
812
+ input_lengths = (input_lengths - 1) // 2 + 1
813
+
814
+ return input_lengths
815
+
816
+
817
+ WHISPER_START_DOCSTRING = r"""
818
+ This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the
819
+ library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
820
+ etc.)
821
+
822
+ This model is also a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) subclass.
823
+ Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
824
+ and behavior.
825
+
826
+ Parameters:
827
+ config ([`WhisperConfig`]):
828
+ Model configuration class with all the parameters of the model. Initializing with a config file does not
829
+ load the weights associated with the model, only the configuration. Check out the
830
+ [`~PreTrainedModel.from_pretrained`] method to load the model weights.
831
+ """
832
+
833
+ WHISPER_INPUTS_DOCSTRING = r"""
834
+ Args:
835
+ input_features (`torch.FloatTensor` of shape `(batch_size, feature_size, sequence_length)`):
836
+ Float values mel features extracted from the raw speech waveform. Raw speech waveform can be obtained by
837
+ loading a `.flac` or `.wav` audio file into an array of type `List[float]` or a `numpy.ndarray`, *e.g.* via
838
+ the soundfile library (`pip install soundfile`). To prepare the array into `input_features`, the
839
+ [`AutoFeatureExtractor`] should be used for extracting the mel features, padding and conversion into a
840
+ tensor of type `torch.FloatTensor`. See [`~WhisperFeatureExtractor.__call__`]
841
+ attention_mask (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
842
+ Mask to avoid performing *SpecAugment* data augmentation on padding token indices. Mask values selected in
843
+ `[0, 1]`:
844
+
845
+ - 1 for tokens that are **not masked**,
846
+ - 0 for tokens that are **masked**.
847
+
848
+ [What are attention masks?](../glossary#attention-mask)
849
+ decoder_input_ids (`torch.LongTensor` of shape `(batch_size, target_sequence_length)`, *optional*):
850
+ Indices of decoder input sequence tokens in the vocabulary.
851
+
852
+ Indices can be obtained using [`WhisperTokenizer`]. See [`PreTrainedTokenizer.encode`] and
853
+ [`PreTrainedTokenizer.__call__`] for details.
854
+
855
+ [What are decoder input IDs?](../glossary#decoder-input-ids)
856
+
857
+ Whisper uses the `decoder_start_token_id` as the starting token for `decoder_input_ids` generation. If
858
+ `past_key_values` is used, optionally only the last `decoder_input_ids` have to be input (see
859
+ `past_key_values`).
860
+ decoder_attention_mask (`torch.LongTensor` of shape `(batch_size, target_sequence_length)`, *optional*):
861
+ Default behavior: generate a tensor that ignores pad tokens in `decoder_input_ids`. Causal mask will also
862
+ be used by default.
863
+
864
+ If you want to change padding behavior, you should read
865
+ [`modeling_whisper._prepare_decoder_attention_mask`] and modify to your needs. See diagram 1 in [the BART
866
+ paper](https://arxiv.org/abs/1910.13461) for more information on the default strategy.
867
+ head_mask (`torch.Tensor` of shape `(encoder_layers, encoder_attention_heads)`, *optional*):
868
+ Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in `[0, 1]`:
869
+
870
+ - 1 indicates the head is **not masked**,
871
+ - 0 indicates the head is **masked**.
872
+
873
+ decoder_head_mask (`torch.Tensor` of shape `(decoder_layers, decoder_attention_heads)`, *optional*):
874
+ Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in `[0, 1]`:
875
+
876
+ - 1 indicates the head is **not masked**,
877
+ - 0 indicates the head is **masked**.
878
+
879
+ cross_attn_head_mask (`torch.Tensor` of shape `(decoder_layers, decoder_attention_heads)`, *optional*):
880
+ Mask to nullify selected heads of the cross-attention modules. Mask values selected in `[0, 1]`:
881
+
882
+ - 1 indicates the head is **not masked**,
883
+ - 0 indicates the head is **masked**.
884
+
885
+ encoder_outputs (`tuple(tuple(torch.FloatTensor)`, *optional*):
886
+ Tuple consists of (`last_hidden_state`, *optional*: `hidden_states`, *optional*: `attentions`)
887
+ `last_hidden_state` of shape `(batch_size, sequence_length, hidden_size)`, *optional*) is a sequence of
888
+ hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.
889
+ past_key_values (`tuple(tuple(torch.FloatTensor))`, *optional*, returned when `use_cache=True` is passed or when `config.use_cache=True`):
890
+ Tuple of `tuple(torch.FloatTensor)` of length `config.n_layers`, with each tuple having 2 tensors of shape
891
+ `(batch_size, num_heads, sequence_length, embed_size_per_head)`) and 2 additional tensors of shape
892
+ `(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)`.
893
+
894
+ Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
895
+ blocks) that can be used (see `past_key_values` input) to speed up sequential decoding.
896
+
897
+ If `past_key_values` are used, the user can optionally input only the last `decoder_input_ids` (those that
898
+ don't have their past key value states given to this model) of shape `(batch_size, 1)` instead of all
899
+ `decoder_input_ids` of shape `(batch_size, sequence_length)`.
900
+ decoder_inputs_embeds (`torch.FloatTensor` of shape `(batch_size, target_sequence_length, hidden_size)`, *optional*):
901
+ Optionally, instead of passing `decoder_input_ids` you can choose to directly pass an embedded
902
+ representation. If `past_key_values` is used, optionally only the last `decoder_inputs_embeds` have to be
903
+ input (see `past_key_values`). This is useful if you want more control over how to convert
904
+ `decoder_input_ids` indices into associated vectors than the model's internal embedding lookup matrix.
905
+ use_cache (`bool`, *optional*):
906
+ If set to `True`, `past_key_values` key value states are returned and can be used to speed up decoding (see
907
+ `past_key_values`).
908
+ output_attentions (`bool`, *optional*):
909
+ Whether or not to return the attentions tensors of all attention layers. See `attentions` under returned
910
+ tensors for more detail.
911
+ output_hidden_states (`bool`, *optional*):
912
+ Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
913
+ more detail.
914
+ return_dict (`bool`, *optional*):
915
+ Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
916
+ """
917
+
918
+ WHISPER_ENCODER_INPUTS_DOCSTRING = r"""
919
+ Args:
920
+ input_features (`torch.FloatTensor` of shape `(batch_size, feature_size, sequence_length)`):
921
+ Float values mel features extracted from the raw speech waveform. Raw speech waveform can be obtained by
922
+ loading a `.flac` or `.wav` audio file into an array of type `List[float]` or a `numpy.ndarray`, *e.g.* via
923
+ the soundfile library (`pip install soundfile`). To prepare the array into `input_features`, the
924
+ [`AutoFeatureExtractor`] should be used for extracting the mel features, padding and conversion into a
925
+ tensor of type `torch.FloatTensor`. See [`~WhisperFeatureExtractor.__call__`]
926
+ head_mask (`torch.Tensor` of shape `(encoder_layers, encoder_attention_heads)`, *optional*):
927
+ Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in `[0, 1]`:
928
+
929
+ - 1 indicates the head is **not masked**,
930
+ - 0 indicates the head is **masked**.
931
+ encoder_outputs (`tuple(tuple(torch.FloatTensor)`, *optional*):
932
+ Tuple consists of (`last_hidden_state`, *optional*: `hidden_states`, *optional*: `attentions`)
933
+ `last_hidden_state` of shape `(batch_size, sequence_length, hidden_size)`, *optional*) is a sequence of
934
+ hidden-states at the output of the last layer of the encoder.
935
+ output_attentions (`bool`, *optional*):
936
+ Whether or not to return the attentions tensors of all attention layers. See `attentions` under returned
937
+ tensors for more detail.
938
+ output_hidden_states (`bool`, *optional*):
939
+ Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
940
+ more detail.
941
+ return_dict (`bool`, *optional*):
942
+ Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
943
+ """
944
+
945
+
946
+ class WhisperEncoder(WhisperPreTrainedModel):
947
+ """
948
+ Transformer encoder consisting of *config.encoder_layers* self attention layers. Each layer is a
949
+ [`WhisperEncoderLayer`].
950
+
951
+ Args:
952
+ config: WhisperConfig
953
+ """
954
+
955
+ def __init__(self, config: WhisperConfig):
956
+ super().__init__(config)
957
+ self.dropout = config.dropout
958
+ self.layerdrop = config.encoder_layerdrop
959
+
960
+ embed_dim = config.d_model
961
+ self.num_mel_bins = 128
962
+ self.padding_idx = config.pad_token_id
963
+ self.max_source_positions = config.max_source_positions
964
+ self.embed_scale = math.sqrt(embed_dim) if config.scale_embedding else 1.0
965
+
966
+ self.conv1 = nn.Conv1d(self.num_mel_bins, embed_dim, kernel_size=3, padding=1)
967
+ self.conv2 = nn.Conv1d(embed_dim, embed_dim, kernel_size=3, stride=2, padding=1)
968
+
969
+ self.embed_positions = nn.Embedding(self.max_source_positions, embed_dim)
970
+
971
+ self.layers = nn.ModuleList(
972
+ [WhisperEncoderLayer(config) for _ in range(config.encoder_layers)]
973
+ )
974
+ self.layer_norm = nn.LayerNorm(config.d_model)
975
+
976
+ # args = get_args()
977
+ self.gradient_checkpointing = False # args.kimia_whisper_gradient_checkpointing
978
+ self.gradient_checkpointing_first_layer = (
979
+ False # args.kimia_whisper_gradient_checkpointing_first_layer
980
+ )
981
+ # Initialize weights and apply final processing
982
+ self.post_init()
983
+
984
+ def _freeze_parameters(self):
985
+ for param in self.parameters():
986
+ param.requires_grad = False
987
+ self._requires_grad = False
988
+
989
+ def get_input_embeddings(self) -> nn.Module:
990
+ return self.conv1
991
+
992
+ def set_input_embeddings(self, value: nn.Module):
993
+ self.conv1 = value
994
+
995
+ def forward(
996
+ self,
997
+ input_features,
998
+ input_seq_lens=None,
999
+ output_attentions=None,
1000
+ output_hidden_states=None,
1001
+ return_dict=None,
1002
+ ):
1003
+ r"""
1004
+ Args:
1005
+ input_features (`torch.LongTensor` of shape `(batch_size, feature_size, sequence_length)`):
1006
+ Float values of mel features extracted from the raw speech waveform. Raw speech waveform can be
1007
+ obtained by loading a `.flac` or `.wav` audio file into an array of type `List[float]` or a
1008
+ `numpy.ndarray`, *e.g.* via the soundfile library (`pip install soundfile`). To prepare the array into
1009
+ `input_features`, the [`AutoFeatureExtractor`] should be used for extracting the mel features, padding
1010
+ and conversion into a tensor of type `torch.FloatTensor`. See [`~WhisperFeatureExtractor.__call__`]
1011
+ input_seq_lens (`torch.Tensor`)`, *optional*):
1012
+ The sequence lengths of the input mel features.
1013
+ output_attentions (`bool`, *optional*):
1014
+ Whether or not to return the attentions tensors of all attention layers. See `attentions` under
1015
+ returned tensors for more detail.
1016
+ output_hidden_states (`bool`, *optional*):
1017
+ Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors
1018
+ for more detail.
1019
+ return_dict (`bool`, *optional*):
1020
+ Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
1021
+ """
1022
+ output_attentions = (
1023
+ output_attentions
1024
+ if output_attentions is not None
1025
+ else self.config.output_attentions
1026
+ )
1027
+ output_hidden_states = (
1028
+ output_hidden_states
1029
+ if output_hidden_states is not None
1030
+ else self.config.output_hidden_states
1031
+ )
1032
+ return_dict = (
1033
+ return_dict if return_dict is not None else self.config.use_return_dict
1034
+ )
1035
+ inputs_embeds = nn.functional.gelu(self.conv1(input_features))
1036
+ inputs_embeds = nn.functional.gelu(self.conv2(inputs_embeds))
1037
+
1038
+ inputs_embeds = inputs_embeds.permute(0, 2, 1)
1039
+ embed_pos = self.embed_positions.weight
1040
+
1041
+ hidden_states = inputs_embeds + embed_pos
1042
+ hidden_states = nn.functional.dropout(
1043
+ hidden_states, p=self.dropout, training=self.training
1044
+ )
1045
+
1046
+ encoder_states = () if output_hidden_states else None
1047
+ all_attentions = () if output_attentions else None
1048
+
1049
+ # if input_seq_lens is None:
1050
+ # input_seq_lens = torch.zeros(hidden_states.shape[0], dtype=torch.int32).fill_(hidden_states.shape[1]).to(hidden_states.device).long()
1051
+
1052
+ if input_seq_lens is not None:
1053
+ # build cu_seqlens_q, cu_seqlens_kv, max_seqlen_q, max_seqlen_kv and q, k, v by seq_lens
1054
+ B, S, D = hidden_states.shape
1055
+ cu_seqlens_q = torch.zeros(B + 1, dtype=torch.int32).to(
1056
+ hidden_states.device
1057
+ )
1058
+ cu_seqlens_kv = torch.zeros(B + 1, dtype=torch.int32).to(
1059
+ hidden_states.device
1060
+ )
1061
+ max_seqlen_q = torch.max(input_seq_lens).to(hidden_states.device)
1062
+ max_seqlen_kv = torch.max(input_seq_lens).to(hidden_states.device)
1063
+
1064
+ hidden_states_collect = []
1065
+ for i in range(B):
1066
+ hidden_states_collect.append(hidden_states[i, : input_seq_lens[i], :])
1067
+ cu_seqlens_q[i + 1] = cu_seqlens_q[i] + input_seq_lens[i]
1068
+ cu_seqlens_kv[i + 1] = cu_seqlens_kv[i] + input_seq_lens[i]
1069
+ max_seqlen_q = max(max_seqlen_q, input_seq_lens[i])
1070
+ max_seqlen_kv = max(max_seqlen_kv, input_seq_lens[i])
1071
+
1072
+ hidden_states = torch.cat(hidden_states_collect, dim=0)
1073
+ else:
1074
+ cu_seqlens_q = None
1075
+ cu_seqlens_kv = None
1076
+ max_seqlen_q = None
1077
+ max_seqlen_kv = None
1078
+
1079
+ for idx, encoder_layer in enumerate(self.layers):
1080
+ if output_hidden_states:
1081
+ encoder_states = encoder_states + (hidden_states,)
1082
+ # add LayerDrop (see https://arxiv.org/abs/1909.11556 for description)
1083
+ dropout_probability = random.uniform(0, 1)
1084
+ if self.training and (
1085
+ dropout_probability < self.layerdrop
1086
+ ): # skip the layer
1087
+ layer_outputs = (None, None)
1088
+ else:
1089
+ if (
1090
+ self.gradient_checkpointing
1091
+ and self.training
1092
+ and (
1093
+ self.gradient_checkpointing_first_layer == -1
1094
+ or idx <= self.gradient_checkpointing_first_layer
1095
+ )
1096
+ ):
1097
+
1098
+ def create_custom_forward(module):
1099
+ def custom_forward(*inputs):
1100
+ return module(*inputs, output_attentions)
1101
+
1102
+ return custom_forward
1103
+
1104
+ layer_outputs = torch.utils.checkpoint.checkpoint(
1105
+ create_custom_forward(encoder_layer),
1106
+ hidden_states,
1107
+ cu_seqlens_q,
1108
+ cu_seqlens_kv,
1109
+ max_seqlen_q,
1110
+ max_seqlen_kv,
1111
+ )
1112
+ else:
1113
+ layer_outputs = encoder_layer(
1114
+ hidden_states,
1115
+ cu_seqlens_q,
1116
+ cu_seqlens_kv,
1117
+ max_seqlen_q,
1118
+ max_seqlen_kv,
1119
+ output_attentions=output_attentions,
1120
+ )
1121
+
1122
+ hidden_states = layer_outputs[0]
1123
+
1124
+ if output_attentions:
1125
+ all_attentions = all_attentions + (layer_outputs[1],)
1126
+
1127
+ if input_seq_lens is not None:
1128
+ # recover the hidden_states, split by seq_lens and then pad&cat
1129
+ hidden_states = torch.split(
1130
+ hidden_states, input_seq_lens.detach().cpu().numpy().tolist(), dim=0
1131
+ )
1132
+ hidden_states = pad_sequence(hidden_states, batch_first=True)
1133
+
1134
+ hidden_states = self.layer_norm(hidden_states)
1135
+ if output_hidden_states:
1136
+ encoder_states = encoder_states + (hidden_states,)
1137
+
1138
+ if not return_dict:
1139
+ return tuple(
1140
+ v
1141
+ for v in [hidden_states, encoder_states, all_attentions]
1142
+ if v is not None
1143
+ )
1144
+ return BaseModelOutput(
1145
+ last_hidden_state=hidden_states,
1146
+ hidden_states=encoder_states,
1147
+ attentions=all_attentions,
1148
+ )
1149
+
1150
+
1151
+ class WhisperDecoder(WhisperPreTrainedModel):
1152
+ """
1153
+ Transformer decoder consisting of *config.decoder_layers* layers. Each layer is a [`WhisperDecoderLayer`]
1154
+
1155
+ Args:
1156
+ config: WhisperConfig
1157
+ """
1158
+
1159
+ def __init__(self, config: WhisperConfig):
1160
+ super().__init__(config)
1161
+ self.dropout = config.dropout
1162
+ self.layerdrop = config.decoder_layerdrop
1163
+ self.padding_idx = config.pad_token_id
1164
+ self.max_target_positions = config.max_target_positions
1165
+ self.max_source_positions = config.max_source_positions
1166
+ self.embed_scale = math.sqrt(config.d_model) if config.scale_embedding else 1.0
1167
+
1168
+ self.embed_tokens = nn.Embedding(
1169
+ config.vocab_size, config.d_model, self.padding_idx
1170
+ )
1171
+ self.embed_positions = WhisperPositionalEmbedding(
1172
+ self.max_target_positions, config.d_model
1173
+ )
1174
+
1175
+ self.layers = nn.ModuleList(
1176
+ [WhisperDecoderLayer(config) for _ in range(config.decoder_layers)]
1177
+ )
1178
+
1179
+ self.layer_norm = nn.LayerNorm(config.d_model)
1180
+
1181
+ self.gradient_checkpointing = False
1182
+ # Initialize weights and apply final processing
1183
+ self.post_init()
1184
+
1185
+ def get_input_embeddings(self):
1186
+ return self.embed_tokens
1187
+
1188
+ def set_input_embeddings(self, value):
1189
+ self.embed_tokens = value
1190
+
1191
+ def _prepare_decoder_attention_mask(
1192
+ self, attention_mask, input_shape, inputs_embeds, past_key_values_length
1193
+ ):
1194
+ # create causal mask
1195
+ # [bsz, seq_len] -> [bsz, 1, tgt_seq_len, src_seq_len]
1196
+ combined_attention_mask = None
1197
+
1198
+ if input_shape[-1] > 1:
1199
+ combined_attention_mask = _make_causal_mask(
1200
+ input_shape,
1201
+ inputs_embeds.dtype,
1202
+ device=inputs_embeds.device,
1203
+ past_key_values_length=past_key_values_length,
1204
+ )
1205
+
1206
+ if attention_mask is not None:
1207
+ # [bsz, seq_len] -> [bsz, 1, tgt_seq_len, src_seq_len]
1208
+ expanded_attn_mask = _expand_mask(
1209
+ attention_mask, inputs_embeds.dtype, tgt_len=input_shape[-1]
1210
+ )
1211
+ combined_attention_mask = (
1212
+ expanded_attn_mask
1213
+ if combined_attention_mask is None
1214
+ else expanded_attn_mask + combined_attention_mask
1215
+ )
1216
+
1217
+ return combined_attention_mask
1218
+
1219
+ def forward(
1220
+ self,
1221
+ input_ids=None,
1222
+ attention_mask=None,
1223
+ encoder_hidden_states=None,
1224
+ head_mask=None,
1225
+ cross_attn_head_mask=None,
1226
+ past_key_values=None,
1227
+ inputs_embeds=None,
1228
+ use_cache=None,
1229
+ output_attentions=None,
1230
+ output_hidden_states=None,
1231
+ return_dict=None,
1232
+ ):
1233
+ r"""
1234
+ Args:
1235
+ input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`):
1236
+ Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you
1237
+ provide it.
1238
+
1239
+ Indices can be obtained using [`WhisperTokenizer`]. See [`PreTrainedTokenizer.encode`] and
1240
+ [`PreTrainedTokenizer.__call__`] for details.
1241
+
1242
+ [What are input IDs?](../glossary#input-ids)
1243
+ attention_mask (`torch.Tensor` of shape `(batch_size, sequence_length)`, *optional*):
1244
+ Mask to avoid performing attention on padding token indices. Mask values selected in `[0, 1]`:
1245
+
1246
+ - 1 for tokens that are **not masked**,
1247
+ - 0 for tokens that are **masked**.
1248
+
1249
+ [What are attention masks?](../glossary#attention-mask)
1250
+ encoder_hidden_states (`torch.FloatTensor` of shape `(batch_size, encoder_sequence_length, hidden_size)`, *optional*):
1251
+ Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention
1252
+ of the decoder.
1253
+ head_mask (`torch.Tensor` of shape `(decoder_layers, decoder_attention_heads)`, *optional*):
1254
+ Mask to nullify selected heads of the attention modules. Mask values selected in `[0, 1]`:
1255
+
1256
+ - 1 indicates the head is **not masked**,
1257
+ - 0 indicates the head is **masked**.
1258
+
1259
+ cross_attn_head_mask (`torch.Tensor` of shape `(decoder_layers, decoder_attention_heads)`, *optional*):
1260
+ Mask to nullify selected heads of the attention modules in encoder to avoid performing cross-attention
1261
+ on hidden heads. Mask values selected in `[0, 1]`:
1262
+
1263
+ - 1 indicates the head is **not masked**,
1264
+ - 0 indicates the head is **masked**.
1265
+
1266
+ past_key_values (`tuple(tuple(torch.FloatTensor))`, *optional*, returned when `use_cache=True` is passed or when `config.use_cache=True`):
1267
+ Tuple of `tuple(torch.FloatTensor)` of length `config.n_layers`, with each tuple having 2 tensors of
1268
+ shape `(batch_size, num_heads, sequence_length, embed_size_per_head)`) and 2 additional tensors of
1269
+ shape `(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)`.
1270
+
1271
+ Contains pre-computed hidden-states (key and values in the self-attention blocks and in the
1272
+ cross-attention blocks) that can be used (see `past_key_values` input) to speed up sequential decoding.
1273
+
1274
+ If `past_key_values` are used, the user can optionally input only the last `decoder_input_ids` (those
1275
+ that don't have their past key value states given to this model) of shape `(batch_size, 1)` instead of
1276
+ all `decoder_input_ids` of shape `(batch_size, sequence_length)`. inputs_embeds (`torch.FloatTensor` of
1277
+ shape `(batch_size, sequence_length, hidden_size)`, *optional*): Optionally, instead of passing
1278
+ `input_ids` you can choose to directly pass an embedded representation. This is useful if you want more
1279
+ control over how to convert `input_ids` indices into associated vectors than the model's internal
1280
+ embedding lookup matrix.
1281
+ output_attentions (`bool`, *optional*):
1282
+ Whether or not to return the attentions tensors of all attention layers. See `attentions` under
1283
+ returned tensors for more detail.
1284
+ output_hidden_states (`bool`, *optional*):
1285
+ Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors
1286
+ for more detail.
1287
+ return_dict (`bool`, *optional*):
1288
+ Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
1289
+ """
1290
+ output_attentions = (
1291
+ output_attentions
1292
+ if output_attentions is not None
1293
+ else self.config.output_attentions
1294
+ )
1295
+ output_hidden_states = (
1296
+ output_hidden_states
1297
+ if output_hidden_states is not None
1298
+ else self.config.output_hidden_states
1299
+ )
1300
+ use_cache = use_cache if use_cache is not None else self.config.use_cache
1301
+ return_dict = (
1302
+ return_dict if return_dict is not None else self.config.use_return_dict
1303
+ )
1304
+
1305
+ # retrieve input_ids and inputs_embeds
1306
+ if input_ids is not None and inputs_embeds is not None:
1307
+ raise ValueError(
1308
+ "You cannot specify both decoder_input_ids and decoder_inputs_embeds at the same time"
1309
+ )
1310
+ elif input_ids is not None:
1311
+ input_shape = input_ids.size()
1312
+ input_ids = input_ids.view(-1, input_shape[-1])
1313
+ elif inputs_embeds is not None:
1314
+ input_shape = inputs_embeds.size()[:-1]
1315
+ else:
1316
+ raise ValueError(
1317
+ "You have to specify either decoder_input_ids or decoder_inputs_embeds"
1318
+ )
1319
+
1320
+ # past_key_values_length
1321
+ past_key_values_length = (
1322
+ past_key_values[0][0].shape[2] if past_key_values is not None else 0
1323
+ )
1324
+
1325
+ if inputs_embeds is None:
1326
+ inputs_embeds = self.embed_tokens(input_ids)
1327
+
1328
+ attention_mask = self._prepare_decoder_attention_mask(
1329
+ attention_mask, input_shape, inputs_embeds, past_key_values_length
1330
+ )
1331
+
1332
+ # embed positions
1333
+ if input_ids is not None:
1334
+ positions = self.embed_positions(
1335
+ input_ids, past_key_values_length=past_key_values_length
1336
+ )
1337
+ else:
1338
+ positions = self.embed_positions(
1339
+ inputs_embeds, past_key_values_length=past_key_values_length
1340
+ )
1341
+
1342
+ hidden_states = inputs_embeds + positions
1343
+ hidden_states = nn.functional.dropout(
1344
+ hidden_states, p=self.dropout, training=self.training
1345
+ )
1346
+
1347
+ if self.gradient_checkpointing and self.training:
1348
+ if use_cache:
1349
+ logger.warning_once(
1350
+ "`use_cache = True` is incompatible with gradient checkpointing. Setting `use_cache = False`..."
1351
+ )
1352
+ use_cache = False
1353
+ # decoder layers
1354
+ all_hidden_states = () if output_hidden_states else None
1355
+ all_self_attns = () if output_attentions else None
1356
+ all_cross_attentions = (
1357
+ () if (output_attentions and encoder_hidden_states is not None) else None
1358
+ )
1359
+ next_decoder_cache = () if use_cache else None
1360
+
1361
+ # check if head_mask/cross_attn_head_mask has a correct number of layers specified if desired
1362
+ for attn_mask, mask_name in zip(
1363
+ [head_mask, cross_attn_head_mask], ["head_mask", "cross_attn_head_mask"]
1364
+ ):
1365
+ if attn_mask is not None:
1366
+ assert attn_mask.size()[0] == (len(self.layers)), (
1367
+ f"The `{mask_name}` should be specified for {len(self.layers)} layers, but it is for"
1368
+ f" {head_mask.size()[0]}."
1369
+ )
1370
+ for idx, decoder_layer in enumerate(self.layers):
1371
+ # add LayerDrop (see https://arxiv.org/abs/1909.11556 for description)
1372
+ if output_hidden_states:
1373
+ all_hidden_states += (hidden_states,)
1374
+ dropout_probability = random.uniform(0, 1)
1375
+ if self.training and (dropout_probability < self.layerdrop):
1376
+ continue
1377
+
1378
+ past_key_value = (
1379
+ past_key_values[idx] if past_key_values is not None else None
1380
+ )
1381
+
1382
+ if self.gradient_checkpointing and self.training:
1383
+
1384
+ def create_custom_forward(module):
1385
+ def custom_forward(*inputs):
1386
+ # None for past_key_value
1387
+ return module(*inputs, output_attentions, use_cache)
1388
+
1389
+ return custom_forward
1390
+
1391
+ layer_outputs = torch.utils.checkpoint.checkpoint(
1392
+ create_custom_forward(decoder_layer),
1393
+ hidden_states,
1394
+ attention_mask,
1395
+ encoder_hidden_states,
1396
+ None, # encoder attention mask
1397
+ head_mask[idx] if head_mask is not None else None,
1398
+ (
1399
+ cross_attn_head_mask[idx]
1400
+ if cross_attn_head_mask is not None
1401
+ else None
1402
+ ),
1403
+ None, # past_key_value
1404
+ )
1405
+ else:
1406
+ layer_outputs = decoder_layer(
1407
+ hidden_states,
1408
+ attention_mask=attention_mask,
1409
+ encoder_hidden_states=encoder_hidden_states,
1410
+ layer_head_mask=(head_mask[idx] if head_mask is not None else None),
1411
+ cross_attn_layer_head_mask=(
1412
+ cross_attn_head_mask[idx]
1413
+ if cross_attn_head_mask is not None
1414
+ else None
1415
+ ),
1416
+ past_key_value=past_key_value,
1417
+ output_attentions=output_attentions,
1418
+ use_cache=use_cache,
1419
+ )
1420
+ hidden_states = layer_outputs[0]
1421
+
1422
+ if use_cache:
1423
+ next_decoder_cache += (layer_outputs[3 if output_attentions else 1],)
1424
+
1425
+ if output_attentions:
1426
+ all_self_attns += (layer_outputs[1],)
1427
+
1428
+ if encoder_hidden_states is not None:
1429
+ all_cross_attentions += (layer_outputs[2],)
1430
+
1431
+ hidden_states = self.layer_norm(hidden_states)
1432
+ # add hidden states from the last decoder layer
1433
+ if output_hidden_states:
1434
+ all_hidden_states += (hidden_states,)
1435
+
1436
+ next_cache = next_decoder_cache if use_cache else None
1437
+ if not return_dict:
1438
+ return tuple(
1439
+ v
1440
+ for v in [
1441
+ hidden_states,
1442
+ next_cache,
1443
+ all_hidden_states,
1444
+ all_self_attns,
1445
+ all_cross_attentions,
1446
+ ]
1447
+ if v is not None
1448
+ )
1449
+ return BaseModelOutputWithPastAndCrossAttentions(
1450
+ last_hidden_state=hidden_states,
1451
+ past_key_values=next_cache,
1452
+ hidden_states=all_hidden_states,
1453
+ attentions=all_self_attns,
1454
+ cross_attentions=all_cross_attentions,
1455
+ )
1456
+
1457
+
1458
+ @add_start_docstrings(
1459
+ "The bare Whisper Model outputting raw hidden-states without any specific head on top.",
1460
+ WHISPER_START_DOCSTRING,
1461
+ )
1462
+ class WhisperModel(WhisperPreTrainedModel):
1463
+ _keys_to_ignore_on_load_missing = [r"proj_out.weight"]
1464
+
1465
+ def __init__(self, config: WhisperConfig):
1466
+ super().__init__(config)
1467
+
1468
+ self.encoder = WhisperEncoder(config)
1469
+ self.decoder = WhisperDecoder(config)
1470
+ # Initialize weights and apply final processing
1471
+ self.post_init()
1472
+
1473
+ def get_input_embeddings(self):
1474
+ return self.decoder.embed_tokens
1475
+
1476
+ def set_input_embeddings(self, value):
1477
+ self.decoder.embed_tokens = value
1478
+
1479
+ def get_encoder(self):
1480
+ return self.encoder
1481
+
1482
+ def get_decoder(self):
1483
+ return self.decoder
1484
+
1485
+ def freeze_encoder(self):
1486
+ """
1487
+ Calling this function will disable the gradient computation for the Whisper encoder so that its parameters will
1488
+ not be updated during training.
1489
+ """
1490
+ self.encoder._freeze_parameters()
1491
+
1492
+ def _mask_input_features(
1493
+ self,
1494
+ input_features: torch.FloatTensor,
1495
+ attention_mask: Optional[torch.LongTensor] = None,
1496
+ ):
1497
+ """
1498
+ Masks extracted features along time axis and/or along feature axis according to
1499
+ [SpecAugment](https://arxiv.org/abs/1904.08779).
1500
+ """
1501
+
1502
+ # `config.apply_spec_augment` can set masking to False
1503
+ if not getattr(self.config, "apply_spec_augment", True):
1504
+ return input_features
1505
+
1506
+ # generate indices & apply SpecAugment along time axis
1507
+ batch_size, hidden_size, sequence_length = input_features.size()
1508
+
1509
+ if self.config.mask_time_prob > 0 and self.training:
1510
+ # generate indices & apply SpecAugment along time axis
1511
+ mask_time_indices = _compute_mask_indices(
1512
+ (batch_size, sequence_length),
1513
+ mask_prob=self.config.mask_time_prob,
1514
+ mask_length=self.config.mask_time_length,
1515
+ attention_mask=attention_mask,
1516
+ min_masks=self.config.mask_time_min_masks,
1517
+ )
1518
+ mask_time_indices = torch.tensor(
1519
+ mask_time_indices, device=input_features.device, dtype=torch.bool
1520
+ )
1521
+ mask_time_indices = mask_time_indices[:, None].expand(-1, hidden_size, -1)
1522
+ input_features[mask_time_indices] = 0
1523
+
1524
+ if self.config.mask_feature_prob > 0 and self.training:
1525
+ # generate indices & apply SpecAugment along feature axis
1526
+ mask_feature_indices = _compute_mask_indices(
1527
+ (batch_size, hidden_size),
1528
+ mask_prob=self.config.mask_feature_prob,
1529
+ mask_length=self.config.mask_feature_length,
1530
+ min_masks=self.config.mask_feature_min_masks,
1531
+ )
1532
+ mask_feature_indices = torch.tensor(
1533
+ mask_feature_indices, device=input_features.device, dtype=torch.bool
1534
+ )
1535
+ input_features[mask_feature_indices] = 0
1536
+
1537
+ return input_features
1538
+
1539
+ @add_start_docstrings_to_model_forward(WHISPER_INPUTS_DOCSTRING)
1540
+ @replace_return_docstrings(
1541
+ output_type=Seq2SeqModelOutput, config_class=_CONFIG_FOR_DOC
1542
+ )
1543
+ def forward(
1544
+ self,
1545
+ input_features: Optional[torch.FloatTensor] = None,
1546
+ attention_mask: Optional[torch.LongTensor] = None,
1547
+ decoder_input_ids: Optional[torch.LongTensor] = None,
1548
+ decoder_attention_mask: Optional[torch.LongTensor] = None,
1549
+ head_mask: Optional[torch.Tensor] = None,
1550
+ decoder_head_mask: Optional[torch.Tensor] = None,
1551
+ cross_attn_head_mask: Optional[torch.Tensor] = None,
1552
+ encoder_outputs: Optional[Tuple[Tuple[torch.FloatTensor]]] = None,
1553
+ past_key_values: Optional[Tuple[Tuple[torch.FloatTensor]]] = None,
1554
+ decoder_inputs_embeds: Optional[Tuple[torch.FloatTensor]] = None,
1555
+ use_cache: Optional[bool] = None,
1556
+ output_attentions: Optional[bool] = None,
1557
+ output_hidden_states: Optional[bool] = None,
1558
+ return_dict: Optional[bool] = None,
1559
+ ) -> Union[Tuple[torch.Tensor], Seq2SeqModelOutput]:
1560
+ r"""
1561
+ Returns:
1562
+
1563
+ Example:
1564
+ ```python
1565
+ >>> import torch
1566
+ >>> from transformers import AutoFeatureExtractor, WhisperModel
1567
+ >>> from datasets import load_dataset
1568
+
1569
+ >>> model = WhisperModel.from_pretrained("openai/whisper-base")
1570
+ >>> feature_extractor = AutoFeatureExtractor.from_pretrained("openai/whisper-base")
1571
+ >>> ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
1572
+ >>> inputs = feature_extractor(ds[0]["audio"]["array"], return_tensors="pt")
1573
+ >>> input_features = inputs.input_features
1574
+ >>> decoder_input_ids = torch.tensor([[1, 1]]) * model.config.decoder_start_token_id
1575
+ >>> last_hidden_state = model(input_features, decoder_input_ids=decoder_input_ids).last_hidden_state
1576
+ >>> list(last_hidden_state.shape)
1577
+ [1, 2, 512]
1578
+ ```"""
1579
+ output_attentions = (
1580
+ output_attentions
1581
+ if output_attentions is not None
1582
+ else self.config.output_attentions
1583
+ )
1584
+ output_hidden_states = (
1585
+ output_hidden_states
1586
+ if output_hidden_states is not None
1587
+ else self.config.output_hidden_states
1588
+ )
1589
+ use_cache = use_cache if use_cache is not None else self.config.use_cache
1590
+ return_dict = (
1591
+ return_dict if return_dict is not None else self.config.use_return_dict
1592
+ )
1593
+
1594
+ if encoder_outputs is None:
1595
+ input_features = self._mask_input_features(
1596
+ input_features, attention_mask=attention_mask
1597
+ )
1598
+
1599
+ encoder_outputs = self.encoder(
1600
+ input_features,
1601
+ head_mask=head_mask,
1602
+ output_attentions=output_attentions,
1603
+ output_hidden_states=output_hidden_states,
1604
+ return_dict=return_dict,
1605
+ )
1606
+ # If the user passed a tuple for encoder_outputs, we wrap it in a BaseModelOutput when return_dict=True
1607
+ elif return_dict and not isinstance(encoder_outputs, BaseModelOutput):
1608
+ encoder_outputs = BaseModelOutput(
1609
+ last_hidden_state=encoder_outputs[0],
1610
+ hidden_states=encoder_outputs[1] if len(encoder_outputs) > 1 else None,
1611
+ attentions=encoder_outputs[2] if len(encoder_outputs) > 2 else None,
1612
+ )
1613
+
1614
+ # decoder outputs consists of (dec_features, past_key_value, dec_hidden, dec_attn)
1615
+ decoder_outputs = self.decoder(
1616
+ input_ids=decoder_input_ids,
1617
+ attention_mask=decoder_attention_mask,
1618
+ encoder_hidden_states=encoder_outputs[0],
1619
+ head_mask=decoder_head_mask,
1620
+ cross_attn_head_mask=cross_attn_head_mask,
1621
+ past_key_values=past_key_values,
1622
+ inputs_embeds=decoder_inputs_embeds,
1623
+ use_cache=use_cache,
1624
+ output_attentions=output_attentions,
1625
+ output_hidden_states=output_hidden_states,
1626
+ return_dict=return_dict,
1627
+ )
1628
+
1629
+ if not return_dict:
1630
+ return decoder_outputs + encoder_outputs
1631
+
1632
+ return Seq2SeqModelOutput(
1633
+ last_hidden_state=decoder_outputs.last_hidden_state,
1634
+ past_key_values=decoder_outputs.past_key_values,
1635
+ decoder_hidden_states=decoder_outputs.hidden_states,
1636
+ decoder_attentions=decoder_outputs.attentions,
1637
+ cross_attentions=decoder_outputs.cross_attentions,
1638
+ encoder_last_hidden_state=encoder_outputs.last_hidden_state,
1639
+ encoder_hidden_states=encoder_outputs.hidden_states,
1640
+ encoder_attentions=encoder_outputs.attentions,
1641
+ )
config.json ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "EchoChatForCausalLM"
4
+ ],
5
+ "attention_dropout": 0.0,
6
+ "auto_map": {
7
+ "AutoConfig": "configuration_echochat.EchoChatConfig",
8
+ "AutoModel": "modeling_echochat.EchoChatModel",
9
+ "AutoModelForCausalLM": "modeling_echochat.EchoChatForCausalLM"
10
+ },
11
+ "bos_token_id": 151643,
12
+ "eos_token_ids": [
13
+ 151644,
14
+ 151645
15
+ ],
16
+ "hidden_act": "silu",
17
+ "hidden_size": 3584,
18
+ "initializer_range": 0.02,
19
+ "intermediate_size": 18944,
20
+ "kimia_adaptor_input_dim": 5120,
21
+ "kimia_audio_output_vocab": 16896,
22
+ "kimia_media_begin": 151661,
23
+ "kimia_media_end": 151663,
24
+ "kimia_mimo_audiodelaytokens": 6,
25
+ "kimia_mimo_layers": 6,
26
+ "kimia_mimo_transformer_from_layer_index": 21,
27
+ "kimia_text_output_vocab": 152064,
28
+ "kimia_token_offset": 152064,
29
+ "max_position_embeddings": 8192,
30
+ "max_window_layers": 28,
31
+ "model_type": "qwen2",
32
+ "num_attention_heads": 28,
33
+ "num_audio_special_tokens": 512,
34
+ "num_base_tokens": 151643,
35
+ "num_hidden_layers": 28,
36
+ "num_key_value_heads": 4,
37
+ "pad_token_id": 152063,
38
+ "rms_norm_eps": 1e-06,
39
+ "rope_scaling": null,
40
+ "rope_theta": 1000000.0,
41
+ "sliding_window": 4096,
42
+ "tie_word_embeddings": false,
43
+ "torch_dtype": "bfloat16",
44
+ "transformers_version": "4.51.3",
45
+ "use_cache": true,
46
+ "use_sliding_window": false,
47
+ "use_whisper_feature": true,
48
+ "vocab_size": 168448
49
+ }
configuration_echochat.py ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Modified for EchoChat distribution: renamed public entry points; computation unchanged.
2
+ from transformers.models.qwen2.configuration_qwen2 import Qwen2Config
3
+
4
+
5
+ class EchoChatConfig(Qwen2Config):
6
+ def __init__(
7
+ self,
8
+ vocab_size=163840,
9
+ hidden_size=4096,
10
+ intermediate_size=11008,
11
+ num_hidden_layers=32,
12
+ num_attention_heads=32,
13
+ num_key_value_heads=None,
14
+ hidden_act="silu",
15
+ initializer_range=0.02,
16
+ rms_norm_eps=1e-6,
17
+ use_cache=True,
18
+ rope_theta=10000.0,
19
+ rope_scaling=None,
20
+ tie_word_embeddings=False,
21
+ kimia_mimo_layers: int = 6,
22
+ kimia_mimo_audiodelaytokens: int = 5,
23
+ kimia_mimo_transformer_from_layer_index: int = 21,
24
+ kimia_audio_output_vocab: int = 16896,
25
+ kimia_text_output_vocab: int = 152064,
26
+ num_audio_special_tokens: int = 512,
27
+ num_base_tokens: int = 151643,
28
+ kimia_token_offset: int = 152064,
29
+ use_whisper_feature: bool = True,
30
+ kimia_adaptor_input_dim: int = 5120,
31
+ kimia_media_begin: int = 151661,
32
+ kimia_media_end: int = 151663,
33
+ **kwargs,
34
+ ):
35
+ super().__init__(
36
+ vocab_size=vocab_size,
37
+ hidden_size=hidden_size,
38
+ intermediate_size=intermediate_size,
39
+ num_hidden_layers=num_hidden_layers,
40
+ num_attention_heads=num_attention_heads,
41
+ num_key_value_heads=num_key_value_heads,
42
+ hidden_act=hidden_act,
43
+ initializer_range=initializer_range,
44
+ rms_norm_eps=rms_norm_eps,
45
+ use_cache=use_cache,
46
+ tie_word_embeddings=tie_word_embeddings,
47
+ rope_theta=rope_theta,
48
+ rope_scaling=rope_scaling,
49
+ **kwargs,
50
+ )
51
+
52
+ self.kimia_mimo_layers = kimia_mimo_layers
53
+ self.kimia_mimo_audiodelaytokens = kimia_mimo_audiodelaytokens
54
+ # vocab
55
+ self.kimia_mimo_transformer_from_layer_index = (
56
+ kimia_mimo_transformer_from_layer_index
57
+ )
58
+ self.kimia_audio_output_vocab = kimia_audio_output_vocab
59
+ self.kimia_text_output_vocab = kimia_text_output_vocab
60
+ self.num_audio_special_tokens = num_audio_special_tokens
61
+ self.num_base_tokens = num_base_tokens
62
+ self.kimia_token_offset = kimia_token_offset
63
+ self.use_whisper_feature = use_whisper_feature
64
+ self.kimia_adaptor_input_dim = kimia_adaptor_input_dim
65
+ # special tokens
66
+ self.kimia_media_begin = kimia_media_begin
67
+ self.kimia_media_end = kimia_media_end
licenses/Apache-2.0.txt ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
licenses/MIT.txt ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright 2025 The Moonshot AI Team, Qwen Team, and HuggingFace Inc. team. All rights reserved.
2
+
3
+ MIT License:
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
model-00001-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:39f83ac6ca7cdf41590d96a47df721efdf4bd0f3436efb7fa215e23c3ce65065
3
+ size 1868073328
model-00002-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ca32847eb341cecbdaf9cd6e6615b0dab923e67f8abc436902903d9d59aed2cb
3
+ size 1864467800
model-00003-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cf780ca93e0f064657600e562edd9e4057a3f31c654691fd76c32e086dfa5dae
3
+ size 1864467800
model-00004-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:63988fd3109491d6af07b566a5af899bb44e051ae80fb51958fdf9dc0c0c2950
3
+ size 1864467824
model-00005-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0417331bcd9804e51432f27434711e249c80ba830c1cbbafa49987820b3de312
3
+ size 1864467848
model-00006-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:041e61c8399bb208d726e61e98ee2af13ad05e312ca583e71c93f118fd4215ac
3
+ size 1864467848
model-00007-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e631fc93e13211d184a8ab2fdaab9b8355aae08b5154b6957b22348fbf5faf74
3
+ size 1864467848
model-00008-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:88d8f91e3fdee77496bd820ca1aeb51898b0e539deef038f72b1d679ac324eb3
3
+ size 1864475184
model-00009-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a50385172a9aaca4b75aeb7fc73208a498cd5775ccb04e52a21b03997c57bc4d
3
+ size 1864468040
model-00010-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ec5e761bde74f16ee8fe8bbc913f50a014e6765335a76815e849cf0c5846b48b
3
+ size 1541458240
model-00011-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:95b6f8f4f0366eaafede3c5e8cbc03218b8fd789cb9d4c7f7f41ca6402e4bb2b
3
+ size 1207435400
model.safetensors.index.json ADDED
@@ -0,0 +1,426 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 19532668928
4
+ },
5
+ "weight_map": {
6
+ "lm_head.weight": "model-00010-of-00011.safetensors",
7
+ "mimo_output.weight": "model-00011-of-00011.safetensors",
8
+ "model.embed_tokens.weight": "model-00001-of-00011.safetensors",
9
+ "model.layers.0.input_layernorm.weight": "model-00001-of-00011.safetensors",
10
+ "model.layers.0.mlp.down_proj.weight": "model-00001-of-00011.safetensors",
11
+ "model.layers.0.mlp.gate_proj.weight": "model-00001-of-00011.safetensors",
12
+ "model.layers.0.mlp.up_proj.weight": "model-00001-of-00011.safetensors",
13
+ "model.layers.0.post_attention_layernorm.weight": "model-00001-of-00011.safetensors",
14
+ "model.layers.0.self_attn.k_proj.bias": "model-00001-of-00011.safetensors",
15
+ "model.layers.0.self_attn.k_proj.weight": "model-00001-of-00011.safetensors",
16
+ "model.layers.0.self_attn.o_proj.weight": "model-00001-of-00011.safetensors",
17
+ "model.layers.0.self_attn.q_proj.bias": "model-00001-of-00011.safetensors",
18
+ "model.layers.0.self_attn.q_proj.weight": "model-00001-of-00011.safetensors",
19
+ "model.layers.0.self_attn.v_proj.bias": "model-00001-of-00011.safetensors",
20
+ "model.layers.0.self_attn.v_proj.weight": "model-00001-of-00011.safetensors",
21
+ "model.layers.1.input_layernorm.weight": "model-00002-of-00011.safetensors",
22
+ "model.layers.1.mlp.down_proj.weight": "model-00002-of-00011.safetensors",
23
+ "model.layers.1.mlp.gate_proj.weight": "model-00001-of-00011.safetensors",
24
+ "model.layers.1.mlp.up_proj.weight": "model-00002-of-00011.safetensors",
25
+ "model.layers.1.post_attention_layernorm.weight": "model-00002-of-00011.safetensors",
26
+ "model.layers.1.self_attn.k_proj.bias": "model-00001-of-00011.safetensors",
27
+ "model.layers.1.self_attn.k_proj.weight": "model-00001-of-00011.safetensors",
28
+ "model.layers.1.self_attn.o_proj.weight": "model-00001-of-00011.safetensors",
29
+ "model.layers.1.self_attn.q_proj.bias": "model-00001-of-00011.safetensors",
30
+ "model.layers.1.self_attn.q_proj.weight": "model-00001-of-00011.safetensors",
31
+ "model.layers.1.self_attn.v_proj.bias": "model-00001-of-00011.safetensors",
32
+ "model.layers.1.self_attn.v_proj.weight": "model-00001-of-00011.safetensors",
33
+ "model.layers.10.input_layernorm.weight": "model-00004-of-00011.safetensors",
34
+ "model.layers.10.mlp.down_proj.weight": "model-00004-of-00011.safetensors",
35
+ "model.layers.10.mlp.gate_proj.weight": "model-00004-of-00011.safetensors",
36
+ "model.layers.10.mlp.up_proj.weight": "model-00004-of-00011.safetensors",
37
+ "model.layers.10.post_attention_layernorm.weight": "model-00004-of-00011.safetensors",
38
+ "model.layers.10.self_attn.k_proj.bias": "model-00004-of-00011.safetensors",
39
+ "model.layers.10.self_attn.k_proj.weight": "model-00004-of-00011.safetensors",
40
+ "model.layers.10.self_attn.o_proj.weight": "model-00004-of-00011.safetensors",
41
+ "model.layers.10.self_attn.q_proj.bias": "model-00004-of-00011.safetensors",
42
+ "model.layers.10.self_attn.q_proj.weight": "model-00004-of-00011.safetensors",
43
+ "model.layers.10.self_attn.v_proj.bias": "model-00004-of-00011.safetensors",
44
+ "model.layers.10.self_attn.v_proj.weight": "model-00004-of-00011.safetensors",
45
+ "model.layers.11.input_layernorm.weight": "model-00004-of-00011.safetensors",
46
+ "model.layers.11.mlp.down_proj.weight": "model-00004-of-00011.safetensors",
47
+ "model.layers.11.mlp.gate_proj.weight": "model-00004-of-00011.safetensors",
48
+ "model.layers.11.mlp.up_proj.weight": "model-00004-of-00011.safetensors",
49
+ "model.layers.11.post_attention_layernorm.weight": "model-00004-of-00011.safetensors",
50
+ "model.layers.11.self_attn.k_proj.bias": "model-00004-of-00011.safetensors",
51
+ "model.layers.11.self_attn.k_proj.weight": "model-00004-of-00011.safetensors",
52
+ "model.layers.11.self_attn.o_proj.weight": "model-00004-of-00011.safetensors",
53
+ "model.layers.11.self_attn.q_proj.bias": "model-00004-of-00011.safetensors",
54
+ "model.layers.11.self_attn.q_proj.weight": "model-00004-of-00011.safetensors",
55
+ "model.layers.11.self_attn.v_proj.bias": "model-00004-of-00011.safetensors",
56
+ "model.layers.11.self_attn.v_proj.weight": "model-00004-of-00011.safetensors",
57
+ "model.layers.12.input_layernorm.weight": "model-00004-of-00011.safetensors",
58
+ "model.layers.12.mlp.down_proj.weight": "model-00004-of-00011.safetensors",
59
+ "model.layers.12.mlp.gate_proj.weight": "model-00004-of-00011.safetensors",
60
+ "model.layers.12.mlp.up_proj.weight": "model-00004-of-00011.safetensors",
61
+ "model.layers.12.post_attention_layernorm.weight": "model-00004-of-00011.safetensors",
62
+ "model.layers.12.self_attn.k_proj.bias": "model-00004-of-00011.safetensors",
63
+ "model.layers.12.self_attn.k_proj.weight": "model-00004-of-00011.safetensors",
64
+ "model.layers.12.self_attn.o_proj.weight": "model-00004-of-00011.safetensors",
65
+ "model.layers.12.self_attn.q_proj.bias": "model-00004-of-00011.safetensors",
66
+ "model.layers.12.self_attn.q_proj.weight": "model-00004-of-00011.safetensors",
67
+ "model.layers.12.self_attn.v_proj.bias": "model-00004-of-00011.safetensors",
68
+ "model.layers.12.self_attn.v_proj.weight": "model-00004-of-00011.safetensors",
69
+ "model.layers.13.input_layernorm.weight": "model-00005-of-00011.safetensors",
70
+ "model.layers.13.mlp.down_proj.weight": "model-00005-of-00011.safetensors",
71
+ "model.layers.13.mlp.gate_proj.weight": "model-00004-of-00011.safetensors",
72
+ "model.layers.13.mlp.up_proj.weight": "model-00005-of-00011.safetensors",
73
+ "model.layers.13.post_attention_layernorm.weight": "model-00005-of-00011.safetensors",
74
+ "model.layers.13.self_attn.k_proj.bias": "model-00004-of-00011.safetensors",
75
+ "model.layers.13.self_attn.k_proj.weight": "model-00004-of-00011.safetensors",
76
+ "model.layers.13.self_attn.o_proj.weight": "model-00004-of-00011.safetensors",
77
+ "model.layers.13.self_attn.q_proj.bias": "model-00004-of-00011.safetensors",
78
+ "model.layers.13.self_attn.q_proj.weight": "model-00004-of-00011.safetensors",
79
+ "model.layers.13.self_attn.v_proj.bias": "model-00004-of-00011.safetensors",
80
+ "model.layers.13.self_attn.v_proj.weight": "model-00004-of-00011.safetensors",
81
+ "model.layers.14.input_layernorm.weight": "model-00005-of-00011.safetensors",
82
+ "model.layers.14.mlp.down_proj.weight": "model-00005-of-00011.safetensors",
83
+ "model.layers.14.mlp.gate_proj.weight": "model-00005-of-00011.safetensors",
84
+ "model.layers.14.mlp.up_proj.weight": "model-00005-of-00011.safetensors",
85
+ "model.layers.14.post_attention_layernorm.weight": "model-00005-of-00011.safetensors",
86
+ "model.layers.14.self_attn.k_proj.bias": "model-00005-of-00011.safetensors",
87
+ "model.layers.14.self_attn.k_proj.weight": "model-00005-of-00011.safetensors",
88
+ "model.layers.14.self_attn.o_proj.weight": "model-00005-of-00011.safetensors",
89
+ "model.layers.14.self_attn.q_proj.bias": "model-00005-of-00011.safetensors",
90
+ "model.layers.14.self_attn.q_proj.weight": "model-00005-of-00011.safetensors",
91
+ "model.layers.14.self_attn.v_proj.bias": "model-00005-of-00011.safetensors",
92
+ "model.layers.14.self_attn.v_proj.weight": "model-00005-of-00011.safetensors",
93
+ "model.layers.15.input_layernorm.weight": "model-00005-of-00011.safetensors",
94
+ "model.layers.15.mlp.down_proj.weight": "model-00005-of-00011.safetensors",
95
+ "model.layers.15.mlp.gate_proj.weight": "model-00005-of-00011.safetensors",
96
+ "model.layers.15.mlp.up_proj.weight": "model-00005-of-00011.safetensors",
97
+ "model.layers.15.post_attention_layernorm.weight": "model-00005-of-00011.safetensors",
98
+ "model.layers.15.self_attn.k_proj.bias": "model-00005-of-00011.safetensors",
99
+ "model.layers.15.self_attn.k_proj.weight": "model-00005-of-00011.safetensors",
100
+ "model.layers.15.self_attn.o_proj.weight": "model-00005-of-00011.safetensors",
101
+ "model.layers.15.self_attn.q_proj.bias": "model-00005-of-00011.safetensors",
102
+ "model.layers.15.self_attn.q_proj.weight": "model-00005-of-00011.safetensors",
103
+ "model.layers.15.self_attn.v_proj.bias": "model-00005-of-00011.safetensors",
104
+ "model.layers.15.self_attn.v_proj.weight": "model-00005-of-00011.safetensors",
105
+ "model.layers.16.input_layernorm.weight": "model-00005-of-00011.safetensors",
106
+ "model.layers.16.mlp.down_proj.weight": "model-00005-of-00011.safetensors",
107
+ "model.layers.16.mlp.gate_proj.weight": "model-00005-of-00011.safetensors",
108
+ "model.layers.16.mlp.up_proj.weight": "model-00005-of-00011.safetensors",
109
+ "model.layers.16.post_attention_layernorm.weight": "model-00005-of-00011.safetensors",
110
+ "model.layers.16.self_attn.k_proj.bias": "model-00005-of-00011.safetensors",
111
+ "model.layers.16.self_attn.k_proj.weight": "model-00005-of-00011.safetensors",
112
+ "model.layers.16.self_attn.o_proj.weight": "model-00005-of-00011.safetensors",
113
+ "model.layers.16.self_attn.q_proj.bias": "model-00005-of-00011.safetensors",
114
+ "model.layers.16.self_attn.q_proj.weight": "model-00005-of-00011.safetensors",
115
+ "model.layers.16.self_attn.v_proj.bias": "model-00005-of-00011.safetensors",
116
+ "model.layers.16.self_attn.v_proj.weight": "model-00005-of-00011.safetensors",
117
+ "model.layers.17.input_layernorm.weight": "model-00006-of-00011.safetensors",
118
+ "model.layers.17.mlp.down_proj.weight": "model-00006-of-00011.safetensors",
119
+ "model.layers.17.mlp.gate_proj.weight": "model-00005-of-00011.safetensors",
120
+ "model.layers.17.mlp.up_proj.weight": "model-00006-of-00011.safetensors",
121
+ "model.layers.17.post_attention_layernorm.weight": "model-00006-of-00011.safetensors",
122
+ "model.layers.17.self_attn.k_proj.bias": "model-00005-of-00011.safetensors",
123
+ "model.layers.17.self_attn.k_proj.weight": "model-00005-of-00011.safetensors",
124
+ "model.layers.17.self_attn.o_proj.weight": "model-00005-of-00011.safetensors",
125
+ "model.layers.17.self_attn.q_proj.bias": "model-00005-of-00011.safetensors",
126
+ "model.layers.17.self_attn.q_proj.weight": "model-00005-of-00011.safetensors",
127
+ "model.layers.17.self_attn.v_proj.bias": "model-00005-of-00011.safetensors",
128
+ "model.layers.17.self_attn.v_proj.weight": "model-00005-of-00011.safetensors",
129
+ "model.layers.18.input_layernorm.weight": "model-00006-of-00011.safetensors",
130
+ "model.layers.18.mlp.down_proj.weight": "model-00006-of-00011.safetensors",
131
+ "model.layers.18.mlp.gate_proj.weight": "model-00006-of-00011.safetensors",
132
+ "model.layers.18.mlp.up_proj.weight": "model-00006-of-00011.safetensors",
133
+ "model.layers.18.post_attention_layernorm.weight": "model-00006-of-00011.safetensors",
134
+ "model.layers.18.self_attn.k_proj.bias": "model-00006-of-00011.safetensors",
135
+ "model.layers.18.self_attn.k_proj.weight": "model-00006-of-00011.safetensors",
136
+ "model.layers.18.self_attn.o_proj.weight": "model-00006-of-00011.safetensors",
137
+ "model.layers.18.self_attn.q_proj.bias": "model-00006-of-00011.safetensors",
138
+ "model.layers.18.self_attn.q_proj.weight": "model-00006-of-00011.safetensors",
139
+ "model.layers.18.self_attn.v_proj.bias": "model-00006-of-00011.safetensors",
140
+ "model.layers.18.self_attn.v_proj.weight": "model-00006-of-00011.safetensors",
141
+ "model.layers.19.input_layernorm.weight": "model-00006-of-00011.safetensors",
142
+ "model.layers.19.mlp.down_proj.weight": "model-00006-of-00011.safetensors",
143
+ "model.layers.19.mlp.gate_proj.weight": "model-00006-of-00011.safetensors",
144
+ "model.layers.19.mlp.up_proj.weight": "model-00006-of-00011.safetensors",
145
+ "model.layers.19.post_attention_layernorm.weight": "model-00006-of-00011.safetensors",
146
+ "model.layers.19.self_attn.k_proj.bias": "model-00006-of-00011.safetensors",
147
+ "model.layers.19.self_attn.k_proj.weight": "model-00006-of-00011.safetensors",
148
+ "model.layers.19.self_attn.o_proj.weight": "model-00006-of-00011.safetensors",
149
+ "model.layers.19.self_attn.q_proj.bias": "model-00006-of-00011.safetensors",
150
+ "model.layers.19.self_attn.q_proj.weight": "model-00006-of-00011.safetensors",
151
+ "model.layers.19.self_attn.v_proj.bias": "model-00006-of-00011.safetensors",
152
+ "model.layers.19.self_attn.v_proj.weight": "model-00006-of-00011.safetensors",
153
+ "model.layers.2.input_layernorm.weight": "model-00002-of-00011.safetensors",
154
+ "model.layers.2.mlp.down_proj.weight": "model-00002-of-00011.safetensors",
155
+ "model.layers.2.mlp.gate_proj.weight": "model-00002-of-00011.safetensors",
156
+ "model.layers.2.mlp.up_proj.weight": "model-00002-of-00011.safetensors",
157
+ "model.layers.2.post_attention_layernorm.weight": "model-00002-of-00011.safetensors",
158
+ "model.layers.2.self_attn.k_proj.bias": "model-00002-of-00011.safetensors",
159
+ "model.layers.2.self_attn.k_proj.weight": "model-00002-of-00011.safetensors",
160
+ "model.layers.2.self_attn.o_proj.weight": "model-00002-of-00011.safetensors",
161
+ "model.layers.2.self_attn.q_proj.bias": "model-00002-of-00011.safetensors",
162
+ "model.layers.2.self_attn.q_proj.weight": "model-00002-of-00011.safetensors",
163
+ "model.layers.2.self_attn.v_proj.bias": "model-00002-of-00011.safetensors",
164
+ "model.layers.2.self_attn.v_proj.weight": "model-00002-of-00011.safetensors",
165
+ "model.layers.20.input_layernorm.weight": "model-00006-of-00011.safetensors",
166
+ "model.layers.20.mlp.down_proj.weight": "model-00006-of-00011.safetensors",
167
+ "model.layers.20.mlp.gate_proj.weight": "model-00006-of-00011.safetensors",
168
+ "model.layers.20.mlp.up_proj.weight": "model-00006-of-00011.safetensors",
169
+ "model.layers.20.post_attention_layernorm.weight": "model-00006-of-00011.safetensors",
170
+ "model.layers.20.self_attn.k_proj.bias": "model-00006-of-00011.safetensors",
171
+ "model.layers.20.self_attn.k_proj.weight": "model-00006-of-00011.safetensors",
172
+ "model.layers.20.self_attn.o_proj.weight": "model-00006-of-00011.safetensors",
173
+ "model.layers.20.self_attn.q_proj.bias": "model-00006-of-00011.safetensors",
174
+ "model.layers.20.self_attn.q_proj.weight": "model-00006-of-00011.safetensors",
175
+ "model.layers.20.self_attn.v_proj.bias": "model-00006-of-00011.safetensors",
176
+ "model.layers.20.self_attn.v_proj.weight": "model-00006-of-00011.safetensors",
177
+ "model.layers.21.input_layernorm.weight": "model-00007-of-00011.safetensors",
178
+ "model.layers.21.mlp.down_proj.weight": "model-00007-of-00011.safetensors",
179
+ "model.layers.21.mlp.gate_proj.weight": "model-00006-of-00011.safetensors",
180
+ "model.layers.21.mlp.up_proj.weight": "model-00007-of-00011.safetensors",
181
+ "model.layers.21.post_attention_layernorm.weight": "model-00007-of-00011.safetensors",
182
+ "model.layers.21.self_attn.k_proj.bias": "model-00006-of-00011.safetensors",
183
+ "model.layers.21.self_attn.k_proj.weight": "model-00006-of-00011.safetensors",
184
+ "model.layers.21.self_attn.o_proj.weight": "model-00006-of-00011.safetensors",
185
+ "model.layers.21.self_attn.q_proj.bias": "model-00006-of-00011.safetensors",
186
+ "model.layers.21.self_attn.q_proj.weight": "model-00006-of-00011.safetensors",
187
+ "model.layers.21.self_attn.v_proj.bias": "model-00006-of-00011.safetensors",
188
+ "model.layers.21.self_attn.v_proj.weight": "model-00006-of-00011.safetensors",
189
+ "model.layers.22.input_layernorm.weight": "model-00007-of-00011.safetensors",
190
+ "model.layers.22.mlp.down_proj.weight": "model-00007-of-00011.safetensors",
191
+ "model.layers.22.mlp.gate_proj.weight": "model-00007-of-00011.safetensors",
192
+ "model.layers.22.mlp.up_proj.weight": "model-00007-of-00011.safetensors",
193
+ "model.layers.22.post_attention_layernorm.weight": "model-00007-of-00011.safetensors",
194
+ "model.layers.22.self_attn.k_proj.bias": "model-00007-of-00011.safetensors",
195
+ "model.layers.22.self_attn.k_proj.weight": "model-00007-of-00011.safetensors",
196
+ "model.layers.22.self_attn.o_proj.weight": "model-00007-of-00011.safetensors",
197
+ "model.layers.22.self_attn.q_proj.bias": "model-00007-of-00011.safetensors",
198
+ "model.layers.22.self_attn.q_proj.weight": "model-00007-of-00011.safetensors",
199
+ "model.layers.22.self_attn.v_proj.bias": "model-00007-of-00011.safetensors",
200
+ "model.layers.22.self_attn.v_proj.weight": "model-00007-of-00011.safetensors",
201
+ "model.layers.23.input_layernorm.weight": "model-00007-of-00011.safetensors",
202
+ "model.layers.23.mlp.down_proj.weight": "model-00007-of-00011.safetensors",
203
+ "model.layers.23.mlp.gate_proj.weight": "model-00007-of-00011.safetensors",
204
+ "model.layers.23.mlp.up_proj.weight": "model-00007-of-00011.safetensors",
205
+ "model.layers.23.post_attention_layernorm.weight": "model-00007-of-00011.safetensors",
206
+ "model.layers.23.self_attn.k_proj.bias": "model-00007-of-00011.safetensors",
207
+ "model.layers.23.self_attn.k_proj.weight": "model-00007-of-00011.safetensors",
208
+ "model.layers.23.self_attn.o_proj.weight": "model-00007-of-00011.safetensors",
209
+ "model.layers.23.self_attn.q_proj.bias": "model-00007-of-00011.safetensors",
210
+ "model.layers.23.self_attn.q_proj.weight": "model-00007-of-00011.safetensors",
211
+ "model.layers.23.self_attn.v_proj.bias": "model-00007-of-00011.safetensors",
212
+ "model.layers.23.self_attn.v_proj.weight": "model-00007-of-00011.safetensors",
213
+ "model.layers.24.input_layernorm.weight": "model-00007-of-00011.safetensors",
214
+ "model.layers.24.mlp.down_proj.weight": "model-00007-of-00011.safetensors",
215
+ "model.layers.24.mlp.gate_proj.weight": "model-00007-of-00011.safetensors",
216
+ "model.layers.24.mlp.up_proj.weight": "model-00007-of-00011.safetensors",
217
+ "model.layers.24.post_attention_layernorm.weight": "model-00007-of-00011.safetensors",
218
+ "model.layers.24.self_attn.k_proj.bias": "model-00007-of-00011.safetensors",
219
+ "model.layers.24.self_attn.k_proj.weight": "model-00007-of-00011.safetensors",
220
+ "model.layers.24.self_attn.o_proj.weight": "model-00007-of-00011.safetensors",
221
+ "model.layers.24.self_attn.q_proj.bias": "model-00007-of-00011.safetensors",
222
+ "model.layers.24.self_attn.q_proj.weight": "model-00007-of-00011.safetensors",
223
+ "model.layers.24.self_attn.v_proj.bias": "model-00007-of-00011.safetensors",
224
+ "model.layers.24.self_attn.v_proj.weight": "model-00007-of-00011.safetensors",
225
+ "model.layers.25.input_layernorm.weight": "model-00008-of-00011.safetensors",
226
+ "model.layers.25.mlp.down_proj.weight": "model-00008-of-00011.safetensors",
227
+ "model.layers.25.mlp.gate_proj.weight": "model-00007-of-00011.safetensors",
228
+ "model.layers.25.mlp.up_proj.weight": "model-00008-of-00011.safetensors",
229
+ "model.layers.25.post_attention_layernorm.weight": "model-00008-of-00011.safetensors",
230
+ "model.layers.25.self_attn.k_proj.bias": "model-00007-of-00011.safetensors",
231
+ "model.layers.25.self_attn.k_proj.weight": "model-00007-of-00011.safetensors",
232
+ "model.layers.25.self_attn.o_proj.weight": "model-00007-of-00011.safetensors",
233
+ "model.layers.25.self_attn.q_proj.bias": "model-00007-of-00011.safetensors",
234
+ "model.layers.25.self_attn.q_proj.weight": "model-00007-of-00011.safetensors",
235
+ "model.layers.25.self_attn.v_proj.bias": "model-00007-of-00011.safetensors",
236
+ "model.layers.25.self_attn.v_proj.weight": "model-00007-of-00011.safetensors",
237
+ "model.layers.26.input_layernorm.weight": "model-00008-of-00011.safetensors",
238
+ "model.layers.26.mlp.down_proj.weight": "model-00008-of-00011.safetensors",
239
+ "model.layers.26.mlp.gate_proj.weight": "model-00008-of-00011.safetensors",
240
+ "model.layers.26.mlp.up_proj.weight": "model-00008-of-00011.safetensors",
241
+ "model.layers.26.post_attention_layernorm.weight": "model-00008-of-00011.safetensors",
242
+ "model.layers.26.self_attn.k_proj.bias": "model-00008-of-00011.safetensors",
243
+ "model.layers.26.self_attn.k_proj.weight": "model-00008-of-00011.safetensors",
244
+ "model.layers.26.self_attn.o_proj.weight": "model-00008-of-00011.safetensors",
245
+ "model.layers.26.self_attn.q_proj.bias": "model-00008-of-00011.safetensors",
246
+ "model.layers.26.self_attn.q_proj.weight": "model-00008-of-00011.safetensors",
247
+ "model.layers.26.self_attn.v_proj.bias": "model-00008-of-00011.safetensors",
248
+ "model.layers.26.self_attn.v_proj.weight": "model-00008-of-00011.safetensors",
249
+ "model.layers.27.input_layernorm.weight": "model-00008-of-00011.safetensors",
250
+ "model.layers.27.mlp.down_proj.weight": "model-00008-of-00011.safetensors",
251
+ "model.layers.27.mlp.gate_proj.weight": "model-00008-of-00011.safetensors",
252
+ "model.layers.27.mlp.up_proj.weight": "model-00008-of-00011.safetensors",
253
+ "model.layers.27.post_attention_layernorm.weight": "model-00008-of-00011.safetensors",
254
+ "model.layers.27.self_attn.k_proj.bias": "model-00008-of-00011.safetensors",
255
+ "model.layers.27.self_attn.k_proj.weight": "model-00008-of-00011.safetensors",
256
+ "model.layers.27.self_attn.o_proj.weight": "model-00008-of-00011.safetensors",
257
+ "model.layers.27.self_attn.q_proj.bias": "model-00008-of-00011.safetensors",
258
+ "model.layers.27.self_attn.q_proj.weight": "model-00008-of-00011.safetensors",
259
+ "model.layers.27.self_attn.v_proj.bias": "model-00008-of-00011.safetensors",
260
+ "model.layers.27.self_attn.v_proj.weight": "model-00008-of-00011.safetensors",
261
+ "model.layers.3.input_layernorm.weight": "model-00002-of-00011.safetensors",
262
+ "model.layers.3.mlp.down_proj.weight": "model-00002-of-00011.safetensors",
263
+ "model.layers.3.mlp.gate_proj.weight": "model-00002-of-00011.safetensors",
264
+ "model.layers.3.mlp.up_proj.weight": "model-00002-of-00011.safetensors",
265
+ "model.layers.3.post_attention_layernorm.weight": "model-00002-of-00011.safetensors",
266
+ "model.layers.3.self_attn.k_proj.bias": "model-00002-of-00011.safetensors",
267
+ "model.layers.3.self_attn.k_proj.weight": "model-00002-of-00011.safetensors",
268
+ "model.layers.3.self_attn.o_proj.weight": "model-00002-of-00011.safetensors",
269
+ "model.layers.3.self_attn.q_proj.bias": "model-00002-of-00011.safetensors",
270
+ "model.layers.3.self_attn.q_proj.weight": "model-00002-of-00011.safetensors",
271
+ "model.layers.3.self_attn.v_proj.bias": "model-00002-of-00011.safetensors",
272
+ "model.layers.3.self_attn.v_proj.weight": "model-00002-of-00011.safetensors",
273
+ "model.layers.4.input_layernorm.weight": "model-00002-of-00011.safetensors",
274
+ "model.layers.4.mlp.down_proj.weight": "model-00002-of-00011.safetensors",
275
+ "model.layers.4.mlp.gate_proj.weight": "model-00002-of-00011.safetensors",
276
+ "model.layers.4.mlp.up_proj.weight": "model-00002-of-00011.safetensors",
277
+ "model.layers.4.post_attention_layernorm.weight": "model-00002-of-00011.safetensors",
278
+ "model.layers.4.self_attn.k_proj.bias": "model-00002-of-00011.safetensors",
279
+ "model.layers.4.self_attn.k_proj.weight": "model-00002-of-00011.safetensors",
280
+ "model.layers.4.self_attn.o_proj.weight": "model-00002-of-00011.safetensors",
281
+ "model.layers.4.self_attn.q_proj.bias": "model-00002-of-00011.safetensors",
282
+ "model.layers.4.self_attn.q_proj.weight": "model-00002-of-00011.safetensors",
283
+ "model.layers.4.self_attn.v_proj.bias": "model-00002-of-00011.safetensors",
284
+ "model.layers.4.self_attn.v_proj.weight": "model-00002-of-00011.safetensors",
285
+ "model.layers.5.input_layernorm.weight": "model-00003-of-00011.safetensors",
286
+ "model.layers.5.mlp.down_proj.weight": "model-00003-of-00011.safetensors",
287
+ "model.layers.5.mlp.gate_proj.weight": "model-00002-of-00011.safetensors",
288
+ "model.layers.5.mlp.up_proj.weight": "model-00003-of-00011.safetensors",
289
+ "model.layers.5.post_attention_layernorm.weight": "model-00003-of-00011.safetensors",
290
+ "model.layers.5.self_attn.k_proj.bias": "model-00002-of-00011.safetensors",
291
+ "model.layers.5.self_attn.k_proj.weight": "model-00002-of-00011.safetensors",
292
+ "model.layers.5.self_attn.o_proj.weight": "model-00002-of-00011.safetensors",
293
+ "model.layers.5.self_attn.q_proj.bias": "model-00002-of-00011.safetensors",
294
+ "model.layers.5.self_attn.q_proj.weight": "model-00002-of-00011.safetensors",
295
+ "model.layers.5.self_attn.v_proj.bias": "model-00002-of-00011.safetensors",
296
+ "model.layers.5.self_attn.v_proj.weight": "model-00002-of-00011.safetensors",
297
+ "model.layers.6.input_layernorm.weight": "model-00003-of-00011.safetensors",
298
+ "model.layers.6.mlp.down_proj.weight": "model-00003-of-00011.safetensors",
299
+ "model.layers.6.mlp.gate_proj.weight": "model-00003-of-00011.safetensors",
300
+ "model.layers.6.mlp.up_proj.weight": "model-00003-of-00011.safetensors",
301
+ "model.layers.6.post_attention_layernorm.weight": "model-00003-of-00011.safetensors",
302
+ "model.layers.6.self_attn.k_proj.bias": "model-00003-of-00011.safetensors",
303
+ "model.layers.6.self_attn.k_proj.weight": "model-00003-of-00011.safetensors",
304
+ "model.layers.6.self_attn.o_proj.weight": "model-00003-of-00011.safetensors",
305
+ "model.layers.6.self_attn.q_proj.bias": "model-00003-of-00011.safetensors",
306
+ "model.layers.6.self_attn.q_proj.weight": "model-00003-of-00011.safetensors",
307
+ "model.layers.6.self_attn.v_proj.bias": "model-00003-of-00011.safetensors",
308
+ "model.layers.6.self_attn.v_proj.weight": "model-00003-of-00011.safetensors",
309
+ "model.layers.7.input_layernorm.weight": "model-00003-of-00011.safetensors",
310
+ "model.layers.7.mlp.down_proj.weight": "model-00003-of-00011.safetensors",
311
+ "model.layers.7.mlp.gate_proj.weight": "model-00003-of-00011.safetensors",
312
+ "model.layers.7.mlp.up_proj.weight": "model-00003-of-00011.safetensors",
313
+ "model.layers.7.post_attention_layernorm.weight": "model-00003-of-00011.safetensors",
314
+ "model.layers.7.self_attn.k_proj.bias": "model-00003-of-00011.safetensors",
315
+ "model.layers.7.self_attn.k_proj.weight": "model-00003-of-00011.safetensors",
316
+ "model.layers.7.self_attn.o_proj.weight": "model-00003-of-00011.safetensors",
317
+ "model.layers.7.self_attn.q_proj.bias": "model-00003-of-00011.safetensors",
318
+ "model.layers.7.self_attn.q_proj.weight": "model-00003-of-00011.safetensors",
319
+ "model.layers.7.self_attn.v_proj.bias": "model-00003-of-00011.safetensors",
320
+ "model.layers.7.self_attn.v_proj.weight": "model-00003-of-00011.safetensors",
321
+ "model.layers.8.input_layernorm.weight": "model-00003-of-00011.safetensors",
322
+ "model.layers.8.mlp.down_proj.weight": "model-00003-of-00011.safetensors",
323
+ "model.layers.8.mlp.gate_proj.weight": "model-00003-of-00011.safetensors",
324
+ "model.layers.8.mlp.up_proj.weight": "model-00003-of-00011.safetensors",
325
+ "model.layers.8.post_attention_layernorm.weight": "model-00003-of-00011.safetensors",
326
+ "model.layers.8.self_attn.k_proj.bias": "model-00003-of-00011.safetensors",
327
+ "model.layers.8.self_attn.k_proj.weight": "model-00003-of-00011.safetensors",
328
+ "model.layers.8.self_attn.o_proj.weight": "model-00003-of-00011.safetensors",
329
+ "model.layers.8.self_attn.q_proj.bias": "model-00003-of-00011.safetensors",
330
+ "model.layers.8.self_attn.q_proj.weight": "model-00003-of-00011.safetensors",
331
+ "model.layers.8.self_attn.v_proj.bias": "model-00003-of-00011.safetensors",
332
+ "model.layers.8.self_attn.v_proj.weight": "model-00003-of-00011.safetensors",
333
+ "model.layers.9.input_layernorm.weight": "model-00004-of-00011.safetensors",
334
+ "model.layers.9.mlp.down_proj.weight": "model-00004-of-00011.safetensors",
335
+ "model.layers.9.mlp.gate_proj.weight": "model-00003-of-00011.safetensors",
336
+ "model.layers.9.mlp.up_proj.weight": "model-00004-of-00011.safetensors",
337
+ "model.layers.9.post_attention_layernorm.weight": "model-00004-of-00011.safetensors",
338
+ "model.layers.9.self_attn.k_proj.bias": "model-00003-of-00011.safetensors",
339
+ "model.layers.9.self_attn.k_proj.weight": "model-00003-of-00011.safetensors",
340
+ "model.layers.9.self_attn.o_proj.weight": "model-00003-of-00011.safetensors",
341
+ "model.layers.9.self_attn.q_proj.bias": "model-00003-of-00011.safetensors",
342
+ "model.layers.9.self_attn.q_proj.weight": "model-00003-of-00011.safetensors",
343
+ "model.layers.9.self_attn.v_proj.bias": "model-00003-of-00011.safetensors",
344
+ "model.layers.9.self_attn.v_proj.weight": "model-00003-of-00011.safetensors",
345
+ "model.mimo_layers.0.input_layernorm.weight": "model-00008-of-00011.safetensors",
346
+ "model.mimo_layers.0.mlp.down_proj.weight": "model-00008-of-00011.safetensors",
347
+ "model.mimo_layers.0.mlp.gate_proj.weight": "model-00008-of-00011.safetensors",
348
+ "model.mimo_layers.0.mlp.up_proj.weight": "model-00008-of-00011.safetensors",
349
+ "model.mimo_layers.0.post_attention_layernorm.weight": "model-00008-of-00011.safetensors",
350
+ "model.mimo_layers.0.self_attn.k_proj.bias": "model-00008-of-00011.safetensors",
351
+ "model.mimo_layers.0.self_attn.k_proj.weight": "model-00008-of-00011.safetensors",
352
+ "model.mimo_layers.0.self_attn.o_proj.weight": "model-00008-of-00011.safetensors",
353
+ "model.mimo_layers.0.self_attn.q_proj.bias": "model-00008-of-00011.safetensors",
354
+ "model.mimo_layers.0.self_attn.q_proj.weight": "model-00008-of-00011.safetensors",
355
+ "model.mimo_layers.0.self_attn.v_proj.bias": "model-00008-of-00011.safetensors",
356
+ "model.mimo_layers.0.self_attn.v_proj.weight": "model-00008-of-00011.safetensors",
357
+ "model.mimo_layers.1.input_layernorm.weight": "model-00009-of-00011.safetensors",
358
+ "model.mimo_layers.1.mlp.down_proj.weight": "model-00009-of-00011.safetensors",
359
+ "model.mimo_layers.1.mlp.gate_proj.weight": "model-00008-of-00011.safetensors",
360
+ "model.mimo_layers.1.mlp.up_proj.weight": "model-00009-of-00011.safetensors",
361
+ "model.mimo_layers.1.post_attention_layernorm.weight": "model-00009-of-00011.safetensors",
362
+ "model.mimo_layers.1.self_attn.k_proj.bias": "model-00008-of-00011.safetensors",
363
+ "model.mimo_layers.1.self_attn.k_proj.weight": "model-00008-of-00011.safetensors",
364
+ "model.mimo_layers.1.self_attn.o_proj.weight": "model-00008-of-00011.safetensors",
365
+ "model.mimo_layers.1.self_attn.q_proj.bias": "model-00008-of-00011.safetensors",
366
+ "model.mimo_layers.1.self_attn.q_proj.weight": "model-00008-of-00011.safetensors",
367
+ "model.mimo_layers.1.self_attn.v_proj.bias": "model-00008-of-00011.safetensors",
368
+ "model.mimo_layers.1.self_attn.v_proj.weight": "model-00008-of-00011.safetensors",
369
+ "model.mimo_layers.2.input_layernorm.weight": "model-00009-of-00011.safetensors",
370
+ "model.mimo_layers.2.mlp.down_proj.weight": "model-00009-of-00011.safetensors",
371
+ "model.mimo_layers.2.mlp.gate_proj.weight": "model-00009-of-00011.safetensors",
372
+ "model.mimo_layers.2.mlp.up_proj.weight": "model-00009-of-00011.safetensors",
373
+ "model.mimo_layers.2.post_attention_layernorm.weight": "model-00009-of-00011.safetensors",
374
+ "model.mimo_layers.2.self_attn.k_proj.bias": "model-00009-of-00011.safetensors",
375
+ "model.mimo_layers.2.self_attn.k_proj.weight": "model-00009-of-00011.safetensors",
376
+ "model.mimo_layers.2.self_attn.o_proj.weight": "model-00009-of-00011.safetensors",
377
+ "model.mimo_layers.2.self_attn.q_proj.bias": "model-00009-of-00011.safetensors",
378
+ "model.mimo_layers.2.self_attn.q_proj.weight": "model-00009-of-00011.safetensors",
379
+ "model.mimo_layers.2.self_attn.v_proj.bias": "model-00009-of-00011.safetensors",
380
+ "model.mimo_layers.2.self_attn.v_proj.weight": "model-00009-of-00011.safetensors",
381
+ "model.mimo_layers.3.input_layernorm.weight": "model-00009-of-00011.safetensors",
382
+ "model.mimo_layers.3.mlp.down_proj.weight": "model-00009-of-00011.safetensors",
383
+ "model.mimo_layers.3.mlp.gate_proj.weight": "model-00009-of-00011.safetensors",
384
+ "model.mimo_layers.3.mlp.up_proj.weight": "model-00009-of-00011.safetensors",
385
+ "model.mimo_layers.3.post_attention_layernorm.weight": "model-00009-of-00011.safetensors",
386
+ "model.mimo_layers.3.self_attn.k_proj.bias": "model-00009-of-00011.safetensors",
387
+ "model.mimo_layers.3.self_attn.k_proj.weight": "model-00009-of-00011.safetensors",
388
+ "model.mimo_layers.3.self_attn.o_proj.weight": "model-00009-of-00011.safetensors",
389
+ "model.mimo_layers.3.self_attn.q_proj.bias": "model-00009-of-00011.safetensors",
390
+ "model.mimo_layers.3.self_attn.q_proj.weight": "model-00009-of-00011.safetensors",
391
+ "model.mimo_layers.3.self_attn.v_proj.bias": "model-00009-of-00011.safetensors",
392
+ "model.mimo_layers.3.self_attn.v_proj.weight": "model-00009-of-00011.safetensors",
393
+ "model.mimo_layers.4.input_layernorm.weight": "model-00009-of-00011.safetensors",
394
+ "model.mimo_layers.4.mlp.down_proj.weight": "model-00009-of-00011.safetensors",
395
+ "model.mimo_layers.4.mlp.gate_proj.weight": "model-00009-of-00011.safetensors",
396
+ "model.mimo_layers.4.mlp.up_proj.weight": "model-00009-of-00011.safetensors",
397
+ "model.mimo_layers.4.post_attention_layernorm.weight": "model-00009-of-00011.safetensors",
398
+ "model.mimo_layers.4.self_attn.k_proj.bias": "model-00009-of-00011.safetensors",
399
+ "model.mimo_layers.4.self_attn.k_proj.weight": "model-00009-of-00011.safetensors",
400
+ "model.mimo_layers.4.self_attn.o_proj.weight": "model-00009-of-00011.safetensors",
401
+ "model.mimo_layers.4.self_attn.q_proj.bias": "model-00009-of-00011.safetensors",
402
+ "model.mimo_layers.4.self_attn.q_proj.weight": "model-00009-of-00011.safetensors",
403
+ "model.mimo_layers.4.self_attn.v_proj.bias": "model-00009-of-00011.safetensors",
404
+ "model.mimo_layers.4.self_attn.v_proj.weight": "model-00009-of-00011.safetensors",
405
+ "model.mimo_layers.5.input_layernorm.weight": "model-00010-of-00011.safetensors",
406
+ "model.mimo_layers.5.mlp.down_proj.weight": "model-00010-of-00011.safetensors",
407
+ "model.mimo_layers.5.mlp.gate_proj.weight": "model-00009-of-00011.safetensors",
408
+ "model.mimo_layers.5.mlp.up_proj.weight": "model-00010-of-00011.safetensors",
409
+ "model.mimo_layers.5.post_attention_layernorm.weight": "model-00010-of-00011.safetensors",
410
+ "model.mimo_layers.5.self_attn.k_proj.bias": "model-00009-of-00011.safetensors",
411
+ "model.mimo_layers.5.self_attn.k_proj.weight": "model-00009-of-00011.safetensors",
412
+ "model.mimo_layers.5.self_attn.o_proj.weight": "model-00009-of-00011.safetensors",
413
+ "model.mimo_layers.5.self_attn.q_proj.bias": "model-00009-of-00011.safetensors",
414
+ "model.mimo_layers.5.self_attn.q_proj.weight": "model-00009-of-00011.safetensors",
415
+ "model.mimo_layers.5.self_attn.v_proj.bias": "model-00009-of-00011.safetensors",
416
+ "model.mimo_layers.5.self_attn.v_proj.weight": "model-00009-of-00011.safetensors",
417
+ "model.mimo_norm.weight": "model-00010-of-00011.safetensors",
418
+ "model.norm.weight": "model-00008-of-00011.safetensors",
419
+ "model.vq_adaptor.layers.0.bias": "model-00010-of-00011.safetensors",
420
+ "model.vq_adaptor.layers.0.weight": "model-00010-of-00011.safetensors",
421
+ "model.vq_adaptor.layers.3.bias": "model-00010-of-00011.safetensors",
422
+ "model.vq_adaptor.layers.3.weight": "model-00010-of-00011.safetensors",
423
+ "model.vq_adaptor.layers.4.bias": "model-00010-of-00011.safetensors",
424
+ "model.vq_adaptor.layers.4.weight": "model-00010-of-00011.safetensors"
425
+ }
426
+ }
modeling_echochat.py ADDED
@@ -0,0 +1,955 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Modified for EchoChat distribution: renamed entry points and deferred the FlashAttention import error to execution; GPU computation unchanged.
2
+ # coding=utf-8
3
+ # Copyright 2025 The Moonshot AI Team, Qwen Team, and HuggingFace Inc. team. All rights reserved.
4
+ #
5
+ # The code is based on Qwen2.5-7B, but modified for KimiAudio.
6
+ #
7
+ # Licensing Information:
8
+ # - Code derived from Qwen2.5-7B is licensed under the Apache License, Version 2.0.
9
+ # - Other parts of the code are licensed under the MIT License.
10
+ #
11
+ # Apache License, Version 2.0:
12
+ # Licensed under the Apache License, Version 2.0 (the "License");
13
+ # you may not use this file except in compliance with the License.
14
+ # You may obtain a copy of the License at
15
+ #
16
+ # http://www.apache.org/licenses/LICENSE-2.0
17
+ #
18
+ # Unless required by applicable law or agreed to in writing, software
19
+ # distributed under the License is distributed on an "AS IS" BASIS,
20
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
+ # See the License for the specific language governing permissions and
22
+ # limitations under the License.
23
+ #
24
+ # MIT License:
25
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
26
+ # of this software and associated documentation files (the "Software"), to deal
27
+ # in the Software without restriction, including without limitation the rights
28
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
29
+ # copies of the Software, and to permit persons to whom the Software is
30
+ # furnished to do so, subject to the following conditions:
31
+ #
32
+ # The above copyright notice and this permission notice shall be included in all
33
+ # copies or substantial portions of the Software.
34
+ #
35
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
36
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
37
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
38
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
39
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
40
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
41
+ # SOFTWARE.
42
+ """PyTorch KimiAudio model."""
43
+
44
+ import math
45
+ from typing import List, Optional, Tuple, Union
46
+ import torch
47
+ import torch.utils.checkpoint
48
+ from torch import nn
49
+
50
+ import transformers
51
+ from packaging import version
52
+
53
+ assert version.parse(transformers.__version__) >= version.parse("4.34.1")
54
+
55
+ from transformers.modeling_outputs import (
56
+ BaseModelOutputWithPast,
57
+ CausalLMOutputWithPast,
58
+ )
59
+ from transformers.utils import (
60
+ logging,
61
+ )
62
+ from .configuration_echochat import EchoChatConfig
63
+ import torch.nn.functional as F
64
+ from transformers.models.qwen2.modeling_qwen2 import (
65
+ Qwen2RMSNorm,
66
+ Qwen2MLP,
67
+ Qwen2PreTrainedModel,
68
+ )
69
+ from transformers.models.qwen2.modeling_qwen2 import apply_rotary_pos_emb
70
+
71
+ if version.parse(transformers.__version__) >= version.parse("4.35.0"):
72
+ from transformers.utils import is_flash_attn_2_available as is_flash_attn_available
73
+ else:
74
+ from transformers.utils import is_flash_attn_available
75
+
76
+ if is_flash_attn_available():
77
+ from flash_attn import flash_attn_func, flash_attn_varlen_func
78
+ from flash_attn.bert_padding import index_first_axis, pad_input, unpad_input # noqa
79
+ else:
80
+ # Permit CPU weight inspection; execution still requires FlashAttention.
81
+ def _flash_attention_required(*args, **kwargs):
82
+ raise RuntimeError("CUDA FlashAttention is required for model execution")
83
+ flash_attn_func = flash_attn_varlen_func = _flash_attention_required
84
+ index_first_axis = pad_input = unpad_input = _flash_attention_required
85
+
86
+
87
+ logger = logging.get_logger(__name__)
88
+
89
+
90
+ def _get_unpad_data(padding_mask):
91
+ seqlens_in_batch = padding_mask.sum(dim=-1, dtype=torch.int32)
92
+ indices = torch.nonzero(padding_mask.flatten(), as_tuple=False).flatten()
93
+ max_seqlen_in_batch = seqlens_in_batch.max().item()
94
+ cu_seqlens = F.pad(
95
+ torch.cumsum(seqlens_in_batch, dim=0, dtype=torch.torch.int32), (1, 0)
96
+ )
97
+ return (
98
+ indices,
99
+ cu_seqlens,
100
+ max_seqlen_in_batch,
101
+ )
102
+
103
+
104
+ def _upad_input(query_layer, key_layer, value_layer, padding_mask, query_length):
105
+ indices_k, cu_seqlens_k, max_seqlen_in_batch_k = _get_unpad_data(padding_mask)
106
+ batch_size, kv_seq_len, num_key_value_heads, head_dim = key_layer.shape
107
+ num_heads = query_layer.shape[2]
108
+
109
+ key_layer = index_first_axis(
110
+ key_layer.reshape(batch_size * kv_seq_len, num_key_value_heads, head_dim),
111
+ indices_k,
112
+ )
113
+ value_layer = index_first_axis(
114
+ value_layer.reshape(batch_size * kv_seq_len, num_key_value_heads, head_dim),
115
+ indices_k,
116
+ )
117
+ if query_length == kv_seq_len:
118
+ query_layer = index_first_axis(
119
+ query_layer.reshape(batch_size * kv_seq_len, num_heads, head_dim), indices_k
120
+ )
121
+ cu_seqlens_q = cu_seqlens_k
122
+ max_seqlen_in_batch_q = max_seqlen_in_batch_k
123
+ indices_q = indices_k
124
+ elif query_length == 1:
125
+ max_seqlen_in_batch_q = 1
126
+ cu_seqlens_q = torch.arange(
127
+ batch_size + 1, dtype=torch.int32, device=query_layer.device
128
+ ) # There is a memcpy here, that is very bad.
129
+ indices_q = cu_seqlens_q[:-1]
130
+ query_layer = query_layer.squeeze(1)
131
+ else:
132
+ # The -q_len: slice assumes left padding.
133
+ padding_mask = padding_mask[:, -query_length:]
134
+ query_layer, indices_q, cu_seqlens_q, max_seqlen_in_batch_q = unpad_input(
135
+ query_layer, padding_mask
136
+ )
137
+
138
+ return (
139
+ query_layer,
140
+ key_layer,
141
+ value_layer,
142
+ indices_q,
143
+ (cu_seqlens_q, cu_seqlens_k),
144
+ (max_seqlen_in_batch_q, max_seqlen_in_batch_k),
145
+ )
146
+
147
+
148
+ # Copied from transformers.models.bart.modeling_bart._make_causal_mask
149
+ def _make_causal_mask(
150
+ input_ids_shape: torch.Size,
151
+ dtype: torch.dtype,
152
+ device: torch.device,
153
+ past_key_values_length: int = 0,
154
+ ):
155
+ """
156
+ Make causal mask used for bi-directional self-attention.
157
+ """
158
+ bsz, tgt_len = input_ids_shape
159
+ mask = torch.full((tgt_len, tgt_len), torch.finfo(dtype).min, device=device)
160
+ mask_cond = torch.arange(mask.size(-1), device=device)
161
+ mask.masked_fill_(mask_cond < (mask_cond + 1).view(mask.size(-1), 1), 0)
162
+ mask = mask.to(dtype)
163
+
164
+ if past_key_values_length > 0:
165
+ mask = torch.cat(
166
+ [
167
+ torch.zeros(
168
+ tgt_len, past_key_values_length, dtype=dtype, device=device
169
+ ),
170
+ mask,
171
+ ],
172
+ dim=-1,
173
+ )
174
+ return mask[None, None, :, :].expand(
175
+ bsz, 1, tgt_len, tgt_len + past_key_values_length
176
+ )
177
+
178
+
179
+ # Copied from transformers.models.bart.modeling_bart._expand_mask
180
+ def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Optional[int] = None):
181
+ """
182
+ Expands attention_mask from `[bsz, seq_len]` to `[bsz, 1, tgt_seq_len, src_seq_len]`.
183
+ """
184
+ bsz, src_len = mask.size()
185
+ tgt_len = tgt_len if tgt_len is not None else src_len
186
+
187
+ expanded_mask = mask[:, None, None, :].expand(bsz, 1, tgt_len, src_len).to(dtype)
188
+
189
+ inverted_mask = 1.0 - expanded_mask
190
+
191
+ return inverted_mask.masked_fill(
192
+ inverted_mask.to(torch.bool), torch.finfo(dtype).min
193
+ )
194
+
195
+
196
+ class RotaryEmbedding(nn.Module):
197
+ def __init__(self, dim, max_position_embeddings=2048, base=10000, device=None):
198
+ super().__init__()
199
+
200
+ self.dim = dim
201
+ self.max_position_embeddings = max_position_embeddings
202
+ self.base = base
203
+ inv_freq = 1.0 / (
204
+ self.base ** (torch.arange(0, self.dim, 2).float().to(device) / self.dim)
205
+ )
206
+ self.register_buffer("inv_freq", inv_freq, persistent=False)
207
+
208
+ # Build here to make `torch.jit.trace` work.
209
+ self._set_cos_sin_cache(
210
+ seq_len=max_position_embeddings,
211
+ device=self.inv_freq.device,
212
+ dtype=torch.get_default_dtype(),
213
+ )
214
+
215
+ def _set_cos_sin_cache(self, seq_len, device, dtype):
216
+ self.max_seq_len_cached = seq_len
217
+ t = torch.arange(
218
+ self.max_seq_len_cached, device=device, dtype=self.inv_freq.dtype
219
+ )
220
+
221
+ freqs = torch.einsum("i,j->ij", t, self.inv_freq)
222
+ # Different from paper, but it uses a different permutation in order to obtain the same calculation
223
+ emb = torch.cat((freqs, freqs), dim=-1)
224
+ self.register_buffer("cos_cached", emb.cos().to(dtype), persistent=False)
225
+ self.register_buffer("sin_cached", emb.sin().to(dtype), persistent=False)
226
+
227
+ def forward(self, x, seq_len=None):
228
+ # x: [bs, num_attention_heads, seq_len, head_size]
229
+ if seq_len > self.max_seq_len_cached:
230
+ self._set_cos_sin_cache(seq_len=seq_len, device=x.device, dtype=x.dtype)
231
+
232
+ return (
233
+ self.cos_cached[:seq_len].to(dtype=x.dtype),
234
+ self.sin_cached[:seq_len].to(dtype=x.dtype),
235
+ )
236
+
237
+
238
+ class MoonshotAttention(nn.Module):
239
+ """Multi-headed attention from 'Attention Is All You Need' paper"""
240
+
241
+ def __init__(self, config: EchoChatConfig, layer_idx: int = 0, total_layers: int = 28):
242
+ super().__init__()
243
+ self.config = config
244
+ self.layer_idx = layer_idx
245
+ self.total_layers = total_layers
246
+ self.hidden_size = config.hidden_size
247
+ self.num_heads = config.num_attention_heads
248
+ self.head_dim = self.hidden_size // self.num_heads
249
+ self.num_key_value_heads = config.num_key_value_heads
250
+ self.num_key_value_groups = self.num_heads // self.num_key_value_heads
251
+ self.max_position_embeddings = config.max_position_embeddings
252
+ self.rope_theta = config.rope_theta
253
+ if (self.head_dim * self.num_heads) != self.hidden_size:
254
+ raise ValueError(
255
+ f"hidden_size must be divisible by num_heads (got `hidden_size`: {self.hidden_size}"
256
+ f" and `num_heads`: {self.num_heads})."
257
+ )
258
+ self.q_proj = nn.Linear(
259
+ self.hidden_size, self.num_heads * self.head_dim, bias=True
260
+ )
261
+ self.k_proj = nn.Linear(
262
+ self.hidden_size, self.num_key_value_heads * self.head_dim, bias=True
263
+ )
264
+ self.v_proj = nn.Linear(
265
+ self.hidden_size, self.num_key_value_heads * self.head_dim, bias=True
266
+ )
267
+ self.o_proj = nn.Linear(
268
+ self.num_heads * self.head_dim, self.hidden_size, bias=False
269
+ )
270
+
271
+ self._init_rope()
272
+
273
+ def _init_rope(self):
274
+
275
+ self.rotary_emb = RotaryEmbedding(
276
+ self.head_dim,
277
+ max_position_embeddings=self.max_position_embeddings,
278
+ base=self.rope_theta,
279
+ )
280
+
281
+ def forward(
282
+ self,
283
+ hidden_states: torch.Tensor,
284
+ attention_mask: Optional[torch.Tensor] = None,
285
+ position_ids: Optional[torch.LongTensor] = None,
286
+ past_key_value: Optional[Tuple[torch.Tensor]] = None,
287
+ output_attentions: bool = False,
288
+ use_cache: bool = False,
289
+ padding_mask: Optional[torch.LongTensor] = None,
290
+ ) -> Tuple[torch.Tensor, Optional[torch.Tensor], Optional[Tuple[torch.Tensor]]]:
291
+ # AAA: only the last AAA_EAGER_LAYERS layers use the eager attention path when
292
+ # output_attentions=True. All earlier layers silently fall back to flash attention.
293
+ # layer_idx=-1 (mimo layers) never enters the eager path.
294
+ AAA_EAGER_LAYERS = 2 # last 2 main transformer layers
295
+ use_eager = output_attentions and (self.layer_idx >= 0) and (self.layer_idx >= self.total_layers - AAA_EAGER_LAYERS)
296
+
297
+ bsz, q_len, _ = hidden_states.size()
298
+
299
+ query_states = self.q_proj(hidden_states)
300
+ key_states = self.k_proj(hidden_states)
301
+ value_states = self.v_proj(hidden_states)
302
+
303
+ # Shape: [bsz, num_heads, seq_len, head_dim]
304
+ query_states = query_states.view(
305
+ bsz, q_len, self.num_heads, self.head_dim
306
+ ).transpose(1, 2)
307
+ key_states = key_states.view(
308
+ bsz, q_len, self.num_key_value_heads, self.head_dim
309
+ ).transpose(1, 2)
310
+ value_states = value_states.view(
311
+ bsz, q_len, self.num_key_value_heads, self.head_dim
312
+ ).transpose(1, 2)
313
+
314
+ kv_seq_len = key_states.shape[-2]
315
+ if past_key_value is not None:
316
+ kv_seq_len += past_key_value[0].shape[-2]
317
+
318
+ cos, sin = self.rotary_emb(value_states, seq_len=kv_seq_len)
319
+ cos = cos[position_ids]
320
+ sin = sin[position_ids]
321
+ query_states, key_states = apply_rotary_pos_emb(
322
+ query_states, key_states, cos, sin, position_ids
323
+ )
324
+
325
+ if past_key_value is not None:
326
+ key_states = torch.cat([past_key_value[0], key_states], dim=2)
327
+ value_states = torch.cat([past_key_value[1], value_states], dim=2)
328
+
329
+ past_key_value = (key_states, value_states) if use_cache else None
330
+
331
+ # --- Eager attention path (AAA: last N layers, output_attentions=True) ---
332
+ if use_eager:
333
+ # Expand KV heads for GQA: [bsz, num_heads, kv_len, head_dim]
334
+ if self.num_key_value_groups > 1:
335
+ key_states_e = key_states.repeat_interleave(self.num_key_value_groups, dim=1)
336
+ value_states_e = value_states.repeat_interleave(self.num_key_value_groups, dim=1)
337
+ else:
338
+ key_states_e = key_states
339
+ value_states_e = value_states
340
+
341
+ scale = 1.0 / math.sqrt(self.head_dim)
342
+ # [bsz, num_heads, q_len, kv_len]
343
+ attn_weights = torch.matmul(query_states, key_states_e.transpose(-2, -1)) * scale
344
+
345
+ # Build causal mask: positions i cannot attend to j > i
346
+ if q_len > 1:
347
+ causal = torch.full(
348
+ (q_len, kv_seq_len), fill_value=float('-inf'),
349
+ device=attn_weights.device, dtype=attn_weights.dtype,
350
+ )
351
+ # Upper-triangular (excluding the diagonal shifted by kv_seq_len - q_len)
352
+ causal = torch.triu(causal, diagonal=1 + kv_seq_len - q_len)
353
+ attn_weights = attn_weights + causal.unsqueeze(0).unsqueeze(0)
354
+
355
+ # Softmax in fp32 for numerical stability; keep fp32 copy for AAA loss gradients.
356
+ attn_weights_f32 = torch.nn.functional.softmax(attn_weights.float(), dim=-1)
357
+ # Cast to model dtype for the value matmul (keeps compute in bf16/fp16)
358
+ attn_weights_compute = attn_weights_f32.to(query_states.dtype)
359
+
360
+ # [bsz, num_heads, q_len, head_dim]
361
+ attn_output = torch.matmul(attn_weights_compute, value_states_e)
362
+ # [bsz, q_len, num_heads, head_dim] → [bsz, q_len, hidden_size]
363
+ attn_output = attn_output.transpose(1, 2).reshape(bsz, q_len, self.hidden_size).contiguous()
364
+ attn_output = self.o_proj(attn_output)
365
+ # Return fp32 attention weights so AAA loss can compute precise gradients
366
+ return attn_output, attn_weights_f32, past_key_value
367
+
368
+ # --- Flash attention path (all other layers, or when output_attentions=False) ---
369
+ # Transpose to [bsz, seq_len, heads, head_dim] for flash attention
370
+ query_states = query_states.transpose(1, 2)
371
+ key_states = key_states.transpose(1, 2)
372
+ value_states = value_states.transpose(1, 2)
373
+
374
+ dropout_rate = 0.0
375
+
376
+ # Cast back to fp16 if upcast happened (PEFT layer-norm fp32 upcasting)
377
+ input_dtype = query_states.dtype
378
+ if input_dtype == torch.float32:
379
+ logger.warning_once(
380
+ "The input hidden states seems to be silently casted in float32, this might be related to"
381
+ " the fact you have upcasted embedding or layer norm layers in float32. We will cast back the input in"
382
+ " float16."
383
+ )
384
+ query_states = query_states.to(torch.float16)
385
+ key_states = key_states.to(torch.float16)
386
+ value_states = value_states.to(torch.float16)
387
+
388
+ attn_output = self._flash_attention_forward(
389
+ query_states,
390
+ key_states,
391
+ value_states,
392
+ padding_mask,
393
+ q_len,
394
+ dropout=dropout_rate,
395
+ )
396
+
397
+ if input_dtype == torch.float32:
398
+ attn_output = attn_output.to(torch.float32)
399
+
400
+ attn_output = attn_output.reshape(bsz, q_len, self.hidden_size).contiguous()
401
+ attn_output = self.o_proj(attn_output)
402
+
403
+ # Flash attention does not expose attention weights
404
+ return attn_output, None, past_key_value
405
+
406
+ def _flash_attention_forward(
407
+ self,
408
+ query_states,
409
+ key_states,
410
+ value_states,
411
+ padding_mask,
412
+ query_length,
413
+ dropout=0.0,
414
+ softmax_scale=None,
415
+ ):
416
+ """
417
+ Calls the forward method of Flash Attention - if the input hidden states contain at least one padding token
418
+ first unpad the input, then computes the attention scores and pad the final attention scores.
419
+
420
+ Args:
421
+ query_states (`torch.Tensor`):
422
+ Input query states to be passed to Flash Attention API
423
+ key_states (`torch.Tensor`):
424
+ Input key states to be passed to Flash Attention API
425
+ value_states (`torch.Tensor`):
426
+ Input value states to be passed to Flash Attention API
427
+ padding_mask (`torch.Tensor`):
428
+ The padding mask - corresponds to a tensor of size `(batch_size, seq_len)` where 0 stands for the
429
+ position of padding tokens and 1 for the position of non-padding tokens.
430
+ dropout (`int`, *optional*):
431
+ Attention dropout
432
+ softmax_scale (`float`, *optional*):
433
+ The scaling of QK^T before applying softmax. Default to 1 / sqrt(head_dim)
434
+ """
435
+ # Contains at least one padding token in the sequence
436
+ if padding_mask is not None:
437
+ batch_size = query_states.shape[0]
438
+ (
439
+ query_states,
440
+ key_states,
441
+ value_states,
442
+ indices_q,
443
+ cu_seq_lens,
444
+ max_seq_lens,
445
+ ) = _upad_input(
446
+ query_states, key_states, value_states, padding_mask, query_length
447
+ )
448
+
449
+ cu_seqlens_q, cu_seqlens_k = cu_seq_lens
450
+ max_seqlen_in_batch_q, max_seqlen_in_batch_k = max_seq_lens
451
+
452
+ attn_output_unpad = flash_attn_varlen_func(
453
+ query_states,
454
+ key_states,
455
+ value_states,
456
+ cu_seqlens_q=cu_seqlens_q,
457
+ cu_seqlens_k=cu_seqlens_k,
458
+ max_seqlen_q=max_seqlen_in_batch_q,
459
+ max_seqlen_k=max_seqlen_in_batch_k,
460
+ dropout_p=dropout,
461
+ softmax_scale=softmax_scale,
462
+ causal=True,
463
+ )
464
+
465
+ attn_output = pad_input(
466
+ attn_output_unpad, indices_q, batch_size, query_length
467
+ )
468
+ else:
469
+ attn_output = flash_attn_func(
470
+ query_states,
471
+ key_states,
472
+ value_states,
473
+ dropout,
474
+ softmax_scale=softmax_scale,
475
+ causal=True,
476
+ )
477
+
478
+ return attn_output
479
+
480
+
481
+ class MoonshotDecoderLayer(nn.Module):
482
+ def __init__(self, config: EchoChatConfig, layer_idx: int = 0, total_layers: int = 28):
483
+ super().__init__()
484
+ self.hidden_size = config.hidden_size
485
+ self.config = config
486
+
487
+ logger.warning_once("using normal flash attention")
488
+ self.self_attn = MoonshotAttention(config=config, layer_idx=layer_idx, total_layers=total_layers)
489
+
490
+ self.mlp = Qwen2MLP(config)
491
+ self.input_layernorm = Qwen2RMSNorm(config.hidden_size, eps=config.rms_norm_eps)
492
+ self.post_attention_layernorm = Qwen2RMSNorm(
493
+ config.hidden_size, eps=config.rms_norm_eps
494
+ )
495
+
496
+ def forward(
497
+ self,
498
+ hidden_states: torch.Tensor,
499
+ attention_mask: Optional[torch.Tensor] = None,
500
+ position_ids: Optional[torch.LongTensor] = None,
501
+ past_key_value: Optional[Tuple[torch.Tensor]] = None,
502
+ output_attentions: Optional[bool] = False,
503
+ use_cache: Optional[bool] = False,
504
+ padding_mask: Optional[torch.LongTensor] = None,
505
+ ) -> Tuple[
506
+ torch.FloatTensor, Optional[Tuple[torch.FloatTensor, torch.FloatTensor]]
507
+ ]:
508
+ """
509
+ Args:
510
+ hidden_states (`torch.FloatTensor`): input to the layer of shape `(batch, seq_len, embed_dim)`
511
+ attention_mask (`torch.FloatTensor`, *optional*): attention mask of size
512
+ `(batch, 1, tgt_len, src_len)` where padding elements are indicated by very large negative values.
513
+ output_attentions (`bool`, *optional*):
514
+ Whether or not to return the attentions tensors of all attention layers. See `attentions` under
515
+ returned tensors for more detail.
516
+ use_cache (`bool`, *optional*):
517
+ If set to `True`, `past_key_values` key value states are returned and can be used to speed up decoding
518
+ (see `past_key_values`).
519
+ past_key_value (`Tuple(torch.FloatTensor)`, *optional*): cached past key and value projection states
520
+ """
521
+
522
+ residual = hidden_states
523
+
524
+ hidden_states = self.input_layernorm(hidden_states)
525
+
526
+ # Self Attention
527
+ hidden_states, self_attn_weights, present_key_value = self.self_attn(
528
+ hidden_states=hidden_states,
529
+ attention_mask=attention_mask,
530
+ position_ids=position_ids,
531
+ past_key_value=past_key_value,
532
+ output_attentions=output_attentions,
533
+ use_cache=use_cache,
534
+ padding_mask=padding_mask,
535
+ )
536
+ hidden_states = residual + hidden_states
537
+
538
+ # Fully Connected
539
+ residual = hidden_states
540
+ hidden_states = self.post_attention_layernorm(hidden_states)
541
+ hidden_states = self.mlp(hidden_states)
542
+ hidden_states = residual + hidden_states
543
+
544
+ outputs = (hidden_states,)
545
+
546
+ if output_attentions:
547
+ outputs += (self_attn_weights,)
548
+
549
+ if use_cache:
550
+ outputs += (present_key_value,)
551
+
552
+ return outputs
553
+
554
+
555
+ class VQAdaptor(nn.Module):
556
+ def __init__(self, config):
557
+ super().__init__()
558
+ self.layers = nn.Sequential(
559
+ nn.Linear(config.kimia_adaptor_input_dim, config.hidden_size, bias=True),
560
+ nn.SiLU(),
561
+ nn.Dropout(0.0),
562
+ nn.Linear(config.hidden_size, config.hidden_size, bias=True),
563
+ nn.LayerNorm(config.hidden_size, eps=config.rms_norm_eps, bias=True),
564
+ )
565
+
566
+ def forward(self, x):
567
+ return self.layers(x)
568
+
569
+
570
+ class EchoChatModel(Qwen2PreTrainedModel):
571
+ """
572
+ Transformer decoder consisting of *config.num_hidden_layers* layers. Each layer is a [`QwenDecoderLayer`]
573
+
574
+ Args:
575
+ config: EchoChatConfig
576
+ """
577
+
578
+ config_class = EchoChatConfig
579
+
580
+ def __init__(self, config: EchoChatConfig):
581
+ super().__init__(config)
582
+ self.padding_idx = config.pad_token_id
583
+ self.vocab_size = config.vocab_size
584
+ self.kimia_mimo_transformer_from_layer_index = (
585
+ config.kimia_mimo_transformer_from_layer_index
586
+ )
587
+
588
+ self.embed_tokens = nn.Embedding(
589
+ config.vocab_size, config.hidden_size, self.padding_idx
590
+ )
591
+ _total = config.num_hidden_layers
592
+ self.layers = nn.ModuleList(
593
+ [MoonshotDecoderLayer(config, layer_idx=i, total_layers=_total)
594
+ for i in range(_total)]
595
+ )
596
+ self.norm = Qwen2RMSNorm(config.hidden_size, eps=config.rms_norm_eps)
597
+
598
+ # extra 1B audio transformers (mimo layers are not used for AAA; use flash always)
599
+ self.mimo_layers = nn.ModuleList(
600
+ [MoonshotDecoderLayer(config, layer_idx=-1, total_layers=_total)
601
+ for _ in range(config.kimia_mimo_layers)]
602
+ )
603
+ self.mimo_norm = Qwen2RMSNorm(config.hidden_size, eps=config.rms_norm_eps)
604
+ self.use_whisper_feature = config.use_whisper_feature
605
+ if self.use_whisper_feature:
606
+ self.vq_adaptor = VQAdaptor(config)
607
+ self.kimia_media_begin = config.kimia_media_begin
608
+ self.kimia_media_end = config.kimia_media_end
609
+
610
+ self.gradient_checkpointing = False
611
+ # Initialize weights and apply final processing
612
+ self.post_init()
613
+
614
+ def get_input_embeddings(self):
615
+ return self.embed_tokens
616
+
617
+ def set_input_embeddings(self, value):
618
+ self.embed_tokens = value
619
+
620
+ # Copied from transformers.models.bart.modeling_bart.BartDecoder._prepare_decoder_attention_mask
621
+ def _prepare_decoder_attention_mask(
622
+ self, attention_mask, input_shape, inputs_embeds, past_key_values_length
623
+ ):
624
+ # create causal mask
625
+ # [bsz, seq_len] -> [bsz, 1, tgt_seq_len, src_seq_len]
626
+ combined_attention_mask = None
627
+ if input_shape[-1] > 1:
628
+ combined_attention_mask = _make_causal_mask(
629
+ input_shape,
630
+ inputs_embeds.dtype,
631
+ device=inputs_embeds.device,
632
+ past_key_values_length=past_key_values_length,
633
+ )
634
+
635
+ if attention_mask is not None:
636
+ # [bsz, seq_len] -> [bsz, 1, tgt_seq_len, src_seq_len]
637
+ expanded_attn_mask = _expand_mask(
638
+ attention_mask, inputs_embeds.dtype, tgt_len=input_shape[-1]
639
+ ).to(inputs_embeds.device)
640
+ combined_attention_mask = (
641
+ expanded_attn_mask
642
+ if combined_attention_mask is None
643
+ else expanded_attn_mask + combined_attention_mask
644
+ )
645
+
646
+ return combined_attention_mask
647
+
648
+ def forward(
649
+ self,
650
+ input_ids: torch.LongTensor = None,
651
+ text_input_ids: torch.LongTensor = None,
652
+ whisper_input_feature: Optional[torch.FloatTensor] = None,
653
+ is_continuous_mask: Optional[torch.Tensor] = None,
654
+ attention_mask: Optional[torch.Tensor] = None,
655
+ position_ids: Optional[torch.LongTensor] = None,
656
+ past_key_values: Optional[List[torch.FloatTensor]] = None,
657
+ inputs_embeds: Optional[torch.FloatTensor] = None,
658
+ use_cache: Optional[bool] = None,
659
+ output_attentions: Optional[bool] = None,
660
+ output_hidden_states: Optional[bool] = None,
661
+ return_dict: Optional[bool] = None,
662
+ ) -> Union[Tuple, BaseModelOutputWithPast]:
663
+ output_attentions = (
664
+ output_attentions
665
+ if output_attentions is not None
666
+ else self.config.output_attentions
667
+ )
668
+ output_hidden_states = (
669
+ output_hidden_states
670
+ if output_hidden_states is not None
671
+ else self.config.output_hidden_states
672
+ )
673
+ use_cache = use_cache if use_cache is not None else self.config.use_cache
674
+
675
+ return_dict = (
676
+ return_dict if return_dict is not None else self.config.use_return_dict
677
+ )
678
+
679
+ # retrieve input_ids and inputs_embeds
680
+ if input_ids is not None and inputs_embeds is not None:
681
+ raise ValueError(
682
+ "You cannot specify both input_ids and inputs_embeds at the same time"
683
+ )
684
+ elif input_ids is not None:
685
+ batch_size, seq_length = input_ids.shape
686
+ elif inputs_embeds is not None:
687
+ batch_size, seq_length, _ = inputs_embeds.shape
688
+ else:
689
+ raise ValueError("You have to specify either input_ids or inputs_embeds")
690
+
691
+ seq_length_with_past = seq_length
692
+ past_key_values_length = 0
693
+
694
+ if past_key_values is not None:
695
+ past_key_values_length = past_key_values[0][0].shape[2]
696
+ seq_length_with_past = seq_length_with_past + past_key_values_length
697
+ if position_ids is None:
698
+ device = input_ids.device if input_ids is not None else inputs_embeds.device
699
+ position_ids = torch.arange(
700
+ past_key_values_length,
701
+ seq_length + past_key_values_length,
702
+ dtype=torch.long,
703
+ device=device,
704
+ )
705
+ position_ids = position_ids.unsqueeze(0)
706
+
707
+ if inputs_embeds is None:
708
+ # shape: batch, seq_len, hidden_size
709
+ input_ids = input_ids.to(torch.cuda.current_device())
710
+ text_input_ids = text_input_ids.to(torch.cuda.current_device())
711
+ audio_emb = self.embed_tokens(input_ids)
712
+ if self.use_whisper_feature and whisper_input_feature is not None:
713
+ if not isinstance(whisper_input_feature, list):
714
+ whisper_input_feature = whisper_input_feature.squeeze(0)
715
+ whisper_input_feature = [whisper_input_feature]
716
+
717
+ media_start_idx = (input_ids == self.kimia_media_begin).nonzero()
718
+ media_end_idx = (input_ids == self.kimia_media_end).nonzero()
719
+ # shape: batch, seq_len, hidden_size
720
+ whisper_input_dim = whisper_input_feature[0].shape[-1]
721
+ whisper_dtype = whisper_input_feature[0].dtype
722
+ expanded_whisper = (
723
+ torch.zeros(audio_emb.shape[1], whisper_input_dim)
724
+ .to(torch.cuda.current_device())
725
+ .to(whisper_dtype)
726
+ )
727
+ assert (media_end_idx - media_start_idx).sum() - media_start_idx.shape[0] == is_continuous_mask.sum()
728
+ for seg_idx, ((batch_idx, start_idx), (_, end_idx)) in enumerate(zip(
729
+ media_start_idx, media_end_idx
730
+ )):
731
+
732
+ feat_len = end_idx - (start_idx + 1)
733
+ whisper_input_feature_i = whisper_input_feature[seg_idx].squeeze(0)
734
+ expanded_whisper[start_idx + 1 : end_idx, :] = (
735
+ whisper_input_feature_i[:feat_len, :]
736
+ )
737
+
738
+ expanded_whisper = expanded_whisper.unsqueeze(0)
739
+ whisper_emb = self.vq_adaptor(
740
+ expanded_whisper.transpose(0, 1)
741
+ ).transpose(0, 1)
742
+ is_continuous_mask = is_continuous_mask.to(torch.cuda.current_device())
743
+ whisper_emb = whisper_emb.to(torch.cuda.current_device())
744
+ whisper_emb = whisper_emb * is_continuous_mask[:, :, None]
745
+
746
+ encoder_input_addwith_discrete_token = (
747
+ audio_emb + whisper_emb
748
+ ) * torch.sqrt(
749
+ torch.tensor(
750
+ 2.0, dtype=whisper_emb.dtype, device=torch.cuda.current_device()
751
+ )
752
+ )
753
+ audio_emb = (
754
+ audio_emb * (~is_continuous_mask[:, :, None])
755
+ + encoder_input_addwith_discrete_token
756
+ * is_continuous_mask[:, :, None]
757
+ )
758
+ if text_input_ids is not None and text_input_ids.sum() != 0:
759
+ inputs_embeds = audio_emb + self.embed_tokens(text_input_ids)
760
+ else:
761
+ inputs_embeds = audio_emb
762
+ # embed positions
763
+ # TODO kill attention_mask for prefill
764
+ padding_mask = attention_mask
765
+
766
+ hidden_states = inputs_embeds
767
+
768
+ # decoder layers
769
+ all_hidden_states = () if output_hidden_states else None
770
+ all_self_attns = () if output_attentions else None
771
+ next_decoder_cache = () if use_cache else None
772
+ for idx, decoder_layer in enumerate(self.layers):
773
+ if output_hidden_states:
774
+ all_hidden_states += (hidden_states,)
775
+
776
+ past_key_value = (
777
+ past_key_values[idx] if past_key_values is not None else None
778
+ )
779
+ layer_outputs = decoder_layer(
780
+ hidden_states,
781
+ attention_mask=attention_mask,
782
+ position_ids=position_ids,
783
+ past_key_value=past_key_value,
784
+ output_attentions=output_attentions,
785
+ use_cache=use_cache,
786
+ padding_mask=padding_mask,
787
+ )
788
+
789
+ hidden_states = layer_outputs[0]
790
+ if idx == self.kimia_mimo_transformer_from_layer_index:
791
+ mimo_hidden_states = hidden_states.clone()
792
+
793
+ if use_cache:
794
+ next_decoder_cache += (layer_outputs[2 if output_attentions else 1],)
795
+
796
+ if output_attentions:
797
+ all_self_attns += (layer_outputs[1],)
798
+
799
+ hidden_states = self.norm(hidden_states)
800
+ if output_hidden_states:
801
+ all_hidden_states += (hidden_states,)
802
+
803
+ # apply audio transformer layers
804
+ for idx, decoder_layer in enumerate(self.mimo_layers):
805
+ if output_hidden_states:
806
+ all_hidden_states += (mimo_hidden_states,)
807
+
808
+ past_key_value = (
809
+ past_key_values[idx + len(self.layers)]
810
+ if past_key_values is not None
811
+ else None
812
+ )
813
+ layer_outputs = decoder_layer(
814
+ mimo_hidden_states,
815
+ attention_mask=attention_mask,
816
+ position_ids=position_ids,
817
+ past_key_value=past_key_value,
818
+ output_attentions=output_attentions,
819
+ use_cache=use_cache,
820
+ padding_mask=padding_mask,
821
+ )
822
+
823
+ mimo_hidden_states = layer_outputs[0]
824
+
825
+ if use_cache:
826
+ next_decoder_cache += (layer_outputs[2 if output_attentions else 1],)
827
+
828
+ mimo_hidden_states = self.mimo_norm(mimo_hidden_states)
829
+
830
+ # add hidden states from the last decoder layer
831
+ if output_hidden_states:
832
+ all_hidden_states += (mimo_hidden_states,)
833
+
834
+ next_cache = next_decoder_cache if use_cache else None
835
+ if not return_dict:
836
+ return tuple(
837
+ v
838
+ for v in [
839
+ hidden_states,
840
+ mimo_hidden_states,
841
+ next_cache,
842
+ all_hidden_states,
843
+ all_hidden_states,
844
+ all_self_attns,
845
+ ]
846
+ if v is not None
847
+ )
848
+ return BaseModelOutputWithPast(
849
+ last_hidden_state=(hidden_states, mimo_hidden_states),
850
+ past_key_values=next_cache,
851
+ hidden_states=all_hidden_states,
852
+ attentions=all_self_attns,
853
+ )
854
+
855
+
856
+ class EchoChatForCausalLM(Qwen2PreTrainedModel):
857
+ _tied_weights_keys = ["lm_head.weight", "mimo_output.weight"]
858
+ config_class = EchoChatConfig
859
+
860
+ def __init__(self, config):
861
+ super().__init__(config)
862
+ self.model = EchoChatModel(config)
863
+ self.vocab_size = config.vocab_size
864
+ self.lm_head = nn.Linear(config.hidden_size, config.vocab_size, bias=False)
865
+ self.mimo_output = nn.Linear(config.hidden_size, config.vocab_size, bias=False)
866
+
867
+ # Initialize weights and apply final processing
868
+ self.post_init()
869
+
870
+ def get_input_embeddings(self):
871
+ return self.model.embed_tokens
872
+
873
+ def set_input_embeddings(self, value):
874
+ self.model.embed_tokens = value
875
+
876
+ def get_output_embeddings(self):
877
+ return self.lm_head
878
+
879
+ def set_output_embeddings(self, new_embeddings):
880
+ self.lm_head = new_embeddings
881
+
882
+ def set_decoder(self, decoder):
883
+ self.model = decoder
884
+
885
+ def get_decoder(self):
886
+ return self.model
887
+
888
+ def forward(
889
+ self,
890
+ input_ids: torch.LongTensor = None,
891
+ text_input_ids: torch.LongTensor = None,
892
+ whisper_input_feature: Optional[torch.FloatTensor] = None,
893
+ is_continuous_mask: Optional[torch.Tensor] = None,
894
+ attention_mask: Optional[torch.Tensor] = None,
895
+ position_ids: Optional[torch.LongTensor] = None,
896
+ past_key_values: Optional[List[torch.FloatTensor]] = None,
897
+ inputs_embeds: Optional[torch.FloatTensor] = None,
898
+ labels: Optional[torch.LongTensor] = None,
899
+ use_cache: Optional[bool] = None,
900
+ output_attentions: Optional[bool] = None,
901
+ output_hidden_states: Optional[bool] = None,
902
+ generation_mode: Optional[bool] = None,
903
+ return_dict: Optional[bool] = None,
904
+ ) -> Union[Tuple, CausalLMOutputWithPast]:
905
+
906
+ output_attentions = (
907
+ output_attentions
908
+ if output_attentions is not None
909
+ else self.config.output_attentions
910
+ )
911
+ output_hidden_states = (
912
+ output_hidden_states
913
+ if output_hidden_states is not None
914
+ else self.config.output_hidden_states
915
+ )
916
+ return_dict = (
917
+ return_dict if return_dict is not None else self.config.use_return_dict
918
+ )
919
+
920
+ # decoder outputs consists of (dec_features, layer_state, dec_hidden, dec_attn)
921
+ outputs = self.model(
922
+ input_ids=input_ids,
923
+ text_input_ids=text_input_ids,
924
+ whisper_input_feature=whisper_input_feature,
925
+ is_continuous_mask=is_continuous_mask,
926
+ attention_mask=attention_mask,
927
+ position_ids=position_ids,
928
+ past_key_values=past_key_values,
929
+ inputs_embeds=inputs_embeds,
930
+ use_cache=use_cache,
931
+ output_attentions=output_attentions,
932
+ output_hidden_states=output_hidden_states,
933
+ return_dict=return_dict,
934
+ )
935
+ if return_dict:
936
+ hidden_states, mimo_hidden_states = (
937
+ outputs.last_hidden_state[0],
938
+ outputs.last_hidden_state[1],
939
+ )
940
+ else:
941
+ hidden_states, mimo_hidden_states = outputs[0], outputs[1]
942
+
943
+ text_logits = self.lm_head(hidden_states)
944
+ audio_logits = self.mimo_output(mimo_hidden_states)
945
+
946
+ if not return_dict:
947
+ output = (audio_logits, text_logits) + outputs[2:]
948
+ return output
949
+ return CausalLMOutputWithPast(
950
+ loss=None,
951
+ logits=(audio_logits, text_logits),
952
+ past_key_values=outputs.past_key_values,
953
+ hidden_states=outputs.hidden_states,
954
+ attentions=outputs.attentions,
955
+ )
special_tokens_map.json ADDED
@@ -0,0 +1,425 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_msg_end|>",
4
+ "<|im_user_msg_start|>",
5
+ "<|im_assistant_msg_start|>",
6
+ "<|reserved_token_0|>",
7
+ "<|reserved_token_1|>",
8
+ "<|reserved_token_2|>",
9
+ "<|reserved_token_3|>",
10
+ "[EOT]",
11
+ "<|reserved_token_4|>",
12
+ "<|reserved_token_5|>",
13
+ "<|reserved_token_6|>",
14
+ "<|reserved_token_7|>",
15
+ "<|reserved_token_8|>",
16
+ "<|reserved_token_9|>",
17
+ "<|reserved_token_10|>",
18
+ "<|reserved_token_11|>",
19
+ "<|im_media_begin|>",
20
+ "<|reserved_token_12|>",
21
+ "<|im_media_end|>",
22
+ "<|reserved_token_13|>",
23
+ "<|reserved_token_14|>",
24
+ "<|im_kimia_text_blank|>",
25
+ "<|im_kimia_text_eos|>",
26
+ "<|reserved_token_15|>",
27
+ "<|reserved_token_16|>",
28
+ "<|im_kimia_user_msg_start|>",
29
+ "<|im_kimia_assistant_msg_start|>",
30
+ "<|reserved_token_17|>",
31
+ "<|reserved_token_18|>",
32
+ "<|reserved_token_19|>",
33
+ "<|im_kimia_speech_ct_id|>",
34
+ "<|im_kimia_speech_ctd_id|>",
35
+ "<|reserved_token_20|>",
36
+ "<|reserved_token_21|>",
37
+ "<|reserved_token_22|>",
38
+ "<|reserved_token_23|>",
39
+ "<|reserved_token_24|>",
40
+ "<|reserved_token_25|>",
41
+ "<|reserved_token_26|>",
42
+ "<|reserved_token_27|>",
43
+ "<|reserved_token_28|>",
44
+ "<|reserved_token_29|>",
45
+ "<|reserved_token_30|>",
46
+ "<|reserved_token_31|>",
47
+ "<|reserved_token_32|>",
48
+ "<|reserved_token_33|>",
49
+ "<|reserved_token_34|>",
50
+ "<|reserved_token_35|>",
51
+ "<|reserved_token_36|>",
52
+ "<|reserved_token_37|>",
53
+ "<|reserved_token_38|>",
54
+ "<|reserved_token_39|>",
55
+ "<|reserved_token_40|>",
56
+ "<|reserved_token_41|>",
57
+ "<|reserved_token_42|>",
58
+ "<|reserved_token_43|>",
59
+ "<|reserved_token_44|>",
60
+ "<|reserved_token_45|>",
61
+ "<|reserved_token_46|>",
62
+ "<|reserved_token_47|>",
63
+ "<|reserved_token_48|>",
64
+ "<|reserved_token_49|>",
65
+ "<|reserved_token_50|>",
66
+ "<|reserved_token_51|>",
67
+ "<|reserved_token_52|>",
68
+ "<|reserved_token_53|>",
69
+ "<|reserved_token_54|>",
70
+ "<|reserved_token_55|>",
71
+ "<|reserved_token_56|>",
72
+ "<|reserved_token_57|>",
73
+ "<|reserved_token_58|>",
74
+ "<|reserved_token_59|>",
75
+ "<|reserved_token_60|>",
76
+ "<|reserved_token_61|>",
77
+ "<|reserved_token_62|>",
78
+ "<|reserved_token_63|>",
79
+ "<|reserved_token_64|>",
80
+ "<|reserved_token_65|>",
81
+ "<|reserved_token_66|>",
82
+ "<|reserved_token_67|>",
83
+ "<|reserved_token_68|>",
84
+ "<|reserved_token_69|>",
85
+ "<|reserved_token_70|>",
86
+ "<|reserved_token_71|>",
87
+ "<|reserved_token_72|>",
88
+ "<|reserved_token_73|>",
89
+ "<|reserved_token_74|>",
90
+ "<|reserved_token_75|>",
91
+ "<|reserved_token_76|>",
92
+ "<|reserved_token_77|>",
93
+ "<|reserved_token_78|>",
94
+ "<|reserved_token_79|>",
95
+ "<|reserved_token_80|>",
96
+ "<|reserved_token_81|>",
97
+ "<|reserved_token_82|>",
98
+ "<|reserved_token_83|>",
99
+ "<|reserved_token_84|>",
100
+ "<|reserved_token_85|>",
101
+ "<|reserved_token_86|>",
102
+ "<|reserved_token_87|>",
103
+ "<|reserved_token_88|>",
104
+ "<|reserved_token_89|>",
105
+ "<|reserved_token_90|>",
106
+ "<|reserved_token_91|>",
107
+ "<|reserved_token_92|>",
108
+ "<|reserved_token_93|>",
109
+ "<|reserved_token_94|>",
110
+ "<|reserved_token_95|>",
111
+ "<|reserved_token_96|>",
112
+ "<|reserved_token_97|>",
113
+ "<|reserved_token_98|>",
114
+ "<|reserved_token_99|>",
115
+ "<|reserved_token_100|>",
116
+ "<|reserved_token_101|>",
117
+ "<|reserved_token_102|>",
118
+ "<|reserved_token_103|>",
119
+ "<|reserved_token_104|>",
120
+ "<|reserved_token_105|>",
121
+ "<|reserved_token_106|>",
122
+ "<|reserved_token_107|>",
123
+ "<|reserved_token_108|>",
124
+ "<|reserved_token_109|>",
125
+ "<|reserved_token_110|>",
126
+ "<|reserved_token_111|>",
127
+ "<|reserved_token_112|>",
128
+ "<|reserved_token_113|>",
129
+ "<|reserved_token_114|>",
130
+ "<|reserved_token_115|>",
131
+ "<|reserved_token_116|>",
132
+ "<|reserved_token_117|>",
133
+ "<|reserved_token_118|>",
134
+ "<|reserved_token_119|>",
135
+ "<|reserved_token_120|>",
136
+ "<|reserved_token_121|>",
137
+ "<|reserved_token_122|>",
138
+ "<|reserved_token_123|>",
139
+ "<|reserved_token_124|>",
140
+ "<|reserved_token_125|>",
141
+ "<|reserved_token_126|>",
142
+ "<|reserved_token_127|>",
143
+ "<|reserved_token_128|>",
144
+ "<|reserved_token_129|>",
145
+ "<|reserved_token_130|>",
146
+ "<|reserved_token_131|>",
147
+ "<|reserved_token_132|>",
148
+ "<|reserved_token_133|>",
149
+ "<|reserved_token_134|>",
150
+ "<|reserved_token_135|>",
151
+ "<|reserved_token_136|>",
152
+ "<|reserved_token_137|>",
153
+ "<|reserved_token_138|>",
154
+ "<|reserved_token_139|>",
155
+ "<|reserved_token_140|>",
156
+ "<|reserved_token_141|>",
157
+ "<|reserved_token_142|>",
158
+ "<|reserved_token_143|>",
159
+ "<|reserved_token_144|>",
160
+ "<|reserved_token_145|>",
161
+ "<|reserved_token_146|>",
162
+ "<|reserved_token_147|>",
163
+ "<|reserved_token_148|>",
164
+ "<|reserved_token_149|>",
165
+ "<|reserved_token_150|>",
166
+ "<|reserved_token_151|>",
167
+ "<|reserved_token_152|>",
168
+ "<|reserved_token_153|>",
169
+ "<|reserved_token_154|>",
170
+ "<|reserved_token_155|>",
171
+ "<|reserved_token_156|>",
172
+ "<|reserved_token_157|>",
173
+ "<|reserved_token_158|>",
174
+ "<|reserved_token_159|>",
175
+ "<|reserved_token_160|>",
176
+ "<|reserved_token_161|>",
177
+ "<|reserved_token_162|>",
178
+ "<|reserved_token_163|>",
179
+ "<|reserved_token_164|>",
180
+ "<|reserved_token_165|>",
181
+ "<|reserved_token_166|>",
182
+ "<|reserved_token_167|>",
183
+ "<|reserved_token_168|>",
184
+ "<|reserved_token_169|>",
185
+ "<|reserved_token_170|>",
186
+ "<|reserved_token_171|>",
187
+ "<|reserved_token_172|>",
188
+ "<|reserved_token_173|>",
189
+ "<|reserved_token_174|>",
190
+ "<|reserved_token_175|>",
191
+ "<|reserved_token_176|>",
192
+ "<|reserved_token_177|>",
193
+ "<|reserved_token_178|>",
194
+ "<|reserved_token_179|>",
195
+ "<|reserved_token_180|>",
196
+ "<|reserved_token_181|>",
197
+ "<|reserved_token_182|>",
198
+ "<|reserved_token_183|>",
199
+ "<|reserved_token_184|>",
200
+ "<|reserved_token_185|>",
201
+ "<|reserved_token_186|>",
202
+ "<|reserved_token_187|>",
203
+ "<|reserved_token_188|>",
204
+ "<|reserved_token_189|>",
205
+ "<|reserved_token_190|>",
206
+ "<|reserved_token_191|>",
207
+ "<|reserved_token_192|>",
208
+ "<|reserved_token_193|>",
209
+ "<|reserved_token_194|>",
210
+ "<|reserved_token_195|>",
211
+ "<|reserved_token_196|>",
212
+ "<|reserved_token_197|>",
213
+ "<|reserved_token_198|>",
214
+ "<|reserved_token_199|>",
215
+ "<|reserved_token_200|>",
216
+ "<|reserved_token_201|>",
217
+ "<|reserved_token_202|>",
218
+ "<|reserved_token_203|>",
219
+ "<|reserved_token_204|>",
220
+ "<|reserved_token_205|>",
221
+ "<|reserved_token_206|>",
222
+ "<|reserved_token_207|>",
223
+ "<|reserved_token_208|>",
224
+ "<|reserved_token_209|>",
225
+ "<|reserved_token_210|>",
226
+ "<|reserved_token_211|>",
227
+ "<|reserved_token_212|>",
228
+ "<|reserved_token_213|>",
229
+ "<|reserved_token_214|>",
230
+ "<|reserved_token_215|>",
231
+ "<|reserved_token_216|>",
232
+ "<|reserved_token_217|>",
233
+ "<|reserved_token_218|>",
234
+ "<|reserved_token_219|>",
235
+ "<|reserved_token_220|>",
236
+ "<|reserved_token_221|>",
237
+ "<|reserved_token_222|>",
238
+ "<|reserved_token_223|>",
239
+ "<|reserved_token_224|>",
240
+ "<|reserved_token_225|>",
241
+ "<|reserved_token_226|>",
242
+ "<|reserved_token_227|>",
243
+ "<|reserved_token_228|>",
244
+ "<|reserved_token_229|>",
245
+ "<|reserved_token_230|>",
246
+ "<|reserved_token_231|>",
247
+ "<|reserved_token_232|>",
248
+ "<|reserved_token_233|>",
249
+ "<|reserved_token_234|>",
250
+ "<|reserved_token_235|>",
251
+ "<|reserved_token_236|>",
252
+ "<|reserved_token_237|>",
253
+ "<|reserved_token_238|>",
254
+ "<|reserved_token_239|>",
255
+ "<|reserved_token_240|>",
256
+ "<|reserved_token_241|>",
257
+ "<|reserved_token_242|>",
258
+ "<|reserved_token_243|>",
259
+ "<|reserved_token_244|>",
260
+ "<|reserved_token_245|>",
261
+ "<|reserved_token_246|>",
262
+ "<|reserved_token_247|>",
263
+ "<|reserved_token_248|>",
264
+ "<|reserved_token_249|>",
265
+ "<|reserved_token_250|>",
266
+ "<|reserved_token_251|>",
267
+ "<|reserved_token_252|>",
268
+ "<|reserved_token_253|>",
269
+ "<|reserved_token_254|>",
270
+ "<|reserved_token_255|>",
271
+ "<|reserved_token_256|>",
272
+ "<|reserved_token_257|>",
273
+ "<|reserved_token_258|>",
274
+ "<|reserved_token_259|>",
275
+ "<|reserved_token_260|>",
276
+ "<|reserved_token_261|>",
277
+ "<|reserved_token_262|>",
278
+ "<|reserved_token_263|>",
279
+ "<|reserved_token_264|>",
280
+ "<|reserved_token_265|>",
281
+ "<|reserved_token_266|>",
282
+ "<|reserved_token_267|>",
283
+ "<|reserved_token_268|>",
284
+ "<|reserved_token_269|>",
285
+ "<|reserved_token_270|>",
286
+ "<|reserved_token_271|>",
287
+ "<|reserved_token_272|>",
288
+ "<|reserved_token_273|>",
289
+ "<|reserved_token_274|>",
290
+ "<|reserved_token_275|>",
291
+ "<|reserved_token_276|>",
292
+ "<|reserved_token_277|>",
293
+ "<|reserved_token_278|>",
294
+ "<|reserved_token_279|>",
295
+ "<|reserved_token_280|>",
296
+ "<|reserved_token_281|>",
297
+ "<|reserved_token_282|>",
298
+ "<|reserved_token_283|>",
299
+ "<|reserved_token_284|>",
300
+ "<|reserved_token_285|>",
301
+ "<|reserved_token_286|>",
302
+ "<|reserved_token_287|>",
303
+ "<|reserved_token_288|>",
304
+ "<|reserved_token_289|>",
305
+ "<|reserved_token_290|>",
306
+ "<|reserved_token_291|>",
307
+ "<|reserved_token_292|>",
308
+ "<|reserved_token_293|>",
309
+ "<|reserved_token_294|>",
310
+ "<|reserved_token_295|>",
311
+ "<|reserved_token_296|>",
312
+ "<|reserved_token_297|>",
313
+ "<|reserved_token_298|>",
314
+ "<|reserved_token_299|>",
315
+ "<|reserved_token_300|>",
316
+ "<|reserved_token_301|>",
317
+ "<|reserved_token_302|>",
318
+ "<|reserved_token_303|>",
319
+ "<|reserved_token_304|>",
320
+ "<|reserved_token_305|>",
321
+ "<|reserved_token_306|>",
322
+ "<|reserved_token_307|>",
323
+ "<|reserved_token_308|>",
324
+ "<|reserved_token_309|>",
325
+ "<|reserved_token_310|>",
326
+ "<|reserved_token_311|>",
327
+ "<|reserved_token_312|>",
328
+ "<|reserved_token_313|>",
329
+ "<|reserved_token_314|>",
330
+ "<|reserved_token_315|>",
331
+ "<|reserved_token_316|>",
332
+ "<|reserved_token_317|>",
333
+ "<|reserved_token_318|>",
334
+ "<|reserved_token_319|>",
335
+ "<|reserved_token_320|>",
336
+ "<|reserved_token_321|>",
337
+ "<|reserved_token_322|>",
338
+ "<|reserved_token_323|>",
339
+ "<|reserved_token_324|>",
340
+ "<|reserved_token_325|>",
341
+ "<|reserved_token_326|>",
342
+ "<|reserved_token_327|>",
343
+ "<|reserved_token_328|>",
344
+ "<|reserved_token_329|>",
345
+ "<|reserved_token_330|>",
346
+ "<|reserved_token_331|>",
347
+ "<|reserved_token_332|>",
348
+ "<|reserved_token_333|>",
349
+ "<|reserved_token_334|>",
350
+ "<|reserved_token_335|>",
351
+ "<|reserved_token_336|>",
352
+ "<|reserved_token_337|>",
353
+ "<|reserved_token_338|>",
354
+ "<|reserved_token_339|>",
355
+ "<|reserved_token_340|>",
356
+ "<|reserved_token_341|>",
357
+ "<|reserved_token_342|>",
358
+ "<|reserved_token_343|>",
359
+ "<|reserved_token_344|>",
360
+ "<|reserved_token_345|>",
361
+ "<|reserved_token_346|>",
362
+ "<|reserved_token_347|>",
363
+ "<|reserved_token_348|>",
364
+ "<|reserved_token_349|>",
365
+ "<|reserved_token_350|>",
366
+ "<|reserved_token_351|>",
367
+ "<|reserved_token_352|>",
368
+ "<|reserved_token_353|>",
369
+ "<|reserved_token_354|>",
370
+ "<|reserved_token_355|>",
371
+ "<|reserved_token_356|>",
372
+ "<|reserved_token_357|>",
373
+ "<|reserved_token_358|>",
374
+ "<|reserved_token_359|>",
375
+ "<|reserved_token_360|>",
376
+ "<|reserved_token_361|>",
377
+ "<|reserved_token_362|>",
378
+ "<|reserved_token_363|>",
379
+ "<|reserved_token_364|>",
380
+ "<|reserved_token_365|>",
381
+ "<|reserved_token_366|>",
382
+ "<|reserved_token_367|>",
383
+ "<|reserved_token_368|>",
384
+ "<|reserved_token_369|>",
385
+ "<|reserved_token_370|>",
386
+ "<|reserved_token_371|>",
387
+ "<|reserved_token_372|>",
388
+ "<|reserved_token_373|>",
389
+ "<|reserved_token_374|>",
390
+ "<|reserved_token_375|>",
391
+ "<|reserved_token_376|>",
392
+ "<|reserved_token_377|>",
393
+ "<|reserved_token_378|>",
394
+ "<|reserved_token_379|>",
395
+ "<|reserved_token_380|>",
396
+ "<|reserved_token_381|>",
397
+ "<|reserved_token_382|>",
398
+ "<|reserved_token_383|>",
399
+ "<|reserved_token_384|>",
400
+ "<|reserved_token_385|>",
401
+ "<|reserved_token_386|>",
402
+ "<|reserved_token_387|>",
403
+ "<|reserved_token_388|>",
404
+ "<|reserved_token_389|>",
405
+ "<|reserved_token_390|>",
406
+ "<|reserved_token_391|>",
407
+ "<|reserved_token_392|>",
408
+ "<|reserved_token_393|>",
409
+ "<|reserved_token_394|>",
410
+ "<|reserved_token_395|>",
411
+ "<|reserved_token_396|>",
412
+ "<|reserved_token_397|>",
413
+ "<|reserved_token_398|>",
414
+ "<|reserved_token_399|>",
415
+ "<|reserved_token_400|>",
416
+ "<|reserved_token_401|>",
417
+ "<|reserved_token_402|>",
418
+ "<|reserved_token_403|>",
419
+ "<|reserved_token_404|>"
420
+ ],
421
+ "bos_token": "[BOS]",
422
+ "eos_token": "[EOS]",
423
+ "pad_token": "<|reserved_token_406|>",
424
+ "unk_token": "<|reserved_token_405|>"
425
+ }
tiktoken.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b2b1b8dfb5cc5f024bafc373121c6aba3f66f9a5a0269e243470a1de16a33186
3
+ size 2561218
tokenization_echochat.py ADDED
@@ -0,0 +1,336 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Modified for EchoChat distribution: renamed public entry points; computation unchanged.
2
+ # Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
3
+
4
+ """Megatron tokenizers."""
5
+ from transformers.tokenization_utils import PreTrainedTokenizer
6
+ from typing import Union
7
+ from typing import (
8
+ AbstractSet,
9
+ cast,
10
+ Collection,
11
+ Dict,
12
+ Iterator,
13
+ List,
14
+ Literal,
15
+ Sequence,
16
+ Union,
17
+ Optional,
18
+ )
19
+ from tiktoken.load import load_tiktoken_bpe
20
+ import tiktoken
21
+ from pathlib import Path
22
+ import os
23
+ import logging
24
+ from tokenizers import AddedToken
25
+
26
+ logger = logging.getLogger(__name__)
27
+ VOCAB_FILES_NAMES = {"vocab_file": "tiktoken.model"}
28
+
29
+
30
+ class TikTokenTokenizer(PreTrainedTokenizer):
31
+ """
32
+ Tokenizing and encoding/decoding text using the Tiktoken tokenizer.
33
+ """
34
+
35
+ special_tokens: Dict[str, int]
36
+
37
+ num_reserved_special_tokens = 293 + 128
38
+
39
+ pat_str = "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?\\p{L}+|\\p{N}| ?[^\\s\\p{L}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+"
40
+
41
+ vocab_files_names = VOCAB_FILES_NAMES
42
+
43
+ def __init__(
44
+ self,
45
+ vocab_file,
46
+ bos_token: Union[str, AddedToken] = "[BOS]",
47
+ eos_token: Union[str, AddedToken] = "[EOS]",
48
+ unk_token: Union[str, AddedToken] = "[UNK]",
49
+ pad_token: Union[str, AddedToken] = "[PAD]",
50
+ additional_special_tokens: Optional[List[str]] = None,
51
+ added_tokens_decoder: Optional[dict] = None,
52
+ **kwargs,
53
+ ):
54
+ """
55
+ Initializes the Tokenizer with a Tiktoken model.
56
+
57
+ Args:
58
+ model_path (str): The path to the Tiktoken model file.
59
+ """
60
+ assert os.path.isfile(vocab_file), vocab_file
61
+
62
+ mergeable_ranks = load_tiktoken_bpe(vocab_file)
63
+ num_base_tokens = len(mergeable_ranks)
64
+
65
+ used_special_tokens = [
66
+ "[BOS]",
67
+ "[EOS]",
68
+ "<|im_msg_end|>", # 0
69
+ "<|im_user_msg_start|>", # 1
70
+ "<|im_assistant_msg_start|>", # 2
71
+ "<|reserved_token_0|>", # 3
72
+ "<|reserved_token_1|>",
73
+ "<|reserved_token_2|>",
74
+ "<|reserved_token_3|>", # 4
75
+ "[EOT]",
76
+ "<|reserved_token_4|>", # 5
77
+ "<|reserved_token_5|>", # 6
78
+ "<|reserved_token_6|>", # 7
79
+ "<|reserved_token_7|>", # 8
80
+ "<|reserved_token_8|>", # 9
81
+ "<|reserved_token_9|>", # 10
82
+ "<|reserved_token_10|>", # 11
83
+ "<|reserved_token_11|>", # 12
84
+ "<|im_media_begin|>", # 13
85
+ "<|reserved_token_12|>", # 14
86
+ "<|im_media_end|>", # 15
87
+ "<|reserved_token_13|>", # 16
88
+ "<|reserved_token_14|>", # 17
89
+ "<|im_kimia_text_blank|>", # 18
90
+ "<|im_kimia_text_eos|>", # 19
91
+ "<|reserved_token_15|>", # 20
92
+ "<|reserved_token_16|>", # 21
93
+ "<|im_kimia_user_msg_start|>", # 22
94
+ "<|im_kimia_assistant_msg_start|>", # 23
95
+ "<|reserved_token_17|>", # 24
96
+ "<|reserved_token_18|>", # 25
97
+ "<|reserved_token_19|>", # 26
98
+ "<|im_kimia_speech_ct_id|>", # 27
99
+ "<|im_kimia_speech_ctd_id|>", # 28
100
+ ]
101
+ autoset_special_tokens = [
102
+ f"<|reserved_token_{i}|>"
103
+ for i in range(
104
+ 20, self.num_reserved_special_tokens - len(used_special_tokens) + 20
105
+ )
106
+ ]
107
+ special_tokens = used_special_tokens + autoset_special_tokens
108
+ self.special_tokens = {
109
+ token: num_base_tokens + i for i, token in enumerate(special_tokens)
110
+ }
111
+ self.model = tiktoken.Encoding(
112
+ name=Path(vocab_file).name,
113
+ pat_str=self.pat_str,
114
+ mergeable_ranks=mergeable_ranks,
115
+ special_tokens=self.special_tokens,
116
+ )
117
+ logger.info(f"Reloaded tiktoken model from {vocab_file}")
118
+
119
+ self.n_words: int = self.model.n_vocab
120
+ # BOS / EOS token IDs
121
+ self.bos_token = "[BOS]"
122
+ self.bos_id: int = self.special_tokens["[BOS]"]
123
+ self.eos_token = "[EOS]"
124
+ self.eos_id: int = self.special_tokens["[EOS]"]
125
+
126
+ # use last speical token as pad token, the last - 1 is unk_token
127
+ self.pad_token: str = special_tokens[-1]
128
+ self.pad_id: int = self.special_tokens[self.pad_token]
129
+
130
+ self.unk_token: str = special_tokens[-2]
131
+ self.unk_id: int = self.special_tokens[self.pad_token]
132
+
133
+ self.stop_tokens = {
134
+ self.special_tokens["[EOS]"],
135
+ self.special_tokens["[EOT]"],
136
+ }
137
+
138
+ logger.info(
139
+ f"#words: {self.n_words} - BOS ID: {self.bos_id} - EOS ID: {self.eos_id}"
140
+ )
141
+
142
+ def encode(
143
+ self,
144
+ s: str,
145
+ *,
146
+ bos: bool,
147
+ eos: bool,
148
+ allowed_special: Union[Literal["all"], AbstractSet[str]] = set(),
149
+ disallowed_special: Union[Literal["all"], Collection[str]] = (),
150
+ ) -> List[int]:
151
+ """
152
+ Encodes a string into a list of token IDs.
153
+
154
+ Args:
155
+ s (str): The input string to be encoded.
156
+ bos (bool): Whether to prepend the beginning-of-sequence token.
157
+ eos (bool): Whether to append the end-of-sequence token.
158
+ allowed_tokens ("all"|set[str]): allowed special tokens in string
159
+ disallowed_tokens ("all"|set[str]): special tokens that raise an error when in string
160
+
161
+ Returns:
162
+ list[int]: A list of token IDs.
163
+
164
+ By default, setting disallowed_special=() encodes a string by ignoring
165
+ special tokens. Specifically:
166
+ - Setting `disallowed_special` to () will cause all text corresponding
167
+ to special tokens to be encoded as natural text (insteading of raising
168
+ an error).
169
+ - Setting `allowed_special` to "all" will treat all text corresponding
170
+ to special tokens to be encoded as special tokens.
171
+ """
172
+ assert type(s) is str
173
+
174
+ # The tiktoken tokenizer can handle <=400k chars without
175
+ # pyo3_runtime.PanicException.
176
+ TIKTOKEN_MAX_ENCODE_CHARS = 400_000
177
+
178
+ # https://github.com/openai/tiktoken/issues/195
179
+ # Here we iterate over subsequences and split if we exceed the limit
180
+ # of max consecutive non-whitespace or whitespace characters.
181
+ MAX_NO_WHITESPACES_CHARS = 25_000
182
+
183
+ substrs = (
184
+ substr
185
+ for i in range(0, len(s), TIKTOKEN_MAX_ENCODE_CHARS)
186
+ for substr in self._split_whitespaces_or_nonwhitespaces(
187
+ s[i : i + TIKTOKEN_MAX_ENCODE_CHARS], MAX_NO_WHITESPACES_CHARS
188
+ )
189
+ )
190
+ t: List[int] = []
191
+ for substr in substrs:
192
+ t.extend(
193
+ self.model.encode(
194
+ substr,
195
+ allowed_special=allowed_special,
196
+ disallowed_special=disallowed_special,
197
+ )
198
+ )
199
+ if bos:
200
+ t.insert(0, self.bos_id)
201
+ if eos:
202
+ t.append(self.eos_id)
203
+ return t
204
+
205
+ def decode(self, t: Sequence[int]) -> str:
206
+ """
207
+ Decodes a list of token IDs into a string.
208
+
209
+ Args:
210
+ t (List[int]): The list of token IDs to be decoded.
211
+
212
+ Returns:
213
+ str: The decoded string.
214
+ """
215
+ # Typecast is safe here. Tiktoken doesn't do anything list-related with the sequence.
216
+ return self.model.decode(cast(List[int], t))
217
+
218
+ @staticmethod
219
+ def _split_whitespaces_or_nonwhitespaces(
220
+ s: str, max_consecutive_slice_len: int
221
+ ) -> Iterator[str]:
222
+ """
223
+ Splits the string `s` so that each substring contains no more than `max_consecutive_slice_len`
224
+ consecutive whitespaces or consecutive non-whitespaces.
225
+ """
226
+ current_slice_len = 0
227
+ current_slice_is_space = s[0].isspace() if len(s) > 0 else False
228
+ slice_start = 0
229
+
230
+ for i in range(len(s)):
231
+ is_now_space = s[i].isspace()
232
+
233
+ if current_slice_is_space ^ is_now_space:
234
+ current_slice_len = 1
235
+ current_slice_is_space = is_now_space
236
+ else:
237
+ current_slice_len += 1
238
+ if current_slice_len > max_consecutive_slice_len:
239
+ yield s[slice_start:i]
240
+ slice_start = i
241
+ current_slice_len = 1
242
+ yield s[slice_start:]
243
+
244
+ """ ----- Below are the abstract methods required by megatron ----- """
245
+
246
+ @property
247
+ def vocab_size(self):
248
+ return self.n_words
249
+
250
+ @property
251
+ def vocab(self):
252
+ if hasattr(self, "str_vocab"):
253
+ return self.str_vocab
254
+ self.str_vocab = {}
255
+
256
+ # convert mergeable_ranks from bytes to string
257
+ utf8_num, unicode_num = 0, 0
258
+ for byte_key, index in self.model._mergeable_ranks.items():
259
+ try:
260
+ str_key = byte_key.decode("utf-8")
261
+ utf8_num += 1
262
+ except UnicodeDecodeError:
263
+ # use backslashreplace so we can get num vocab different tokens
264
+ # see: https://docs.python.org/3/howto/unicode.html
265
+ # this vocab is only used for offline processing, so this is fine
266
+ str_key = byte_key.decode("utf-8", "backslashreplace") + "_unicode_"
267
+ unicode_num += 1
268
+
269
+ self.str_vocab[str_key] = index
270
+ logger.info(f"num utf8: {utf8_num}, num unicode: {unicode_num}")
271
+
272
+ # add all special tokens to the dictionary
273
+ self.str_vocab.update(self.model._special_tokens)
274
+
275
+ assert len(self.str_vocab) == self.vocab_size
276
+ return self.str_vocab
277
+
278
+ @property
279
+ def inv_vocab(self):
280
+ return {v: k for k, v in self.vocab.items()}
281
+
282
+ def tokenize(self, text, eos=True):
283
+ # BOS: always add bos token
284
+ # EOS:
285
+ # Most cases should be true when we are tokenizing a full sequence
286
+ # Only setting to false when we are running a inference
287
+ return self.encode(text, bos=True, eos=eos)
288
+
289
+ def detokenize(self, tokens):
290
+ # convert tensor to list if needed...
291
+ if not isinstance(tokens, list):
292
+ tokens = tokens.tolist()
293
+ return self.decode(tokens)
294
+
295
+ @property
296
+ def eod(self):
297
+ return self.eos_id
298
+
299
+ def bod(self):
300
+ return self.bos_id
301
+
302
+ @property
303
+ def msk_start_id(self):
304
+ return self.msk_start
305
+
306
+ @property
307
+ def msk_end_id(self):
308
+ return self.msk_end
309
+
310
+ def _get_index_2_bytes(self):
311
+ if hasattr(self, "index_2_bytes"):
312
+ return self.index_2_bytes
313
+
314
+ # use array rather than dict for faster access
315
+ self.index_2_bytes = [0] * self.model.n_vocab
316
+ for byte_key, index in self.model._mergeable_ranks.items():
317
+ self.index_2_bytes[index] = len(byte_key)
318
+
319
+ for _, index in self.model._special_tokens.items():
320
+ # in total we have 256 special tokens, 2^8 = 256
321
+ # so the num of bytes of each token is only 1
322
+ self.index_2_bytes[index] = 1
323
+
324
+ return self.index_2_bytes
325
+
326
+ def get_array_bytes(self, array):
327
+ index_2_bytes = self._get_index_2_bytes()
328
+ return sum(index_2_bytes[i] for i in array)
329
+
330
+ @property
331
+ def eos_token_id(self):
332
+ return self.eos_id
333
+
334
+ @property
335
+ def pad_token_id(self):
336
+ return self.pad_id
tokenizer_config.json ADDED
@@ -0,0 +1,3805 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "151643": {
4
+ "content": "[BOS]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "151644": {
12
+ "content": "[EOS]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "151645": {
20
+ "content": "<|im_msg_end|>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "151646": {
28
+ "content": "<|im_user_msg_start|>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "151647": {
36
+ "content": "<|im_assistant_msg_start|>",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ },
43
+ "151648": {
44
+ "content": "<|reserved_token_0|>",
45
+ "lstrip": false,
46
+ "normalized": false,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": true
50
+ },
51
+ "151649": {
52
+ "content": "<|reserved_token_1|>",
53
+ "lstrip": false,
54
+ "normalized": false,
55
+ "rstrip": false,
56
+ "single_word": false,
57
+ "special": true
58
+ },
59
+ "151650": {
60
+ "content": "<|reserved_token_2|>",
61
+ "lstrip": false,
62
+ "normalized": false,
63
+ "rstrip": false,
64
+ "single_word": false,
65
+ "special": true
66
+ },
67
+ "151651": {
68
+ "content": "<|reserved_token_3|>",
69
+ "lstrip": false,
70
+ "normalized": false,
71
+ "rstrip": false,
72
+ "single_word": false,
73
+ "special": true
74
+ },
75
+ "151652": {
76
+ "content": "[EOT]",
77
+ "lstrip": false,
78
+ "normalized": false,
79
+ "rstrip": false,
80
+ "single_word": false,
81
+ "special": true
82
+ },
83
+ "151653": {
84
+ "content": "<|reserved_token_4|>",
85
+ "lstrip": false,
86
+ "normalized": false,
87
+ "rstrip": false,
88
+ "single_word": false,
89
+ "special": true
90
+ },
91
+ "151654": {
92
+ "content": "<|reserved_token_5|>",
93
+ "lstrip": false,
94
+ "normalized": false,
95
+ "rstrip": false,
96
+ "single_word": false,
97
+ "special": true
98
+ },
99
+ "151655": {
100
+ "content": "<|reserved_token_6|>",
101
+ "lstrip": false,
102
+ "normalized": false,
103
+ "rstrip": false,
104
+ "single_word": false,
105
+ "special": true
106
+ },
107
+ "151656": {
108
+ "content": "<|reserved_token_7|>",
109
+ "lstrip": false,
110
+ "normalized": false,
111
+ "rstrip": false,
112
+ "single_word": false,
113
+ "special": true
114
+ },
115
+ "151657": {
116
+ "content": "<|reserved_token_8|>",
117
+ "lstrip": false,
118
+ "normalized": false,
119
+ "rstrip": false,
120
+ "single_word": false,
121
+ "special": true
122
+ },
123
+ "151658": {
124
+ "content": "<|reserved_token_9|>",
125
+ "lstrip": false,
126
+ "normalized": false,
127
+ "rstrip": false,
128
+ "single_word": false,
129
+ "special": true
130
+ },
131
+ "151659": {
132
+ "content": "<|reserved_token_10|>",
133
+ "lstrip": false,
134
+ "normalized": false,
135
+ "rstrip": false,
136
+ "single_word": false,
137
+ "special": true
138
+ },
139
+ "151660": {
140
+ "content": "<|reserved_token_11|>",
141
+ "lstrip": false,
142
+ "normalized": false,
143
+ "rstrip": false,
144
+ "single_word": false,
145
+ "special": true
146
+ },
147
+ "151661": {
148
+ "content": "<|im_media_begin|>",
149
+ "lstrip": false,
150
+ "normalized": false,
151
+ "rstrip": false,
152
+ "single_word": false,
153
+ "special": true
154
+ },
155
+ "151662": {
156
+ "content": "<|reserved_token_12|>",
157
+ "lstrip": false,
158
+ "normalized": false,
159
+ "rstrip": false,
160
+ "single_word": false,
161
+ "special": true
162
+ },
163
+ "151663": {
164
+ "content": "<|im_media_end|>",
165
+ "lstrip": false,
166
+ "normalized": false,
167
+ "rstrip": false,
168
+ "single_word": false,
169
+ "special": true
170
+ },
171
+ "151664": {
172
+ "content": "<|reserved_token_13|>",
173
+ "lstrip": false,
174
+ "normalized": false,
175
+ "rstrip": false,
176
+ "single_word": false,
177
+ "special": true
178
+ },
179
+ "151665": {
180
+ "content": "<|reserved_token_14|>",
181
+ "lstrip": false,
182
+ "normalized": false,
183
+ "rstrip": false,
184
+ "single_word": false,
185
+ "special": true
186
+ },
187
+ "151666": {
188
+ "content": "<|im_kimia_text_blank|>",
189
+ "lstrip": false,
190
+ "normalized": false,
191
+ "rstrip": false,
192
+ "single_word": false,
193
+ "special": true
194
+ },
195
+ "151667": {
196
+ "content": "<|im_kimia_text_eos|>",
197
+ "lstrip": false,
198
+ "normalized": false,
199
+ "rstrip": false,
200
+ "single_word": false,
201
+ "special": true
202
+ },
203
+ "151668": {
204
+ "content": "<|reserved_token_15|>",
205
+ "lstrip": false,
206
+ "normalized": false,
207
+ "rstrip": false,
208
+ "single_word": false,
209
+ "special": true
210
+ },
211
+ "151669": {
212
+ "content": "<|reserved_token_16|>",
213
+ "lstrip": false,
214
+ "normalized": false,
215
+ "rstrip": false,
216
+ "single_word": false,
217
+ "special": true
218
+ },
219
+ "151670": {
220
+ "content": "<|im_kimia_user_msg_start|>",
221
+ "lstrip": false,
222
+ "normalized": false,
223
+ "rstrip": false,
224
+ "single_word": false,
225
+ "special": true
226
+ },
227
+ "151671": {
228
+ "content": "<|im_kimia_assistant_msg_start|>",
229
+ "lstrip": false,
230
+ "normalized": false,
231
+ "rstrip": false,
232
+ "single_word": false,
233
+ "special": true
234
+ },
235
+ "151672": {
236
+ "content": "<|reserved_token_17|>",
237
+ "lstrip": false,
238
+ "normalized": false,
239
+ "rstrip": false,
240
+ "single_word": false,
241
+ "special": true
242
+ },
243
+ "151673": {
244
+ "content": "<|reserved_token_18|>",
245
+ "lstrip": false,
246
+ "normalized": false,
247
+ "rstrip": false,
248
+ "single_word": false,
249
+ "special": true
250
+ },
251
+ "151674": {
252
+ "content": "<|reserved_token_19|>",
253
+ "lstrip": false,
254
+ "normalized": false,
255
+ "rstrip": false,
256
+ "single_word": false,
257
+ "special": true
258
+ },
259
+ "151675": {
260
+ "content": "<|im_kimia_speech_ct_id|>",
261
+ "lstrip": false,
262
+ "normalized": false,
263
+ "rstrip": false,
264
+ "single_word": false,
265
+ "special": true
266
+ },
267
+ "151676": {
268
+ "content": "<|im_kimia_speech_ctd_id|>",
269
+ "lstrip": false,
270
+ "normalized": false,
271
+ "rstrip": false,
272
+ "single_word": false,
273
+ "special": true
274
+ },
275
+ "151677": {
276
+ "content": "<|reserved_token_20|>",
277
+ "lstrip": false,
278
+ "normalized": false,
279
+ "rstrip": false,
280
+ "single_word": false,
281
+ "special": true
282
+ },
283
+ "151678": {
284
+ "content": "<|reserved_token_21|>",
285
+ "lstrip": false,
286
+ "normalized": false,
287
+ "rstrip": false,
288
+ "single_word": false,
289
+ "special": true
290
+ },
291
+ "151679": {
292
+ "content": "<|reserved_token_22|>",
293
+ "lstrip": false,
294
+ "normalized": false,
295
+ "rstrip": false,
296
+ "single_word": false,
297
+ "special": true
298
+ },
299
+ "151680": {
300
+ "content": "<|reserved_token_23|>",
301
+ "lstrip": false,
302
+ "normalized": false,
303
+ "rstrip": false,
304
+ "single_word": false,
305
+ "special": true
306
+ },
307
+ "151681": {
308
+ "content": "<|reserved_token_24|>",
309
+ "lstrip": false,
310
+ "normalized": false,
311
+ "rstrip": false,
312
+ "single_word": false,
313
+ "special": true
314
+ },
315
+ "151682": {
316
+ "content": "<|reserved_token_25|>",
317
+ "lstrip": false,
318
+ "normalized": false,
319
+ "rstrip": false,
320
+ "single_word": false,
321
+ "special": true
322
+ },
323
+ "151683": {
324
+ "content": "<|reserved_token_26|>",
325
+ "lstrip": false,
326
+ "normalized": false,
327
+ "rstrip": false,
328
+ "single_word": false,
329
+ "special": true
330
+ },
331
+ "151684": {
332
+ "content": "<|reserved_token_27|>",
333
+ "lstrip": false,
334
+ "normalized": false,
335
+ "rstrip": false,
336
+ "single_word": false,
337
+ "special": true
338
+ },
339
+ "151685": {
340
+ "content": "<|reserved_token_28|>",
341
+ "lstrip": false,
342
+ "normalized": false,
343
+ "rstrip": false,
344
+ "single_word": false,
345
+ "special": true
346
+ },
347
+ "151686": {
348
+ "content": "<|reserved_token_29|>",
349
+ "lstrip": false,
350
+ "normalized": false,
351
+ "rstrip": false,
352
+ "single_word": false,
353
+ "special": true
354
+ },
355
+ "151687": {
356
+ "content": "<|reserved_token_30|>",
357
+ "lstrip": false,
358
+ "normalized": false,
359
+ "rstrip": false,
360
+ "single_word": false,
361
+ "special": true
362
+ },
363
+ "151688": {
364
+ "content": "<|reserved_token_31|>",
365
+ "lstrip": false,
366
+ "normalized": false,
367
+ "rstrip": false,
368
+ "single_word": false,
369
+ "special": true
370
+ },
371
+ "151689": {
372
+ "content": "<|reserved_token_32|>",
373
+ "lstrip": false,
374
+ "normalized": false,
375
+ "rstrip": false,
376
+ "single_word": false,
377
+ "special": true
378
+ },
379
+ "151690": {
380
+ "content": "<|reserved_token_33|>",
381
+ "lstrip": false,
382
+ "normalized": false,
383
+ "rstrip": false,
384
+ "single_word": false,
385
+ "special": true
386
+ },
387
+ "151691": {
388
+ "content": "<|reserved_token_34|>",
389
+ "lstrip": false,
390
+ "normalized": false,
391
+ "rstrip": false,
392
+ "single_word": false,
393
+ "special": true
394
+ },
395
+ "151692": {
396
+ "content": "<|reserved_token_35|>",
397
+ "lstrip": false,
398
+ "normalized": false,
399
+ "rstrip": false,
400
+ "single_word": false,
401
+ "special": true
402
+ },
403
+ "151693": {
404
+ "content": "<|reserved_token_36|>",
405
+ "lstrip": false,
406
+ "normalized": false,
407
+ "rstrip": false,
408
+ "single_word": false,
409
+ "special": true
410
+ },
411
+ "151694": {
412
+ "content": "<|reserved_token_37|>",
413
+ "lstrip": false,
414
+ "normalized": false,
415
+ "rstrip": false,
416
+ "single_word": false,
417
+ "special": true
418
+ },
419
+ "151695": {
420
+ "content": "<|reserved_token_38|>",
421
+ "lstrip": false,
422
+ "normalized": false,
423
+ "rstrip": false,
424
+ "single_word": false,
425
+ "special": true
426
+ },
427
+ "151696": {
428
+ "content": "<|reserved_token_39|>",
429
+ "lstrip": false,
430
+ "normalized": false,
431
+ "rstrip": false,
432
+ "single_word": false,
433
+ "special": true
434
+ },
435
+ "151697": {
436
+ "content": "<|reserved_token_40|>",
437
+ "lstrip": false,
438
+ "normalized": false,
439
+ "rstrip": false,
440
+ "single_word": false,
441
+ "special": true
442
+ },
443
+ "151698": {
444
+ "content": "<|reserved_token_41|>",
445
+ "lstrip": false,
446
+ "normalized": false,
447
+ "rstrip": false,
448
+ "single_word": false,
449
+ "special": true
450
+ },
451
+ "151699": {
452
+ "content": "<|reserved_token_42|>",
453
+ "lstrip": false,
454
+ "normalized": false,
455
+ "rstrip": false,
456
+ "single_word": false,
457
+ "special": true
458
+ },
459
+ "151700": {
460
+ "content": "<|reserved_token_43|>",
461
+ "lstrip": false,
462
+ "normalized": false,
463
+ "rstrip": false,
464
+ "single_word": false,
465
+ "special": true
466
+ },
467
+ "151701": {
468
+ "content": "<|reserved_token_44|>",
469
+ "lstrip": false,
470
+ "normalized": false,
471
+ "rstrip": false,
472
+ "single_word": false,
473
+ "special": true
474
+ },
475
+ "151702": {
476
+ "content": "<|reserved_token_45|>",
477
+ "lstrip": false,
478
+ "normalized": false,
479
+ "rstrip": false,
480
+ "single_word": false,
481
+ "special": true
482
+ },
483
+ "151703": {
484
+ "content": "<|reserved_token_46|>",
485
+ "lstrip": false,
486
+ "normalized": false,
487
+ "rstrip": false,
488
+ "single_word": false,
489
+ "special": true
490
+ },
491
+ "151704": {
492
+ "content": "<|reserved_token_47|>",
493
+ "lstrip": false,
494
+ "normalized": false,
495
+ "rstrip": false,
496
+ "single_word": false,
497
+ "special": true
498
+ },
499
+ "151705": {
500
+ "content": "<|reserved_token_48|>",
501
+ "lstrip": false,
502
+ "normalized": false,
503
+ "rstrip": false,
504
+ "single_word": false,
505
+ "special": true
506
+ },
507
+ "151706": {
508
+ "content": "<|reserved_token_49|>",
509
+ "lstrip": false,
510
+ "normalized": false,
511
+ "rstrip": false,
512
+ "single_word": false,
513
+ "special": true
514
+ },
515
+ "151707": {
516
+ "content": "<|reserved_token_50|>",
517
+ "lstrip": false,
518
+ "normalized": false,
519
+ "rstrip": false,
520
+ "single_word": false,
521
+ "special": true
522
+ },
523
+ "151708": {
524
+ "content": "<|reserved_token_51|>",
525
+ "lstrip": false,
526
+ "normalized": false,
527
+ "rstrip": false,
528
+ "single_word": false,
529
+ "special": true
530
+ },
531
+ "151709": {
532
+ "content": "<|reserved_token_52|>",
533
+ "lstrip": false,
534
+ "normalized": false,
535
+ "rstrip": false,
536
+ "single_word": false,
537
+ "special": true
538
+ },
539
+ "151710": {
540
+ "content": "<|reserved_token_53|>",
541
+ "lstrip": false,
542
+ "normalized": false,
543
+ "rstrip": false,
544
+ "single_word": false,
545
+ "special": true
546
+ },
547
+ "151711": {
548
+ "content": "<|reserved_token_54|>",
549
+ "lstrip": false,
550
+ "normalized": false,
551
+ "rstrip": false,
552
+ "single_word": false,
553
+ "special": true
554
+ },
555
+ "151712": {
556
+ "content": "<|reserved_token_55|>",
557
+ "lstrip": false,
558
+ "normalized": false,
559
+ "rstrip": false,
560
+ "single_word": false,
561
+ "special": true
562
+ },
563
+ "151713": {
564
+ "content": "<|reserved_token_56|>",
565
+ "lstrip": false,
566
+ "normalized": false,
567
+ "rstrip": false,
568
+ "single_word": false,
569
+ "special": true
570
+ },
571
+ "151714": {
572
+ "content": "<|reserved_token_57|>",
573
+ "lstrip": false,
574
+ "normalized": false,
575
+ "rstrip": false,
576
+ "single_word": false,
577
+ "special": true
578
+ },
579
+ "151715": {
580
+ "content": "<|reserved_token_58|>",
581
+ "lstrip": false,
582
+ "normalized": false,
583
+ "rstrip": false,
584
+ "single_word": false,
585
+ "special": true
586
+ },
587
+ "151716": {
588
+ "content": "<|reserved_token_59|>",
589
+ "lstrip": false,
590
+ "normalized": false,
591
+ "rstrip": false,
592
+ "single_word": false,
593
+ "special": true
594
+ },
595
+ "151717": {
596
+ "content": "<|reserved_token_60|>",
597
+ "lstrip": false,
598
+ "normalized": false,
599
+ "rstrip": false,
600
+ "single_word": false,
601
+ "special": true
602
+ },
603
+ "151718": {
604
+ "content": "<|reserved_token_61|>",
605
+ "lstrip": false,
606
+ "normalized": false,
607
+ "rstrip": false,
608
+ "single_word": false,
609
+ "special": true
610
+ },
611
+ "151719": {
612
+ "content": "<|reserved_token_62|>",
613
+ "lstrip": false,
614
+ "normalized": false,
615
+ "rstrip": false,
616
+ "single_word": false,
617
+ "special": true
618
+ },
619
+ "151720": {
620
+ "content": "<|reserved_token_63|>",
621
+ "lstrip": false,
622
+ "normalized": false,
623
+ "rstrip": false,
624
+ "single_word": false,
625
+ "special": true
626
+ },
627
+ "151721": {
628
+ "content": "<|reserved_token_64|>",
629
+ "lstrip": false,
630
+ "normalized": false,
631
+ "rstrip": false,
632
+ "single_word": false,
633
+ "special": true
634
+ },
635
+ "151722": {
636
+ "content": "<|reserved_token_65|>",
637
+ "lstrip": false,
638
+ "normalized": false,
639
+ "rstrip": false,
640
+ "single_word": false,
641
+ "special": true
642
+ },
643
+ "151723": {
644
+ "content": "<|reserved_token_66|>",
645
+ "lstrip": false,
646
+ "normalized": false,
647
+ "rstrip": false,
648
+ "single_word": false,
649
+ "special": true
650
+ },
651
+ "151724": {
652
+ "content": "<|reserved_token_67|>",
653
+ "lstrip": false,
654
+ "normalized": false,
655
+ "rstrip": false,
656
+ "single_word": false,
657
+ "special": true
658
+ },
659
+ "151725": {
660
+ "content": "<|reserved_token_68|>",
661
+ "lstrip": false,
662
+ "normalized": false,
663
+ "rstrip": false,
664
+ "single_word": false,
665
+ "special": true
666
+ },
667
+ "151726": {
668
+ "content": "<|reserved_token_69|>",
669
+ "lstrip": false,
670
+ "normalized": false,
671
+ "rstrip": false,
672
+ "single_word": false,
673
+ "special": true
674
+ },
675
+ "151727": {
676
+ "content": "<|reserved_token_70|>",
677
+ "lstrip": false,
678
+ "normalized": false,
679
+ "rstrip": false,
680
+ "single_word": false,
681
+ "special": true
682
+ },
683
+ "151728": {
684
+ "content": "<|reserved_token_71|>",
685
+ "lstrip": false,
686
+ "normalized": false,
687
+ "rstrip": false,
688
+ "single_word": false,
689
+ "special": true
690
+ },
691
+ "151729": {
692
+ "content": "<|reserved_token_72|>",
693
+ "lstrip": false,
694
+ "normalized": false,
695
+ "rstrip": false,
696
+ "single_word": false,
697
+ "special": true
698
+ },
699
+ "151730": {
700
+ "content": "<|reserved_token_73|>",
701
+ "lstrip": false,
702
+ "normalized": false,
703
+ "rstrip": false,
704
+ "single_word": false,
705
+ "special": true
706
+ },
707
+ "151731": {
708
+ "content": "<|reserved_token_74|>",
709
+ "lstrip": false,
710
+ "normalized": false,
711
+ "rstrip": false,
712
+ "single_word": false,
713
+ "special": true
714
+ },
715
+ "151732": {
716
+ "content": "<|reserved_token_75|>",
717
+ "lstrip": false,
718
+ "normalized": false,
719
+ "rstrip": false,
720
+ "single_word": false,
721
+ "special": true
722
+ },
723
+ "151733": {
724
+ "content": "<|reserved_token_76|>",
725
+ "lstrip": false,
726
+ "normalized": false,
727
+ "rstrip": false,
728
+ "single_word": false,
729
+ "special": true
730
+ },
731
+ "151734": {
732
+ "content": "<|reserved_token_77|>",
733
+ "lstrip": false,
734
+ "normalized": false,
735
+ "rstrip": false,
736
+ "single_word": false,
737
+ "special": true
738
+ },
739
+ "151735": {
740
+ "content": "<|reserved_token_78|>",
741
+ "lstrip": false,
742
+ "normalized": false,
743
+ "rstrip": false,
744
+ "single_word": false,
745
+ "special": true
746
+ },
747
+ "151736": {
748
+ "content": "<|reserved_token_79|>",
749
+ "lstrip": false,
750
+ "normalized": false,
751
+ "rstrip": false,
752
+ "single_word": false,
753
+ "special": true
754
+ },
755
+ "151737": {
756
+ "content": "<|reserved_token_80|>",
757
+ "lstrip": false,
758
+ "normalized": false,
759
+ "rstrip": false,
760
+ "single_word": false,
761
+ "special": true
762
+ },
763
+ "151738": {
764
+ "content": "<|reserved_token_81|>",
765
+ "lstrip": false,
766
+ "normalized": false,
767
+ "rstrip": false,
768
+ "single_word": false,
769
+ "special": true
770
+ },
771
+ "151739": {
772
+ "content": "<|reserved_token_82|>",
773
+ "lstrip": false,
774
+ "normalized": false,
775
+ "rstrip": false,
776
+ "single_word": false,
777
+ "special": true
778
+ },
779
+ "151740": {
780
+ "content": "<|reserved_token_83|>",
781
+ "lstrip": false,
782
+ "normalized": false,
783
+ "rstrip": false,
784
+ "single_word": false,
785
+ "special": true
786
+ },
787
+ "151741": {
788
+ "content": "<|reserved_token_84|>",
789
+ "lstrip": false,
790
+ "normalized": false,
791
+ "rstrip": false,
792
+ "single_word": false,
793
+ "special": true
794
+ },
795
+ "151742": {
796
+ "content": "<|reserved_token_85|>",
797
+ "lstrip": false,
798
+ "normalized": false,
799
+ "rstrip": false,
800
+ "single_word": false,
801
+ "special": true
802
+ },
803
+ "151743": {
804
+ "content": "<|reserved_token_86|>",
805
+ "lstrip": false,
806
+ "normalized": false,
807
+ "rstrip": false,
808
+ "single_word": false,
809
+ "special": true
810
+ },
811
+ "151744": {
812
+ "content": "<|reserved_token_87|>",
813
+ "lstrip": false,
814
+ "normalized": false,
815
+ "rstrip": false,
816
+ "single_word": false,
817
+ "special": true
818
+ },
819
+ "151745": {
820
+ "content": "<|reserved_token_88|>",
821
+ "lstrip": false,
822
+ "normalized": false,
823
+ "rstrip": false,
824
+ "single_word": false,
825
+ "special": true
826
+ },
827
+ "151746": {
828
+ "content": "<|reserved_token_89|>",
829
+ "lstrip": false,
830
+ "normalized": false,
831
+ "rstrip": false,
832
+ "single_word": false,
833
+ "special": true
834
+ },
835
+ "151747": {
836
+ "content": "<|reserved_token_90|>",
837
+ "lstrip": false,
838
+ "normalized": false,
839
+ "rstrip": false,
840
+ "single_word": false,
841
+ "special": true
842
+ },
843
+ "151748": {
844
+ "content": "<|reserved_token_91|>",
845
+ "lstrip": false,
846
+ "normalized": false,
847
+ "rstrip": false,
848
+ "single_word": false,
849
+ "special": true
850
+ },
851
+ "151749": {
852
+ "content": "<|reserved_token_92|>",
853
+ "lstrip": false,
854
+ "normalized": false,
855
+ "rstrip": false,
856
+ "single_word": false,
857
+ "special": true
858
+ },
859
+ "151750": {
860
+ "content": "<|reserved_token_93|>",
861
+ "lstrip": false,
862
+ "normalized": false,
863
+ "rstrip": false,
864
+ "single_word": false,
865
+ "special": true
866
+ },
867
+ "151751": {
868
+ "content": "<|reserved_token_94|>",
869
+ "lstrip": false,
870
+ "normalized": false,
871
+ "rstrip": false,
872
+ "single_word": false,
873
+ "special": true
874
+ },
875
+ "151752": {
876
+ "content": "<|reserved_token_95|>",
877
+ "lstrip": false,
878
+ "normalized": false,
879
+ "rstrip": false,
880
+ "single_word": false,
881
+ "special": true
882
+ },
883
+ "151753": {
884
+ "content": "<|reserved_token_96|>",
885
+ "lstrip": false,
886
+ "normalized": false,
887
+ "rstrip": false,
888
+ "single_word": false,
889
+ "special": true
890
+ },
891
+ "151754": {
892
+ "content": "<|reserved_token_97|>",
893
+ "lstrip": false,
894
+ "normalized": false,
895
+ "rstrip": false,
896
+ "single_word": false,
897
+ "special": true
898
+ },
899
+ "151755": {
900
+ "content": "<|reserved_token_98|>",
901
+ "lstrip": false,
902
+ "normalized": false,
903
+ "rstrip": false,
904
+ "single_word": false,
905
+ "special": true
906
+ },
907
+ "151756": {
908
+ "content": "<|reserved_token_99|>",
909
+ "lstrip": false,
910
+ "normalized": false,
911
+ "rstrip": false,
912
+ "single_word": false,
913
+ "special": true
914
+ },
915
+ "151757": {
916
+ "content": "<|reserved_token_100|>",
917
+ "lstrip": false,
918
+ "normalized": false,
919
+ "rstrip": false,
920
+ "single_word": false,
921
+ "special": true
922
+ },
923
+ "151758": {
924
+ "content": "<|reserved_token_101|>",
925
+ "lstrip": false,
926
+ "normalized": false,
927
+ "rstrip": false,
928
+ "single_word": false,
929
+ "special": true
930
+ },
931
+ "151759": {
932
+ "content": "<|reserved_token_102|>",
933
+ "lstrip": false,
934
+ "normalized": false,
935
+ "rstrip": false,
936
+ "single_word": false,
937
+ "special": true
938
+ },
939
+ "151760": {
940
+ "content": "<|reserved_token_103|>",
941
+ "lstrip": false,
942
+ "normalized": false,
943
+ "rstrip": false,
944
+ "single_word": false,
945
+ "special": true
946
+ },
947
+ "151761": {
948
+ "content": "<|reserved_token_104|>",
949
+ "lstrip": false,
950
+ "normalized": false,
951
+ "rstrip": false,
952
+ "single_word": false,
953
+ "special": true
954
+ },
955
+ "151762": {
956
+ "content": "<|reserved_token_105|>",
957
+ "lstrip": false,
958
+ "normalized": false,
959
+ "rstrip": false,
960
+ "single_word": false,
961
+ "special": true
962
+ },
963
+ "151763": {
964
+ "content": "<|reserved_token_106|>",
965
+ "lstrip": false,
966
+ "normalized": false,
967
+ "rstrip": false,
968
+ "single_word": false,
969
+ "special": true
970
+ },
971
+ "151764": {
972
+ "content": "<|reserved_token_107|>",
973
+ "lstrip": false,
974
+ "normalized": false,
975
+ "rstrip": false,
976
+ "single_word": false,
977
+ "special": true
978
+ },
979
+ "151765": {
980
+ "content": "<|reserved_token_108|>",
981
+ "lstrip": false,
982
+ "normalized": false,
983
+ "rstrip": false,
984
+ "single_word": false,
985
+ "special": true
986
+ },
987
+ "151766": {
988
+ "content": "<|reserved_token_109|>",
989
+ "lstrip": false,
990
+ "normalized": false,
991
+ "rstrip": false,
992
+ "single_word": false,
993
+ "special": true
994
+ },
995
+ "151767": {
996
+ "content": "<|reserved_token_110|>",
997
+ "lstrip": false,
998
+ "normalized": false,
999
+ "rstrip": false,
1000
+ "single_word": false,
1001
+ "special": true
1002
+ },
1003
+ "151768": {
1004
+ "content": "<|reserved_token_111|>",
1005
+ "lstrip": false,
1006
+ "normalized": false,
1007
+ "rstrip": false,
1008
+ "single_word": false,
1009
+ "special": true
1010
+ },
1011
+ "151769": {
1012
+ "content": "<|reserved_token_112|>",
1013
+ "lstrip": false,
1014
+ "normalized": false,
1015
+ "rstrip": false,
1016
+ "single_word": false,
1017
+ "special": true
1018
+ },
1019
+ "151770": {
1020
+ "content": "<|reserved_token_113|>",
1021
+ "lstrip": false,
1022
+ "normalized": false,
1023
+ "rstrip": false,
1024
+ "single_word": false,
1025
+ "special": true
1026
+ },
1027
+ "151771": {
1028
+ "content": "<|reserved_token_114|>",
1029
+ "lstrip": false,
1030
+ "normalized": false,
1031
+ "rstrip": false,
1032
+ "single_word": false,
1033
+ "special": true
1034
+ },
1035
+ "151772": {
1036
+ "content": "<|reserved_token_115|>",
1037
+ "lstrip": false,
1038
+ "normalized": false,
1039
+ "rstrip": false,
1040
+ "single_word": false,
1041
+ "special": true
1042
+ },
1043
+ "151773": {
1044
+ "content": "<|reserved_token_116|>",
1045
+ "lstrip": false,
1046
+ "normalized": false,
1047
+ "rstrip": false,
1048
+ "single_word": false,
1049
+ "special": true
1050
+ },
1051
+ "151774": {
1052
+ "content": "<|reserved_token_117|>",
1053
+ "lstrip": false,
1054
+ "normalized": false,
1055
+ "rstrip": false,
1056
+ "single_word": false,
1057
+ "special": true
1058
+ },
1059
+ "151775": {
1060
+ "content": "<|reserved_token_118|>",
1061
+ "lstrip": false,
1062
+ "normalized": false,
1063
+ "rstrip": false,
1064
+ "single_word": false,
1065
+ "special": true
1066
+ },
1067
+ "151776": {
1068
+ "content": "<|reserved_token_119|>",
1069
+ "lstrip": false,
1070
+ "normalized": false,
1071
+ "rstrip": false,
1072
+ "single_word": false,
1073
+ "special": true
1074
+ },
1075
+ "151777": {
1076
+ "content": "<|reserved_token_120|>",
1077
+ "lstrip": false,
1078
+ "normalized": false,
1079
+ "rstrip": false,
1080
+ "single_word": false,
1081
+ "special": true
1082
+ },
1083
+ "151778": {
1084
+ "content": "<|reserved_token_121|>",
1085
+ "lstrip": false,
1086
+ "normalized": false,
1087
+ "rstrip": false,
1088
+ "single_word": false,
1089
+ "special": true
1090
+ },
1091
+ "151779": {
1092
+ "content": "<|reserved_token_122|>",
1093
+ "lstrip": false,
1094
+ "normalized": false,
1095
+ "rstrip": false,
1096
+ "single_word": false,
1097
+ "special": true
1098
+ },
1099
+ "151780": {
1100
+ "content": "<|reserved_token_123|>",
1101
+ "lstrip": false,
1102
+ "normalized": false,
1103
+ "rstrip": false,
1104
+ "single_word": false,
1105
+ "special": true
1106
+ },
1107
+ "151781": {
1108
+ "content": "<|reserved_token_124|>",
1109
+ "lstrip": false,
1110
+ "normalized": false,
1111
+ "rstrip": false,
1112
+ "single_word": false,
1113
+ "special": true
1114
+ },
1115
+ "151782": {
1116
+ "content": "<|reserved_token_125|>",
1117
+ "lstrip": false,
1118
+ "normalized": false,
1119
+ "rstrip": false,
1120
+ "single_word": false,
1121
+ "special": true
1122
+ },
1123
+ "151783": {
1124
+ "content": "<|reserved_token_126|>",
1125
+ "lstrip": false,
1126
+ "normalized": false,
1127
+ "rstrip": false,
1128
+ "single_word": false,
1129
+ "special": true
1130
+ },
1131
+ "151784": {
1132
+ "content": "<|reserved_token_127|>",
1133
+ "lstrip": false,
1134
+ "normalized": false,
1135
+ "rstrip": false,
1136
+ "single_word": false,
1137
+ "special": true
1138
+ },
1139
+ "151785": {
1140
+ "content": "<|reserved_token_128|>",
1141
+ "lstrip": false,
1142
+ "normalized": false,
1143
+ "rstrip": false,
1144
+ "single_word": false,
1145
+ "special": true
1146
+ },
1147
+ "151786": {
1148
+ "content": "<|reserved_token_129|>",
1149
+ "lstrip": false,
1150
+ "normalized": false,
1151
+ "rstrip": false,
1152
+ "single_word": false,
1153
+ "special": true
1154
+ },
1155
+ "151787": {
1156
+ "content": "<|reserved_token_130|>",
1157
+ "lstrip": false,
1158
+ "normalized": false,
1159
+ "rstrip": false,
1160
+ "single_word": false,
1161
+ "special": true
1162
+ },
1163
+ "151788": {
1164
+ "content": "<|reserved_token_131|>",
1165
+ "lstrip": false,
1166
+ "normalized": false,
1167
+ "rstrip": false,
1168
+ "single_word": false,
1169
+ "special": true
1170
+ },
1171
+ "151789": {
1172
+ "content": "<|reserved_token_132|>",
1173
+ "lstrip": false,
1174
+ "normalized": false,
1175
+ "rstrip": false,
1176
+ "single_word": false,
1177
+ "special": true
1178
+ },
1179
+ "151790": {
1180
+ "content": "<|reserved_token_133|>",
1181
+ "lstrip": false,
1182
+ "normalized": false,
1183
+ "rstrip": false,
1184
+ "single_word": false,
1185
+ "special": true
1186
+ },
1187
+ "151791": {
1188
+ "content": "<|reserved_token_134|>",
1189
+ "lstrip": false,
1190
+ "normalized": false,
1191
+ "rstrip": false,
1192
+ "single_word": false,
1193
+ "special": true
1194
+ },
1195
+ "151792": {
1196
+ "content": "<|reserved_token_135|>",
1197
+ "lstrip": false,
1198
+ "normalized": false,
1199
+ "rstrip": false,
1200
+ "single_word": false,
1201
+ "special": true
1202
+ },
1203
+ "151793": {
1204
+ "content": "<|reserved_token_136|>",
1205
+ "lstrip": false,
1206
+ "normalized": false,
1207
+ "rstrip": false,
1208
+ "single_word": false,
1209
+ "special": true
1210
+ },
1211
+ "151794": {
1212
+ "content": "<|reserved_token_137|>",
1213
+ "lstrip": false,
1214
+ "normalized": false,
1215
+ "rstrip": false,
1216
+ "single_word": false,
1217
+ "special": true
1218
+ },
1219
+ "151795": {
1220
+ "content": "<|reserved_token_138|>",
1221
+ "lstrip": false,
1222
+ "normalized": false,
1223
+ "rstrip": false,
1224
+ "single_word": false,
1225
+ "special": true
1226
+ },
1227
+ "151796": {
1228
+ "content": "<|reserved_token_139|>",
1229
+ "lstrip": false,
1230
+ "normalized": false,
1231
+ "rstrip": false,
1232
+ "single_word": false,
1233
+ "special": true
1234
+ },
1235
+ "151797": {
1236
+ "content": "<|reserved_token_140|>",
1237
+ "lstrip": false,
1238
+ "normalized": false,
1239
+ "rstrip": false,
1240
+ "single_word": false,
1241
+ "special": true
1242
+ },
1243
+ "151798": {
1244
+ "content": "<|reserved_token_141|>",
1245
+ "lstrip": false,
1246
+ "normalized": false,
1247
+ "rstrip": false,
1248
+ "single_word": false,
1249
+ "special": true
1250
+ },
1251
+ "151799": {
1252
+ "content": "<|reserved_token_142|>",
1253
+ "lstrip": false,
1254
+ "normalized": false,
1255
+ "rstrip": false,
1256
+ "single_word": false,
1257
+ "special": true
1258
+ },
1259
+ "151800": {
1260
+ "content": "<|reserved_token_143|>",
1261
+ "lstrip": false,
1262
+ "normalized": false,
1263
+ "rstrip": false,
1264
+ "single_word": false,
1265
+ "special": true
1266
+ },
1267
+ "151801": {
1268
+ "content": "<|reserved_token_144|>",
1269
+ "lstrip": false,
1270
+ "normalized": false,
1271
+ "rstrip": false,
1272
+ "single_word": false,
1273
+ "special": true
1274
+ },
1275
+ "151802": {
1276
+ "content": "<|reserved_token_145|>",
1277
+ "lstrip": false,
1278
+ "normalized": false,
1279
+ "rstrip": false,
1280
+ "single_word": false,
1281
+ "special": true
1282
+ },
1283
+ "151803": {
1284
+ "content": "<|reserved_token_146|>",
1285
+ "lstrip": false,
1286
+ "normalized": false,
1287
+ "rstrip": false,
1288
+ "single_word": false,
1289
+ "special": true
1290
+ },
1291
+ "151804": {
1292
+ "content": "<|reserved_token_147|>",
1293
+ "lstrip": false,
1294
+ "normalized": false,
1295
+ "rstrip": false,
1296
+ "single_word": false,
1297
+ "special": true
1298
+ },
1299
+ "151805": {
1300
+ "content": "<|reserved_token_148|>",
1301
+ "lstrip": false,
1302
+ "normalized": false,
1303
+ "rstrip": false,
1304
+ "single_word": false,
1305
+ "special": true
1306
+ },
1307
+ "151806": {
1308
+ "content": "<|reserved_token_149|>",
1309
+ "lstrip": false,
1310
+ "normalized": false,
1311
+ "rstrip": false,
1312
+ "single_word": false,
1313
+ "special": true
1314
+ },
1315
+ "151807": {
1316
+ "content": "<|reserved_token_150|>",
1317
+ "lstrip": false,
1318
+ "normalized": false,
1319
+ "rstrip": false,
1320
+ "single_word": false,
1321
+ "special": true
1322
+ },
1323
+ "151808": {
1324
+ "content": "<|reserved_token_151|>",
1325
+ "lstrip": false,
1326
+ "normalized": false,
1327
+ "rstrip": false,
1328
+ "single_word": false,
1329
+ "special": true
1330
+ },
1331
+ "151809": {
1332
+ "content": "<|reserved_token_152|>",
1333
+ "lstrip": false,
1334
+ "normalized": false,
1335
+ "rstrip": false,
1336
+ "single_word": false,
1337
+ "special": true
1338
+ },
1339
+ "151810": {
1340
+ "content": "<|reserved_token_153|>",
1341
+ "lstrip": false,
1342
+ "normalized": false,
1343
+ "rstrip": false,
1344
+ "single_word": false,
1345
+ "special": true
1346
+ },
1347
+ "151811": {
1348
+ "content": "<|reserved_token_154|>",
1349
+ "lstrip": false,
1350
+ "normalized": false,
1351
+ "rstrip": false,
1352
+ "single_word": false,
1353
+ "special": true
1354
+ },
1355
+ "151812": {
1356
+ "content": "<|reserved_token_155|>",
1357
+ "lstrip": false,
1358
+ "normalized": false,
1359
+ "rstrip": false,
1360
+ "single_word": false,
1361
+ "special": true
1362
+ },
1363
+ "151813": {
1364
+ "content": "<|reserved_token_156|>",
1365
+ "lstrip": false,
1366
+ "normalized": false,
1367
+ "rstrip": false,
1368
+ "single_word": false,
1369
+ "special": true
1370
+ },
1371
+ "151814": {
1372
+ "content": "<|reserved_token_157|>",
1373
+ "lstrip": false,
1374
+ "normalized": false,
1375
+ "rstrip": false,
1376
+ "single_word": false,
1377
+ "special": true
1378
+ },
1379
+ "151815": {
1380
+ "content": "<|reserved_token_158|>",
1381
+ "lstrip": false,
1382
+ "normalized": false,
1383
+ "rstrip": false,
1384
+ "single_word": false,
1385
+ "special": true
1386
+ },
1387
+ "151816": {
1388
+ "content": "<|reserved_token_159|>",
1389
+ "lstrip": false,
1390
+ "normalized": false,
1391
+ "rstrip": false,
1392
+ "single_word": false,
1393
+ "special": true
1394
+ },
1395
+ "151817": {
1396
+ "content": "<|reserved_token_160|>",
1397
+ "lstrip": false,
1398
+ "normalized": false,
1399
+ "rstrip": false,
1400
+ "single_word": false,
1401
+ "special": true
1402
+ },
1403
+ "151818": {
1404
+ "content": "<|reserved_token_161|>",
1405
+ "lstrip": false,
1406
+ "normalized": false,
1407
+ "rstrip": false,
1408
+ "single_word": false,
1409
+ "special": true
1410
+ },
1411
+ "151819": {
1412
+ "content": "<|reserved_token_162|>",
1413
+ "lstrip": false,
1414
+ "normalized": false,
1415
+ "rstrip": false,
1416
+ "single_word": false,
1417
+ "special": true
1418
+ },
1419
+ "151820": {
1420
+ "content": "<|reserved_token_163|>",
1421
+ "lstrip": false,
1422
+ "normalized": false,
1423
+ "rstrip": false,
1424
+ "single_word": false,
1425
+ "special": true
1426
+ },
1427
+ "151821": {
1428
+ "content": "<|reserved_token_164|>",
1429
+ "lstrip": false,
1430
+ "normalized": false,
1431
+ "rstrip": false,
1432
+ "single_word": false,
1433
+ "special": true
1434
+ },
1435
+ "151822": {
1436
+ "content": "<|reserved_token_165|>",
1437
+ "lstrip": false,
1438
+ "normalized": false,
1439
+ "rstrip": false,
1440
+ "single_word": false,
1441
+ "special": true
1442
+ },
1443
+ "151823": {
1444
+ "content": "<|reserved_token_166|>",
1445
+ "lstrip": false,
1446
+ "normalized": false,
1447
+ "rstrip": false,
1448
+ "single_word": false,
1449
+ "special": true
1450
+ },
1451
+ "151824": {
1452
+ "content": "<|reserved_token_167|>",
1453
+ "lstrip": false,
1454
+ "normalized": false,
1455
+ "rstrip": false,
1456
+ "single_word": false,
1457
+ "special": true
1458
+ },
1459
+ "151825": {
1460
+ "content": "<|reserved_token_168|>",
1461
+ "lstrip": false,
1462
+ "normalized": false,
1463
+ "rstrip": false,
1464
+ "single_word": false,
1465
+ "special": true
1466
+ },
1467
+ "151826": {
1468
+ "content": "<|reserved_token_169|>",
1469
+ "lstrip": false,
1470
+ "normalized": false,
1471
+ "rstrip": false,
1472
+ "single_word": false,
1473
+ "special": true
1474
+ },
1475
+ "151827": {
1476
+ "content": "<|reserved_token_170|>",
1477
+ "lstrip": false,
1478
+ "normalized": false,
1479
+ "rstrip": false,
1480
+ "single_word": false,
1481
+ "special": true
1482
+ },
1483
+ "151828": {
1484
+ "content": "<|reserved_token_171|>",
1485
+ "lstrip": false,
1486
+ "normalized": false,
1487
+ "rstrip": false,
1488
+ "single_word": false,
1489
+ "special": true
1490
+ },
1491
+ "151829": {
1492
+ "content": "<|reserved_token_172|>",
1493
+ "lstrip": false,
1494
+ "normalized": false,
1495
+ "rstrip": false,
1496
+ "single_word": false,
1497
+ "special": true
1498
+ },
1499
+ "151830": {
1500
+ "content": "<|reserved_token_173|>",
1501
+ "lstrip": false,
1502
+ "normalized": false,
1503
+ "rstrip": false,
1504
+ "single_word": false,
1505
+ "special": true
1506
+ },
1507
+ "151831": {
1508
+ "content": "<|reserved_token_174|>",
1509
+ "lstrip": false,
1510
+ "normalized": false,
1511
+ "rstrip": false,
1512
+ "single_word": false,
1513
+ "special": true
1514
+ },
1515
+ "151832": {
1516
+ "content": "<|reserved_token_175|>",
1517
+ "lstrip": false,
1518
+ "normalized": false,
1519
+ "rstrip": false,
1520
+ "single_word": false,
1521
+ "special": true
1522
+ },
1523
+ "151833": {
1524
+ "content": "<|reserved_token_176|>",
1525
+ "lstrip": false,
1526
+ "normalized": false,
1527
+ "rstrip": false,
1528
+ "single_word": false,
1529
+ "special": true
1530
+ },
1531
+ "151834": {
1532
+ "content": "<|reserved_token_177|>",
1533
+ "lstrip": false,
1534
+ "normalized": false,
1535
+ "rstrip": false,
1536
+ "single_word": false,
1537
+ "special": true
1538
+ },
1539
+ "151835": {
1540
+ "content": "<|reserved_token_178|>",
1541
+ "lstrip": false,
1542
+ "normalized": false,
1543
+ "rstrip": false,
1544
+ "single_word": false,
1545
+ "special": true
1546
+ },
1547
+ "151836": {
1548
+ "content": "<|reserved_token_179|>",
1549
+ "lstrip": false,
1550
+ "normalized": false,
1551
+ "rstrip": false,
1552
+ "single_word": false,
1553
+ "special": true
1554
+ },
1555
+ "151837": {
1556
+ "content": "<|reserved_token_180|>",
1557
+ "lstrip": false,
1558
+ "normalized": false,
1559
+ "rstrip": false,
1560
+ "single_word": false,
1561
+ "special": true
1562
+ },
1563
+ "151838": {
1564
+ "content": "<|reserved_token_181|>",
1565
+ "lstrip": false,
1566
+ "normalized": false,
1567
+ "rstrip": false,
1568
+ "single_word": false,
1569
+ "special": true
1570
+ },
1571
+ "151839": {
1572
+ "content": "<|reserved_token_182|>",
1573
+ "lstrip": false,
1574
+ "normalized": false,
1575
+ "rstrip": false,
1576
+ "single_word": false,
1577
+ "special": true
1578
+ },
1579
+ "151840": {
1580
+ "content": "<|reserved_token_183|>",
1581
+ "lstrip": false,
1582
+ "normalized": false,
1583
+ "rstrip": false,
1584
+ "single_word": false,
1585
+ "special": true
1586
+ },
1587
+ "151841": {
1588
+ "content": "<|reserved_token_184|>",
1589
+ "lstrip": false,
1590
+ "normalized": false,
1591
+ "rstrip": false,
1592
+ "single_word": false,
1593
+ "special": true
1594
+ },
1595
+ "151842": {
1596
+ "content": "<|reserved_token_185|>",
1597
+ "lstrip": false,
1598
+ "normalized": false,
1599
+ "rstrip": false,
1600
+ "single_word": false,
1601
+ "special": true
1602
+ },
1603
+ "151843": {
1604
+ "content": "<|reserved_token_186|>",
1605
+ "lstrip": false,
1606
+ "normalized": false,
1607
+ "rstrip": false,
1608
+ "single_word": false,
1609
+ "special": true
1610
+ },
1611
+ "151844": {
1612
+ "content": "<|reserved_token_187|>",
1613
+ "lstrip": false,
1614
+ "normalized": false,
1615
+ "rstrip": false,
1616
+ "single_word": false,
1617
+ "special": true
1618
+ },
1619
+ "151845": {
1620
+ "content": "<|reserved_token_188|>",
1621
+ "lstrip": false,
1622
+ "normalized": false,
1623
+ "rstrip": false,
1624
+ "single_word": false,
1625
+ "special": true
1626
+ },
1627
+ "151846": {
1628
+ "content": "<|reserved_token_189|>",
1629
+ "lstrip": false,
1630
+ "normalized": false,
1631
+ "rstrip": false,
1632
+ "single_word": false,
1633
+ "special": true
1634
+ },
1635
+ "151847": {
1636
+ "content": "<|reserved_token_190|>",
1637
+ "lstrip": false,
1638
+ "normalized": false,
1639
+ "rstrip": false,
1640
+ "single_word": false,
1641
+ "special": true
1642
+ },
1643
+ "151848": {
1644
+ "content": "<|reserved_token_191|>",
1645
+ "lstrip": false,
1646
+ "normalized": false,
1647
+ "rstrip": false,
1648
+ "single_word": false,
1649
+ "special": true
1650
+ },
1651
+ "151849": {
1652
+ "content": "<|reserved_token_192|>",
1653
+ "lstrip": false,
1654
+ "normalized": false,
1655
+ "rstrip": false,
1656
+ "single_word": false,
1657
+ "special": true
1658
+ },
1659
+ "151850": {
1660
+ "content": "<|reserved_token_193|>",
1661
+ "lstrip": false,
1662
+ "normalized": false,
1663
+ "rstrip": false,
1664
+ "single_word": false,
1665
+ "special": true
1666
+ },
1667
+ "151851": {
1668
+ "content": "<|reserved_token_194|>",
1669
+ "lstrip": false,
1670
+ "normalized": false,
1671
+ "rstrip": false,
1672
+ "single_word": false,
1673
+ "special": true
1674
+ },
1675
+ "151852": {
1676
+ "content": "<|reserved_token_195|>",
1677
+ "lstrip": false,
1678
+ "normalized": false,
1679
+ "rstrip": false,
1680
+ "single_word": false,
1681
+ "special": true
1682
+ },
1683
+ "151853": {
1684
+ "content": "<|reserved_token_196|>",
1685
+ "lstrip": false,
1686
+ "normalized": false,
1687
+ "rstrip": false,
1688
+ "single_word": false,
1689
+ "special": true
1690
+ },
1691
+ "151854": {
1692
+ "content": "<|reserved_token_197|>",
1693
+ "lstrip": false,
1694
+ "normalized": false,
1695
+ "rstrip": false,
1696
+ "single_word": false,
1697
+ "special": true
1698
+ },
1699
+ "151855": {
1700
+ "content": "<|reserved_token_198|>",
1701
+ "lstrip": false,
1702
+ "normalized": false,
1703
+ "rstrip": false,
1704
+ "single_word": false,
1705
+ "special": true
1706
+ },
1707
+ "151856": {
1708
+ "content": "<|reserved_token_199|>",
1709
+ "lstrip": false,
1710
+ "normalized": false,
1711
+ "rstrip": false,
1712
+ "single_word": false,
1713
+ "special": true
1714
+ },
1715
+ "151857": {
1716
+ "content": "<|reserved_token_200|>",
1717
+ "lstrip": false,
1718
+ "normalized": false,
1719
+ "rstrip": false,
1720
+ "single_word": false,
1721
+ "special": true
1722
+ },
1723
+ "151858": {
1724
+ "content": "<|reserved_token_201|>",
1725
+ "lstrip": false,
1726
+ "normalized": false,
1727
+ "rstrip": false,
1728
+ "single_word": false,
1729
+ "special": true
1730
+ },
1731
+ "151859": {
1732
+ "content": "<|reserved_token_202|>",
1733
+ "lstrip": false,
1734
+ "normalized": false,
1735
+ "rstrip": false,
1736
+ "single_word": false,
1737
+ "special": true
1738
+ },
1739
+ "151860": {
1740
+ "content": "<|reserved_token_203|>",
1741
+ "lstrip": false,
1742
+ "normalized": false,
1743
+ "rstrip": false,
1744
+ "single_word": false,
1745
+ "special": true
1746
+ },
1747
+ "151861": {
1748
+ "content": "<|reserved_token_204|>",
1749
+ "lstrip": false,
1750
+ "normalized": false,
1751
+ "rstrip": false,
1752
+ "single_word": false,
1753
+ "special": true
1754
+ },
1755
+ "151862": {
1756
+ "content": "<|reserved_token_205|>",
1757
+ "lstrip": false,
1758
+ "normalized": false,
1759
+ "rstrip": false,
1760
+ "single_word": false,
1761
+ "special": true
1762
+ },
1763
+ "151863": {
1764
+ "content": "<|reserved_token_206|>",
1765
+ "lstrip": false,
1766
+ "normalized": false,
1767
+ "rstrip": false,
1768
+ "single_word": false,
1769
+ "special": true
1770
+ },
1771
+ "151864": {
1772
+ "content": "<|reserved_token_207|>",
1773
+ "lstrip": false,
1774
+ "normalized": false,
1775
+ "rstrip": false,
1776
+ "single_word": false,
1777
+ "special": true
1778
+ },
1779
+ "151865": {
1780
+ "content": "<|reserved_token_208|>",
1781
+ "lstrip": false,
1782
+ "normalized": false,
1783
+ "rstrip": false,
1784
+ "single_word": false,
1785
+ "special": true
1786
+ },
1787
+ "151866": {
1788
+ "content": "<|reserved_token_209|>",
1789
+ "lstrip": false,
1790
+ "normalized": false,
1791
+ "rstrip": false,
1792
+ "single_word": false,
1793
+ "special": true
1794
+ },
1795
+ "151867": {
1796
+ "content": "<|reserved_token_210|>",
1797
+ "lstrip": false,
1798
+ "normalized": false,
1799
+ "rstrip": false,
1800
+ "single_word": false,
1801
+ "special": true
1802
+ },
1803
+ "151868": {
1804
+ "content": "<|reserved_token_211|>",
1805
+ "lstrip": false,
1806
+ "normalized": false,
1807
+ "rstrip": false,
1808
+ "single_word": false,
1809
+ "special": true
1810
+ },
1811
+ "151869": {
1812
+ "content": "<|reserved_token_212|>",
1813
+ "lstrip": false,
1814
+ "normalized": false,
1815
+ "rstrip": false,
1816
+ "single_word": false,
1817
+ "special": true
1818
+ },
1819
+ "151870": {
1820
+ "content": "<|reserved_token_213|>",
1821
+ "lstrip": false,
1822
+ "normalized": false,
1823
+ "rstrip": false,
1824
+ "single_word": false,
1825
+ "special": true
1826
+ },
1827
+ "151871": {
1828
+ "content": "<|reserved_token_214|>",
1829
+ "lstrip": false,
1830
+ "normalized": false,
1831
+ "rstrip": false,
1832
+ "single_word": false,
1833
+ "special": true
1834
+ },
1835
+ "151872": {
1836
+ "content": "<|reserved_token_215|>",
1837
+ "lstrip": false,
1838
+ "normalized": false,
1839
+ "rstrip": false,
1840
+ "single_word": false,
1841
+ "special": true
1842
+ },
1843
+ "151873": {
1844
+ "content": "<|reserved_token_216|>",
1845
+ "lstrip": false,
1846
+ "normalized": false,
1847
+ "rstrip": false,
1848
+ "single_word": false,
1849
+ "special": true
1850
+ },
1851
+ "151874": {
1852
+ "content": "<|reserved_token_217|>",
1853
+ "lstrip": false,
1854
+ "normalized": false,
1855
+ "rstrip": false,
1856
+ "single_word": false,
1857
+ "special": true
1858
+ },
1859
+ "151875": {
1860
+ "content": "<|reserved_token_218|>",
1861
+ "lstrip": false,
1862
+ "normalized": false,
1863
+ "rstrip": false,
1864
+ "single_word": false,
1865
+ "special": true
1866
+ },
1867
+ "151876": {
1868
+ "content": "<|reserved_token_219|>",
1869
+ "lstrip": false,
1870
+ "normalized": false,
1871
+ "rstrip": false,
1872
+ "single_word": false,
1873
+ "special": true
1874
+ },
1875
+ "151877": {
1876
+ "content": "<|reserved_token_220|>",
1877
+ "lstrip": false,
1878
+ "normalized": false,
1879
+ "rstrip": false,
1880
+ "single_word": false,
1881
+ "special": true
1882
+ },
1883
+ "151878": {
1884
+ "content": "<|reserved_token_221|>",
1885
+ "lstrip": false,
1886
+ "normalized": false,
1887
+ "rstrip": false,
1888
+ "single_word": false,
1889
+ "special": true
1890
+ },
1891
+ "151879": {
1892
+ "content": "<|reserved_token_222|>",
1893
+ "lstrip": false,
1894
+ "normalized": false,
1895
+ "rstrip": false,
1896
+ "single_word": false,
1897
+ "special": true
1898
+ },
1899
+ "151880": {
1900
+ "content": "<|reserved_token_223|>",
1901
+ "lstrip": false,
1902
+ "normalized": false,
1903
+ "rstrip": false,
1904
+ "single_word": false,
1905
+ "special": true
1906
+ },
1907
+ "151881": {
1908
+ "content": "<|reserved_token_224|>",
1909
+ "lstrip": false,
1910
+ "normalized": false,
1911
+ "rstrip": false,
1912
+ "single_word": false,
1913
+ "special": true
1914
+ },
1915
+ "151882": {
1916
+ "content": "<|reserved_token_225|>",
1917
+ "lstrip": false,
1918
+ "normalized": false,
1919
+ "rstrip": false,
1920
+ "single_word": false,
1921
+ "special": true
1922
+ },
1923
+ "151883": {
1924
+ "content": "<|reserved_token_226|>",
1925
+ "lstrip": false,
1926
+ "normalized": false,
1927
+ "rstrip": false,
1928
+ "single_word": false,
1929
+ "special": true
1930
+ },
1931
+ "151884": {
1932
+ "content": "<|reserved_token_227|>",
1933
+ "lstrip": false,
1934
+ "normalized": false,
1935
+ "rstrip": false,
1936
+ "single_word": false,
1937
+ "special": true
1938
+ },
1939
+ "151885": {
1940
+ "content": "<|reserved_token_228|>",
1941
+ "lstrip": false,
1942
+ "normalized": false,
1943
+ "rstrip": false,
1944
+ "single_word": false,
1945
+ "special": true
1946
+ },
1947
+ "151886": {
1948
+ "content": "<|reserved_token_229|>",
1949
+ "lstrip": false,
1950
+ "normalized": false,
1951
+ "rstrip": false,
1952
+ "single_word": false,
1953
+ "special": true
1954
+ },
1955
+ "151887": {
1956
+ "content": "<|reserved_token_230|>",
1957
+ "lstrip": false,
1958
+ "normalized": false,
1959
+ "rstrip": false,
1960
+ "single_word": false,
1961
+ "special": true
1962
+ },
1963
+ "151888": {
1964
+ "content": "<|reserved_token_231|>",
1965
+ "lstrip": false,
1966
+ "normalized": false,
1967
+ "rstrip": false,
1968
+ "single_word": false,
1969
+ "special": true
1970
+ },
1971
+ "151889": {
1972
+ "content": "<|reserved_token_232|>",
1973
+ "lstrip": false,
1974
+ "normalized": false,
1975
+ "rstrip": false,
1976
+ "single_word": false,
1977
+ "special": true
1978
+ },
1979
+ "151890": {
1980
+ "content": "<|reserved_token_233|>",
1981
+ "lstrip": false,
1982
+ "normalized": false,
1983
+ "rstrip": false,
1984
+ "single_word": false,
1985
+ "special": true
1986
+ },
1987
+ "151891": {
1988
+ "content": "<|reserved_token_234|>",
1989
+ "lstrip": false,
1990
+ "normalized": false,
1991
+ "rstrip": false,
1992
+ "single_word": false,
1993
+ "special": true
1994
+ },
1995
+ "151892": {
1996
+ "content": "<|reserved_token_235|>",
1997
+ "lstrip": false,
1998
+ "normalized": false,
1999
+ "rstrip": false,
2000
+ "single_word": false,
2001
+ "special": true
2002
+ },
2003
+ "151893": {
2004
+ "content": "<|reserved_token_236|>",
2005
+ "lstrip": false,
2006
+ "normalized": false,
2007
+ "rstrip": false,
2008
+ "single_word": false,
2009
+ "special": true
2010
+ },
2011
+ "151894": {
2012
+ "content": "<|reserved_token_237|>",
2013
+ "lstrip": false,
2014
+ "normalized": false,
2015
+ "rstrip": false,
2016
+ "single_word": false,
2017
+ "special": true
2018
+ },
2019
+ "151895": {
2020
+ "content": "<|reserved_token_238|>",
2021
+ "lstrip": false,
2022
+ "normalized": false,
2023
+ "rstrip": false,
2024
+ "single_word": false,
2025
+ "special": true
2026
+ },
2027
+ "151896": {
2028
+ "content": "<|reserved_token_239|>",
2029
+ "lstrip": false,
2030
+ "normalized": false,
2031
+ "rstrip": false,
2032
+ "single_word": false,
2033
+ "special": true
2034
+ },
2035
+ "151897": {
2036
+ "content": "<|reserved_token_240|>",
2037
+ "lstrip": false,
2038
+ "normalized": false,
2039
+ "rstrip": false,
2040
+ "single_word": false,
2041
+ "special": true
2042
+ },
2043
+ "151898": {
2044
+ "content": "<|reserved_token_241|>",
2045
+ "lstrip": false,
2046
+ "normalized": false,
2047
+ "rstrip": false,
2048
+ "single_word": false,
2049
+ "special": true
2050
+ },
2051
+ "151899": {
2052
+ "content": "<|reserved_token_242|>",
2053
+ "lstrip": false,
2054
+ "normalized": false,
2055
+ "rstrip": false,
2056
+ "single_word": false,
2057
+ "special": true
2058
+ },
2059
+ "151900": {
2060
+ "content": "<|reserved_token_243|>",
2061
+ "lstrip": false,
2062
+ "normalized": false,
2063
+ "rstrip": false,
2064
+ "single_word": false,
2065
+ "special": true
2066
+ },
2067
+ "151901": {
2068
+ "content": "<|reserved_token_244|>",
2069
+ "lstrip": false,
2070
+ "normalized": false,
2071
+ "rstrip": false,
2072
+ "single_word": false,
2073
+ "special": true
2074
+ },
2075
+ "151902": {
2076
+ "content": "<|reserved_token_245|>",
2077
+ "lstrip": false,
2078
+ "normalized": false,
2079
+ "rstrip": false,
2080
+ "single_word": false,
2081
+ "special": true
2082
+ },
2083
+ "151903": {
2084
+ "content": "<|reserved_token_246|>",
2085
+ "lstrip": false,
2086
+ "normalized": false,
2087
+ "rstrip": false,
2088
+ "single_word": false,
2089
+ "special": true
2090
+ },
2091
+ "151904": {
2092
+ "content": "<|reserved_token_247|>",
2093
+ "lstrip": false,
2094
+ "normalized": false,
2095
+ "rstrip": false,
2096
+ "single_word": false,
2097
+ "special": true
2098
+ },
2099
+ "151905": {
2100
+ "content": "<|reserved_token_248|>",
2101
+ "lstrip": false,
2102
+ "normalized": false,
2103
+ "rstrip": false,
2104
+ "single_word": false,
2105
+ "special": true
2106
+ },
2107
+ "151906": {
2108
+ "content": "<|reserved_token_249|>",
2109
+ "lstrip": false,
2110
+ "normalized": false,
2111
+ "rstrip": false,
2112
+ "single_word": false,
2113
+ "special": true
2114
+ },
2115
+ "151907": {
2116
+ "content": "<|reserved_token_250|>",
2117
+ "lstrip": false,
2118
+ "normalized": false,
2119
+ "rstrip": false,
2120
+ "single_word": false,
2121
+ "special": true
2122
+ },
2123
+ "151908": {
2124
+ "content": "<|reserved_token_251|>",
2125
+ "lstrip": false,
2126
+ "normalized": false,
2127
+ "rstrip": false,
2128
+ "single_word": false,
2129
+ "special": true
2130
+ },
2131
+ "151909": {
2132
+ "content": "<|reserved_token_252|>",
2133
+ "lstrip": false,
2134
+ "normalized": false,
2135
+ "rstrip": false,
2136
+ "single_word": false,
2137
+ "special": true
2138
+ },
2139
+ "151910": {
2140
+ "content": "<|reserved_token_253|>",
2141
+ "lstrip": false,
2142
+ "normalized": false,
2143
+ "rstrip": false,
2144
+ "single_word": false,
2145
+ "special": true
2146
+ },
2147
+ "151911": {
2148
+ "content": "<|reserved_token_254|>",
2149
+ "lstrip": false,
2150
+ "normalized": false,
2151
+ "rstrip": false,
2152
+ "single_word": false,
2153
+ "special": true
2154
+ },
2155
+ "151912": {
2156
+ "content": "<|reserved_token_255|>",
2157
+ "lstrip": false,
2158
+ "normalized": false,
2159
+ "rstrip": false,
2160
+ "single_word": false,
2161
+ "special": true
2162
+ },
2163
+ "151913": {
2164
+ "content": "<|reserved_token_256|>",
2165
+ "lstrip": false,
2166
+ "normalized": false,
2167
+ "rstrip": false,
2168
+ "single_word": false,
2169
+ "special": true
2170
+ },
2171
+ "151914": {
2172
+ "content": "<|reserved_token_257|>",
2173
+ "lstrip": false,
2174
+ "normalized": false,
2175
+ "rstrip": false,
2176
+ "single_word": false,
2177
+ "special": true
2178
+ },
2179
+ "151915": {
2180
+ "content": "<|reserved_token_258|>",
2181
+ "lstrip": false,
2182
+ "normalized": false,
2183
+ "rstrip": false,
2184
+ "single_word": false,
2185
+ "special": true
2186
+ },
2187
+ "151916": {
2188
+ "content": "<|reserved_token_259|>",
2189
+ "lstrip": false,
2190
+ "normalized": false,
2191
+ "rstrip": false,
2192
+ "single_word": false,
2193
+ "special": true
2194
+ },
2195
+ "151917": {
2196
+ "content": "<|reserved_token_260|>",
2197
+ "lstrip": false,
2198
+ "normalized": false,
2199
+ "rstrip": false,
2200
+ "single_word": false,
2201
+ "special": true
2202
+ },
2203
+ "151918": {
2204
+ "content": "<|reserved_token_261|>",
2205
+ "lstrip": false,
2206
+ "normalized": false,
2207
+ "rstrip": false,
2208
+ "single_word": false,
2209
+ "special": true
2210
+ },
2211
+ "151919": {
2212
+ "content": "<|reserved_token_262|>",
2213
+ "lstrip": false,
2214
+ "normalized": false,
2215
+ "rstrip": false,
2216
+ "single_word": false,
2217
+ "special": true
2218
+ },
2219
+ "151920": {
2220
+ "content": "<|reserved_token_263|>",
2221
+ "lstrip": false,
2222
+ "normalized": false,
2223
+ "rstrip": false,
2224
+ "single_word": false,
2225
+ "special": true
2226
+ },
2227
+ "151921": {
2228
+ "content": "<|reserved_token_264|>",
2229
+ "lstrip": false,
2230
+ "normalized": false,
2231
+ "rstrip": false,
2232
+ "single_word": false,
2233
+ "special": true
2234
+ },
2235
+ "151922": {
2236
+ "content": "<|reserved_token_265|>",
2237
+ "lstrip": false,
2238
+ "normalized": false,
2239
+ "rstrip": false,
2240
+ "single_word": false,
2241
+ "special": true
2242
+ },
2243
+ "151923": {
2244
+ "content": "<|reserved_token_266|>",
2245
+ "lstrip": false,
2246
+ "normalized": false,
2247
+ "rstrip": false,
2248
+ "single_word": false,
2249
+ "special": true
2250
+ },
2251
+ "151924": {
2252
+ "content": "<|reserved_token_267|>",
2253
+ "lstrip": false,
2254
+ "normalized": false,
2255
+ "rstrip": false,
2256
+ "single_word": false,
2257
+ "special": true
2258
+ },
2259
+ "151925": {
2260
+ "content": "<|reserved_token_268|>",
2261
+ "lstrip": false,
2262
+ "normalized": false,
2263
+ "rstrip": false,
2264
+ "single_word": false,
2265
+ "special": true
2266
+ },
2267
+ "151926": {
2268
+ "content": "<|reserved_token_269|>",
2269
+ "lstrip": false,
2270
+ "normalized": false,
2271
+ "rstrip": false,
2272
+ "single_word": false,
2273
+ "special": true
2274
+ },
2275
+ "151927": {
2276
+ "content": "<|reserved_token_270|>",
2277
+ "lstrip": false,
2278
+ "normalized": false,
2279
+ "rstrip": false,
2280
+ "single_word": false,
2281
+ "special": true
2282
+ },
2283
+ "151928": {
2284
+ "content": "<|reserved_token_271|>",
2285
+ "lstrip": false,
2286
+ "normalized": false,
2287
+ "rstrip": false,
2288
+ "single_word": false,
2289
+ "special": true
2290
+ },
2291
+ "151929": {
2292
+ "content": "<|reserved_token_272|>",
2293
+ "lstrip": false,
2294
+ "normalized": false,
2295
+ "rstrip": false,
2296
+ "single_word": false,
2297
+ "special": true
2298
+ },
2299
+ "151930": {
2300
+ "content": "<|reserved_token_273|>",
2301
+ "lstrip": false,
2302
+ "normalized": false,
2303
+ "rstrip": false,
2304
+ "single_word": false,
2305
+ "special": true
2306
+ },
2307
+ "151931": {
2308
+ "content": "<|reserved_token_274|>",
2309
+ "lstrip": false,
2310
+ "normalized": false,
2311
+ "rstrip": false,
2312
+ "single_word": false,
2313
+ "special": true
2314
+ },
2315
+ "151932": {
2316
+ "content": "<|reserved_token_275|>",
2317
+ "lstrip": false,
2318
+ "normalized": false,
2319
+ "rstrip": false,
2320
+ "single_word": false,
2321
+ "special": true
2322
+ },
2323
+ "151933": {
2324
+ "content": "<|reserved_token_276|>",
2325
+ "lstrip": false,
2326
+ "normalized": false,
2327
+ "rstrip": false,
2328
+ "single_word": false,
2329
+ "special": true
2330
+ },
2331
+ "151934": {
2332
+ "content": "<|reserved_token_277|>",
2333
+ "lstrip": false,
2334
+ "normalized": false,
2335
+ "rstrip": false,
2336
+ "single_word": false,
2337
+ "special": true
2338
+ },
2339
+ "151935": {
2340
+ "content": "<|reserved_token_278|>",
2341
+ "lstrip": false,
2342
+ "normalized": false,
2343
+ "rstrip": false,
2344
+ "single_word": false,
2345
+ "special": true
2346
+ },
2347
+ "151936": {
2348
+ "content": "<|reserved_token_279|>",
2349
+ "lstrip": false,
2350
+ "normalized": false,
2351
+ "rstrip": false,
2352
+ "single_word": false,
2353
+ "special": true
2354
+ },
2355
+ "151937": {
2356
+ "content": "<|reserved_token_280|>",
2357
+ "lstrip": false,
2358
+ "normalized": false,
2359
+ "rstrip": false,
2360
+ "single_word": false,
2361
+ "special": true
2362
+ },
2363
+ "151938": {
2364
+ "content": "<|reserved_token_281|>",
2365
+ "lstrip": false,
2366
+ "normalized": false,
2367
+ "rstrip": false,
2368
+ "single_word": false,
2369
+ "special": true
2370
+ },
2371
+ "151939": {
2372
+ "content": "<|reserved_token_282|>",
2373
+ "lstrip": false,
2374
+ "normalized": false,
2375
+ "rstrip": false,
2376
+ "single_word": false,
2377
+ "special": true
2378
+ },
2379
+ "151940": {
2380
+ "content": "<|reserved_token_283|>",
2381
+ "lstrip": false,
2382
+ "normalized": false,
2383
+ "rstrip": false,
2384
+ "single_word": false,
2385
+ "special": true
2386
+ },
2387
+ "151941": {
2388
+ "content": "<|reserved_token_284|>",
2389
+ "lstrip": false,
2390
+ "normalized": false,
2391
+ "rstrip": false,
2392
+ "single_word": false,
2393
+ "special": true
2394
+ },
2395
+ "151942": {
2396
+ "content": "<|reserved_token_285|>",
2397
+ "lstrip": false,
2398
+ "normalized": false,
2399
+ "rstrip": false,
2400
+ "single_word": false,
2401
+ "special": true
2402
+ },
2403
+ "151943": {
2404
+ "content": "<|reserved_token_286|>",
2405
+ "lstrip": false,
2406
+ "normalized": false,
2407
+ "rstrip": false,
2408
+ "single_word": false,
2409
+ "special": true
2410
+ },
2411
+ "151944": {
2412
+ "content": "<|reserved_token_287|>",
2413
+ "lstrip": false,
2414
+ "normalized": false,
2415
+ "rstrip": false,
2416
+ "single_word": false,
2417
+ "special": true
2418
+ },
2419
+ "151945": {
2420
+ "content": "<|reserved_token_288|>",
2421
+ "lstrip": false,
2422
+ "normalized": false,
2423
+ "rstrip": false,
2424
+ "single_word": false,
2425
+ "special": true
2426
+ },
2427
+ "151946": {
2428
+ "content": "<|reserved_token_289|>",
2429
+ "lstrip": false,
2430
+ "normalized": false,
2431
+ "rstrip": false,
2432
+ "single_word": false,
2433
+ "special": true
2434
+ },
2435
+ "151947": {
2436
+ "content": "<|reserved_token_290|>",
2437
+ "lstrip": false,
2438
+ "normalized": false,
2439
+ "rstrip": false,
2440
+ "single_word": false,
2441
+ "special": true
2442
+ },
2443
+ "151948": {
2444
+ "content": "<|reserved_token_291|>",
2445
+ "lstrip": false,
2446
+ "normalized": false,
2447
+ "rstrip": false,
2448
+ "single_word": false,
2449
+ "special": true
2450
+ },
2451
+ "151949": {
2452
+ "content": "<|reserved_token_292|>",
2453
+ "lstrip": false,
2454
+ "normalized": false,
2455
+ "rstrip": false,
2456
+ "single_word": false,
2457
+ "special": true
2458
+ },
2459
+ "151950": {
2460
+ "content": "<|reserved_token_293|>",
2461
+ "lstrip": false,
2462
+ "normalized": false,
2463
+ "rstrip": false,
2464
+ "single_word": false,
2465
+ "special": true
2466
+ },
2467
+ "151951": {
2468
+ "content": "<|reserved_token_294|>",
2469
+ "lstrip": false,
2470
+ "normalized": false,
2471
+ "rstrip": false,
2472
+ "single_word": false,
2473
+ "special": true
2474
+ },
2475
+ "151952": {
2476
+ "content": "<|reserved_token_295|>",
2477
+ "lstrip": false,
2478
+ "normalized": false,
2479
+ "rstrip": false,
2480
+ "single_word": false,
2481
+ "special": true
2482
+ },
2483
+ "151953": {
2484
+ "content": "<|reserved_token_296|>",
2485
+ "lstrip": false,
2486
+ "normalized": false,
2487
+ "rstrip": false,
2488
+ "single_word": false,
2489
+ "special": true
2490
+ },
2491
+ "151954": {
2492
+ "content": "<|reserved_token_297|>",
2493
+ "lstrip": false,
2494
+ "normalized": false,
2495
+ "rstrip": false,
2496
+ "single_word": false,
2497
+ "special": true
2498
+ },
2499
+ "151955": {
2500
+ "content": "<|reserved_token_298|>",
2501
+ "lstrip": false,
2502
+ "normalized": false,
2503
+ "rstrip": false,
2504
+ "single_word": false,
2505
+ "special": true
2506
+ },
2507
+ "151956": {
2508
+ "content": "<|reserved_token_299|>",
2509
+ "lstrip": false,
2510
+ "normalized": false,
2511
+ "rstrip": false,
2512
+ "single_word": false,
2513
+ "special": true
2514
+ },
2515
+ "151957": {
2516
+ "content": "<|reserved_token_300|>",
2517
+ "lstrip": false,
2518
+ "normalized": false,
2519
+ "rstrip": false,
2520
+ "single_word": false,
2521
+ "special": true
2522
+ },
2523
+ "151958": {
2524
+ "content": "<|reserved_token_301|>",
2525
+ "lstrip": false,
2526
+ "normalized": false,
2527
+ "rstrip": false,
2528
+ "single_word": false,
2529
+ "special": true
2530
+ },
2531
+ "151959": {
2532
+ "content": "<|reserved_token_302|>",
2533
+ "lstrip": false,
2534
+ "normalized": false,
2535
+ "rstrip": false,
2536
+ "single_word": false,
2537
+ "special": true
2538
+ },
2539
+ "151960": {
2540
+ "content": "<|reserved_token_303|>",
2541
+ "lstrip": false,
2542
+ "normalized": false,
2543
+ "rstrip": false,
2544
+ "single_word": false,
2545
+ "special": true
2546
+ },
2547
+ "151961": {
2548
+ "content": "<|reserved_token_304|>",
2549
+ "lstrip": false,
2550
+ "normalized": false,
2551
+ "rstrip": false,
2552
+ "single_word": false,
2553
+ "special": true
2554
+ },
2555
+ "151962": {
2556
+ "content": "<|reserved_token_305|>",
2557
+ "lstrip": false,
2558
+ "normalized": false,
2559
+ "rstrip": false,
2560
+ "single_word": false,
2561
+ "special": true
2562
+ },
2563
+ "151963": {
2564
+ "content": "<|reserved_token_306|>",
2565
+ "lstrip": false,
2566
+ "normalized": false,
2567
+ "rstrip": false,
2568
+ "single_word": false,
2569
+ "special": true
2570
+ },
2571
+ "151964": {
2572
+ "content": "<|reserved_token_307|>",
2573
+ "lstrip": false,
2574
+ "normalized": false,
2575
+ "rstrip": false,
2576
+ "single_word": false,
2577
+ "special": true
2578
+ },
2579
+ "151965": {
2580
+ "content": "<|reserved_token_308|>",
2581
+ "lstrip": false,
2582
+ "normalized": false,
2583
+ "rstrip": false,
2584
+ "single_word": false,
2585
+ "special": true
2586
+ },
2587
+ "151966": {
2588
+ "content": "<|reserved_token_309|>",
2589
+ "lstrip": false,
2590
+ "normalized": false,
2591
+ "rstrip": false,
2592
+ "single_word": false,
2593
+ "special": true
2594
+ },
2595
+ "151967": {
2596
+ "content": "<|reserved_token_310|>",
2597
+ "lstrip": false,
2598
+ "normalized": false,
2599
+ "rstrip": false,
2600
+ "single_word": false,
2601
+ "special": true
2602
+ },
2603
+ "151968": {
2604
+ "content": "<|reserved_token_311|>",
2605
+ "lstrip": false,
2606
+ "normalized": false,
2607
+ "rstrip": false,
2608
+ "single_word": false,
2609
+ "special": true
2610
+ },
2611
+ "151969": {
2612
+ "content": "<|reserved_token_312|>",
2613
+ "lstrip": false,
2614
+ "normalized": false,
2615
+ "rstrip": false,
2616
+ "single_word": false,
2617
+ "special": true
2618
+ },
2619
+ "151970": {
2620
+ "content": "<|reserved_token_313|>",
2621
+ "lstrip": false,
2622
+ "normalized": false,
2623
+ "rstrip": false,
2624
+ "single_word": false,
2625
+ "special": true
2626
+ },
2627
+ "151971": {
2628
+ "content": "<|reserved_token_314|>",
2629
+ "lstrip": false,
2630
+ "normalized": false,
2631
+ "rstrip": false,
2632
+ "single_word": false,
2633
+ "special": true
2634
+ },
2635
+ "151972": {
2636
+ "content": "<|reserved_token_315|>",
2637
+ "lstrip": false,
2638
+ "normalized": false,
2639
+ "rstrip": false,
2640
+ "single_word": false,
2641
+ "special": true
2642
+ },
2643
+ "151973": {
2644
+ "content": "<|reserved_token_316|>",
2645
+ "lstrip": false,
2646
+ "normalized": false,
2647
+ "rstrip": false,
2648
+ "single_word": false,
2649
+ "special": true
2650
+ },
2651
+ "151974": {
2652
+ "content": "<|reserved_token_317|>",
2653
+ "lstrip": false,
2654
+ "normalized": false,
2655
+ "rstrip": false,
2656
+ "single_word": false,
2657
+ "special": true
2658
+ },
2659
+ "151975": {
2660
+ "content": "<|reserved_token_318|>",
2661
+ "lstrip": false,
2662
+ "normalized": false,
2663
+ "rstrip": false,
2664
+ "single_word": false,
2665
+ "special": true
2666
+ },
2667
+ "151976": {
2668
+ "content": "<|reserved_token_319|>",
2669
+ "lstrip": false,
2670
+ "normalized": false,
2671
+ "rstrip": false,
2672
+ "single_word": false,
2673
+ "special": true
2674
+ },
2675
+ "151977": {
2676
+ "content": "<|reserved_token_320|>",
2677
+ "lstrip": false,
2678
+ "normalized": false,
2679
+ "rstrip": false,
2680
+ "single_word": false,
2681
+ "special": true
2682
+ },
2683
+ "151978": {
2684
+ "content": "<|reserved_token_321|>",
2685
+ "lstrip": false,
2686
+ "normalized": false,
2687
+ "rstrip": false,
2688
+ "single_word": false,
2689
+ "special": true
2690
+ },
2691
+ "151979": {
2692
+ "content": "<|reserved_token_322|>",
2693
+ "lstrip": false,
2694
+ "normalized": false,
2695
+ "rstrip": false,
2696
+ "single_word": false,
2697
+ "special": true
2698
+ },
2699
+ "151980": {
2700
+ "content": "<|reserved_token_323|>",
2701
+ "lstrip": false,
2702
+ "normalized": false,
2703
+ "rstrip": false,
2704
+ "single_word": false,
2705
+ "special": true
2706
+ },
2707
+ "151981": {
2708
+ "content": "<|reserved_token_324|>",
2709
+ "lstrip": false,
2710
+ "normalized": false,
2711
+ "rstrip": false,
2712
+ "single_word": false,
2713
+ "special": true
2714
+ },
2715
+ "151982": {
2716
+ "content": "<|reserved_token_325|>",
2717
+ "lstrip": false,
2718
+ "normalized": false,
2719
+ "rstrip": false,
2720
+ "single_word": false,
2721
+ "special": true
2722
+ },
2723
+ "151983": {
2724
+ "content": "<|reserved_token_326|>",
2725
+ "lstrip": false,
2726
+ "normalized": false,
2727
+ "rstrip": false,
2728
+ "single_word": false,
2729
+ "special": true
2730
+ },
2731
+ "151984": {
2732
+ "content": "<|reserved_token_327|>",
2733
+ "lstrip": false,
2734
+ "normalized": false,
2735
+ "rstrip": false,
2736
+ "single_word": false,
2737
+ "special": true
2738
+ },
2739
+ "151985": {
2740
+ "content": "<|reserved_token_328|>",
2741
+ "lstrip": false,
2742
+ "normalized": false,
2743
+ "rstrip": false,
2744
+ "single_word": false,
2745
+ "special": true
2746
+ },
2747
+ "151986": {
2748
+ "content": "<|reserved_token_329|>",
2749
+ "lstrip": false,
2750
+ "normalized": false,
2751
+ "rstrip": false,
2752
+ "single_word": false,
2753
+ "special": true
2754
+ },
2755
+ "151987": {
2756
+ "content": "<|reserved_token_330|>",
2757
+ "lstrip": false,
2758
+ "normalized": false,
2759
+ "rstrip": false,
2760
+ "single_word": false,
2761
+ "special": true
2762
+ },
2763
+ "151988": {
2764
+ "content": "<|reserved_token_331|>",
2765
+ "lstrip": false,
2766
+ "normalized": false,
2767
+ "rstrip": false,
2768
+ "single_word": false,
2769
+ "special": true
2770
+ },
2771
+ "151989": {
2772
+ "content": "<|reserved_token_332|>",
2773
+ "lstrip": false,
2774
+ "normalized": false,
2775
+ "rstrip": false,
2776
+ "single_word": false,
2777
+ "special": true
2778
+ },
2779
+ "151990": {
2780
+ "content": "<|reserved_token_333|>",
2781
+ "lstrip": false,
2782
+ "normalized": false,
2783
+ "rstrip": false,
2784
+ "single_word": false,
2785
+ "special": true
2786
+ },
2787
+ "151991": {
2788
+ "content": "<|reserved_token_334|>",
2789
+ "lstrip": false,
2790
+ "normalized": false,
2791
+ "rstrip": false,
2792
+ "single_word": false,
2793
+ "special": true
2794
+ },
2795
+ "151992": {
2796
+ "content": "<|reserved_token_335|>",
2797
+ "lstrip": false,
2798
+ "normalized": false,
2799
+ "rstrip": false,
2800
+ "single_word": false,
2801
+ "special": true
2802
+ },
2803
+ "151993": {
2804
+ "content": "<|reserved_token_336|>",
2805
+ "lstrip": false,
2806
+ "normalized": false,
2807
+ "rstrip": false,
2808
+ "single_word": false,
2809
+ "special": true
2810
+ },
2811
+ "151994": {
2812
+ "content": "<|reserved_token_337|>",
2813
+ "lstrip": false,
2814
+ "normalized": false,
2815
+ "rstrip": false,
2816
+ "single_word": false,
2817
+ "special": true
2818
+ },
2819
+ "151995": {
2820
+ "content": "<|reserved_token_338|>",
2821
+ "lstrip": false,
2822
+ "normalized": false,
2823
+ "rstrip": false,
2824
+ "single_word": false,
2825
+ "special": true
2826
+ },
2827
+ "151996": {
2828
+ "content": "<|reserved_token_339|>",
2829
+ "lstrip": false,
2830
+ "normalized": false,
2831
+ "rstrip": false,
2832
+ "single_word": false,
2833
+ "special": true
2834
+ },
2835
+ "151997": {
2836
+ "content": "<|reserved_token_340|>",
2837
+ "lstrip": false,
2838
+ "normalized": false,
2839
+ "rstrip": false,
2840
+ "single_word": false,
2841
+ "special": true
2842
+ },
2843
+ "151998": {
2844
+ "content": "<|reserved_token_341|>",
2845
+ "lstrip": false,
2846
+ "normalized": false,
2847
+ "rstrip": false,
2848
+ "single_word": false,
2849
+ "special": true
2850
+ },
2851
+ "151999": {
2852
+ "content": "<|reserved_token_342|>",
2853
+ "lstrip": false,
2854
+ "normalized": false,
2855
+ "rstrip": false,
2856
+ "single_word": false,
2857
+ "special": true
2858
+ },
2859
+ "152000": {
2860
+ "content": "<|reserved_token_343|>",
2861
+ "lstrip": false,
2862
+ "normalized": false,
2863
+ "rstrip": false,
2864
+ "single_word": false,
2865
+ "special": true
2866
+ },
2867
+ "152001": {
2868
+ "content": "<|reserved_token_344|>",
2869
+ "lstrip": false,
2870
+ "normalized": false,
2871
+ "rstrip": false,
2872
+ "single_word": false,
2873
+ "special": true
2874
+ },
2875
+ "152002": {
2876
+ "content": "<|reserved_token_345|>",
2877
+ "lstrip": false,
2878
+ "normalized": false,
2879
+ "rstrip": false,
2880
+ "single_word": false,
2881
+ "special": true
2882
+ },
2883
+ "152003": {
2884
+ "content": "<|reserved_token_346|>",
2885
+ "lstrip": false,
2886
+ "normalized": false,
2887
+ "rstrip": false,
2888
+ "single_word": false,
2889
+ "special": true
2890
+ },
2891
+ "152004": {
2892
+ "content": "<|reserved_token_347|>",
2893
+ "lstrip": false,
2894
+ "normalized": false,
2895
+ "rstrip": false,
2896
+ "single_word": false,
2897
+ "special": true
2898
+ },
2899
+ "152005": {
2900
+ "content": "<|reserved_token_348|>",
2901
+ "lstrip": false,
2902
+ "normalized": false,
2903
+ "rstrip": false,
2904
+ "single_word": false,
2905
+ "special": true
2906
+ },
2907
+ "152006": {
2908
+ "content": "<|reserved_token_349|>",
2909
+ "lstrip": false,
2910
+ "normalized": false,
2911
+ "rstrip": false,
2912
+ "single_word": false,
2913
+ "special": true
2914
+ },
2915
+ "152007": {
2916
+ "content": "<|reserved_token_350|>",
2917
+ "lstrip": false,
2918
+ "normalized": false,
2919
+ "rstrip": false,
2920
+ "single_word": false,
2921
+ "special": true
2922
+ },
2923
+ "152008": {
2924
+ "content": "<|reserved_token_351|>",
2925
+ "lstrip": false,
2926
+ "normalized": false,
2927
+ "rstrip": false,
2928
+ "single_word": false,
2929
+ "special": true
2930
+ },
2931
+ "152009": {
2932
+ "content": "<|reserved_token_352|>",
2933
+ "lstrip": false,
2934
+ "normalized": false,
2935
+ "rstrip": false,
2936
+ "single_word": false,
2937
+ "special": true
2938
+ },
2939
+ "152010": {
2940
+ "content": "<|reserved_token_353|>",
2941
+ "lstrip": false,
2942
+ "normalized": false,
2943
+ "rstrip": false,
2944
+ "single_word": false,
2945
+ "special": true
2946
+ },
2947
+ "152011": {
2948
+ "content": "<|reserved_token_354|>",
2949
+ "lstrip": false,
2950
+ "normalized": false,
2951
+ "rstrip": false,
2952
+ "single_word": false,
2953
+ "special": true
2954
+ },
2955
+ "152012": {
2956
+ "content": "<|reserved_token_355|>",
2957
+ "lstrip": false,
2958
+ "normalized": false,
2959
+ "rstrip": false,
2960
+ "single_word": false,
2961
+ "special": true
2962
+ },
2963
+ "152013": {
2964
+ "content": "<|reserved_token_356|>",
2965
+ "lstrip": false,
2966
+ "normalized": false,
2967
+ "rstrip": false,
2968
+ "single_word": false,
2969
+ "special": true
2970
+ },
2971
+ "152014": {
2972
+ "content": "<|reserved_token_357|>",
2973
+ "lstrip": false,
2974
+ "normalized": false,
2975
+ "rstrip": false,
2976
+ "single_word": false,
2977
+ "special": true
2978
+ },
2979
+ "152015": {
2980
+ "content": "<|reserved_token_358|>",
2981
+ "lstrip": false,
2982
+ "normalized": false,
2983
+ "rstrip": false,
2984
+ "single_word": false,
2985
+ "special": true
2986
+ },
2987
+ "152016": {
2988
+ "content": "<|reserved_token_359|>",
2989
+ "lstrip": false,
2990
+ "normalized": false,
2991
+ "rstrip": false,
2992
+ "single_word": false,
2993
+ "special": true
2994
+ },
2995
+ "152017": {
2996
+ "content": "<|reserved_token_360|>",
2997
+ "lstrip": false,
2998
+ "normalized": false,
2999
+ "rstrip": false,
3000
+ "single_word": false,
3001
+ "special": true
3002
+ },
3003
+ "152018": {
3004
+ "content": "<|reserved_token_361|>",
3005
+ "lstrip": false,
3006
+ "normalized": false,
3007
+ "rstrip": false,
3008
+ "single_word": false,
3009
+ "special": true
3010
+ },
3011
+ "152019": {
3012
+ "content": "<|reserved_token_362|>",
3013
+ "lstrip": false,
3014
+ "normalized": false,
3015
+ "rstrip": false,
3016
+ "single_word": false,
3017
+ "special": true
3018
+ },
3019
+ "152020": {
3020
+ "content": "<|reserved_token_363|>",
3021
+ "lstrip": false,
3022
+ "normalized": false,
3023
+ "rstrip": false,
3024
+ "single_word": false,
3025
+ "special": true
3026
+ },
3027
+ "152021": {
3028
+ "content": "<|reserved_token_364|>",
3029
+ "lstrip": false,
3030
+ "normalized": false,
3031
+ "rstrip": false,
3032
+ "single_word": false,
3033
+ "special": true
3034
+ },
3035
+ "152022": {
3036
+ "content": "<|reserved_token_365|>",
3037
+ "lstrip": false,
3038
+ "normalized": false,
3039
+ "rstrip": false,
3040
+ "single_word": false,
3041
+ "special": true
3042
+ },
3043
+ "152023": {
3044
+ "content": "<|reserved_token_366|>",
3045
+ "lstrip": false,
3046
+ "normalized": false,
3047
+ "rstrip": false,
3048
+ "single_word": false,
3049
+ "special": true
3050
+ },
3051
+ "152024": {
3052
+ "content": "<|reserved_token_367|>",
3053
+ "lstrip": false,
3054
+ "normalized": false,
3055
+ "rstrip": false,
3056
+ "single_word": false,
3057
+ "special": true
3058
+ },
3059
+ "152025": {
3060
+ "content": "<|reserved_token_368|>",
3061
+ "lstrip": false,
3062
+ "normalized": false,
3063
+ "rstrip": false,
3064
+ "single_word": false,
3065
+ "special": true
3066
+ },
3067
+ "152026": {
3068
+ "content": "<|reserved_token_369|>",
3069
+ "lstrip": false,
3070
+ "normalized": false,
3071
+ "rstrip": false,
3072
+ "single_word": false,
3073
+ "special": true
3074
+ },
3075
+ "152027": {
3076
+ "content": "<|reserved_token_370|>",
3077
+ "lstrip": false,
3078
+ "normalized": false,
3079
+ "rstrip": false,
3080
+ "single_word": false,
3081
+ "special": true
3082
+ },
3083
+ "152028": {
3084
+ "content": "<|reserved_token_371|>",
3085
+ "lstrip": false,
3086
+ "normalized": false,
3087
+ "rstrip": false,
3088
+ "single_word": false,
3089
+ "special": true
3090
+ },
3091
+ "152029": {
3092
+ "content": "<|reserved_token_372|>",
3093
+ "lstrip": false,
3094
+ "normalized": false,
3095
+ "rstrip": false,
3096
+ "single_word": false,
3097
+ "special": true
3098
+ },
3099
+ "152030": {
3100
+ "content": "<|reserved_token_373|>",
3101
+ "lstrip": false,
3102
+ "normalized": false,
3103
+ "rstrip": false,
3104
+ "single_word": false,
3105
+ "special": true
3106
+ },
3107
+ "152031": {
3108
+ "content": "<|reserved_token_374|>",
3109
+ "lstrip": false,
3110
+ "normalized": false,
3111
+ "rstrip": false,
3112
+ "single_word": false,
3113
+ "special": true
3114
+ },
3115
+ "152032": {
3116
+ "content": "<|reserved_token_375|>",
3117
+ "lstrip": false,
3118
+ "normalized": false,
3119
+ "rstrip": false,
3120
+ "single_word": false,
3121
+ "special": true
3122
+ },
3123
+ "152033": {
3124
+ "content": "<|reserved_token_376|>",
3125
+ "lstrip": false,
3126
+ "normalized": false,
3127
+ "rstrip": false,
3128
+ "single_word": false,
3129
+ "special": true
3130
+ },
3131
+ "152034": {
3132
+ "content": "<|reserved_token_377|>",
3133
+ "lstrip": false,
3134
+ "normalized": false,
3135
+ "rstrip": false,
3136
+ "single_word": false,
3137
+ "special": true
3138
+ },
3139
+ "152035": {
3140
+ "content": "<|reserved_token_378|>",
3141
+ "lstrip": false,
3142
+ "normalized": false,
3143
+ "rstrip": false,
3144
+ "single_word": false,
3145
+ "special": true
3146
+ },
3147
+ "152036": {
3148
+ "content": "<|reserved_token_379|>",
3149
+ "lstrip": false,
3150
+ "normalized": false,
3151
+ "rstrip": false,
3152
+ "single_word": false,
3153
+ "special": true
3154
+ },
3155
+ "152037": {
3156
+ "content": "<|reserved_token_380|>",
3157
+ "lstrip": false,
3158
+ "normalized": false,
3159
+ "rstrip": false,
3160
+ "single_word": false,
3161
+ "special": true
3162
+ },
3163
+ "152038": {
3164
+ "content": "<|reserved_token_381|>",
3165
+ "lstrip": false,
3166
+ "normalized": false,
3167
+ "rstrip": false,
3168
+ "single_word": false,
3169
+ "special": true
3170
+ },
3171
+ "152039": {
3172
+ "content": "<|reserved_token_382|>",
3173
+ "lstrip": false,
3174
+ "normalized": false,
3175
+ "rstrip": false,
3176
+ "single_word": false,
3177
+ "special": true
3178
+ },
3179
+ "152040": {
3180
+ "content": "<|reserved_token_383|>",
3181
+ "lstrip": false,
3182
+ "normalized": false,
3183
+ "rstrip": false,
3184
+ "single_word": false,
3185
+ "special": true
3186
+ },
3187
+ "152041": {
3188
+ "content": "<|reserved_token_384|>",
3189
+ "lstrip": false,
3190
+ "normalized": false,
3191
+ "rstrip": false,
3192
+ "single_word": false,
3193
+ "special": true
3194
+ },
3195
+ "152042": {
3196
+ "content": "<|reserved_token_385|>",
3197
+ "lstrip": false,
3198
+ "normalized": false,
3199
+ "rstrip": false,
3200
+ "single_word": false,
3201
+ "special": true
3202
+ },
3203
+ "152043": {
3204
+ "content": "<|reserved_token_386|>",
3205
+ "lstrip": false,
3206
+ "normalized": false,
3207
+ "rstrip": false,
3208
+ "single_word": false,
3209
+ "special": true
3210
+ },
3211
+ "152044": {
3212
+ "content": "<|reserved_token_387|>",
3213
+ "lstrip": false,
3214
+ "normalized": false,
3215
+ "rstrip": false,
3216
+ "single_word": false,
3217
+ "special": true
3218
+ },
3219
+ "152045": {
3220
+ "content": "<|reserved_token_388|>",
3221
+ "lstrip": false,
3222
+ "normalized": false,
3223
+ "rstrip": false,
3224
+ "single_word": false,
3225
+ "special": true
3226
+ },
3227
+ "152046": {
3228
+ "content": "<|reserved_token_389|>",
3229
+ "lstrip": false,
3230
+ "normalized": false,
3231
+ "rstrip": false,
3232
+ "single_word": false,
3233
+ "special": true
3234
+ },
3235
+ "152047": {
3236
+ "content": "<|reserved_token_390|>",
3237
+ "lstrip": false,
3238
+ "normalized": false,
3239
+ "rstrip": false,
3240
+ "single_word": false,
3241
+ "special": true
3242
+ },
3243
+ "152048": {
3244
+ "content": "<|reserved_token_391|>",
3245
+ "lstrip": false,
3246
+ "normalized": false,
3247
+ "rstrip": false,
3248
+ "single_word": false,
3249
+ "special": true
3250
+ },
3251
+ "152049": {
3252
+ "content": "<|reserved_token_392|>",
3253
+ "lstrip": false,
3254
+ "normalized": false,
3255
+ "rstrip": false,
3256
+ "single_word": false,
3257
+ "special": true
3258
+ },
3259
+ "152050": {
3260
+ "content": "<|reserved_token_393|>",
3261
+ "lstrip": false,
3262
+ "normalized": false,
3263
+ "rstrip": false,
3264
+ "single_word": false,
3265
+ "special": true
3266
+ },
3267
+ "152051": {
3268
+ "content": "<|reserved_token_394|>",
3269
+ "lstrip": false,
3270
+ "normalized": false,
3271
+ "rstrip": false,
3272
+ "single_word": false,
3273
+ "special": true
3274
+ },
3275
+ "152052": {
3276
+ "content": "<|reserved_token_395|>",
3277
+ "lstrip": false,
3278
+ "normalized": false,
3279
+ "rstrip": false,
3280
+ "single_word": false,
3281
+ "special": true
3282
+ },
3283
+ "152053": {
3284
+ "content": "<|reserved_token_396|>",
3285
+ "lstrip": false,
3286
+ "normalized": false,
3287
+ "rstrip": false,
3288
+ "single_word": false,
3289
+ "special": true
3290
+ },
3291
+ "152054": {
3292
+ "content": "<|reserved_token_397|>",
3293
+ "lstrip": false,
3294
+ "normalized": false,
3295
+ "rstrip": false,
3296
+ "single_word": false,
3297
+ "special": true
3298
+ },
3299
+ "152055": {
3300
+ "content": "<|reserved_token_398|>",
3301
+ "lstrip": false,
3302
+ "normalized": false,
3303
+ "rstrip": false,
3304
+ "single_word": false,
3305
+ "special": true
3306
+ },
3307
+ "152056": {
3308
+ "content": "<|reserved_token_399|>",
3309
+ "lstrip": false,
3310
+ "normalized": false,
3311
+ "rstrip": false,
3312
+ "single_word": false,
3313
+ "special": true
3314
+ },
3315
+ "152057": {
3316
+ "content": "<|reserved_token_400|>",
3317
+ "lstrip": false,
3318
+ "normalized": false,
3319
+ "rstrip": false,
3320
+ "single_word": false,
3321
+ "special": true
3322
+ },
3323
+ "152058": {
3324
+ "content": "<|reserved_token_401|>",
3325
+ "lstrip": false,
3326
+ "normalized": false,
3327
+ "rstrip": false,
3328
+ "single_word": false,
3329
+ "special": true
3330
+ },
3331
+ "152059": {
3332
+ "content": "<|reserved_token_402|>",
3333
+ "lstrip": false,
3334
+ "normalized": false,
3335
+ "rstrip": false,
3336
+ "single_word": false,
3337
+ "special": true
3338
+ },
3339
+ "152060": {
3340
+ "content": "<|reserved_token_403|>",
3341
+ "lstrip": false,
3342
+ "normalized": false,
3343
+ "rstrip": false,
3344
+ "single_word": false,
3345
+ "special": true
3346
+ },
3347
+ "152061": {
3348
+ "content": "<|reserved_token_404|>",
3349
+ "lstrip": false,
3350
+ "normalized": false,
3351
+ "rstrip": false,
3352
+ "single_word": false,
3353
+ "special": true
3354
+ },
3355
+ "152062": {
3356
+ "content": "<|reserved_token_405|>",
3357
+ "lstrip": false,
3358
+ "normalized": false,
3359
+ "rstrip": false,
3360
+ "single_word": false,
3361
+ "special": true
3362
+ },
3363
+ "152063": {
3364
+ "content": "<|reserved_token_406|>",
3365
+ "lstrip": false,
3366
+ "normalized": false,
3367
+ "rstrip": false,
3368
+ "single_word": false,
3369
+ "special": true
3370
+ }
3371
+ },
3372
+ "additional_special_tokens": [
3373
+ "<|im_msg_end|>",
3374
+ "<|im_user_msg_start|>",
3375
+ "<|im_assistant_msg_start|>",
3376
+ "<|reserved_token_0|>",
3377
+ "<|reserved_token_1|>",
3378
+ "<|reserved_token_2|>",
3379
+ "<|reserved_token_3|>",
3380
+ "[EOT]",
3381
+ "<|reserved_token_4|>",
3382
+ "<|reserved_token_5|>",
3383
+ "<|reserved_token_6|>",
3384
+ "<|reserved_token_7|>",
3385
+ "<|reserved_token_8|>",
3386
+ "<|reserved_token_9|>",
3387
+ "<|reserved_token_10|>",
3388
+ "<|reserved_token_11|>",
3389
+ "<|im_media_begin|>",
3390
+ "<|reserved_token_12|>",
3391
+ "<|im_media_end|>",
3392
+ "<|reserved_token_13|>",
3393
+ "<|reserved_token_14|>",
3394
+ "<|im_kimia_text_blank|>",
3395
+ "<|im_kimia_text_eos|>",
3396
+ "<|reserved_token_15|>",
3397
+ "<|reserved_token_16|>",
3398
+ "<|im_kimia_user_msg_start|>",
3399
+ "<|im_kimia_assistant_msg_start|>",
3400
+ "<|reserved_token_17|>",
3401
+ "<|reserved_token_18|>",
3402
+ "<|reserved_token_19|>",
3403
+ "<|im_kimia_speech_ct_id|>",
3404
+ "<|im_kimia_speech_ctd_id|>",
3405
+ "<|reserved_token_20|>",
3406
+ "<|reserved_token_21|>",
3407
+ "<|reserved_token_22|>",
3408
+ "<|reserved_token_23|>",
3409
+ "<|reserved_token_24|>",
3410
+ "<|reserved_token_25|>",
3411
+ "<|reserved_token_26|>",
3412
+ "<|reserved_token_27|>",
3413
+ "<|reserved_token_28|>",
3414
+ "<|reserved_token_29|>",
3415
+ "<|reserved_token_30|>",
3416
+ "<|reserved_token_31|>",
3417
+ "<|reserved_token_32|>",
3418
+ "<|reserved_token_33|>",
3419
+ "<|reserved_token_34|>",
3420
+ "<|reserved_token_35|>",
3421
+ "<|reserved_token_36|>",
3422
+ "<|reserved_token_37|>",
3423
+ "<|reserved_token_38|>",
3424
+ "<|reserved_token_39|>",
3425
+ "<|reserved_token_40|>",
3426
+ "<|reserved_token_41|>",
3427
+ "<|reserved_token_42|>",
3428
+ "<|reserved_token_43|>",
3429
+ "<|reserved_token_44|>",
3430
+ "<|reserved_token_45|>",
3431
+ "<|reserved_token_46|>",
3432
+ "<|reserved_token_47|>",
3433
+ "<|reserved_token_48|>",
3434
+ "<|reserved_token_49|>",
3435
+ "<|reserved_token_50|>",
3436
+ "<|reserved_token_51|>",
3437
+ "<|reserved_token_52|>",
3438
+ "<|reserved_token_53|>",
3439
+ "<|reserved_token_54|>",
3440
+ "<|reserved_token_55|>",
3441
+ "<|reserved_token_56|>",
3442
+ "<|reserved_token_57|>",
3443
+ "<|reserved_token_58|>",
3444
+ "<|reserved_token_59|>",
3445
+ "<|reserved_token_60|>",
3446
+ "<|reserved_token_61|>",
3447
+ "<|reserved_token_62|>",
3448
+ "<|reserved_token_63|>",
3449
+ "<|reserved_token_64|>",
3450
+ "<|reserved_token_65|>",
3451
+ "<|reserved_token_66|>",
3452
+ "<|reserved_token_67|>",
3453
+ "<|reserved_token_68|>",
3454
+ "<|reserved_token_69|>",
3455
+ "<|reserved_token_70|>",
3456
+ "<|reserved_token_71|>",
3457
+ "<|reserved_token_72|>",
3458
+ "<|reserved_token_73|>",
3459
+ "<|reserved_token_74|>",
3460
+ "<|reserved_token_75|>",
3461
+ "<|reserved_token_76|>",
3462
+ "<|reserved_token_77|>",
3463
+ "<|reserved_token_78|>",
3464
+ "<|reserved_token_79|>",
3465
+ "<|reserved_token_80|>",
3466
+ "<|reserved_token_81|>",
3467
+ "<|reserved_token_82|>",
3468
+ "<|reserved_token_83|>",
3469
+ "<|reserved_token_84|>",
3470
+ "<|reserved_token_85|>",
3471
+ "<|reserved_token_86|>",
3472
+ "<|reserved_token_87|>",
3473
+ "<|reserved_token_88|>",
3474
+ "<|reserved_token_89|>",
3475
+ "<|reserved_token_90|>",
3476
+ "<|reserved_token_91|>",
3477
+ "<|reserved_token_92|>",
3478
+ "<|reserved_token_93|>",
3479
+ "<|reserved_token_94|>",
3480
+ "<|reserved_token_95|>",
3481
+ "<|reserved_token_96|>",
3482
+ "<|reserved_token_97|>",
3483
+ "<|reserved_token_98|>",
3484
+ "<|reserved_token_99|>",
3485
+ "<|reserved_token_100|>",
3486
+ "<|reserved_token_101|>",
3487
+ "<|reserved_token_102|>",
3488
+ "<|reserved_token_103|>",
3489
+ "<|reserved_token_104|>",
3490
+ "<|reserved_token_105|>",
3491
+ "<|reserved_token_106|>",
3492
+ "<|reserved_token_107|>",
3493
+ "<|reserved_token_108|>",
3494
+ "<|reserved_token_109|>",
3495
+ "<|reserved_token_110|>",
3496
+ "<|reserved_token_111|>",
3497
+ "<|reserved_token_112|>",
3498
+ "<|reserved_token_113|>",
3499
+ "<|reserved_token_114|>",
3500
+ "<|reserved_token_115|>",
3501
+ "<|reserved_token_116|>",
3502
+ "<|reserved_token_117|>",
3503
+ "<|reserved_token_118|>",
3504
+ "<|reserved_token_119|>",
3505
+ "<|reserved_token_120|>",
3506
+ "<|reserved_token_121|>",
3507
+ "<|reserved_token_122|>",
3508
+ "<|reserved_token_123|>",
3509
+ "<|reserved_token_124|>",
3510
+ "<|reserved_token_125|>",
3511
+ "<|reserved_token_126|>",
3512
+ "<|reserved_token_127|>",
3513
+ "<|reserved_token_128|>",
3514
+ "<|reserved_token_129|>",
3515
+ "<|reserved_token_130|>",
3516
+ "<|reserved_token_131|>",
3517
+ "<|reserved_token_132|>",
3518
+ "<|reserved_token_133|>",
3519
+ "<|reserved_token_134|>",
3520
+ "<|reserved_token_135|>",
3521
+ "<|reserved_token_136|>",
3522
+ "<|reserved_token_137|>",
3523
+ "<|reserved_token_138|>",
3524
+ "<|reserved_token_139|>",
3525
+ "<|reserved_token_140|>",
3526
+ "<|reserved_token_141|>",
3527
+ "<|reserved_token_142|>",
3528
+ "<|reserved_token_143|>",
3529
+ "<|reserved_token_144|>",
3530
+ "<|reserved_token_145|>",
3531
+ "<|reserved_token_146|>",
3532
+ "<|reserved_token_147|>",
3533
+ "<|reserved_token_148|>",
3534
+ "<|reserved_token_149|>",
3535
+ "<|reserved_token_150|>",
3536
+ "<|reserved_token_151|>",
3537
+ "<|reserved_token_152|>",
3538
+ "<|reserved_token_153|>",
3539
+ "<|reserved_token_154|>",
3540
+ "<|reserved_token_155|>",
3541
+ "<|reserved_token_156|>",
3542
+ "<|reserved_token_157|>",
3543
+ "<|reserved_token_158|>",
3544
+ "<|reserved_token_159|>",
3545
+ "<|reserved_token_160|>",
3546
+ "<|reserved_token_161|>",
3547
+ "<|reserved_token_162|>",
3548
+ "<|reserved_token_163|>",
3549
+ "<|reserved_token_164|>",
3550
+ "<|reserved_token_165|>",
3551
+ "<|reserved_token_166|>",
3552
+ "<|reserved_token_167|>",
3553
+ "<|reserved_token_168|>",
3554
+ "<|reserved_token_169|>",
3555
+ "<|reserved_token_170|>",
3556
+ "<|reserved_token_171|>",
3557
+ "<|reserved_token_172|>",
3558
+ "<|reserved_token_173|>",
3559
+ "<|reserved_token_174|>",
3560
+ "<|reserved_token_175|>",
3561
+ "<|reserved_token_176|>",
3562
+ "<|reserved_token_177|>",
3563
+ "<|reserved_token_178|>",
3564
+ "<|reserved_token_179|>",
3565
+ "<|reserved_token_180|>",
3566
+ "<|reserved_token_181|>",
3567
+ "<|reserved_token_182|>",
3568
+ "<|reserved_token_183|>",
3569
+ "<|reserved_token_184|>",
3570
+ "<|reserved_token_185|>",
3571
+ "<|reserved_token_186|>",
3572
+ "<|reserved_token_187|>",
3573
+ "<|reserved_token_188|>",
3574
+ "<|reserved_token_189|>",
3575
+ "<|reserved_token_190|>",
3576
+ "<|reserved_token_191|>",
3577
+ "<|reserved_token_192|>",
3578
+ "<|reserved_token_193|>",
3579
+ "<|reserved_token_194|>",
3580
+ "<|reserved_token_195|>",
3581
+ "<|reserved_token_196|>",
3582
+ "<|reserved_token_197|>",
3583
+ "<|reserved_token_198|>",
3584
+ "<|reserved_token_199|>",
3585
+ "<|reserved_token_200|>",
3586
+ "<|reserved_token_201|>",
3587
+ "<|reserved_token_202|>",
3588
+ "<|reserved_token_203|>",
3589
+ "<|reserved_token_204|>",
3590
+ "<|reserved_token_205|>",
3591
+ "<|reserved_token_206|>",
3592
+ "<|reserved_token_207|>",
3593
+ "<|reserved_token_208|>",
3594
+ "<|reserved_token_209|>",
3595
+ "<|reserved_token_210|>",
3596
+ "<|reserved_token_211|>",
3597
+ "<|reserved_token_212|>",
3598
+ "<|reserved_token_213|>",
3599
+ "<|reserved_token_214|>",
3600
+ "<|reserved_token_215|>",
3601
+ "<|reserved_token_216|>",
3602
+ "<|reserved_token_217|>",
3603
+ "<|reserved_token_218|>",
3604
+ "<|reserved_token_219|>",
3605
+ "<|reserved_token_220|>",
3606
+ "<|reserved_token_221|>",
3607
+ "<|reserved_token_222|>",
3608
+ "<|reserved_token_223|>",
3609
+ "<|reserved_token_224|>",
3610
+ "<|reserved_token_225|>",
3611
+ "<|reserved_token_226|>",
3612
+ "<|reserved_token_227|>",
3613
+ "<|reserved_token_228|>",
3614
+ "<|reserved_token_229|>",
3615
+ "<|reserved_token_230|>",
3616
+ "<|reserved_token_231|>",
3617
+ "<|reserved_token_232|>",
3618
+ "<|reserved_token_233|>",
3619
+ "<|reserved_token_234|>",
3620
+ "<|reserved_token_235|>",
3621
+ "<|reserved_token_236|>",
3622
+ "<|reserved_token_237|>",
3623
+ "<|reserved_token_238|>",
3624
+ "<|reserved_token_239|>",
3625
+ "<|reserved_token_240|>",
3626
+ "<|reserved_token_241|>",
3627
+ "<|reserved_token_242|>",
3628
+ "<|reserved_token_243|>",
3629
+ "<|reserved_token_244|>",
3630
+ "<|reserved_token_245|>",
3631
+ "<|reserved_token_246|>",
3632
+ "<|reserved_token_247|>",
3633
+ "<|reserved_token_248|>",
3634
+ "<|reserved_token_249|>",
3635
+ "<|reserved_token_250|>",
3636
+ "<|reserved_token_251|>",
3637
+ "<|reserved_token_252|>",
3638
+ "<|reserved_token_253|>",
3639
+ "<|reserved_token_254|>",
3640
+ "<|reserved_token_255|>",
3641
+ "<|reserved_token_256|>",
3642
+ "<|reserved_token_257|>",
3643
+ "<|reserved_token_258|>",
3644
+ "<|reserved_token_259|>",
3645
+ "<|reserved_token_260|>",
3646
+ "<|reserved_token_261|>",
3647
+ "<|reserved_token_262|>",
3648
+ "<|reserved_token_263|>",
3649
+ "<|reserved_token_264|>",
3650
+ "<|reserved_token_265|>",
3651
+ "<|reserved_token_266|>",
3652
+ "<|reserved_token_267|>",
3653
+ "<|reserved_token_268|>",
3654
+ "<|reserved_token_269|>",
3655
+ "<|reserved_token_270|>",
3656
+ "<|reserved_token_271|>",
3657
+ "<|reserved_token_272|>",
3658
+ "<|reserved_token_273|>",
3659
+ "<|reserved_token_274|>",
3660
+ "<|reserved_token_275|>",
3661
+ "<|reserved_token_276|>",
3662
+ "<|reserved_token_277|>",
3663
+ "<|reserved_token_278|>",
3664
+ "<|reserved_token_279|>",
3665
+ "<|reserved_token_280|>",
3666
+ "<|reserved_token_281|>",
3667
+ "<|reserved_token_282|>",
3668
+ "<|reserved_token_283|>",
3669
+ "<|reserved_token_284|>",
3670
+ "<|reserved_token_285|>",
3671
+ "<|reserved_token_286|>",
3672
+ "<|reserved_token_287|>",
3673
+ "<|reserved_token_288|>",
3674
+ "<|reserved_token_289|>",
3675
+ "<|reserved_token_290|>",
3676
+ "<|reserved_token_291|>",
3677
+ "<|reserved_token_292|>",
3678
+ "<|reserved_token_293|>",
3679
+ "<|reserved_token_294|>",
3680
+ "<|reserved_token_295|>",
3681
+ "<|reserved_token_296|>",
3682
+ "<|reserved_token_297|>",
3683
+ "<|reserved_token_298|>",
3684
+ "<|reserved_token_299|>",
3685
+ "<|reserved_token_300|>",
3686
+ "<|reserved_token_301|>",
3687
+ "<|reserved_token_302|>",
3688
+ "<|reserved_token_303|>",
3689
+ "<|reserved_token_304|>",
3690
+ "<|reserved_token_305|>",
3691
+ "<|reserved_token_306|>",
3692
+ "<|reserved_token_307|>",
3693
+ "<|reserved_token_308|>",
3694
+ "<|reserved_token_309|>",
3695
+ "<|reserved_token_310|>",
3696
+ "<|reserved_token_311|>",
3697
+ "<|reserved_token_312|>",
3698
+ "<|reserved_token_313|>",
3699
+ "<|reserved_token_314|>",
3700
+ "<|reserved_token_315|>",
3701
+ "<|reserved_token_316|>",
3702
+ "<|reserved_token_317|>",
3703
+ "<|reserved_token_318|>",
3704
+ "<|reserved_token_319|>",
3705
+ "<|reserved_token_320|>",
3706
+ "<|reserved_token_321|>",
3707
+ "<|reserved_token_322|>",
3708
+ "<|reserved_token_323|>",
3709
+ "<|reserved_token_324|>",
3710
+ "<|reserved_token_325|>",
3711
+ "<|reserved_token_326|>",
3712
+ "<|reserved_token_327|>",
3713
+ "<|reserved_token_328|>",
3714
+ "<|reserved_token_329|>",
3715
+ "<|reserved_token_330|>",
3716
+ "<|reserved_token_331|>",
3717
+ "<|reserved_token_332|>",
3718
+ "<|reserved_token_333|>",
3719
+ "<|reserved_token_334|>",
3720
+ "<|reserved_token_335|>",
3721
+ "<|reserved_token_336|>",
3722
+ "<|reserved_token_337|>",
3723
+ "<|reserved_token_338|>",
3724
+ "<|reserved_token_339|>",
3725
+ "<|reserved_token_340|>",
3726
+ "<|reserved_token_341|>",
3727
+ "<|reserved_token_342|>",
3728
+ "<|reserved_token_343|>",
3729
+ "<|reserved_token_344|>",
3730
+ "<|reserved_token_345|>",
3731
+ "<|reserved_token_346|>",
3732
+ "<|reserved_token_347|>",
3733
+ "<|reserved_token_348|>",
3734
+ "<|reserved_token_349|>",
3735
+ "<|reserved_token_350|>",
3736
+ "<|reserved_token_351|>",
3737
+ "<|reserved_token_352|>",
3738
+ "<|reserved_token_353|>",
3739
+ "<|reserved_token_354|>",
3740
+ "<|reserved_token_355|>",
3741
+ "<|reserved_token_356|>",
3742
+ "<|reserved_token_357|>",
3743
+ "<|reserved_token_358|>",
3744
+ "<|reserved_token_359|>",
3745
+ "<|reserved_token_360|>",
3746
+ "<|reserved_token_361|>",
3747
+ "<|reserved_token_362|>",
3748
+ "<|reserved_token_363|>",
3749
+ "<|reserved_token_364|>",
3750
+ "<|reserved_token_365|>",
3751
+ "<|reserved_token_366|>",
3752
+ "<|reserved_token_367|>",
3753
+ "<|reserved_token_368|>",
3754
+ "<|reserved_token_369|>",
3755
+ "<|reserved_token_370|>",
3756
+ "<|reserved_token_371|>",
3757
+ "<|reserved_token_372|>",
3758
+ "<|reserved_token_373|>",
3759
+ "<|reserved_token_374|>",
3760
+ "<|reserved_token_375|>",
3761
+ "<|reserved_token_376|>",
3762
+ "<|reserved_token_377|>",
3763
+ "<|reserved_token_378|>",
3764
+ "<|reserved_token_379|>",
3765
+ "<|reserved_token_380|>",
3766
+ "<|reserved_token_381|>",
3767
+ "<|reserved_token_382|>",
3768
+ "<|reserved_token_383|>",
3769
+ "<|reserved_token_384|>",
3770
+ "<|reserved_token_385|>",
3771
+ "<|reserved_token_386|>",
3772
+ "<|reserved_token_387|>",
3773
+ "<|reserved_token_388|>",
3774
+ "<|reserved_token_389|>",
3775
+ "<|reserved_token_390|>",
3776
+ "<|reserved_token_391|>",
3777
+ "<|reserved_token_392|>",
3778
+ "<|reserved_token_393|>",
3779
+ "<|reserved_token_394|>",
3780
+ "<|reserved_token_395|>",
3781
+ "<|reserved_token_396|>",
3782
+ "<|reserved_token_397|>",
3783
+ "<|reserved_token_398|>",
3784
+ "<|reserved_token_399|>",
3785
+ "<|reserved_token_400|>",
3786
+ "<|reserved_token_401|>",
3787
+ "<|reserved_token_402|>",
3788
+ "<|reserved_token_403|>",
3789
+ "<|reserved_token_404|>"
3790
+ ],
3791
+ "bos_token": "[BOS]",
3792
+ "clean_up_tokenization_spaces": true,
3793
+ "eos_token": "[EOS]",
3794
+ "model_max_length": 1000000000000000019884624838656,
3795
+ "pad_token": "<|reserved_token_406|>",
3796
+ "pat_str": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?\\p{L}+|\\p{N}| ?[^\\s\\p{L}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",
3797
+ "tokenizer_class": "TikTokenTokenizer",
3798
+ "unk_token": "<|reserved_token_405|>",
3799
+ "auto_map": {
3800
+ "AutoTokenizer": [
3801
+ "tokenization_echochat.TikTokenTokenizer",
3802
+ null
3803
+ ]
3804
+ }
3805
+ }