Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +1 -0
- chat_template.jinja +46 -0
- config.json +1480 -0
- configuration_deepseek.py +212 -0
- generation_config.json +4 -0
- k3_headstack_recipe.json +33 -0
- k3_headstack_verify.json +41 -0
- model-00003-layer004-experts.safetensors +3 -0
- model-00005-layer006-experts.safetensors +3 -0
- model-00007-layer008-experts.safetensors +3 -0
- model-00008-layer009-experts.safetensors +3 -0
- model-00010-layer011-experts.safetensors +3 -0
- model-00011-layer012-experts.safetensors +3 -0
- model-00012-layer013-experts.safetensors +3 -0
- model-00014-layer015-experts.safetensors +3 -0
- model-00016-layer017-experts.safetensors +3 -0
- model-00017-layer018-experts.safetensors +3 -0
- model-00018-layer019-experts.safetensors +3 -0
- model-00020-layer021-experts.safetensors +3 -0
- model-00024-layer025-experts.safetensors +3 -0
- model-00029-layer030-experts.safetensors +3 -0
- model-00030-layer031-experts.safetensors +3 -0
- model-00031-layer032-experts.safetensors +3 -0
- model-00033-layer034-experts.safetensors +3 -0
- model-00034-layer035-experts.safetensors +3 -0
- model-00038-layer039-experts.safetensors +3 -0
- model-00039-layer040-experts.safetensors +3 -0
- model-00042-layer043-experts.safetensors +3 -0
- model-00044-layer045-experts.safetensors +3 -0
- model-00047-layer048-experts.safetensors +3 -0
- model-00052-layer053-experts.safetensors +3 -0
- model-00053-layer054-experts.safetensors +3 -0
- model-00055-layer056-experts.safetensors +3 -0
- model-00059-layer060-experts.safetensors +3 -0
- model-00061-layer062-experts.safetensors +3 -0
- model-00064-layer065-experts.safetensors +3 -0
- model-00066-layer067-experts.safetensors +3 -0
- model-00067-layer068-experts.safetensors +3 -0
- model-00073-layer074-experts.safetensors +3 -0
- model-00080-layer081-experts.safetensors +3 -0
- model-00086-layer087-experts.safetensors +3 -0
- model-00090-layer091-experts.safetensors +3 -0
- model-00094-layer095-experts.safetensors +3 -0
- model-00096-layer097-experts.safetensors +3 -0
- model-00098-layer099-experts.safetensors +3 -0
- model-00099-layer100-experts.safetensors +3 -0
- model-00100-layer101-experts.safetensors +3 -0
- model.safetensors.index.json +3 -0
- tiktoken.model +3 -0
- tokenization_kimi.py +323 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
model.safetensors.index.json filter=lfs diff=lfs merge=lfs -text
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{%- if tools -%}
|
| 2 |
+
<|im_system|>tool_declare<|im_middle|>
|
| 3 |
+
# Tools
|
| 4 |
+
{{ tools | tojson }}<|im_end|>
|
| 5 |
+
{%- endif -%}
|
| 6 |
+
{%- for message in messages -%}
|
| 7 |
+
{%- if loop.first and messages[0]['role'] != 'system' -%}
|
| 8 |
+
<|im_system|>system<|im_middle|>You are Kimi, an AI assistant created by Moonshot AI.<|im_end|>
|
| 9 |
+
{%- endif -%}
|
| 10 |
+
|
| 11 |
+
{%- set role_name = message.get('name') or message['role'] -%}
|
| 12 |
+
{%- if message['role'] == 'user' -%}
|
| 13 |
+
<|im_user|>{{role_name}}<|im_middle|>
|
| 14 |
+
{%- elif message['role'] == 'assistant' -%}
|
| 15 |
+
<|im_assistant|>{{role_name}}<|im_middle|>
|
| 16 |
+
{%- else -%}
|
| 17 |
+
<|im_system|>{{role_name}}<|im_middle|>
|
| 18 |
+
{%- endif -%}
|
| 19 |
+
|
| 20 |
+
{%- if message['role'] == 'assistant' and message.get('tool_calls') -%}
|
| 21 |
+
{%- if message['content'] -%}{{ message['content'] }}{%- endif -%}
|
| 22 |
+
<|tool_calls_section_begin|>
|
| 23 |
+
{%- for tool_call in message['tool_calls'] -%}
|
| 24 |
+
{%- set formatted_id = tool_call['id'] -%}
|
| 25 |
+
<|tool_call_begin|>{{ formatted_id }}<|tool_call_argument_begin|>{% if tool_call['function']['arguments'] is string %}{{ tool_call['function']['arguments'] }}{% else %}{{ tool_call['function']['arguments'] | tojson }}{% endif %}<|tool_call_end|>
|
| 26 |
+
{%- endfor -%}
|
| 27 |
+
<|tool_calls_section_end|>
|
| 28 |
+
{%- elif message['role'] == 'tool' -%}
|
| 29 |
+
## Return of {{ message.tool_call_id }}
|
| 30 |
+
{{ message['content'] }}
|
| 31 |
+
{%- elif message['content'] is string -%}
|
| 32 |
+
{{ message['content'] }}
|
| 33 |
+
{%- elif message['content'] is not none -%}
|
| 34 |
+
{% for content in message['content'] -%}
|
| 35 |
+
{% if content['type'] == 'image' or 'image' in content or 'image_url' in content -%}
|
| 36 |
+
<|media_start|>image<|media_content|><|media_pad|><|media_end|>
|
| 37 |
+
{% else -%}
|
| 38 |
+
{{ content['text'] }}
|
| 39 |
+
{%- endif -%}
|
| 40 |
+
{%- endfor -%}
|
| 41 |
+
{%- endif -%}
|
| 42 |
+
<|im_end|>
|
| 43 |
+
{%- endfor -%}
|
| 44 |
+
{%- if add_generation_prompt -%}
|
| 45 |
+
<|im_assistant|>assistant<|im_middle|>
|
| 46 |
+
{%- endif -%}
|
config.json
ADDED
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "/mnt/weka/home/ggb/mergekit/kimi-k2-merged",
|
| 3 |
+
"add_cross_attention": false,
|
| 4 |
+
"architectures": [
|
| 5 |
+
"DeepseekV3ForCausalLM"
|
| 6 |
+
],
|
| 7 |
+
"attention_bias": false,
|
| 8 |
+
"attention_dropout": 0.0,
|
| 9 |
+
"auto_map": {
|
| 10 |
+
"AutoConfig": "configuration_deepseek.DeepseekV3Config",
|
| 11 |
+
"AutoModel": "modeling_deepseek.DeepseekV3Model",
|
| 12 |
+
"AutoModelForCausalLM": "modeling_deepseek.DeepseekV3ForCausalLM"
|
| 13 |
+
},
|
| 14 |
+
"aux_loss_alpha": 0.001,
|
| 15 |
+
"bad_words_ids": null,
|
| 16 |
+
"begin_suppress_tokens": null,
|
| 17 |
+
"bos_token_id": 163584,
|
| 18 |
+
"chunk_size_feed_forward": 0,
|
| 19 |
+
"cross_attention_hidden_size": null,
|
| 20 |
+
"decoder_start_token_id": null,
|
| 21 |
+
"diversity_penalty": 0.0,
|
| 22 |
+
"do_sample": false,
|
| 23 |
+
"early_stopping": false,
|
| 24 |
+
"encoder_no_repeat_ngram_size": 0,
|
| 25 |
+
"eos_token_id": 163585,
|
| 26 |
+
"ep_size": 1,
|
| 27 |
+
"exponential_decay_length_penalty": null,
|
| 28 |
+
"finetuning_task": null,
|
| 29 |
+
"first_k_dense_replace": 1,
|
| 30 |
+
"forced_bos_token_id": null,
|
| 31 |
+
"forced_eos_token_id": null,
|
| 32 |
+
"head_dim": 64,
|
| 33 |
+
"hidden_act": "silu",
|
| 34 |
+
"hidden_size": 7168,
|
| 35 |
+
"id2label": {
|
| 36 |
+
"0": "LABEL_0",
|
| 37 |
+
"1": "LABEL_1"
|
| 38 |
+
},
|
| 39 |
+
"initializer_range": 0.02,
|
| 40 |
+
"intermediate_size": 18432,
|
| 41 |
+
"is_decoder": false,
|
| 42 |
+
"is_encoder_decoder": false,
|
| 43 |
+
"k3_headstack_recipe": {
|
| 44 |
+
"attention": "q_b_proj and kv_b_proj row-concat base plus mapped instruct branch; o_proj col-concat with per-variant scale",
|
| 45 |
+
"attention_a_proj": "q_a_proj and kv_a_proj_with_mqa rowwise SLERP base plus mapped instruct branch",
|
| 46 |
+
"attention_a_proj_slerp_dot_threshold": 0.9995,
|
| 47 |
+
"attention_a_proj_slerp_t": 0.5,
|
| 48 |
+
"o_proj_scale": 0.5,
|
| 49 |
+
"shared_experts": "gate/up row-concat and down col-concat base plus mapped instruct branch"
|
| 50 |
+
},
|
| 51 |
+
"kv_lora_rank": 512,
|
| 52 |
+
"label2id": {
|
| 53 |
+
"LABEL_0": 0,
|
| 54 |
+
"LABEL_1": 1
|
| 55 |
+
},
|
| 56 |
+
"length_penalty": 1.0,
|
| 57 |
+
"max_length": 20,
|
| 58 |
+
"max_position_embeddings": 131072,
|
| 59 |
+
"min_length": 0,
|
| 60 |
+
"model_type": "deepseek_v3",
|
| 61 |
+
"moe_intermediate_size": 2048,
|
| 62 |
+
"moe_layer_freq": 1,
|
| 63 |
+
"n_group": 1,
|
| 64 |
+
"n_routed_experts": 768,
|
| 65 |
+
"n_shared_experts": 2,
|
| 66 |
+
"no_repeat_ngram_size": 0,
|
| 67 |
+
"norm_topk_prob": true,
|
| 68 |
+
"num_attention_heads": 128,
|
| 69 |
+
"num_beam_groups": 1,
|
| 70 |
+
"num_beams": 1,
|
| 71 |
+
"num_experts_per_tok": 16,
|
| 72 |
+
"num_hidden_layers": 103,
|
| 73 |
+
"num_key_value_heads": 128,
|
| 74 |
+
"num_nextn_predict_layers": 0,
|
| 75 |
+
"num_return_sequences": 1,
|
| 76 |
+
"output_attentions": false,
|
| 77 |
+
"output_hidden_states": false,
|
| 78 |
+
"output_scores": false,
|
| 79 |
+
"pad_token_id": null,
|
| 80 |
+
"prefix": null,
|
| 81 |
+
"pretraining_tp": 1,
|
| 82 |
+
"problem_type": null,
|
| 83 |
+
"pruned_heads": {},
|
| 84 |
+
"q_lora_rank": 1536,
|
| 85 |
+
"qk_head_dim": 192,
|
| 86 |
+
"qk_nope_head_dim": 128,
|
| 87 |
+
"qk_rope_head_dim": 64,
|
| 88 |
+
"quantization_config": {
|
| 89 |
+
"activation_scheme": "dynamic",
|
| 90 |
+
"fmt": "e4m3",
|
| 91 |
+
"ignored_layers": [
|
| 92 |
+
"lm_head",
|
| 93 |
+
"model.embed_tokens",
|
| 94 |
+
"model.layers.0.input_layernorm",
|
| 95 |
+
"model.layers.0.mlp.down_proj",
|
| 96 |
+
"model.layers.0.mlp.gate_proj",
|
| 97 |
+
"model.layers.0.mlp.up_proj",
|
| 98 |
+
"model.layers.0.post_attention_layernorm",
|
| 99 |
+
"model.layers.0.self_attn.kv_a_layernorm",
|
| 100 |
+
"model.layers.0.self_attn.kv_a_proj_with_mqa",
|
| 101 |
+
"model.layers.0.self_attn.kv_b_proj",
|
| 102 |
+
"model.layers.0.self_attn.o_proj",
|
| 103 |
+
"model.layers.0.self_attn.q_a_layernorm",
|
| 104 |
+
"model.layers.0.self_attn.q_a_proj",
|
| 105 |
+
"model.layers.0.self_attn.q_b_proj",
|
| 106 |
+
"model.layers.1.input_layernorm",
|
| 107 |
+
"model.layers.1.mlp.gate",
|
| 108 |
+
"model.layers.1.mlp.shared_experts.down_proj",
|
| 109 |
+
"model.layers.1.mlp.shared_experts.gate_proj",
|
| 110 |
+
"model.layers.1.mlp.shared_experts.up_proj",
|
| 111 |
+
"model.layers.1.post_attention_layernorm",
|
| 112 |
+
"model.layers.1.self_attn.kv_a_layernorm",
|
| 113 |
+
"model.layers.1.self_attn.kv_a_proj_with_mqa",
|
| 114 |
+
"model.layers.1.self_attn.kv_b_proj",
|
| 115 |
+
"model.layers.1.self_attn.o_proj",
|
| 116 |
+
"model.layers.1.self_attn.q_a_layernorm",
|
| 117 |
+
"model.layers.1.self_attn.q_a_proj",
|
| 118 |
+
"model.layers.1.self_attn.q_b_proj",
|
| 119 |
+
"model.layers.10.input_layernorm",
|
| 120 |
+
"model.layers.10.mlp.gate",
|
| 121 |
+
"model.layers.10.mlp.shared_experts.down_proj",
|
| 122 |
+
"model.layers.10.mlp.shared_experts.gate_proj",
|
| 123 |
+
"model.layers.10.mlp.shared_experts.up_proj",
|
| 124 |
+
"model.layers.10.post_attention_layernorm",
|
| 125 |
+
"model.layers.10.self_attn.kv_a_layernorm",
|
| 126 |
+
"model.layers.10.self_attn.kv_a_proj_with_mqa",
|
| 127 |
+
"model.layers.10.self_attn.kv_b_proj",
|
| 128 |
+
"model.layers.10.self_attn.o_proj",
|
| 129 |
+
"model.layers.10.self_attn.q_a_layernorm",
|
| 130 |
+
"model.layers.10.self_attn.q_a_proj",
|
| 131 |
+
"model.layers.10.self_attn.q_b_proj",
|
| 132 |
+
"model.layers.100.input_layernorm",
|
| 133 |
+
"model.layers.100.mlp.gate",
|
| 134 |
+
"model.layers.100.mlp.shared_experts.down_proj",
|
| 135 |
+
"model.layers.100.mlp.shared_experts.gate_proj",
|
| 136 |
+
"model.layers.100.mlp.shared_experts.up_proj",
|
| 137 |
+
"model.layers.100.post_attention_layernorm",
|
| 138 |
+
"model.layers.100.self_attn.kv_a_layernorm",
|
| 139 |
+
"model.layers.100.self_attn.kv_a_proj_with_mqa",
|
| 140 |
+
"model.layers.100.self_attn.kv_b_proj",
|
| 141 |
+
"model.layers.100.self_attn.o_proj",
|
| 142 |
+
"model.layers.100.self_attn.q_a_layernorm",
|
| 143 |
+
"model.layers.100.self_attn.q_a_proj",
|
| 144 |
+
"model.layers.100.self_attn.q_b_proj",
|
| 145 |
+
"model.layers.101.input_layernorm",
|
| 146 |
+
"model.layers.101.mlp.gate",
|
| 147 |
+
"model.layers.101.mlp.shared_experts.down_proj",
|
| 148 |
+
"model.layers.101.mlp.shared_experts.gate_proj",
|
| 149 |
+
"model.layers.101.mlp.shared_experts.up_proj",
|
| 150 |
+
"model.layers.101.post_attention_layernorm",
|
| 151 |
+
"model.layers.101.self_attn.kv_a_layernorm",
|
| 152 |
+
"model.layers.101.self_attn.kv_a_proj_with_mqa",
|
| 153 |
+
"model.layers.101.self_attn.kv_b_proj",
|
| 154 |
+
"model.layers.101.self_attn.o_proj",
|
| 155 |
+
"model.layers.101.self_attn.q_a_layernorm",
|
| 156 |
+
"model.layers.101.self_attn.q_a_proj",
|
| 157 |
+
"model.layers.101.self_attn.q_b_proj",
|
| 158 |
+
"model.layers.102.input_layernorm",
|
| 159 |
+
"model.layers.102.mlp.gate",
|
| 160 |
+
"model.layers.102.mlp.shared_experts.down_proj",
|
| 161 |
+
"model.layers.102.mlp.shared_experts.gate_proj",
|
| 162 |
+
"model.layers.102.mlp.shared_experts.up_proj",
|
| 163 |
+
"model.layers.102.post_attention_layernorm",
|
| 164 |
+
"model.layers.102.self_attn.kv_a_layernorm",
|
| 165 |
+
"model.layers.102.self_attn.kv_a_proj_with_mqa",
|
| 166 |
+
"model.layers.102.self_attn.kv_b_proj",
|
| 167 |
+
"model.layers.102.self_attn.o_proj",
|
| 168 |
+
"model.layers.102.self_attn.q_a_layernorm",
|
| 169 |
+
"model.layers.102.self_attn.q_a_proj",
|
| 170 |
+
"model.layers.102.self_attn.q_b_proj",
|
| 171 |
+
"model.layers.11.input_layernorm",
|
| 172 |
+
"model.layers.11.mlp.gate",
|
| 173 |
+
"model.layers.11.mlp.shared_experts.down_proj",
|
| 174 |
+
"model.layers.11.mlp.shared_experts.gate_proj",
|
| 175 |
+
"model.layers.11.mlp.shared_experts.up_proj",
|
| 176 |
+
"model.layers.11.post_attention_layernorm",
|
| 177 |
+
"model.layers.11.self_attn.kv_a_layernorm",
|
| 178 |
+
"model.layers.11.self_attn.kv_a_proj_with_mqa",
|
| 179 |
+
"model.layers.11.self_attn.kv_b_proj",
|
| 180 |
+
"model.layers.11.self_attn.o_proj",
|
| 181 |
+
"model.layers.11.self_attn.q_a_layernorm",
|
| 182 |
+
"model.layers.11.self_attn.q_a_proj",
|
| 183 |
+
"model.layers.11.self_attn.q_b_proj",
|
| 184 |
+
"model.layers.12.input_layernorm",
|
| 185 |
+
"model.layers.12.mlp.gate",
|
| 186 |
+
"model.layers.12.mlp.shared_experts.down_proj",
|
| 187 |
+
"model.layers.12.mlp.shared_experts.gate_proj",
|
| 188 |
+
"model.layers.12.mlp.shared_experts.up_proj",
|
| 189 |
+
"model.layers.12.post_attention_layernorm",
|
| 190 |
+
"model.layers.12.self_attn.kv_a_layernorm",
|
| 191 |
+
"model.layers.12.self_attn.kv_a_proj_with_mqa",
|
| 192 |
+
"model.layers.12.self_attn.kv_b_proj",
|
| 193 |
+
"model.layers.12.self_attn.o_proj",
|
| 194 |
+
"model.layers.12.self_attn.q_a_layernorm",
|
| 195 |
+
"model.layers.12.self_attn.q_a_proj",
|
| 196 |
+
"model.layers.12.self_attn.q_b_proj",
|
| 197 |
+
"model.layers.13.input_layernorm",
|
| 198 |
+
"model.layers.13.mlp.gate",
|
| 199 |
+
"model.layers.13.mlp.shared_experts.down_proj",
|
| 200 |
+
"model.layers.13.mlp.shared_experts.gate_proj",
|
| 201 |
+
"model.layers.13.mlp.shared_experts.up_proj",
|
| 202 |
+
"model.layers.13.post_attention_layernorm",
|
| 203 |
+
"model.layers.13.self_attn.kv_a_layernorm",
|
| 204 |
+
"model.layers.13.self_attn.kv_a_proj_with_mqa",
|
| 205 |
+
"model.layers.13.self_attn.kv_b_proj",
|
| 206 |
+
"model.layers.13.self_attn.o_proj",
|
| 207 |
+
"model.layers.13.self_attn.q_a_layernorm",
|
| 208 |
+
"model.layers.13.self_attn.q_a_proj",
|
| 209 |
+
"model.layers.13.self_attn.q_b_proj",
|
| 210 |
+
"model.layers.14.input_layernorm",
|
| 211 |
+
"model.layers.14.mlp.gate",
|
| 212 |
+
"model.layers.14.mlp.shared_experts.down_proj",
|
| 213 |
+
"model.layers.14.mlp.shared_experts.gate_proj",
|
| 214 |
+
"model.layers.14.mlp.shared_experts.up_proj",
|
| 215 |
+
"model.layers.14.post_attention_layernorm",
|
| 216 |
+
"model.layers.14.self_attn.kv_a_layernorm",
|
| 217 |
+
"model.layers.14.self_attn.kv_a_proj_with_mqa",
|
| 218 |
+
"model.layers.14.self_attn.kv_b_proj",
|
| 219 |
+
"model.layers.14.self_attn.o_proj",
|
| 220 |
+
"model.layers.14.self_attn.q_a_layernorm",
|
| 221 |
+
"model.layers.14.self_attn.q_a_proj",
|
| 222 |
+
"model.layers.14.self_attn.q_b_proj",
|
| 223 |
+
"model.layers.15.input_layernorm",
|
| 224 |
+
"model.layers.15.mlp.gate",
|
| 225 |
+
"model.layers.15.mlp.shared_experts.down_proj",
|
| 226 |
+
"model.layers.15.mlp.shared_experts.gate_proj",
|
| 227 |
+
"model.layers.15.mlp.shared_experts.up_proj",
|
| 228 |
+
"model.layers.15.post_attention_layernorm",
|
| 229 |
+
"model.layers.15.self_attn.kv_a_layernorm",
|
| 230 |
+
"model.layers.15.self_attn.kv_a_proj_with_mqa",
|
| 231 |
+
"model.layers.15.self_attn.kv_b_proj",
|
| 232 |
+
"model.layers.15.self_attn.o_proj",
|
| 233 |
+
"model.layers.15.self_attn.q_a_layernorm",
|
| 234 |
+
"model.layers.15.self_attn.q_a_proj",
|
| 235 |
+
"model.layers.15.self_attn.q_b_proj",
|
| 236 |
+
"model.layers.16.input_layernorm",
|
| 237 |
+
"model.layers.16.mlp.gate",
|
| 238 |
+
"model.layers.16.mlp.shared_experts.down_proj",
|
| 239 |
+
"model.layers.16.mlp.shared_experts.gate_proj",
|
| 240 |
+
"model.layers.16.mlp.shared_experts.up_proj",
|
| 241 |
+
"model.layers.16.post_attention_layernorm",
|
| 242 |
+
"model.layers.16.self_attn.kv_a_layernorm",
|
| 243 |
+
"model.layers.16.self_attn.kv_a_proj_with_mqa",
|
| 244 |
+
"model.layers.16.self_attn.kv_b_proj",
|
| 245 |
+
"model.layers.16.self_attn.o_proj",
|
| 246 |
+
"model.layers.16.self_attn.q_a_layernorm",
|
| 247 |
+
"model.layers.16.self_attn.q_a_proj",
|
| 248 |
+
"model.layers.16.self_attn.q_b_proj",
|
| 249 |
+
"model.layers.17.input_layernorm",
|
| 250 |
+
"model.layers.17.mlp.gate",
|
| 251 |
+
"model.layers.17.mlp.shared_experts.down_proj",
|
| 252 |
+
"model.layers.17.mlp.shared_experts.gate_proj",
|
| 253 |
+
"model.layers.17.mlp.shared_experts.up_proj",
|
| 254 |
+
"model.layers.17.post_attention_layernorm",
|
| 255 |
+
"model.layers.17.self_attn.kv_a_layernorm",
|
| 256 |
+
"model.layers.17.self_attn.kv_a_proj_with_mqa",
|
| 257 |
+
"model.layers.17.self_attn.kv_b_proj",
|
| 258 |
+
"model.layers.17.self_attn.o_proj",
|
| 259 |
+
"model.layers.17.self_attn.q_a_layernorm",
|
| 260 |
+
"model.layers.17.self_attn.q_a_proj",
|
| 261 |
+
"model.layers.17.self_attn.q_b_proj",
|
| 262 |
+
"model.layers.18.input_layernorm",
|
| 263 |
+
"model.layers.18.mlp.gate",
|
| 264 |
+
"model.layers.18.mlp.shared_experts.down_proj",
|
| 265 |
+
"model.layers.18.mlp.shared_experts.gate_proj",
|
| 266 |
+
"model.layers.18.mlp.shared_experts.up_proj",
|
| 267 |
+
"model.layers.18.post_attention_layernorm",
|
| 268 |
+
"model.layers.18.self_attn.kv_a_layernorm",
|
| 269 |
+
"model.layers.18.self_attn.kv_a_proj_with_mqa",
|
| 270 |
+
"model.layers.18.self_attn.kv_b_proj",
|
| 271 |
+
"model.layers.18.self_attn.o_proj",
|
| 272 |
+
"model.layers.18.self_attn.q_a_layernorm",
|
| 273 |
+
"model.layers.18.self_attn.q_a_proj",
|
| 274 |
+
"model.layers.18.self_attn.q_b_proj",
|
| 275 |
+
"model.layers.19.input_layernorm",
|
| 276 |
+
"model.layers.19.mlp.gate",
|
| 277 |
+
"model.layers.19.mlp.shared_experts.down_proj",
|
| 278 |
+
"model.layers.19.mlp.shared_experts.gate_proj",
|
| 279 |
+
"model.layers.19.mlp.shared_experts.up_proj",
|
| 280 |
+
"model.layers.19.post_attention_layernorm",
|
| 281 |
+
"model.layers.19.self_attn.kv_a_layernorm",
|
| 282 |
+
"model.layers.19.self_attn.kv_a_proj_with_mqa",
|
| 283 |
+
"model.layers.19.self_attn.kv_b_proj",
|
| 284 |
+
"model.layers.19.self_attn.o_proj",
|
| 285 |
+
"model.layers.19.self_attn.q_a_layernorm",
|
| 286 |
+
"model.layers.19.self_attn.q_a_proj",
|
| 287 |
+
"model.layers.19.self_attn.q_b_proj",
|
| 288 |
+
"model.layers.2.input_layernorm",
|
| 289 |
+
"model.layers.2.mlp.gate",
|
| 290 |
+
"model.layers.2.mlp.shared_experts.down_proj",
|
| 291 |
+
"model.layers.2.mlp.shared_experts.gate_proj",
|
| 292 |
+
"model.layers.2.mlp.shared_experts.up_proj",
|
| 293 |
+
"model.layers.2.post_attention_layernorm",
|
| 294 |
+
"model.layers.2.self_attn.kv_a_layernorm",
|
| 295 |
+
"model.layers.2.self_attn.kv_a_proj_with_mqa",
|
| 296 |
+
"model.layers.2.self_attn.kv_b_proj",
|
| 297 |
+
"model.layers.2.self_attn.o_proj",
|
| 298 |
+
"model.layers.2.self_attn.q_a_layernorm",
|
| 299 |
+
"model.layers.2.self_attn.q_a_proj",
|
| 300 |
+
"model.layers.2.self_attn.q_b_proj",
|
| 301 |
+
"model.layers.20.input_layernorm",
|
| 302 |
+
"model.layers.20.mlp.gate",
|
| 303 |
+
"model.layers.20.mlp.shared_experts.down_proj",
|
| 304 |
+
"model.layers.20.mlp.shared_experts.gate_proj",
|
| 305 |
+
"model.layers.20.mlp.shared_experts.up_proj",
|
| 306 |
+
"model.layers.20.post_attention_layernorm",
|
| 307 |
+
"model.layers.20.self_attn.kv_a_layernorm",
|
| 308 |
+
"model.layers.20.self_attn.kv_a_proj_with_mqa",
|
| 309 |
+
"model.layers.20.self_attn.kv_b_proj",
|
| 310 |
+
"model.layers.20.self_attn.o_proj",
|
| 311 |
+
"model.layers.20.self_attn.q_a_layernorm",
|
| 312 |
+
"model.layers.20.self_attn.q_a_proj",
|
| 313 |
+
"model.layers.20.self_attn.q_b_proj",
|
| 314 |
+
"model.layers.21.input_layernorm",
|
| 315 |
+
"model.layers.21.mlp.gate",
|
| 316 |
+
"model.layers.21.mlp.shared_experts.down_proj",
|
| 317 |
+
"model.layers.21.mlp.shared_experts.gate_proj",
|
| 318 |
+
"model.layers.21.mlp.shared_experts.up_proj",
|
| 319 |
+
"model.layers.21.post_attention_layernorm",
|
| 320 |
+
"model.layers.21.self_attn.kv_a_layernorm",
|
| 321 |
+
"model.layers.21.self_attn.kv_a_proj_with_mqa",
|
| 322 |
+
"model.layers.21.self_attn.kv_b_proj",
|
| 323 |
+
"model.layers.21.self_attn.o_proj",
|
| 324 |
+
"model.layers.21.self_attn.q_a_layernorm",
|
| 325 |
+
"model.layers.21.self_attn.q_a_proj",
|
| 326 |
+
"model.layers.21.self_attn.q_b_proj",
|
| 327 |
+
"model.layers.22.input_layernorm",
|
| 328 |
+
"model.layers.22.mlp.gate",
|
| 329 |
+
"model.layers.22.mlp.shared_experts.down_proj",
|
| 330 |
+
"model.layers.22.mlp.shared_experts.gate_proj",
|
| 331 |
+
"model.layers.22.mlp.shared_experts.up_proj",
|
| 332 |
+
"model.layers.22.post_attention_layernorm",
|
| 333 |
+
"model.layers.22.self_attn.kv_a_layernorm",
|
| 334 |
+
"model.layers.22.self_attn.kv_a_proj_with_mqa",
|
| 335 |
+
"model.layers.22.self_attn.kv_b_proj",
|
| 336 |
+
"model.layers.22.self_attn.o_proj",
|
| 337 |
+
"model.layers.22.self_attn.q_a_layernorm",
|
| 338 |
+
"model.layers.22.self_attn.q_a_proj",
|
| 339 |
+
"model.layers.22.self_attn.q_b_proj",
|
| 340 |
+
"model.layers.23.input_layernorm",
|
| 341 |
+
"model.layers.23.mlp.gate",
|
| 342 |
+
"model.layers.23.mlp.shared_experts.down_proj",
|
| 343 |
+
"model.layers.23.mlp.shared_experts.gate_proj",
|
| 344 |
+
"model.layers.23.mlp.shared_experts.up_proj",
|
| 345 |
+
"model.layers.23.post_attention_layernorm",
|
| 346 |
+
"model.layers.23.self_attn.kv_a_layernorm",
|
| 347 |
+
"model.layers.23.self_attn.kv_a_proj_with_mqa",
|
| 348 |
+
"model.layers.23.self_attn.kv_b_proj",
|
| 349 |
+
"model.layers.23.self_attn.o_proj",
|
| 350 |
+
"model.layers.23.self_attn.q_a_layernorm",
|
| 351 |
+
"model.layers.23.self_attn.q_a_proj",
|
| 352 |
+
"model.layers.23.self_attn.q_b_proj",
|
| 353 |
+
"model.layers.24.input_layernorm",
|
| 354 |
+
"model.layers.24.mlp.gate",
|
| 355 |
+
"model.layers.24.mlp.shared_experts.down_proj",
|
| 356 |
+
"model.layers.24.mlp.shared_experts.gate_proj",
|
| 357 |
+
"model.layers.24.mlp.shared_experts.up_proj",
|
| 358 |
+
"model.layers.24.post_attention_layernorm",
|
| 359 |
+
"model.layers.24.self_attn.kv_a_layernorm",
|
| 360 |
+
"model.layers.24.self_attn.kv_a_proj_with_mqa",
|
| 361 |
+
"model.layers.24.self_attn.kv_b_proj",
|
| 362 |
+
"model.layers.24.self_attn.o_proj",
|
| 363 |
+
"model.layers.24.self_attn.q_a_layernorm",
|
| 364 |
+
"model.layers.24.self_attn.q_a_proj",
|
| 365 |
+
"model.layers.24.self_attn.q_b_proj",
|
| 366 |
+
"model.layers.25.input_layernorm",
|
| 367 |
+
"model.layers.25.mlp.gate",
|
| 368 |
+
"model.layers.25.mlp.shared_experts.down_proj",
|
| 369 |
+
"model.layers.25.mlp.shared_experts.gate_proj",
|
| 370 |
+
"model.layers.25.mlp.shared_experts.up_proj",
|
| 371 |
+
"model.layers.25.post_attention_layernorm",
|
| 372 |
+
"model.layers.25.self_attn.kv_a_layernorm",
|
| 373 |
+
"model.layers.25.self_attn.kv_a_proj_with_mqa",
|
| 374 |
+
"model.layers.25.self_attn.kv_b_proj",
|
| 375 |
+
"model.layers.25.self_attn.o_proj",
|
| 376 |
+
"model.layers.25.self_attn.q_a_layernorm",
|
| 377 |
+
"model.layers.25.self_attn.q_a_proj",
|
| 378 |
+
"model.layers.25.self_attn.q_b_proj",
|
| 379 |
+
"model.layers.26.input_layernorm",
|
| 380 |
+
"model.layers.26.mlp.gate",
|
| 381 |
+
"model.layers.26.mlp.shared_experts.down_proj",
|
| 382 |
+
"model.layers.26.mlp.shared_experts.gate_proj",
|
| 383 |
+
"model.layers.26.mlp.shared_experts.up_proj",
|
| 384 |
+
"model.layers.26.post_attention_layernorm",
|
| 385 |
+
"model.layers.26.self_attn.kv_a_layernorm",
|
| 386 |
+
"model.layers.26.self_attn.kv_a_proj_with_mqa",
|
| 387 |
+
"model.layers.26.self_attn.kv_b_proj",
|
| 388 |
+
"model.layers.26.self_attn.o_proj",
|
| 389 |
+
"model.layers.26.self_attn.q_a_layernorm",
|
| 390 |
+
"model.layers.26.self_attn.q_a_proj",
|
| 391 |
+
"model.layers.26.self_attn.q_b_proj",
|
| 392 |
+
"model.layers.27.input_layernorm",
|
| 393 |
+
"model.layers.27.mlp.gate",
|
| 394 |
+
"model.layers.27.mlp.shared_experts.down_proj",
|
| 395 |
+
"model.layers.27.mlp.shared_experts.gate_proj",
|
| 396 |
+
"model.layers.27.mlp.shared_experts.up_proj",
|
| 397 |
+
"model.layers.27.post_attention_layernorm",
|
| 398 |
+
"model.layers.27.self_attn.kv_a_layernorm",
|
| 399 |
+
"model.layers.27.self_attn.kv_a_proj_with_mqa",
|
| 400 |
+
"model.layers.27.self_attn.kv_b_proj",
|
| 401 |
+
"model.layers.27.self_attn.o_proj",
|
| 402 |
+
"model.layers.27.self_attn.q_a_layernorm",
|
| 403 |
+
"model.layers.27.self_attn.q_a_proj",
|
| 404 |
+
"model.layers.27.self_attn.q_b_proj",
|
| 405 |
+
"model.layers.28.input_layernorm",
|
| 406 |
+
"model.layers.28.mlp.gate",
|
| 407 |
+
"model.layers.28.mlp.shared_experts.down_proj",
|
| 408 |
+
"model.layers.28.mlp.shared_experts.gate_proj",
|
| 409 |
+
"model.layers.28.mlp.shared_experts.up_proj",
|
| 410 |
+
"model.layers.28.post_attention_layernorm",
|
| 411 |
+
"model.layers.28.self_attn.kv_a_layernorm",
|
| 412 |
+
"model.layers.28.self_attn.kv_a_proj_with_mqa",
|
| 413 |
+
"model.layers.28.self_attn.kv_b_proj",
|
| 414 |
+
"model.layers.28.self_attn.o_proj",
|
| 415 |
+
"model.layers.28.self_attn.q_a_layernorm",
|
| 416 |
+
"model.layers.28.self_attn.q_a_proj",
|
| 417 |
+
"model.layers.28.self_attn.q_b_proj",
|
| 418 |
+
"model.layers.29.input_layernorm",
|
| 419 |
+
"model.layers.29.mlp.gate",
|
| 420 |
+
"model.layers.29.mlp.shared_experts.down_proj",
|
| 421 |
+
"model.layers.29.mlp.shared_experts.gate_proj",
|
| 422 |
+
"model.layers.29.mlp.shared_experts.up_proj",
|
| 423 |
+
"model.layers.29.post_attention_layernorm",
|
| 424 |
+
"model.layers.29.self_attn.kv_a_layernorm",
|
| 425 |
+
"model.layers.29.self_attn.kv_a_proj_with_mqa",
|
| 426 |
+
"model.layers.29.self_attn.kv_b_proj",
|
| 427 |
+
"model.layers.29.self_attn.o_proj",
|
| 428 |
+
"model.layers.29.self_attn.q_a_layernorm",
|
| 429 |
+
"model.layers.29.self_attn.q_a_proj",
|
| 430 |
+
"model.layers.29.self_attn.q_b_proj",
|
| 431 |
+
"model.layers.3.input_layernorm",
|
| 432 |
+
"model.layers.3.mlp.gate",
|
| 433 |
+
"model.layers.3.mlp.shared_experts.down_proj",
|
| 434 |
+
"model.layers.3.mlp.shared_experts.gate_proj",
|
| 435 |
+
"model.layers.3.mlp.shared_experts.up_proj",
|
| 436 |
+
"model.layers.3.post_attention_layernorm",
|
| 437 |
+
"model.layers.3.self_attn.kv_a_layernorm",
|
| 438 |
+
"model.layers.3.self_attn.kv_a_proj_with_mqa",
|
| 439 |
+
"model.layers.3.self_attn.kv_b_proj",
|
| 440 |
+
"model.layers.3.self_attn.o_proj",
|
| 441 |
+
"model.layers.3.self_attn.q_a_layernorm",
|
| 442 |
+
"model.layers.3.self_attn.q_a_proj",
|
| 443 |
+
"model.layers.3.self_attn.q_b_proj",
|
| 444 |
+
"model.layers.30.input_layernorm",
|
| 445 |
+
"model.layers.30.mlp.gate",
|
| 446 |
+
"model.layers.30.mlp.shared_experts.down_proj",
|
| 447 |
+
"model.layers.30.mlp.shared_experts.gate_proj",
|
| 448 |
+
"model.layers.30.mlp.shared_experts.up_proj",
|
| 449 |
+
"model.layers.30.post_attention_layernorm",
|
| 450 |
+
"model.layers.30.self_attn.kv_a_layernorm",
|
| 451 |
+
"model.layers.30.self_attn.kv_a_proj_with_mqa",
|
| 452 |
+
"model.layers.30.self_attn.kv_b_proj",
|
| 453 |
+
"model.layers.30.self_attn.o_proj",
|
| 454 |
+
"model.layers.30.self_attn.q_a_layernorm",
|
| 455 |
+
"model.layers.30.self_attn.q_a_proj",
|
| 456 |
+
"model.layers.30.self_attn.q_b_proj",
|
| 457 |
+
"model.layers.31.input_layernorm",
|
| 458 |
+
"model.layers.31.mlp.gate",
|
| 459 |
+
"model.layers.31.mlp.shared_experts.down_proj",
|
| 460 |
+
"model.layers.31.mlp.shared_experts.gate_proj",
|
| 461 |
+
"model.layers.31.mlp.shared_experts.up_proj",
|
| 462 |
+
"model.layers.31.post_attention_layernorm",
|
| 463 |
+
"model.layers.31.self_attn.kv_a_layernorm",
|
| 464 |
+
"model.layers.31.self_attn.kv_a_proj_with_mqa",
|
| 465 |
+
"model.layers.31.self_attn.kv_b_proj",
|
| 466 |
+
"model.layers.31.self_attn.o_proj",
|
| 467 |
+
"model.layers.31.self_attn.q_a_layernorm",
|
| 468 |
+
"model.layers.31.self_attn.q_a_proj",
|
| 469 |
+
"model.layers.31.self_attn.q_b_proj",
|
| 470 |
+
"model.layers.32.input_layernorm",
|
| 471 |
+
"model.layers.32.mlp.gate",
|
| 472 |
+
"model.layers.32.mlp.shared_experts.down_proj",
|
| 473 |
+
"model.layers.32.mlp.shared_experts.gate_proj",
|
| 474 |
+
"model.layers.32.mlp.shared_experts.up_proj",
|
| 475 |
+
"model.layers.32.post_attention_layernorm",
|
| 476 |
+
"model.layers.32.self_attn.kv_a_layernorm",
|
| 477 |
+
"model.layers.32.self_attn.kv_a_proj_with_mqa",
|
| 478 |
+
"model.layers.32.self_attn.kv_b_proj",
|
| 479 |
+
"model.layers.32.self_attn.o_proj",
|
| 480 |
+
"model.layers.32.self_attn.q_a_layernorm",
|
| 481 |
+
"model.layers.32.self_attn.q_a_proj",
|
| 482 |
+
"model.layers.32.self_attn.q_b_proj",
|
| 483 |
+
"model.layers.33.input_layernorm",
|
| 484 |
+
"model.layers.33.mlp.gate",
|
| 485 |
+
"model.layers.33.mlp.shared_experts.down_proj",
|
| 486 |
+
"model.layers.33.mlp.shared_experts.gate_proj",
|
| 487 |
+
"model.layers.33.mlp.shared_experts.up_proj",
|
| 488 |
+
"model.layers.33.post_attention_layernorm",
|
| 489 |
+
"model.layers.33.self_attn.kv_a_layernorm",
|
| 490 |
+
"model.layers.33.self_attn.kv_a_proj_with_mqa",
|
| 491 |
+
"model.layers.33.self_attn.kv_b_proj",
|
| 492 |
+
"model.layers.33.self_attn.o_proj",
|
| 493 |
+
"model.layers.33.self_attn.q_a_layernorm",
|
| 494 |
+
"model.layers.33.self_attn.q_a_proj",
|
| 495 |
+
"model.layers.33.self_attn.q_b_proj",
|
| 496 |
+
"model.layers.34.input_layernorm",
|
| 497 |
+
"model.layers.34.mlp.gate",
|
| 498 |
+
"model.layers.34.mlp.shared_experts.down_proj",
|
| 499 |
+
"model.layers.34.mlp.shared_experts.gate_proj",
|
| 500 |
+
"model.layers.34.mlp.shared_experts.up_proj",
|
| 501 |
+
"model.layers.34.post_attention_layernorm",
|
| 502 |
+
"model.layers.34.self_attn.kv_a_layernorm",
|
| 503 |
+
"model.layers.34.self_attn.kv_a_proj_with_mqa",
|
| 504 |
+
"model.layers.34.self_attn.kv_b_proj",
|
| 505 |
+
"model.layers.34.self_attn.o_proj",
|
| 506 |
+
"model.layers.34.self_attn.q_a_layernorm",
|
| 507 |
+
"model.layers.34.self_attn.q_a_proj",
|
| 508 |
+
"model.layers.34.self_attn.q_b_proj",
|
| 509 |
+
"model.layers.35.input_layernorm",
|
| 510 |
+
"model.layers.35.mlp.gate",
|
| 511 |
+
"model.layers.35.mlp.shared_experts.down_proj",
|
| 512 |
+
"model.layers.35.mlp.shared_experts.gate_proj",
|
| 513 |
+
"model.layers.35.mlp.shared_experts.up_proj",
|
| 514 |
+
"model.layers.35.post_attention_layernorm",
|
| 515 |
+
"model.layers.35.self_attn.kv_a_layernorm",
|
| 516 |
+
"model.layers.35.self_attn.kv_a_proj_with_mqa",
|
| 517 |
+
"model.layers.35.self_attn.kv_b_proj",
|
| 518 |
+
"model.layers.35.self_attn.o_proj",
|
| 519 |
+
"model.layers.35.self_attn.q_a_layernorm",
|
| 520 |
+
"model.layers.35.self_attn.q_a_proj",
|
| 521 |
+
"model.layers.35.self_attn.q_b_proj",
|
| 522 |
+
"model.layers.36.input_layernorm",
|
| 523 |
+
"model.layers.36.mlp.gate",
|
| 524 |
+
"model.layers.36.mlp.shared_experts.down_proj",
|
| 525 |
+
"model.layers.36.mlp.shared_experts.gate_proj",
|
| 526 |
+
"model.layers.36.mlp.shared_experts.up_proj",
|
| 527 |
+
"model.layers.36.post_attention_layernorm",
|
| 528 |
+
"model.layers.36.self_attn.kv_a_layernorm",
|
| 529 |
+
"model.layers.36.self_attn.kv_a_proj_with_mqa",
|
| 530 |
+
"model.layers.36.self_attn.kv_b_proj",
|
| 531 |
+
"model.layers.36.self_attn.o_proj",
|
| 532 |
+
"model.layers.36.self_attn.q_a_layernorm",
|
| 533 |
+
"model.layers.36.self_attn.q_a_proj",
|
| 534 |
+
"model.layers.36.self_attn.q_b_proj",
|
| 535 |
+
"model.layers.37.input_layernorm",
|
| 536 |
+
"model.layers.37.mlp.gate",
|
| 537 |
+
"model.layers.37.mlp.shared_experts.down_proj",
|
| 538 |
+
"model.layers.37.mlp.shared_experts.gate_proj",
|
| 539 |
+
"model.layers.37.mlp.shared_experts.up_proj",
|
| 540 |
+
"model.layers.37.post_attention_layernorm",
|
| 541 |
+
"model.layers.37.self_attn.kv_a_layernorm",
|
| 542 |
+
"model.layers.37.self_attn.kv_a_proj_with_mqa",
|
| 543 |
+
"model.layers.37.self_attn.kv_b_proj",
|
| 544 |
+
"model.layers.37.self_attn.o_proj",
|
| 545 |
+
"model.layers.37.self_attn.q_a_layernorm",
|
| 546 |
+
"model.layers.37.self_attn.q_a_proj",
|
| 547 |
+
"model.layers.37.self_attn.q_b_proj",
|
| 548 |
+
"model.layers.38.input_layernorm",
|
| 549 |
+
"model.layers.38.mlp.gate",
|
| 550 |
+
"model.layers.38.mlp.shared_experts.down_proj",
|
| 551 |
+
"model.layers.38.mlp.shared_experts.gate_proj",
|
| 552 |
+
"model.layers.38.mlp.shared_experts.up_proj",
|
| 553 |
+
"model.layers.38.post_attention_layernorm",
|
| 554 |
+
"model.layers.38.self_attn.kv_a_layernorm",
|
| 555 |
+
"model.layers.38.self_attn.kv_a_proj_with_mqa",
|
| 556 |
+
"model.layers.38.self_attn.kv_b_proj",
|
| 557 |
+
"model.layers.38.self_attn.o_proj",
|
| 558 |
+
"model.layers.38.self_attn.q_a_layernorm",
|
| 559 |
+
"model.layers.38.self_attn.q_a_proj",
|
| 560 |
+
"model.layers.38.self_attn.q_b_proj",
|
| 561 |
+
"model.layers.39.input_layernorm",
|
| 562 |
+
"model.layers.39.mlp.gate",
|
| 563 |
+
"model.layers.39.mlp.shared_experts.down_proj",
|
| 564 |
+
"model.layers.39.mlp.shared_experts.gate_proj",
|
| 565 |
+
"model.layers.39.mlp.shared_experts.up_proj",
|
| 566 |
+
"model.layers.39.post_attention_layernorm",
|
| 567 |
+
"model.layers.39.self_attn.kv_a_layernorm",
|
| 568 |
+
"model.layers.39.self_attn.kv_a_proj_with_mqa",
|
| 569 |
+
"model.layers.39.self_attn.kv_b_proj",
|
| 570 |
+
"model.layers.39.self_attn.o_proj",
|
| 571 |
+
"model.layers.39.self_attn.q_a_layernorm",
|
| 572 |
+
"model.layers.39.self_attn.q_a_proj",
|
| 573 |
+
"model.layers.39.self_attn.q_b_proj",
|
| 574 |
+
"model.layers.4.input_layernorm",
|
| 575 |
+
"model.layers.4.mlp.gate",
|
| 576 |
+
"model.layers.4.mlp.shared_experts.down_proj",
|
| 577 |
+
"model.layers.4.mlp.shared_experts.gate_proj",
|
| 578 |
+
"model.layers.4.mlp.shared_experts.up_proj",
|
| 579 |
+
"model.layers.4.post_attention_layernorm",
|
| 580 |
+
"model.layers.4.self_attn.kv_a_layernorm",
|
| 581 |
+
"model.layers.4.self_attn.kv_a_proj_with_mqa",
|
| 582 |
+
"model.layers.4.self_attn.kv_b_proj",
|
| 583 |
+
"model.layers.4.self_attn.o_proj",
|
| 584 |
+
"model.layers.4.self_attn.q_a_layernorm",
|
| 585 |
+
"model.layers.4.self_attn.q_a_proj",
|
| 586 |
+
"model.layers.4.self_attn.q_b_proj",
|
| 587 |
+
"model.layers.40.input_layernorm",
|
| 588 |
+
"model.layers.40.mlp.gate",
|
| 589 |
+
"model.layers.40.mlp.shared_experts.down_proj",
|
| 590 |
+
"model.layers.40.mlp.shared_experts.gate_proj",
|
| 591 |
+
"model.layers.40.mlp.shared_experts.up_proj",
|
| 592 |
+
"model.layers.40.post_attention_layernorm",
|
| 593 |
+
"model.layers.40.self_attn.kv_a_layernorm",
|
| 594 |
+
"model.layers.40.self_attn.kv_a_proj_with_mqa",
|
| 595 |
+
"model.layers.40.self_attn.kv_b_proj",
|
| 596 |
+
"model.layers.40.self_attn.o_proj",
|
| 597 |
+
"model.layers.40.self_attn.q_a_layernorm",
|
| 598 |
+
"model.layers.40.self_attn.q_a_proj",
|
| 599 |
+
"model.layers.40.self_attn.q_b_proj",
|
| 600 |
+
"model.layers.41.input_layernorm",
|
| 601 |
+
"model.layers.41.mlp.gate",
|
| 602 |
+
"model.layers.41.mlp.shared_experts.down_proj",
|
| 603 |
+
"model.layers.41.mlp.shared_experts.gate_proj",
|
| 604 |
+
"model.layers.41.mlp.shared_experts.up_proj",
|
| 605 |
+
"model.layers.41.post_attention_layernorm",
|
| 606 |
+
"model.layers.41.self_attn.kv_a_layernorm",
|
| 607 |
+
"model.layers.41.self_attn.kv_a_proj_with_mqa",
|
| 608 |
+
"model.layers.41.self_attn.kv_b_proj",
|
| 609 |
+
"model.layers.41.self_attn.o_proj",
|
| 610 |
+
"model.layers.41.self_attn.q_a_layernorm",
|
| 611 |
+
"model.layers.41.self_attn.q_a_proj",
|
| 612 |
+
"model.layers.41.self_attn.q_b_proj",
|
| 613 |
+
"model.layers.42.input_layernorm",
|
| 614 |
+
"model.layers.42.mlp.gate",
|
| 615 |
+
"model.layers.42.mlp.shared_experts.down_proj",
|
| 616 |
+
"model.layers.42.mlp.shared_experts.gate_proj",
|
| 617 |
+
"model.layers.42.mlp.shared_experts.up_proj",
|
| 618 |
+
"model.layers.42.post_attention_layernorm",
|
| 619 |
+
"model.layers.42.self_attn.kv_a_layernorm",
|
| 620 |
+
"model.layers.42.self_attn.kv_a_proj_with_mqa",
|
| 621 |
+
"model.layers.42.self_attn.kv_b_proj",
|
| 622 |
+
"model.layers.42.self_attn.o_proj",
|
| 623 |
+
"model.layers.42.self_attn.q_a_layernorm",
|
| 624 |
+
"model.layers.42.self_attn.q_a_proj",
|
| 625 |
+
"model.layers.42.self_attn.q_b_proj",
|
| 626 |
+
"model.layers.43.input_layernorm",
|
| 627 |
+
"model.layers.43.mlp.gate",
|
| 628 |
+
"model.layers.43.mlp.shared_experts.down_proj",
|
| 629 |
+
"model.layers.43.mlp.shared_experts.gate_proj",
|
| 630 |
+
"model.layers.43.mlp.shared_experts.up_proj",
|
| 631 |
+
"model.layers.43.post_attention_layernorm",
|
| 632 |
+
"model.layers.43.self_attn.kv_a_layernorm",
|
| 633 |
+
"model.layers.43.self_attn.kv_a_proj_with_mqa",
|
| 634 |
+
"model.layers.43.self_attn.kv_b_proj",
|
| 635 |
+
"model.layers.43.self_attn.o_proj",
|
| 636 |
+
"model.layers.43.self_attn.q_a_layernorm",
|
| 637 |
+
"model.layers.43.self_attn.q_a_proj",
|
| 638 |
+
"model.layers.43.self_attn.q_b_proj",
|
| 639 |
+
"model.layers.44.input_layernorm",
|
| 640 |
+
"model.layers.44.mlp.gate",
|
| 641 |
+
"model.layers.44.mlp.shared_experts.down_proj",
|
| 642 |
+
"model.layers.44.mlp.shared_experts.gate_proj",
|
| 643 |
+
"model.layers.44.mlp.shared_experts.up_proj",
|
| 644 |
+
"model.layers.44.post_attention_layernorm",
|
| 645 |
+
"model.layers.44.self_attn.kv_a_layernorm",
|
| 646 |
+
"model.layers.44.self_attn.kv_a_proj_with_mqa",
|
| 647 |
+
"model.layers.44.self_attn.kv_b_proj",
|
| 648 |
+
"model.layers.44.self_attn.o_proj",
|
| 649 |
+
"model.layers.44.self_attn.q_a_layernorm",
|
| 650 |
+
"model.layers.44.self_attn.q_a_proj",
|
| 651 |
+
"model.layers.44.self_attn.q_b_proj",
|
| 652 |
+
"model.layers.45.input_layernorm",
|
| 653 |
+
"model.layers.45.mlp.gate",
|
| 654 |
+
"model.layers.45.mlp.shared_experts.down_proj",
|
| 655 |
+
"model.layers.45.mlp.shared_experts.gate_proj",
|
| 656 |
+
"model.layers.45.mlp.shared_experts.up_proj",
|
| 657 |
+
"model.layers.45.post_attention_layernorm",
|
| 658 |
+
"model.layers.45.self_attn.kv_a_layernorm",
|
| 659 |
+
"model.layers.45.self_attn.kv_a_proj_with_mqa",
|
| 660 |
+
"model.layers.45.self_attn.kv_b_proj",
|
| 661 |
+
"model.layers.45.self_attn.o_proj",
|
| 662 |
+
"model.layers.45.self_attn.q_a_layernorm",
|
| 663 |
+
"model.layers.45.self_attn.q_a_proj",
|
| 664 |
+
"model.layers.45.self_attn.q_b_proj",
|
| 665 |
+
"model.layers.46.input_layernorm",
|
| 666 |
+
"model.layers.46.mlp.gate",
|
| 667 |
+
"model.layers.46.mlp.shared_experts.down_proj",
|
| 668 |
+
"model.layers.46.mlp.shared_experts.gate_proj",
|
| 669 |
+
"model.layers.46.mlp.shared_experts.up_proj",
|
| 670 |
+
"model.layers.46.post_attention_layernorm",
|
| 671 |
+
"model.layers.46.self_attn.kv_a_layernorm",
|
| 672 |
+
"model.layers.46.self_attn.kv_a_proj_with_mqa",
|
| 673 |
+
"model.layers.46.self_attn.kv_b_proj",
|
| 674 |
+
"model.layers.46.self_attn.o_proj",
|
| 675 |
+
"model.layers.46.self_attn.q_a_layernorm",
|
| 676 |
+
"model.layers.46.self_attn.q_a_proj",
|
| 677 |
+
"model.layers.46.self_attn.q_b_proj",
|
| 678 |
+
"model.layers.47.input_layernorm",
|
| 679 |
+
"model.layers.47.mlp.gate",
|
| 680 |
+
"model.layers.47.mlp.shared_experts.down_proj",
|
| 681 |
+
"model.layers.47.mlp.shared_experts.gate_proj",
|
| 682 |
+
"model.layers.47.mlp.shared_experts.up_proj",
|
| 683 |
+
"model.layers.47.post_attention_layernorm",
|
| 684 |
+
"model.layers.47.self_attn.kv_a_layernorm",
|
| 685 |
+
"model.layers.47.self_attn.kv_a_proj_with_mqa",
|
| 686 |
+
"model.layers.47.self_attn.kv_b_proj",
|
| 687 |
+
"model.layers.47.self_attn.o_proj",
|
| 688 |
+
"model.layers.47.self_attn.q_a_layernorm",
|
| 689 |
+
"model.layers.47.self_attn.q_a_proj",
|
| 690 |
+
"model.layers.47.self_attn.q_b_proj",
|
| 691 |
+
"model.layers.48.input_layernorm",
|
| 692 |
+
"model.layers.48.mlp.gate",
|
| 693 |
+
"model.layers.48.mlp.shared_experts.down_proj",
|
| 694 |
+
"model.layers.48.mlp.shared_experts.gate_proj",
|
| 695 |
+
"model.layers.48.mlp.shared_experts.up_proj",
|
| 696 |
+
"model.layers.48.post_attention_layernorm",
|
| 697 |
+
"model.layers.48.self_attn.kv_a_layernorm",
|
| 698 |
+
"model.layers.48.self_attn.kv_a_proj_with_mqa",
|
| 699 |
+
"model.layers.48.self_attn.kv_b_proj",
|
| 700 |
+
"model.layers.48.self_attn.o_proj",
|
| 701 |
+
"model.layers.48.self_attn.q_a_layernorm",
|
| 702 |
+
"model.layers.48.self_attn.q_a_proj",
|
| 703 |
+
"model.layers.48.self_attn.q_b_proj",
|
| 704 |
+
"model.layers.49.input_layernorm",
|
| 705 |
+
"model.layers.49.mlp.gate",
|
| 706 |
+
"model.layers.49.mlp.shared_experts.down_proj",
|
| 707 |
+
"model.layers.49.mlp.shared_experts.gate_proj",
|
| 708 |
+
"model.layers.49.mlp.shared_experts.up_proj",
|
| 709 |
+
"model.layers.49.post_attention_layernorm",
|
| 710 |
+
"model.layers.49.self_attn.kv_a_layernorm",
|
| 711 |
+
"model.layers.49.self_attn.kv_a_proj_with_mqa",
|
| 712 |
+
"model.layers.49.self_attn.kv_b_proj",
|
| 713 |
+
"model.layers.49.self_attn.o_proj",
|
| 714 |
+
"model.layers.49.self_attn.q_a_layernorm",
|
| 715 |
+
"model.layers.49.self_attn.q_a_proj",
|
| 716 |
+
"model.layers.49.self_attn.q_b_proj",
|
| 717 |
+
"model.layers.5.input_layernorm",
|
| 718 |
+
"model.layers.5.mlp.gate",
|
| 719 |
+
"model.layers.5.mlp.shared_experts.down_proj",
|
| 720 |
+
"model.layers.5.mlp.shared_experts.gate_proj",
|
| 721 |
+
"model.layers.5.mlp.shared_experts.up_proj",
|
| 722 |
+
"model.layers.5.post_attention_layernorm",
|
| 723 |
+
"model.layers.5.self_attn.kv_a_layernorm",
|
| 724 |
+
"model.layers.5.self_attn.kv_a_proj_with_mqa",
|
| 725 |
+
"model.layers.5.self_attn.kv_b_proj",
|
| 726 |
+
"model.layers.5.self_attn.o_proj",
|
| 727 |
+
"model.layers.5.self_attn.q_a_layernorm",
|
| 728 |
+
"model.layers.5.self_attn.q_a_proj",
|
| 729 |
+
"model.layers.5.self_attn.q_b_proj",
|
| 730 |
+
"model.layers.50.input_layernorm",
|
| 731 |
+
"model.layers.50.mlp.gate",
|
| 732 |
+
"model.layers.50.mlp.shared_experts.down_proj",
|
| 733 |
+
"model.layers.50.mlp.shared_experts.gate_proj",
|
| 734 |
+
"model.layers.50.mlp.shared_experts.up_proj",
|
| 735 |
+
"model.layers.50.post_attention_layernorm",
|
| 736 |
+
"model.layers.50.self_attn.kv_a_layernorm",
|
| 737 |
+
"model.layers.50.self_attn.kv_a_proj_with_mqa",
|
| 738 |
+
"model.layers.50.self_attn.kv_b_proj",
|
| 739 |
+
"model.layers.50.self_attn.o_proj",
|
| 740 |
+
"model.layers.50.self_attn.q_a_layernorm",
|
| 741 |
+
"model.layers.50.self_attn.q_a_proj",
|
| 742 |
+
"model.layers.50.self_attn.q_b_proj",
|
| 743 |
+
"model.layers.51.input_layernorm",
|
| 744 |
+
"model.layers.51.mlp.gate",
|
| 745 |
+
"model.layers.51.mlp.shared_experts.down_proj",
|
| 746 |
+
"model.layers.51.mlp.shared_experts.gate_proj",
|
| 747 |
+
"model.layers.51.mlp.shared_experts.up_proj",
|
| 748 |
+
"model.layers.51.post_attention_layernorm",
|
| 749 |
+
"model.layers.51.self_attn.kv_a_layernorm",
|
| 750 |
+
"model.layers.51.self_attn.kv_a_proj_with_mqa",
|
| 751 |
+
"model.layers.51.self_attn.kv_b_proj",
|
| 752 |
+
"model.layers.51.self_attn.o_proj",
|
| 753 |
+
"model.layers.51.self_attn.q_a_layernorm",
|
| 754 |
+
"model.layers.51.self_attn.q_a_proj",
|
| 755 |
+
"model.layers.51.self_attn.q_b_proj",
|
| 756 |
+
"model.layers.52.input_layernorm",
|
| 757 |
+
"model.layers.52.mlp.gate",
|
| 758 |
+
"model.layers.52.mlp.shared_experts.down_proj",
|
| 759 |
+
"model.layers.52.mlp.shared_experts.gate_proj",
|
| 760 |
+
"model.layers.52.mlp.shared_experts.up_proj",
|
| 761 |
+
"model.layers.52.post_attention_layernorm",
|
| 762 |
+
"model.layers.52.self_attn.kv_a_layernorm",
|
| 763 |
+
"model.layers.52.self_attn.kv_a_proj_with_mqa",
|
| 764 |
+
"model.layers.52.self_attn.kv_b_proj",
|
| 765 |
+
"model.layers.52.self_attn.o_proj",
|
| 766 |
+
"model.layers.52.self_attn.q_a_layernorm",
|
| 767 |
+
"model.layers.52.self_attn.q_a_proj",
|
| 768 |
+
"model.layers.52.self_attn.q_b_proj",
|
| 769 |
+
"model.layers.53.input_layernorm",
|
| 770 |
+
"model.layers.53.mlp.gate",
|
| 771 |
+
"model.layers.53.mlp.shared_experts.down_proj",
|
| 772 |
+
"model.layers.53.mlp.shared_experts.gate_proj",
|
| 773 |
+
"model.layers.53.mlp.shared_experts.up_proj",
|
| 774 |
+
"model.layers.53.post_attention_layernorm",
|
| 775 |
+
"model.layers.53.self_attn.kv_a_layernorm",
|
| 776 |
+
"model.layers.53.self_attn.kv_a_proj_with_mqa",
|
| 777 |
+
"model.layers.53.self_attn.kv_b_proj",
|
| 778 |
+
"model.layers.53.self_attn.o_proj",
|
| 779 |
+
"model.layers.53.self_attn.q_a_layernorm",
|
| 780 |
+
"model.layers.53.self_attn.q_a_proj",
|
| 781 |
+
"model.layers.53.self_attn.q_b_proj",
|
| 782 |
+
"model.layers.54.input_layernorm",
|
| 783 |
+
"model.layers.54.mlp.gate",
|
| 784 |
+
"model.layers.54.mlp.shared_experts.down_proj",
|
| 785 |
+
"model.layers.54.mlp.shared_experts.gate_proj",
|
| 786 |
+
"model.layers.54.mlp.shared_experts.up_proj",
|
| 787 |
+
"model.layers.54.post_attention_layernorm",
|
| 788 |
+
"model.layers.54.self_attn.kv_a_layernorm",
|
| 789 |
+
"model.layers.54.self_attn.kv_a_proj_with_mqa",
|
| 790 |
+
"model.layers.54.self_attn.kv_b_proj",
|
| 791 |
+
"model.layers.54.self_attn.o_proj",
|
| 792 |
+
"model.layers.54.self_attn.q_a_layernorm",
|
| 793 |
+
"model.layers.54.self_attn.q_a_proj",
|
| 794 |
+
"model.layers.54.self_attn.q_b_proj",
|
| 795 |
+
"model.layers.55.input_layernorm",
|
| 796 |
+
"model.layers.55.mlp.gate",
|
| 797 |
+
"model.layers.55.mlp.shared_experts.down_proj",
|
| 798 |
+
"model.layers.55.mlp.shared_experts.gate_proj",
|
| 799 |
+
"model.layers.55.mlp.shared_experts.up_proj",
|
| 800 |
+
"model.layers.55.post_attention_layernorm",
|
| 801 |
+
"model.layers.55.self_attn.kv_a_layernorm",
|
| 802 |
+
"model.layers.55.self_attn.kv_a_proj_with_mqa",
|
| 803 |
+
"model.layers.55.self_attn.kv_b_proj",
|
| 804 |
+
"model.layers.55.self_attn.o_proj",
|
| 805 |
+
"model.layers.55.self_attn.q_a_layernorm",
|
| 806 |
+
"model.layers.55.self_attn.q_a_proj",
|
| 807 |
+
"model.layers.55.self_attn.q_b_proj",
|
| 808 |
+
"model.layers.56.input_layernorm",
|
| 809 |
+
"model.layers.56.mlp.gate",
|
| 810 |
+
"model.layers.56.mlp.shared_experts.down_proj",
|
| 811 |
+
"model.layers.56.mlp.shared_experts.gate_proj",
|
| 812 |
+
"model.layers.56.mlp.shared_experts.up_proj",
|
| 813 |
+
"model.layers.56.post_attention_layernorm",
|
| 814 |
+
"model.layers.56.self_attn.kv_a_layernorm",
|
| 815 |
+
"model.layers.56.self_attn.kv_a_proj_with_mqa",
|
| 816 |
+
"model.layers.56.self_attn.kv_b_proj",
|
| 817 |
+
"model.layers.56.self_attn.o_proj",
|
| 818 |
+
"model.layers.56.self_attn.q_a_layernorm",
|
| 819 |
+
"model.layers.56.self_attn.q_a_proj",
|
| 820 |
+
"model.layers.56.self_attn.q_b_proj",
|
| 821 |
+
"model.layers.57.input_layernorm",
|
| 822 |
+
"model.layers.57.mlp.gate",
|
| 823 |
+
"model.layers.57.mlp.shared_experts.down_proj",
|
| 824 |
+
"model.layers.57.mlp.shared_experts.gate_proj",
|
| 825 |
+
"model.layers.57.mlp.shared_experts.up_proj",
|
| 826 |
+
"model.layers.57.post_attention_layernorm",
|
| 827 |
+
"model.layers.57.self_attn.kv_a_layernorm",
|
| 828 |
+
"model.layers.57.self_attn.kv_a_proj_with_mqa",
|
| 829 |
+
"model.layers.57.self_attn.kv_b_proj",
|
| 830 |
+
"model.layers.57.self_attn.o_proj",
|
| 831 |
+
"model.layers.57.self_attn.q_a_layernorm",
|
| 832 |
+
"model.layers.57.self_attn.q_a_proj",
|
| 833 |
+
"model.layers.57.self_attn.q_b_proj",
|
| 834 |
+
"model.layers.58.input_layernorm",
|
| 835 |
+
"model.layers.58.mlp.gate",
|
| 836 |
+
"model.layers.58.mlp.shared_experts.down_proj",
|
| 837 |
+
"model.layers.58.mlp.shared_experts.gate_proj",
|
| 838 |
+
"model.layers.58.mlp.shared_experts.up_proj",
|
| 839 |
+
"model.layers.58.post_attention_layernorm",
|
| 840 |
+
"model.layers.58.self_attn.kv_a_layernorm",
|
| 841 |
+
"model.layers.58.self_attn.kv_a_proj_with_mqa",
|
| 842 |
+
"model.layers.58.self_attn.kv_b_proj",
|
| 843 |
+
"model.layers.58.self_attn.o_proj",
|
| 844 |
+
"model.layers.58.self_attn.q_a_layernorm",
|
| 845 |
+
"model.layers.58.self_attn.q_a_proj",
|
| 846 |
+
"model.layers.58.self_attn.q_b_proj",
|
| 847 |
+
"model.layers.59.input_layernorm",
|
| 848 |
+
"model.layers.59.mlp.gate",
|
| 849 |
+
"model.layers.59.mlp.shared_experts.down_proj",
|
| 850 |
+
"model.layers.59.mlp.shared_experts.gate_proj",
|
| 851 |
+
"model.layers.59.mlp.shared_experts.up_proj",
|
| 852 |
+
"model.layers.59.post_attention_layernorm",
|
| 853 |
+
"model.layers.59.self_attn.kv_a_layernorm",
|
| 854 |
+
"model.layers.59.self_attn.kv_a_proj_with_mqa",
|
| 855 |
+
"model.layers.59.self_attn.kv_b_proj",
|
| 856 |
+
"model.layers.59.self_attn.o_proj",
|
| 857 |
+
"model.layers.59.self_attn.q_a_layernorm",
|
| 858 |
+
"model.layers.59.self_attn.q_a_proj",
|
| 859 |
+
"model.layers.59.self_attn.q_b_proj",
|
| 860 |
+
"model.layers.6.input_layernorm",
|
| 861 |
+
"model.layers.6.mlp.gate",
|
| 862 |
+
"model.layers.6.mlp.shared_experts.down_proj",
|
| 863 |
+
"model.layers.6.mlp.shared_experts.gate_proj",
|
| 864 |
+
"model.layers.6.mlp.shared_experts.up_proj",
|
| 865 |
+
"model.layers.6.post_attention_layernorm",
|
| 866 |
+
"model.layers.6.self_attn.kv_a_layernorm",
|
| 867 |
+
"model.layers.6.self_attn.kv_a_proj_with_mqa",
|
| 868 |
+
"model.layers.6.self_attn.kv_b_proj",
|
| 869 |
+
"model.layers.6.self_attn.o_proj",
|
| 870 |
+
"model.layers.6.self_attn.q_a_layernorm",
|
| 871 |
+
"model.layers.6.self_attn.q_a_proj",
|
| 872 |
+
"model.layers.6.self_attn.q_b_proj",
|
| 873 |
+
"model.layers.60.input_layernorm",
|
| 874 |
+
"model.layers.60.mlp.gate",
|
| 875 |
+
"model.layers.60.mlp.shared_experts.down_proj",
|
| 876 |
+
"model.layers.60.mlp.shared_experts.gate_proj",
|
| 877 |
+
"model.layers.60.mlp.shared_experts.up_proj",
|
| 878 |
+
"model.layers.60.post_attention_layernorm",
|
| 879 |
+
"model.layers.60.self_attn.kv_a_layernorm",
|
| 880 |
+
"model.layers.60.self_attn.kv_a_proj_with_mqa",
|
| 881 |
+
"model.layers.60.self_attn.kv_b_proj",
|
| 882 |
+
"model.layers.60.self_attn.o_proj",
|
| 883 |
+
"model.layers.60.self_attn.q_a_layernorm",
|
| 884 |
+
"model.layers.60.self_attn.q_a_proj",
|
| 885 |
+
"model.layers.60.self_attn.q_b_proj",
|
| 886 |
+
"model.layers.61.input_layernorm",
|
| 887 |
+
"model.layers.61.mlp.gate",
|
| 888 |
+
"model.layers.61.mlp.shared_experts.down_proj",
|
| 889 |
+
"model.layers.61.mlp.shared_experts.gate_proj",
|
| 890 |
+
"model.layers.61.mlp.shared_experts.up_proj",
|
| 891 |
+
"model.layers.61.post_attention_layernorm",
|
| 892 |
+
"model.layers.61.self_attn.kv_a_layernorm",
|
| 893 |
+
"model.layers.61.self_attn.kv_a_proj_with_mqa",
|
| 894 |
+
"model.layers.61.self_attn.kv_b_proj",
|
| 895 |
+
"model.layers.61.self_attn.o_proj",
|
| 896 |
+
"model.layers.61.self_attn.q_a_layernorm",
|
| 897 |
+
"model.layers.61.self_attn.q_a_proj",
|
| 898 |
+
"model.layers.61.self_attn.q_b_proj",
|
| 899 |
+
"model.layers.62.input_layernorm",
|
| 900 |
+
"model.layers.62.mlp.gate",
|
| 901 |
+
"model.layers.62.mlp.shared_experts.down_proj",
|
| 902 |
+
"model.layers.62.mlp.shared_experts.gate_proj",
|
| 903 |
+
"model.layers.62.mlp.shared_experts.up_proj",
|
| 904 |
+
"model.layers.62.post_attention_layernorm",
|
| 905 |
+
"model.layers.62.self_attn.kv_a_layernorm",
|
| 906 |
+
"model.layers.62.self_attn.kv_a_proj_with_mqa",
|
| 907 |
+
"model.layers.62.self_attn.kv_b_proj",
|
| 908 |
+
"model.layers.62.self_attn.o_proj",
|
| 909 |
+
"model.layers.62.self_attn.q_a_layernorm",
|
| 910 |
+
"model.layers.62.self_attn.q_a_proj",
|
| 911 |
+
"model.layers.62.self_attn.q_b_proj",
|
| 912 |
+
"model.layers.63.input_layernorm",
|
| 913 |
+
"model.layers.63.mlp.gate",
|
| 914 |
+
"model.layers.63.mlp.shared_experts.down_proj",
|
| 915 |
+
"model.layers.63.mlp.shared_experts.gate_proj",
|
| 916 |
+
"model.layers.63.mlp.shared_experts.up_proj",
|
| 917 |
+
"model.layers.63.post_attention_layernorm",
|
| 918 |
+
"model.layers.63.self_attn.kv_a_layernorm",
|
| 919 |
+
"model.layers.63.self_attn.kv_a_proj_with_mqa",
|
| 920 |
+
"model.layers.63.self_attn.kv_b_proj",
|
| 921 |
+
"model.layers.63.self_attn.o_proj",
|
| 922 |
+
"model.layers.63.self_attn.q_a_layernorm",
|
| 923 |
+
"model.layers.63.self_attn.q_a_proj",
|
| 924 |
+
"model.layers.63.self_attn.q_b_proj",
|
| 925 |
+
"model.layers.64.input_layernorm",
|
| 926 |
+
"model.layers.64.mlp.gate",
|
| 927 |
+
"model.layers.64.mlp.shared_experts.down_proj",
|
| 928 |
+
"model.layers.64.mlp.shared_experts.gate_proj",
|
| 929 |
+
"model.layers.64.mlp.shared_experts.up_proj",
|
| 930 |
+
"model.layers.64.post_attention_layernorm",
|
| 931 |
+
"model.layers.64.self_attn.kv_a_layernorm",
|
| 932 |
+
"model.layers.64.self_attn.kv_a_proj_with_mqa",
|
| 933 |
+
"model.layers.64.self_attn.kv_b_proj",
|
| 934 |
+
"model.layers.64.self_attn.o_proj",
|
| 935 |
+
"model.layers.64.self_attn.q_a_layernorm",
|
| 936 |
+
"model.layers.64.self_attn.q_a_proj",
|
| 937 |
+
"model.layers.64.self_attn.q_b_proj",
|
| 938 |
+
"model.layers.65.input_layernorm",
|
| 939 |
+
"model.layers.65.mlp.gate",
|
| 940 |
+
"model.layers.65.mlp.shared_experts.down_proj",
|
| 941 |
+
"model.layers.65.mlp.shared_experts.gate_proj",
|
| 942 |
+
"model.layers.65.mlp.shared_experts.up_proj",
|
| 943 |
+
"model.layers.65.post_attention_layernorm",
|
| 944 |
+
"model.layers.65.self_attn.kv_a_layernorm",
|
| 945 |
+
"model.layers.65.self_attn.kv_a_proj_with_mqa",
|
| 946 |
+
"model.layers.65.self_attn.kv_b_proj",
|
| 947 |
+
"model.layers.65.self_attn.o_proj",
|
| 948 |
+
"model.layers.65.self_attn.q_a_layernorm",
|
| 949 |
+
"model.layers.65.self_attn.q_a_proj",
|
| 950 |
+
"model.layers.65.self_attn.q_b_proj",
|
| 951 |
+
"model.layers.66.input_layernorm",
|
| 952 |
+
"model.layers.66.mlp.gate",
|
| 953 |
+
"model.layers.66.mlp.shared_experts.down_proj",
|
| 954 |
+
"model.layers.66.mlp.shared_experts.gate_proj",
|
| 955 |
+
"model.layers.66.mlp.shared_experts.up_proj",
|
| 956 |
+
"model.layers.66.post_attention_layernorm",
|
| 957 |
+
"model.layers.66.self_attn.kv_a_layernorm",
|
| 958 |
+
"model.layers.66.self_attn.kv_a_proj_with_mqa",
|
| 959 |
+
"model.layers.66.self_attn.kv_b_proj",
|
| 960 |
+
"model.layers.66.self_attn.o_proj",
|
| 961 |
+
"model.layers.66.self_attn.q_a_layernorm",
|
| 962 |
+
"model.layers.66.self_attn.q_a_proj",
|
| 963 |
+
"model.layers.66.self_attn.q_b_proj",
|
| 964 |
+
"model.layers.67.input_layernorm",
|
| 965 |
+
"model.layers.67.mlp.gate",
|
| 966 |
+
"model.layers.67.mlp.shared_experts.down_proj",
|
| 967 |
+
"model.layers.67.mlp.shared_experts.gate_proj",
|
| 968 |
+
"model.layers.67.mlp.shared_experts.up_proj",
|
| 969 |
+
"model.layers.67.post_attention_layernorm",
|
| 970 |
+
"model.layers.67.self_attn.kv_a_layernorm",
|
| 971 |
+
"model.layers.67.self_attn.kv_a_proj_with_mqa",
|
| 972 |
+
"model.layers.67.self_attn.kv_b_proj",
|
| 973 |
+
"model.layers.67.self_attn.o_proj",
|
| 974 |
+
"model.layers.67.self_attn.q_a_layernorm",
|
| 975 |
+
"model.layers.67.self_attn.q_a_proj",
|
| 976 |
+
"model.layers.67.self_attn.q_b_proj",
|
| 977 |
+
"model.layers.68.input_layernorm",
|
| 978 |
+
"model.layers.68.mlp.gate",
|
| 979 |
+
"model.layers.68.mlp.shared_experts.down_proj",
|
| 980 |
+
"model.layers.68.mlp.shared_experts.gate_proj",
|
| 981 |
+
"model.layers.68.mlp.shared_experts.up_proj",
|
| 982 |
+
"model.layers.68.post_attention_layernorm",
|
| 983 |
+
"model.layers.68.self_attn.kv_a_layernorm",
|
| 984 |
+
"model.layers.68.self_attn.kv_a_proj_with_mqa",
|
| 985 |
+
"model.layers.68.self_attn.kv_b_proj",
|
| 986 |
+
"model.layers.68.self_attn.o_proj",
|
| 987 |
+
"model.layers.68.self_attn.q_a_layernorm",
|
| 988 |
+
"model.layers.68.self_attn.q_a_proj",
|
| 989 |
+
"model.layers.68.self_attn.q_b_proj",
|
| 990 |
+
"model.layers.69.input_layernorm",
|
| 991 |
+
"model.layers.69.mlp.gate",
|
| 992 |
+
"model.layers.69.mlp.shared_experts.down_proj",
|
| 993 |
+
"model.layers.69.mlp.shared_experts.gate_proj",
|
| 994 |
+
"model.layers.69.mlp.shared_experts.up_proj",
|
| 995 |
+
"model.layers.69.post_attention_layernorm",
|
| 996 |
+
"model.layers.69.self_attn.kv_a_layernorm",
|
| 997 |
+
"model.layers.69.self_attn.kv_a_proj_with_mqa",
|
| 998 |
+
"model.layers.69.self_attn.kv_b_proj",
|
| 999 |
+
"model.layers.69.self_attn.o_proj",
|
| 1000 |
+
"model.layers.69.self_attn.q_a_layernorm",
|
| 1001 |
+
"model.layers.69.self_attn.q_a_proj",
|
| 1002 |
+
"model.layers.69.self_attn.q_b_proj",
|
| 1003 |
+
"model.layers.7.input_layernorm",
|
| 1004 |
+
"model.layers.7.mlp.gate",
|
| 1005 |
+
"model.layers.7.mlp.shared_experts.down_proj",
|
| 1006 |
+
"model.layers.7.mlp.shared_experts.gate_proj",
|
| 1007 |
+
"model.layers.7.mlp.shared_experts.up_proj",
|
| 1008 |
+
"model.layers.7.post_attention_layernorm",
|
| 1009 |
+
"model.layers.7.self_attn.kv_a_layernorm",
|
| 1010 |
+
"model.layers.7.self_attn.kv_a_proj_with_mqa",
|
| 1011 |
+
"model.layers.7.self_attn.kv_b_proj",
|
| 1012 |
+
"model.layers.7.self_attn.o_proj",
|
| 1013 |
+
"model.layers.7.self_attn.q_a_layernorm",
|
| 1014 |
+
"model.layers.7.self_attn.q_a_proj",
|
| 1015 |
+
"model.layers.7.self_attn.q_b_proj",
|
| 1016 |
+
"model.layers.70.input_layernorm",
|
| 1017 |
+
"model.layers.70.mlp.gate",
|
| 1018 |
+
"model.layers.70.mlp.shared_experts.down_proj",
|
| 1019 |
+
"model.layers.70.mlp.shared_experts.gate_proj",
|
| 1020 |
+
"model.layers.70.mlp.shared_experts.up_proj",
|
| 1021 |
+
"model.layers.70.post_attention_layernorm",
|
| 1022 |
+
"model.layers.70.self_attn.kv_a_layernorm",
|
| 1023 |
+
"model.layers.70.self_attn.kv_a_proj_with_mqa",
|
| 1024 |
+
"model.layers.70.self_attn.kv_b_proj",
|
| 1025 |
+
"model.layers.70.self_attn.o_proj",
|
| 1026 |
+
"model.layers.70.self_attn.q_a_layernorm",
|
| 1027 |
+
"model.layers.70.self_attn.q_a_proj",
|
| 1028 |
+
"model.layers.70.self_attn.q_b_proj",
|
| 1029 |
+
"model.layers.71.input_layernorm",
|
| 1030 |
+
"model.layers.71.mlp.gate",
|
| 1031 |
+
"model.layers.71.mlp.shared_experts.down_proj",
|
| 1032 |
+
"model.layers.71.mlp.shared_experts.gate_proj",
|
| 1033 |
+
"model.layers.71.mlp.shared_experts.up_proj",
|
| 1034 |
+
"model.layers.71.post_attention_layernorm",
|
| 1035 |
+
"model.layers.71.self_attn.kv_a_layernorm",
|
| 1036 |
+
"model.layers.71.self_attn.kv_a_proj_with_mqa",
|
| 1037 |
+
"model.layers.71.self_attn.kv_b_proj",
|
| 1038 |
+
"model.layers.71.self_attn.o_proj",
|
| 1039 |
+
"model.layers.71.self_attn.q_a_layernorm",
|
| 1040 |
+
"model.layers.71.self_attn.q_a_proj",
|
| 1041 |
+
"model.layers.71.self_attn.q_b_proj",
|
| 1042 |
+
"model.layers.72.input_layernorm",
|
| 1043 |
+
"model.layers.72.mlp.gate",
|
| 1044 |
+
"model.layers.72.mlp.shared_experts.down_proj",
|
| 1045 |
+
"model.layers.72.mlp.shared_experts.gate_proj",
|
| 1046 |
+
"model.layers.72.mlp.shared_experts.up_proj",
|
| 1047 |
+
"model.layers.72.post_attention_layernorm",
|
| 1048 |
+
"model.layers.72.self_attn.kv_a_layernorm",
|
| 1049 |
+
"model.layers.72.self_attn.kv_a_proj_with_mqa",
|
| 1050 |
+
"model.layers.72.self_attn.kv_b_proj",
|
| 1051 |
+
"model.layers.72.self_attn.o_proj",
|
| 1052 |
+
"model.layers.72.self_attn.q_a_layernorm",
|
| 1053 |
+
"model.layers.72.self_attn.q_a_proj",
|
| 1054 |
+
"model.layers.72.self_attn.q_b_proj",
|
| 1055 |
+
"model.layers.73.input_layernorm",
|
| 1056 |
+
"model.layers.73.mlp.gate",
|
| 1057 |
+
"model.layers.73.mlp.shared_experts.down_proj",
|
| 1058 |
+
"model.layers.73.mlp.shared_experts.gate_proj",
|
| 1059 |
+
"model.layers.73.mlp.shared_experts.up_proj",
|
| 1060 |
+
"model.layers.73.post_attention_layernorm",
|
| 1061 |
+
"model.layers.73.self_attn.kv_a_layernorm",
|
| 1062 |
+
"model.layers.73.self_attn.kv_a_proj_with_mqa",
|
| 1063 |
+
"model.layers.73.self_attn.kv_b_proj",
|
| 1064 |
+
"model.layers.73.self_attn.o_proj",
|
| 1065 |
+
"model.layers.73.self_attn.q_a_layernorm",
|
| 1066 |
+
"model.layers.73.self_attn.q_a_proj",
|
| 1067 |
+
"model.layers.73.self_attn.q_b_proj",
|
| 1068 |
+
"model.layers.74.input_layernorm",
|
| 1069 |
+
"model.layers.74.mlp.gate",
|
| 1070 |
+
"model.layers.74.mlp.shared_experts.down_proj",
|
| 1071 |
+
"model.layers.74.mlp.shared_experts.gate_proj",
|
| 1072 |
+
"model.layers.74.mlp.shared_experts.up_proj",
|
| 1073 |
+
"model.layers.74.post_attention_layernorm",
|
| 1074 |
+
"model.layers.74.self_attn.kv_a_layernorm",
|
| 1075 |
+
"model.layers.74.self_attn.kv_a_proj_with_mqa",
|
| 1076 |
+
"model.layers.74.self_attn.kv_b_proj",
|
| 1077 |
+
"model.layers.74.self_attn.o_proj",
|
| 1078 |
+
"model.layers.74.self_attn.q_a_layernorm",
|
| 1079 |
+
"model.layers.74.self_attn.q_a_proj",
|
| 1080 |
+
"model.layers.74.self_attn.q_b_proj",
|
| 1081 |
+
"model.layers.75.input_layernorm",
|
| 1082 |
+
"model.layers.75.mlp.gate",
|
| 1083 |
+
"model.layers.75.mlp.shared_experts.down_proj",
|
| 1084 |
+
"model.layers.75.mlp.shared_experts.gate_proj",
|
| 1085 |
+
"model.layers.75.mlp.shared_experts.up_proj",
|
| 1086 |
+
"model.layers.75.post_attention_layernorm",
|
| 1087 |
+
"model.layers.75.self_attn.kv_a_layernorm",
|
| 1088 |
+
"model.layers.75.self_attn.kv_a_proj_with_mqa",
|
| 1089 |
+
"model.layers.75.self_attn.kv_b_proj",
|
| 1090 |
+
"model.layers.75.self_attn.o_proj",
|
| 1091 |
+
"model.layers.75.self_attn.q_a_layernorm",
|
| 1092 |
+
"model.layers.75.self_attn.q_a_proj",
|
| 1093 |
+
"model.layers.75.self_attn.q_b_proj",
|
| 1094 |
+
"model.layers.76.input_layernorm",
|
| 1095 |
+
"model.layers.76.mlp.gate",
|
| 1096 |
+
"model.layers.76.mlp.shared_experts.down_proj",
|
| 1097 |
+
"model.layers.76.mlp.shared_experts.gate_proj",
|
| 1098 |
+
"model.layers.76.mlp.shared_experts.up_proj",
|
| 1099 |
+
"model.layers.76.post_attention_layernorm",
|
| 1100 |
+
"model.layers.76.self_attn.kv_a_layernorm",
|
| 1101 |
+
"model.layers.76.self_attn.kv_a_proj_with_mqa",
|
| 1102 |
+
"model.layers.76.self_attn.kv_b_proj",
|
| 1103 |
+
"model.layers.76.self_attn.o_proj",
|
| 1104 |
+
"model.layers.76.self_attn.q_a_layernorm",
|
| 1105 |
+
"model.layers.76.self_attn.q_a_proj",
|
| 1106 |
+
"model.layers.76.self_attn.q_b_proj",
|
| 1107 |
+
"model.layers.77.input_layernorm",
|
| 1108 |
+
"model.layers.77.mlp.gate",
|
| 1109 |
+
"model.layers.77.mlp.shared_experts.down_proj",
|
| 1110 |
+
"model.layers.77.mlp.shared_experts.gate_proj",
|
| 1111 |
+
"model.layers.77.mlp.shared_experts.up_proj",
|
| 1112 |
+
"model.layers.77.post_attention_layernorm",
|
| 1113 |
+
"model.layers.77.self_attn.kv_a_layernorm",
|
| 1114 |
+
"model.layers.77.self_attn.kv_a_proj_with_mqa",
|
| 1115 |
+
"model.layers.77.self_attn.kv_b_proj",
|
| 1116 |
+
"model.layers.77.self_attn.o_proj",
|
| 1117 |
+
"model.layers.77.self_attn.q_a_layernorm",
|
| 1118 |
+
"model.layers.77.self_attn.q_a_proj",
|
| 1119 |
+
"model.layers.77.self_attn.q_b_proj",
|
| 1120 |
+
"model.layers.78.input_layernorm",
|
| 1121 |
+
"model.layers.78.mlp.gate",
|
| 1122 |
+
"model.layers.78.mlp.shared_experts.down_proj",
|
| 1123 |
+
"model.layers.78.mlp.shared_experts.gate_proj",
|
| 1124 |
+
"model.layers.78.mlp.shared_experts.up_proj",
|
| 1125 |
+
"model.layers.78.post_attention_layernorm",
|
| 1126 |
+
"model.layers.78.self_attn.kv_a_layernorm",
|
| 1127 |
+
"model.layers.78.self_attn.kv_a_proj_with_mqa",
|
| 1128 |
+
"model.layers.78.self_attn.kv_b_proj",
|
| 1129 |
+
"model.layers.78.self_attn.o_proj",
|
| 1130 |
+
"model.layers.78.self_attn.q_a_layernorm",
|
| 1131 |
+
"model.layers.78.self_attn.q_a_proj",
|
| 1132 |
+
"model.layers.78.self_attn.q_b_proj",
|
| 1133 |
+
"model.layers.79.input_layernorm",
|
| 1134 |
+
"model.layers.79.mlp.gate",
|
| 1135 |
+
"model.layers.79.mlp.shared_experts.down_proj",
|
| 1136 |
+
"model.layers.79.mlp.shared_experts.gate_proj",
|
| 1137 |
+
"model.layers.79.mlp.shared_experts.up_proj",
|
| 1138 |
+
"model.layers.79.post_attention_layernorm",
|
| 1139 |
+
"model.layers.79.self_attn.kv_a_layernorm",
|
| 1140 |
+
"model.layers.79.self_attn.kv_a_proj_with_mqa",
|
| 1141 |
+
"model.layers.79.self_attn.kv_b_proj",
|
| 1142 |
+
"model.layers.79.self_attn.o_proj",
|
| 1143 |
+
"model.layers.79.self_attn.q_a_layernorm",
|
| 1144 |
+
"model.layers.79.self_attn.q_a_proj",
|
| 1145 |
+
"model.layers.79.self_attn.q_b_proj",
|
| 1146 |
+
"model.layers.8.input_layernorm",
|
| 1147 |
+
"model.layers.8.mlp.gate",
|
| 1148 |
+
"model.layers.8.mlp.shared_experts.down_proj",
|
| 1149 |
+
"model.layers.8.mlp.shared_experts.gate_proj",
|
| 1150 |
+
"model.layers.8.mlp.shared_experts.up_proj",
|
| 1151 |
+
"model.layers.8.post_attention_layernorm",
|
| 1152 |
+
"model.layers.8.self_attn.kv_a_layernorm",
|
| 1153 |
+
"model.layers.8.self_attn.kv_a_proj_with_mqa",
|
| 1154 |
+
"model.layers.8.self_attn.kv_b_proj",
|
| 1155 |
+
"model.layers.8.self_attn.o_proj",
|
| 1156 |
+
"model.layers.8.self_attn.q_a_layernorm",
|
| 1157 |
+
"model.layers.8.self_attn.q_a_proj",
|
| 1158 |
+
"model.layers.8.self_attn.q_b_proj",
|
| 1159 |
+
"model.layers.80.input_layernorm",
|
| 1160 |
+
"model.layers.80.mlp.gate",
|
| 1161 |
+
"model.layers.80.mlp.shared_experts.down_proj",
|
| 1162 |
+
"model.layers.80.mlp.shared_experts.gate_proj",
|
| 1163 |
+
"model.layers.80.mlp.shared_experts.up_proj",
|
| 1164 |
+
"model.layers.80.post_attention_layernorm",
|
| 1165 |
+
"model.layers.80.self_attn.kv_a_layernorm",
|
| 1166 |
+
"model.layers.80.self_attn.kv_a_proj_with_mqa",
|
| 1167 |
+
"model.layers.80.self_attn.kv_b_proj",
|
| 1168 |
+
"model.layers.80.self_attn.o_proj",
|
| 1169 |
+
"model.layers.80.self_attn.q_a_layernorm",
|
| 1170 |
+
"model.layers.80.self_attn.q_a_proj",
|
| 1171 |
+
"model.layers.80.self_attn.q_b_proj",
|
| 1172 |
+
"model.layers.81.input_layernorm",
|
| 1173 |
+
"model.layers.81.mlp.gate",
|
| 1174 |
+
"model.layers.81.mlp.shared_experts.down_proj",
|
| 1175 |
+
"model.layers.81.mlp.shared_experts.gate_proj",
|
| 1176 |
+
"model.layers.81.mlp.shared_experts.up_proj",
|
| 1177 |
+
"model.layers.81.post_attention_layernorm",
|
| 1178 |
+
"model.layers.81.self_attn.kv_a_layernorm",
|
| 1179 |
+
"model.layers.81.self_attn.kv_a_proj_with_mqa",
|
| 1180 |
+
"model.layers.81.self_attn.kv_b_proj",
|
| 1181 |
+
"model.layers.81.self_attn.o_proj",
|
| 1182 |
+
"model.layers.81.self_attn.q_a_layernorm",
|
| 1183 |
+
"model.layers.81.self_attn.q_a_proj",
|
| 1184 |
+
"model.layers.81.self_attn.q_b_proj",
|
| 1185 |
+
"model.layers.82.input_layernorm",
|
| 1186 |
+
"model.layers.82.mlp.gate",
|
| 1187 |
+
"model.layers.82.mlp.shared_experts.down_proj",
|
| 1188 |
+
"model.layers.82.mlp.shared_experts.gate_proj",
|
| 1189 |
+
"model.layers.82.mlp.shared_experts.up_proj",
|
| 1190 |
+
"model.layers.82.post_attention_layernorm",
|
| 1191 |
+
"model.layers.82.self_attn.kv_a_layernorm",
|
| 1192 |
+
"model.layers.82.self_attn.kv_a_proj_with_mqa",
|
| 1193 |
+
"model.layers.82.self_attn.kv_b_proj",
|
| 1194 |
+
"model.layers.82.self_attn.o_proj",
|
| 1195 |
+
"model.layers.82.self_attn.q_a_layernorm",
|
| 1196 |
+
"model.layers.82.self_attn.q_a_proj",
|
| 1197 |
+
"model.layers.82.self_attn.q_b_proj",
|
| 1198 |
+
"model.layers.83.input_layernorm",
|
| 1199 |
+
"model.layers.83.mlp.gate",
|
| 1200 |
+
"model.layers.83.mlp.shared_experts.down_proj",
|
| 1201 |
+
"model.layers.83.mlp.shared_experts.gate_proj",
|
| 1202 |
+
"model.layers.83.mlp.shared_experts.up_proj",
|
| 1203 |
+
"model.layers.83.post_attention_layernorm",
|
| 1204 |
+
"model.layers.83.self_attn.kv_a_layernorm",
|
| 1205 |
+
"model.layers.83.self_attn.kv_a_proj_with_mqa",
|
| 1206 |
+
"model.layers.83.self_attn.kv_b_proj",
|
| 1207 |
+
"model.layers.83.self_attn.o_proj",
|
| 1208 |
+
"model.layers.83.self_attn.q_a_layernorm",
|
| 1209 |
+
"model.layers.83.self_attn.q_a_proj",
|
| 1210 |
+
"model.layers.83.self_attn.q_b_proj",
|
| 1211 |
+
"model.layers.84.input_layernorm",
|
| 1212 |
+
"model.layers.84.mlp.gate",
|
| 1213 |
+
"model.layers.84.mlp.shared_experts.down_proj",
|
| 1214 |
+
"model.layers.84.mlp.shared_experts.gate_proj",
|
| 1215 |
+
"model.layers.84.mlp.shared_experts.up_proj",
|
| 1216 |
+
"model.layers.84.post_attention_layernorm",
|
| 1217 |
+
"model.layers.84.self_attn.kv_a_layernorm",
|
| 1218 |
+
"model.layers.84.self_attn.kv_a_proj_with_mqa",
|
| 1219 |
+
"model.layers.84.self_attn.kv_b_proj",
|
| 1220 |
+
"model.layers.84.self_attn.o_proj",
|
| 1221 |
+
"model.layers.84.self_attn.q_a_layernorm",
|
| 1222 |
+
"model.layers.84.self_attn.q_a_proj",
|
| 1223 |
+
"model.layers.84.self_attn.q_b_proj",
|
| 1224 |
+
"model.layers.85.input_layernorm",
|
| 1225 |
+
"model.layers.85.mlp.gate",
|
| 1226 |
+
"model.layers.85.mlp.shared_experts.down_proj",
|
| 1227 |
+
"model.layers.85.mlp.shared_experts.gate_proj",
|
| 1228 |
+
"model.layers.85.mlp.shared_experts.up_proj",
|
| 1229 |
+
"model.layers.85.post_attention_layernorm",
|
| 1230 |
+
"model.layers.85.self_attn.kv_a_layernorm",
|
| 1231 |
+
"model.layers.85.self_attn.kv_a_proj_with_mqa",
|
| 1232 |
+
"model.layers.85.self_attn.kv_b_proj",
|
| 1233 |
+
"model.layers.85.self_attn.o_proj",
|
| 1234 |
+
"model.layers.85.self_attn.q_a_layernorm",
|
| 1235 |
+
"model.layers.85.self_attn.q_a_proj",
|
| 1236 |
+
"model.layers.85.self_attn.q_b_proj",
|
| 1237 |
+
"model.layers.86.input_layernorm",
|
| 1238 |
+
"model.layers.86.mlp.gate",
|
| 1239 |
+
"model.layers.86.mlp.shared_experts.down_proj",
|
| 1240 |
+
"model.layers.86.mlp.shared_experts.gate_proj",
|
| 1241 |
+
"model.layers.86.mlp.shared_experts.up_proj",
|
| 1242 |
+
"model.layers.86.post_attention_layernorm",
|
| 1243 |
+
"model.layers.86.self_attn.kv_a_layernorm",
|
| 1244 |
+
"model.layers.86.self_attn.kv_a_proj_with_mqa",
|
| 1245 |
+
"model.layers.86.self_attn.kv_b_proj",
|
| 1246 |
+
"model.layers.86.self_attn.o_proj",
|
| 1247 |
+
"model.layers.86.self_attn.q_a_layernorm",
|
| 1248 |
+
"model.layers.86.self_attn.q_a_proj",
|
| 1249 |
+
"model.layers.86.self_attn.q_b_proj",
|
| 1250 |
+
"model.layers.87.input_layernorm",
|
| 1251 |
+
"model.layers.87.mlp.gate",
|
| 1252 |
+
"model.layers.87.mlp.shared_experts.down_proj",
|
| 1253 |
+
"model.layers.87.mlp.shared_experts.gate_proj",
|
| 1254 |
+
"model.layers.87.mlp.shared_experts.up_proj",
|
| 1255 |
+
"model.layers.87.post_attention_layernorm",
|
| 1256 |
+
"model.layers.87.self_attn.kv_a_layernorm",
|
| 1257 |
+
"model.layers.87.self_attn.kv_a_proj_with_mqa",
|
| 1258 |
+
"model.layers.87.self_attn.kv_b_proj",
|
| 1259 |
+
"model.layers.87.self_attn.o_proj",
|
| 1260 |
+
"model.layers.87.self_attn.q_a_layernorm",
|
| 1261 |
+
"model.layers.87.self_attn.q_a_proj",
|
| 1262 |
+
"model.layers.87.self_attn.q_b_proj",
|
| 1263 |
+
"model.layers.88.input_layernorm",
|
| 1264 |
+
"model.layers.88.mlp.gate",
|
| 1265 |
+
"model.layers.88.mlp.shared_experts.down_proj",
|
| 1266 |
+
"model.layers.88.mlp.shared_experts.gate_proj",
|
| 1267 |
+
"model.layers.88.mlp.shared_experts.up_proj",
|
| 1268 |
+
"model.layers.88.post_attention_layernorm",
|
| 1269 |
+
"model.layers.88.self_attn.kv_a_layernorm",
|
| 1270 |
+
"model.layers.88.self_attn.kv_a_proj_with_mqa",
|
| 1271 |
+
"model.layers.88.self_attn.kv_b_proj",
|
| 1272 |
+
"model.layers.88.self_attn.o_proj",
|
| 1273 |
+
"model.layers.88.self_attn.q_a_layernorm",
|
| 1274 |
+
"model.layers.88.self_attn.q_a_proj",
|
| 1275 |
+
"model.layers.88.self_attn.q_b_proj",
|
| 1276 |
+
"model.layers.89.input_layernorm",
|
| 1277 |
+
"model.layers.89.mlp.gate",
|
| 1278 |
+
"model.layers.89.mlp.shared_experts.down_proj",
|
| 1279 |
+
"model.layers.89.mlp.shared_experts.gate_proj",
|
| 1280 |
+
"model.layers.89.mlp.shared_experts.up_proj",
|
| 1281 |
+
"model.layers.89.post_attention_layernorm",
|
| 1282 |
+
"model.layers.89.self_attn.kv_a_layernorm",
|
| 1283 |
+
"model.layers.89.self_attn.kv_a_proj_with_mqa",
|
| 1284 |
+
"model.layers.89.self_attn.kv_b_proj",
|
| 1285 |
+
"model.layers.89.self_attn.o_proj",
|
| 1286 |
+
"model.layers.89.self_attn.q_a_layernorm",
|
| 1287 |
+
"model.layers.89.self_attn.q_a_proj",
|
| 1288 |
+
"model.layers.89.self_attn.q_b_proj",
|
| 1289 |
+
"model.layers.9.input_layernorm",
|
| 1290 |
+
"model.layers.9.mlp.gate",
|
| 1291 |
+
"model.layers.9.mlp.shared_experts.down_proj",
|
| 1292 |
+
"model.layers.9.mlp.shared_experts.gate_proj",
|
| 1293 |
+
"model.layers.9.mlp.shared_experts.up_proj",
|
| 1294 |
+
"model.layers.9.post_attention_layernorm",
|
| 1295 |
+
"model.layers.9.self_attn.kv_a_layernorm",
|
| 1296 |
+
"model.layers.9.self_attn.kv_a_proj_with_mqa",
|
| 1297 |
+
"model.layers.9.self_attn.kv_b_proj",
|
| 1298 |
+
"model.layers.9.self_attn.o_proj",
|
| 1299 |
+
"model.layers.9.self_attn.q_a_layernorm",
|
| 1300 |
+
"model.layers.9.self_attn.q_a_proj",
|
| 1301 |
+
"model.layers.9.self_attn.q_b_proj",
|
| 1302 |
+
"model.layers.90.input_layernorm",
|
| 1303 |
+
"model.layers.90.mlp.gate",
|
| 1304 |
+
"model.layers.90.mlp.shared_experts.down_proj",
|
| 1305 |
+
"model.layers.90.mlp.shared_experts.gate_proj",
|
| 1306 |
+
"model.layers.90.mlp.shared_experts.up_proj",
|
| 1307 |
+
"model.layers.90.post_attention_layernorm",
|
| 1308 |
+
"model.layers.90.self_attn.kv_a_layernorm",
|
| 1309 |
+
"model.layers.90.self_attn.kv_a_proj_with_mqa",
|
| 1310 |
+
"model.layers.90.self_attn.kv_b_proj",
|
| 1311 |
+
"model.layers.90.self_attn.o_proj",
|
| 1312 |
+
"model.layers.90.self_attn.q_a_layernorm",
|
| 1313 |
+
"model.layers.90.self_attn.q_a_proj",
|
| 1314 |
+
"model.layers.90.self_attn.q_b_proj",
|
| 1315 |
+
"model.layers.91.input_layernorm",
|
| 1316 |
+
"model.layers.91.mlp.gate",
|
| 1317 |
+
"model.layers.91.mlp.shared_experts.down_proj",
|
| 1318 |
+
"model.layers.91.mlp.shared_experts.gate_proj",
|
| 1319 |
+
"model.layers.91.mlp.shared_experts.up_proj",
|
| 1320 |
+
"model.layers.91.post_attention_layernorm",
|
| 1321 |
+
"model.layers.91.self_attn.kv_a_layernorm",
|
| 1322 |
+
"model.layers.91.self_attn.kv_a_proj_with_mqa",
|
| 1323 |
+
"model.layers.91.self_attn.kv_b_proj",
|
| 1324 |
+
"model.layers.91.self_attn.o_proj",
|
| 1325 |
+
"model.layers.91.self_attn.q_a_layernorm",
|
| 1326 |
+
"model.layers.91.self_attn.q_a_proj",
|
| 1327 |
+
"model.layers.91.self_attn.q_b_proj",
|
| 1328 |
+
"model.layers.92.input_layernorm",
|
| 1329 |
+
"model.layers.92.mlp.gate",
|
| 1330 |
+
"model.layers.92.mlp.shared_experts.down_proj",
|
| 1331 |
+
"model.layers.92.mlp.shared_experts.gate_proj",
|
| 1332 |
+
"model.layers.92.mlp.shared_experts.up_proj",
|
| 1333 |
+
"model.layers.92.post_attention_layernorm",
|
| 1334 |
+
"model.layers.92.self_attn.kv_a_layernorm",
|
| 1335 |
+
"model.layers.92.self_attn.kv_a_proj_with_mqa",
|
| 1336 |
+
"model.layers.92.self_attn.kv_b_proj",
|
| 1337 |
+
"model.layers.92.self_attn.o_proj",
|
| 1338 |
+
"model.layers.92.self_attn.q_a_layernorm",
|
| 1339 |
+
"model.layers.92.self_attn.q_a_proj",
|
| 1340 |
+
"model.layers.92.self_attn.q_b_proj",
|
| 1341 |
+
"model.layers.93.input_layernorm",
|
| 1342 |
+
"model.layers.93.mlp.gate",
|
| 1343 |
+
"model.layers.93.mlp.shared_experts.down_proj",
|
| 1344 |
+
"model.layers.93.mlp.shared_experts.gate_proj",
|
| 1345 |
+
"model.layers.93.mlp.shared_experts.up_proj",
|
| 1346 |
+
"model.layers.93.post_attention_layernorm",
|
| 1347 |
+
"model.layers.93.self_attn.kv_a_layernorm",
|
| 1348 |
+
"model.layers.93.self_attn.kv_a_proj_with_mqa",
|
| 1349 |
+
"model.layers.93.self_attn.kv_b_proj",
|
| 1350 |
+
"model.layers.93.self_attn.o_proj",
|
| 1351 |
+
"model.layers.93.self_attn.q_a_layernorm",
|
| 1352 |
+
"model.layers.93.self_attn.q_a_proj",
|
| 1353 |
+
"model.layers.93.self_attn.q_b_proj",
|
| 1354 |
+
"model.layers.94.input_layernorm",
|
| 1355 |
+
"model.layers.94.mlp.gate",
|
| 1356 |
+
"model.layers.94.mlp.shared_experts.down_proj",
|
| 1357 |
+
"model.layers.94.mlp.shared_experts.gate_proj",
|
| 1358 |
+
"model.layers.94.mlp.shared_experts.up_proj",
|
| 1359 |
+
"model.layers.94.post_attention_layernorm",
|
| 1360 |
+
"model.layers.94.self_attn.kv_a_layernorm",
|
| 1361 |
+
"model.layers.94.self_attn.kv_a_proj_with_mqa",
|
| 1362 |
+
"model.layers.94.self_attn.kv_b_proj",
|
| 1363 |
+
"model.layers.94.self_attn.o_proj",
|
| 1364 |
+
"model.layers.94.self_attn.q_a_layernorm",
|
| 1365 |
+
"model.layers.94.self_attn.q_a_proj",
|
| 1366 |
+
"model.layers.94.self_attn.q_b_proj",
|
| 1367 |
+
"model.layers.95.input_layernorm",
|
| 1368 |
+
"model.layers.95.mlp.gate",
|
| 1369 |
+
"model.layers.95.mlp.shared_experts.down_proj",
|
| 1370 |
+
"model.layers.95.mlp.shared_experts.gate_proj",
|
| 1371 |
+
"model.layers.95.mlp.shared_experts.up_proj",
|
| 1372 |
+
"model.layers.95.post_attention_layernorm",
|
| 1373 |
+
"model.layers.95.self_attn.kv_a_layernorm",
|
| 1374 |
+
"model.layers.95.self_attn.kv_a_proj_with_mqa",
|
| 1375 |
+
"model.layers.95.self_attn.kv_b_proj",
|
| 1376 |
+
"model.layers.95.self_attn.o_proj",
|
| 1377 |
+
"model.layers.95.self_attn.q_a_layernorm",
|
| 1378 |
+
"model.layers.95.self_attn.q_a_proj",
|
| 1379 |
+
"model.layers.95.self_attn.q_b_proj",
|
| 1380 |
+
"model.layers.96.input_layernorm",
|
| 1381 |
+
"model.layers.96.mlp.gate",
|
| 1382 |
+
"model.layers.96.mlp.shared_experts.down_proj",
|
| 1383 |
+
"model.layers.96.mlp.shared_experts.gate_proj",
|
| 1384 |
+
"model.layers.96.mlp.shared_experts.up_proj",
|
| 1385 |
+
"model.layers.96.post_attention_layernorm",
|
| 1386 |
+
"model.layers.96.self_attn.kv_a_layernorm",
|
| 1387 |
+
"model.layers.96.self_attn.kv_a_proj_with_mqa",
|
| 1388 |
+
"model.layers.96.self_attn.kv_b_proj",
|
| 1389 |
+
"model.layers.96.self_attn.o_proj",
|
| 1390 |
+
"model.layers.96.self_attn.q_a_layernorm",
|
| 1391 |
+
"model.layers.96.self_attn.q_a_proj",
|
| 1392 |
+
"model.layers.96.self_attn.q_b_proj",
|
| 1393 |
+
"model.layers.97.input_layernorm",
|
| 1394 |
+
"model.layers.97.mlp.gate",
|
| 1395 |
+
"model.layers.97.mlp.shared_experts.down_proj",
|
| 1396 |
+
"model.layers.97.mlp.shared_experts.gate_proj",
|
| 1397 |
+
"model.layers.97.mlp.shared_experts.up_proj",
|
| 1398 |
+
"model.layers.97.post_attention_layernorm",
|
| 1399 |
+
"model.layers.97.self_attn.kv_a_layernorm",
|
| 1400 |
+
"model.layers.97.self_attn.kv_a_proj_with_mqa",
|
| 1401 |
+
"model.layers.97.self_attn.kv_b_proj",
|
| 1402 |
+
"model.layers.97.self_attn.o_proj",
|
| 1403 |
+
"model.layers.97.self_attn.q_a_layernorm",
|
| 1404 |
+
"model.layers.97.self_attn.q_a_proj",
|
| 1405 |
+
"model.layers.97.self_attn.q_b_proj",
|
| 1406 |
+
"model.layers.98.input_layernorm",
|
| 1407 |
+
"model.layers.98.mlp.gate",
|
| 1408 |
+
"model.layers.98.mlp.shared_experts.down_proj",
|
| 1409 |
+
"model.layers.98.mlp.shared_experts.gate_proj",
|
| 1410 |
+
"model.layers.98.mlp.shared_experts.up_proj",
|
| 1411 |
+
"model.layers.98.post_attention_layernorm",
|
| 1412 |
+
"model.layers.98.self_attn.kv_a_layernorm",
|
| 1413 |
+
"model.layers.98.self_attn.kv_a_proj_with_mqa",
|
| 1414 |
+
"model.layers.98.self_attn.kv_b_proj",
|
| 1415 |
+
"model.layers.98.self_attn.o_proj",
|
| 1416 |
+
"model.layers.98.self_attn.q_a_layernorm",
|
| 1417 |
+
"model.layers.98.self_attn.q_a_proj",
|
| 1418 |
+
"model.layers.98.self_attn.q_b_proj",
|
| 1419 |
+
"model.layers.99.input_layernorm",
|
| 1420 |
+
"model.layers.99.mlp.gate",
|
| 1421 |
+
"model.layers.99.mlp.shared_experts.down_proj",
|
| 1422 |
+
"model.layers.99.mlp.shared_experts.gate_proj",
|
| 1423 |
+
"model.layers.99.mlp.shared_experts.up_proj",
|
| 1424 |
+
"model.layers.99.post_attention_layernorm",
|
| 1425 |
+
"model.layers.99.self_attn.kv_a_layernorm",
|
| 1426 |
+
"model.layers.99.self_attn.kv_a_proj_with_mqa",
|
| 1427 |
+
"model.layers.99.self_attn.kv_b_proj",
|
| 1428 |
+
"model.layers.99.self_attn.o_proj",
|
| 1429 |
+
"model.layers.99.self_attn.q_a_layernorm",
|
| 1430 |
+
"model.layers.99.self_attn.q_a_proj",
|
| 1431 |
+
"model.layers.99.self_attn.q_b_proj",
|
| 1432 |
+
"model.norm"
|
| 1433 |
+
],
|
| 1434 |
+
"quant_method": "fp8",
|
| 1435 |
+
"weight_block_size": [
|
| 1436 |
+
128,
|
| 1437 |
+
128
|
| 1438 |
+
]
|
| 1439 |
+
},
|
| 1440 |
+
"remove_invalid_values": false,
|
| 1441 |
+
"repetition_penalty": 1.0,
|
| 1442 |
+
"return_dict": true,
|
| 1443 |
+
"return_dict_in_generate": false,
|
| 1444 |
+
"rms_norm_eps": 1e-06,
|
| 1445 |
+
"rope_interleave": true,
|
| 1446 |
+
"rope_scaling": {
|
| 1447 |
+
"beta_fast": 1.0,
|
| 1448 |
+
"beta_slow": 1.0,
|
| 1449 |
+
"factor": 32.0,
|
| 1450 |
+
"mscale": 1.0,
|
| 1451 |
+
"mscale_all_dim": 1.0,
|
| 1452 |
+
"original_max_position_embeddings": 4096,
|
| 1453 |
+
"rope_type": "yarn",
|
| 1454 |
+
"type": "yarn"
|
| 1455 |
+
},
|
| 1456 |
+
"rope_theta": 50000.0,
|
| 1457 |
+
"routed_scaling_factor": 2.827,
|
| 1458 |
+
"scoring_func": "sigmoid",
|
| 1459 |
+
"sep_token_id": null,
|
| 1460 |
+
"seq_aux": true,
|
| 1461 |
+
"suppress_tokens": null,
|
| 1462 |
+
"task_specific_params": null,
|
| 1463 |
+
"temperature": 1.0,
|
| 1464 |
+
"tf_legacy_loss": false,
|
| 1465 |
+
"tie_encoder_decoder": false,
|
| 1466 |
+
"tie_word_embeddings": false,
|
| 1467 |
+
"tokenizer_class": null,
|
| 1468 |
+
"top_k": 50,
|
| 1469 |
+
"top_p": 1.0,
|
| 1470 |
+
"topk_group": 1,
|
| 1471 |
+
"topk_method": "noaux_tc",
|
| 1472 |
+
"torch_dtype": "bfloat16",
|
| 1473 |
+
"torchscript": false,
|
| 1474 |
+
"transformers_version": "4.55.4",
|
| 1475 |
+
"typical_p": 1.0,
|
| 1476 |
+
"use_bfloat16": false,
|
| 1477 |
+
"use_cache": true,
|
| 1478 |
+
"v_head_dim": 128,
|
| 1479 |
+
"vocab_size": 163840
|
| 1480 |
+
}
|
configuration_deepseek.py
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copy from https://huggingface.co/deepseek-ai/DeepSeek-V3/blob/main/configuration_deepseek.py
|
| 2 |
+
|
| 3 |
+
from transformers.configuration_utils import PretrainedConfig
|
| 4 |
+
from transformers.utils import logging
|
| 5 |
+
|
| 6 |
+
logger = logging.get_logger(__name__)
|
| 7 |
+
|
| 8 |
+
DEEPSEEK_PRETRAINED_CONFIG_ARCHIVE_MAP = {}
|
| 9 |
+
class DeepseekV3Config(PretrainedConfig):
|
| 10 |
+
r"""
|
| 11 |
+
This is the configuration class to store the configuration of a [`DeepseekV3Model`]. It is used to instantiate an DeepSeek
|
| 12 |
+
model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
|
| 13 |
+
defaults will yield a similar configuration to that of the DeepSeek-V3.
|
| 14 |
+
|
| 15 |
+
Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
|
| 16 |
+
documentation from [`PretrainedConfig`] for more information.
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
Args:
|
| 20 |
+
vocab_size (`int`, *optional*, defaults to 129280):
|
| 21 |
+
Vocabulary size of the Deep model. Defines the number of different tokens that can be represented by the
|
| 22 |
+
`inputs_ids` passed when calling [`DeepseekV3Model`]
|
| 23 |
+
hidden_size (`int`, *optional*, defaults to 4096):
|
| 24 |
+
Dimension of the hidden representations.
|
| 25 |
+
intermediate_size (`int`, *optional*, defaults to 11008):
|
| 26 |
+
Dimension of the MLP representations.
|
| 27 |
+
moe_intermediate_size (`int`, *optional*, defaults to 1407):
|
| 28 |
+
Dimension of the MoE representations.
|
| 29 |
+
num_hidden_layers (`int`, *optional*, defaults to 32):
|
| 30 |
+
Number of hidden layers in the Transformer decoder.
|
| 31 |
+
num_nextn_predict_layers (`int`, *optional*, defaults to 1):
|
| 32 |
+
Number of nextn predict layers in the DeepSeekV3 Model.
|
| 33 |
+
num_attention_heads (`int`, *optional*, defaults to 32):
|
| 34 |
+
Number of attention heads for each attention layer in the Transformer decoder.
|
| 35 |
+
n_shared_experts (`int`, *optional*, defaults to None):
|
| 36 |
+
Number of shared experts, None means dense model.
|
| 37 |
+
n_routed_experts (`int`, *optional*, defaults to None):
|
| 38 |
+
Number of routed experts, None means dense model.
|
| 39 |
+
routed_scaling_factor (`float`, *optional*, defaults to 1.0):
|
| 40 |
+
Scaling factor or routed experts.
|
| 41 |
+
topk_method (`str`, *optional*, defaults to `gready`):
|
| 42 |
+
Topk method used in routed gate.
|
| 43 |
+
n_group (`int`, *optional*, defaults to None):
|
| 44 |
+
Number of groups for routed experts.
|
| 45 |
+
topk_group (`int`, *optional*, defaults to None):
|
| 46 |
+
Number of selected groups for each token(for each token, ensuring the selected experts is only within `topk_group` groups).
|
| 47 |
+
num_experts_per_tok (`int`, *optional*, defaults to None):
|
| 48 |
+
Number of selected experts, None means dense model.
|
| 49 |
+
moe_layer_freq (`int`, *optional*, defaults to 1):
|
| 50 |
+
The frequency of the MoE layer: one expert layer for every `moe_layer_freq - 1` dense layers.
|
| 51 |
+
first_k_dense_replace (`int`, *optional*, defaults to 0):
|
| 52 |
+
Number of dense layers in shallow layers(embed->dense->dense->...->dense->moe->moe...->lm_head).
|
| 53 |
+
\--k dense layers--/
|
| 54 |
+
norm_topk_prob (`bool`, *optional*, defaults to False):
|
| 55 |
+
Whether to normalize the weights of the routed experts.
|
| 56 |
+
scoring_func (`str`, *optional*, defaults to 'softmax'):
|
| 57 |
+
Method of computing expert weights.
|
| 58 |
+
aux_loss_alpha (`float`, *optional*, defaults to 0.001):
|
| 59 |
+
Auxiliary loss weight coefficient.
|
| 60 |
+
seq_aux = (`bool`, *optional*, defaults to True):
|
| 61 |
+
Whether to compute the auxiliary loss for each individual sample.
|
| 62 |
+
num_key_value_heads (`int`, *optional*):
|
| 63 |
+
This is the number of key_value heads that should be used to implement Grouped Query Attention. If
|
| 64 |
+
`num_key_value_heads=num_attention_heads`, the model will use Multi Head Attention (MHA), if
|
| 65 |
+
`num_key_value_heads=1 the model will use Multi Query Attention (MQA) otherwise GQA is used. When
|
| 66 |
+
converting a multi-head checkpoint to a GQA checkpoint, each group key and value head should be constructed
|
| 67 |
+
by meanpooling all the original heads within that group. For more details checkout [this
|
| 68 |
+
paper](https://arxiv.org/pdf/2305.13245.pdf). If it is not specified, will default to
|
| 69 |
+
`num_attention_heads`.
|
| 70 |
+
hidden_act (`str` or `function`, *optional*, defaults to `"silu"`):
|
| 71 |
+
The non-linear activation function (function or string) in the decoder.
|
| 72 |
+
max_position_embeddings (`int`, *optional*, defaults to 2048):
|
| 73 |
+
The maximum sequence length that this model might ever be used with.
|
| 74 |
+
initializer_range (`float`, *optional*, defaults to 0.02):
|
| 75 |
+
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
|
| 76 |
+
rms_norm_eps (`float`, *optional*, defaults to 1e-06):
|
| 77 |
+
The epsilon used by the rms normalization layers.
|
| 78 |
+
use_cache (`bool`, *optional*, defaults to `True`):
|
| 79 |
+
Whether or not the model should return the last key/values attentions (not used by all models). Only
|
| 80 |
+
relevant if `config.is_decoder=True`.
|
| 81 |
+
pad_token_id (`int`, *optional*):
|
| 82 |
+
Padding token id.
|
| 83 |
+
bos_token_id (`int`, *optional*, defaults to 1):
|
| 84 |
+
Beginning of stream token id.
|
| 85 |
+
eos_token_id (`int`, *optional*, defaults to 2):
|
| 86 |
+
End of stream token id.
|
| 87 |
+
pretraining_tp (`int`, *optional*, defaults to 1):
|
| 88 |
+
Experimental feature. Tensor parallelism rank used during pretraining. Please refer to [this
|
| 89 |
+
document](https://huggingface.co/docs/transformers/parallelism) to understand more about it. This value is
|
| 90 |
+
necessary to ensure exact reproducibility of the pretraining results. Please refer to [this
|
| 91 |
+
issue](https://github.com/pytorch/pytorch/issues/76232).
|
| 92 |
+
tie_word_embeddings (`bool`, *optional*, defaults to `False`):
|
| 93 |
+
Whether to tie weight embeddings
|
| 94 |
+
rope_theta (`float`, *optional*, defaults to 10000.0):
|
| 95 |
+
The base period of the RoPE embeddings.
|
| 96 |
+
rope_scaling (`Dict`, *optional*):
|
| 97 |
+
Dictionary containing the scaling configuration for the RoPE embeddings. Currently supports two scaling
|
| 98 |
+
strategies: linear and dynamic. Their scaling factor must be a float greater than 1. The expected format is
|
| 99 |
+
`{"type": strategy name, "factor": scaling factor}`. When using this flag, don't update
|
| 100 |
+
`max_position_embeddings` to the expected new maximum.
|
| 101 |
+
attention_bias (`bool`, defaults to `False`, *optional*, defaults to `False`):
|
| 102 |
+
Whether to use a bias in the query, key, value and output projection layers during self-attention.
|
| 103 |
+
attention_dropout (`float`, *optional*, defaults to 0.0):
|
| 104 |
+
The dropout ratio for the attention probabilities.
|
| 105 |
+
|
| 106 |
+
```python
|
| 107 |
+
>>> from transformers import DeepseekV3Model, DeepseekV3Config
|
| 108 |
+
|
| 109 |
+
>>> # Initializing a Deepseek-V3 style configuration
|
| 110 |
+
>>> configuration = DeepseekV3Config()
|
| 111 |
+
|
| 112 |
+
>>> # Accessing the model configuration
|
| 113 |
+
>>> configuration = model.config
|
| 114 |
+
```"""
|
| 115 |
+
|
| 116 |
+
model_type = "deepseek_v3"
|
| 117 |
+
keys_to_ignore_at_inference = ["past_key_values"]
|
| 118 |
+
|
| 119 |
+
def __init__(
|
| 120 |
+
self,
|
| 121 |
+
vocab_size=129280,
|
| 122 |
+
hidden_size=7168,
|
| 123 |
+
intermediate_size=18432,
|
| 124 |
+
moe_intermediate_size = 2048,
|
| 125 |
+
num_hidden_layers=61,
|
| 126 |
+
num_nextn_predict_layers=1,
|
| 127 |
+
num_attention_heads=128,
|
| 128 |
+
num_key_value_heads=128,
|
| 129 |
+
n_shared_experts = 1,
|
| 130 |
+
n_routed_experts = 256,
|
| 131 |
+
ep_size = 1,
|
| 132 |
+
routed_scaling_factor = 2.5,
|
| 133 |
+
kv_lora_rank = 512,
|
| 134 |
+
q_lora_rank = 1536,
|
| 135 |
+
qk_rope_head_dim = 64,
|
| 136 |
+
v_head_dim = 128,
|
| 137 |
+
qk_nope_head_dim = 128,
|
| 138 |
+
topk_method = 'noaux_tc',
|
| 139 |
+
n_group = 8,
|
| 140 |
+
topk_group = 4,
|
| 141 |
+
num_experts_per_tok = 8,
|
| 142 |
+
moe_layer_freq = 1,
|
| 143 |
+
first_k_dense_replace = 3,
|
| 144 |
+
norm_topk_prob = True,
|
| 145 |
+
scoring_func = 'sigmoid',
|
| 146 |
+
aux_loss_alpha = 0.001,
|
| 147 |
+
seq_aux = True,
|
| 148 |
+
hidden_act="silu",
|
| 149 |
+
max_position_embeddings=4096,
|
| 150 |
+
initializer_range=0.02,
|
| 151 |
+
rms_norm_eps=1e-6,
|
| 152 |
+
use_cache=True,
|
| 153 |
+
pad_token_id=None,
|
| 154 |
+
bos_token_id=0,
|
| 155 |
+
eos_token_id=1,
|
| 156 |
+
pretraining_tp=1,
|
| 157 |
+
tie_word_embeddings=False,
|
| 158 |
+
rope_theta=10000.0,
|
| 159 |
+
rope_scaling=None,
|
| 160 |
+
attention_bias=False,
|
| 161 |
+
attention_dropout=0.0,
|
| 162 |
+
**kwargs,
|
| 163 |
+
):
|
| 164 |
+
self.vocab_size = vocab_size
|
| 165 |
+
self.max_position_embeddings = max_position_embeddings
|
| 166 |
+
self.hidden_size = hidden_size
|
| 167 |
+
self.intermediate_size = intermediate_size
|
| 168 |
+
self.moe_intermediate_size = moe_intermediate_size
|
| 169 |
+
self.num_hidden_layers = num_hidden_layers
|
| 170 |
+
self.num_nextn_predict_layers = num_nextn_predict_layers
|
| 171 |
+
self.num_attention_heads = num_attention_heads
|
| 172 |
+
self.n_shared_experts = n_shared_experts
|
| 173 |
+
self.n_routed_experts = n_routed_experts
|
| 174 |
+
self.ep_size = ep_size
|
| 175 |
+
self.routed_scaling_factor = routed_scaling_factor
|
| 176 |
+
self.kv_lora_rank = kv_lora_rank
|
| 177 |
+
self.q_lora_rank = q_lora_rank
|
| 178 |
+
self.qk_rope_head_dim = qk_rope_head_dim
|
| 179 |
+
self.v_head_dim = v_head_dim
|
| 180 |
+
self.qk_nope_head_dim = qk_nope_head_dim
|
| 181 |
+
self.topk_method = topk_method
|
| 182 |
+
self.n_group = n_group
|
| 183 |
+
self.topk_group = topk_group
|
| 184 |
+
self.num_experts_per_tok = num_experts_per_tok
|
| 185 |
+
self.moe_layer_freq = moe_layer_freq
|
| 186 |
+
self.first_k_dense_replace = first_k_dense_replace
|
| 187 |
+
self.norm_topk_prob = norm_topk_prob
|
| 188 |
+
self.scoring_func = scoring_func
|
| 189 |
+
self.aux_loss_alpha = aux_loss_alpha
|
| 190 |
+
self.seq_aux = seq_aux
|
| 191 |
+
# for backward compatibility
|
| 192 |
+
if num_key_value_heads is None:
|
| 193 |
+
num_key_value_heads = num_attention_heads
|
| 194 |
+
|
| 195 |
+
self.num_key_value_heads = num_key_value_heads
|
| 196 |
+
self.hidden_act = hidden_act
|
| 197 |
+
self.initializer_range = initializer_range
|
| 198 |
+
self.rms_norm_eps = rms_norm_eps
|
| 199 |
+
self.pretraining_tp = pretraining_tp
|
| 200 |
+
self.use_cache = use_cache
|
| 201 |
+
self.rope_theta = rope_theta
|
| 202 |
+
self.rope_scaling = rope_scaling
|
| 203 |
+
self.attention_bias = attention_bias
|
| 204 |
+
self.attention_dropout = attention_dropout
|
| 205 |
+
|
| 206 |
+
super().__init__(
|
| 207 |
+
pad_token_id=pad_token_id,
|
| 208 |
+
bos_token_id=bos_token_id,
|
| 209 |
+
eos_token_id=eos_token_id,
|
| 210 |
+
tie_word_embeddings=tie_word_embeddings,
|
| 211 |
+
**kwargs,
|
| 212 |
+
)
|
generation_config.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"max_length": 131072,
|
| 3 |
+
"eos_token_id": 163586
|
| 4 |
+
}
|
k3_headstack_recipe.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"base_model": "/home/ggb/mergehell/outputs/k3_fp8_experts",
|
| 3 |
+
"common_dir": "/home/ggb/mergehell/outputs/k3_headstack_rowwise_common",
|
| 4 |
+
"common_file": "model-00102-common-non-o.safetensors",
|
| 5 |
+
"config_updates": {
|
| 6 |
+
"n_shared_experts": 2,
|
| 7 |
+
"num_attention_heads": 128,
|
| 8 |
+
"num_key_value_heads": 128
|
| 9 |
+
},
|
| 10 |
+
"created_utc": "2026-06-13T20:17:22Z",
|
| 11 |
+
"expert_shards": {
|
| 12 |
+
"count": 102,
|
| 13 |
+
"mode": "relative_symlink",
|
| 14 |
+
"source": "/home/ggb/mergehell/outputs/k3_fp8_experts"
|
| 15 |
+
},
|
| 16 |
+
"logical_total_size": 3513903759664,
|
| 17 |
+
"logical_total_size_gib": 3272.577896401286,
|
| 18 |
+
"o_proj_file": "model-00103-o-proj-scale050.safetensors",
|
| 19 |
+
"o_proj_scale": 0.5,
|
| 20 |
+
"o_proj_total_size": 24192745472,
|
| 21 |
+
"o_proj_total_size_gib": 22.53125,
|
| 22 |
+
"output_dir": "/home/ggb/mergehell/outputs/k3_headstack_rowwise_o_050",
|
| 23 |
+
"rowwise_a_proj_keys": [
|
| 24 |
+
"model.layers.N.self_attn.q_a_proj.weight",
|
| 25 |
+
"model.layers.N.self_attn.kv_a_proj_with_mqa.weight"
|
| 26 |
+
],
|
| 27 |
+
"rowwise_a_proj_merge": true,
|
| 28 |
+
"shared_output_scale": 0.5,
|
| 29 |
+
"slerp_dot_threshold": 0.9995,
|
| 30 |
+
"slerp_eps": 1e-08,
|
| 31 |
+
"slerp_t": 0.5,
|
| 32 |
+
"tensor_count": 471562
|
| 33 |
+
}
|
k3_headstack_verify.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"apparent_entry_bytes": 24244741638,
|
| 3 |
+
"expert_symlink_count": 102,
|
| 4 |
+
"files_in_index": 104,
|
| 5 |
+
"shape_checks": {
|
| 6 |
+
"model.layers.1.mlp.shared_experts.down_proj.weight": [
|
| 7 |
+
7168,
|
| 8 |
+
4096
|
| 9 |
+
],
|
| 10 |
+
"model.layers.1.mlp.shared_experts.gate_proj.weight": [
|
| 11 |
+
4096,
|
| 12 |
+
7168
|
| 13 |
+
],
|
| 14 |
+
"model.layers.1.mlp.shared_experts.up_proj.weight": [
|
| 15 |
+
4096,
|
| 16 |
+
7168
|
| 17 |
+
],
|
| 18 |
+
"model.layers.1.self_attn.kv_a_proj_with_mqa.weight": [
|
| 19 |
+
576,
|
| 20 |
+
7168
|
| 21 |
+
],
|
| 22 |
+
"model.layers.1.self_attn.kv_b_proj.weight": [
|
| 23 |
+
32768,
|
| 24 |
+
512
|
| 25 |
+
],
|
| 26 |
+
"model.layers.1.self_attn.o_proj.weight": [
|
| 27 |
+
7168,
|
| 28 |
+
16384
|
| 29 |
+
],
|
| 30 |
+
"model.layers.1.self_attn.q_a_proj.weight": [
|
| 31 |
+
1536,
|
| 32 |
+
7168
|
| 33 |
+
],
|
| 34 |
+
"model.layers.1.self_attn.q_b_proj.weight": [
|
| 35 |
+
24576,
|
| 36 |
+
1536
|
| 37 |
+
]
|
| 38 |
+
},
|
| 39 |
+
"tensor_count": 471562,
|
| 40 |
+
"total_symlink_count": 103
|
| 41 |
+
}
|
model-00003-layer004-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ab6cb887de18bc3f7a10552d1a68d3a2ba89db21a9fe50fabf058045952b6711
|
| 3 |
+
size 33831718248
|
model-00005-layer006-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9c1cb5ca25879f8e38df48c52d385de205f3ed1e86b76d46dbe34e143c7bc7d6
|
| 3 |
+
size 33831718248
|
model-00007-layer008-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1599376ce4da71da9b42e9dac700c1c114fcab6e4871b560c2384e8d95017416
|
| 3 |
+
size 33831718248
|
model-00008-layer009-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:968c7e554be42645c814e659d6e0b2d0c78236ed836317fc1b4fbeae4bf5dce6
|
| 3 |
+
size 33831718248
|
model-00010-layer011-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cea2ab3a68cc124c12fa6de8ba516b86f57cb96098ae825883fa8498c24cf3af
|
| 3 |
+
size 33831722856
|
model-00011-layer012-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0411880abbb4b7868a1205f42f51031d1b62a719d7322749912e8682d0a7822b
|
| 3 |
+
size 33831722856
|
model-00012-layer013-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dcca0cfd29ff21dd02c1fb8c7d6cce630750b760df7f019e621476fec159403f
|
| 3 |
+
size 33831722856
|
model-00014-layer015-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b27fff951a1ebc08b5685f08ea97648fcde89e5d5184013311920cd63f60eb27
|
| 3 |
+
size 33831722856
|
model-00016-layer017-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ed7904cac9949215ad836d31bd5bc3f52d4fc1acd9964be6202f4ed27b1b1dfd
|
| 3 |
+
size 33831722856
|
model-00017-layer018-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0f028f09c7f599624d1ce7a88aa646beda66e8cf665439738862cfeea85ffc42
|
| 3 |
+
size 33831722856
|
model-00018-layer019-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b5af5206a475f21693f2a314fedb805f4e779b32cdc62c5747bae728b8299aa8
|
| 3 |
+
size 33831722856
|
model-00020-layer021-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:aed8c32a2c9e30cf1b945530d371b15d7e1ef6039c10961653fa3af9289f0fde
|
| 3 |
+
size 33831722856
|
model-00024-layer025-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:643432f754d37488eadc2cdc646bdc80c41143406e68676f16a1eca5654c0e2a
|
| 3 |
+
size 33831722856
|
model-00029-layer030-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e9c25fd7677d5b8606f0e88d87cbab82b3e89143e29e0656c4164597807eb859
|
| 3 |
+
size 33831722856
|
model-00030-layer031-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7efda5a37fa3baf35879c9b3660b7651d8010be3ab989b883f242f0e053b769d
|
| 3 |
+
size 33831722856
|
model-00031-layer032-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f960e7c19e1a6843c43ae19e92d5de627a495bb432959e810519528395c8e3ba
|
| 3 |
+
size 33831722856
|
model-00033-layer034-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fd6f9dc29a0a618b24c9cb66d857cc559f84df374f5ec90021fac7c28cc099f9
|
| 3 |
+
size 33831722856
|
model-00034-layer035-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0a5e5bf55f3d2623d0f6080f25bf87902741514e75464605df9a452920d1ab30
|
| 3 |
+
size 33831722856
|
model-00038-layer039-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:41f30c39d802182107b504d3a53c9110f8a7e6d2ba4e90618d8605c81166ec5e
|
| 3 |
+
size 33831722856
|
model-00039-layer040-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fb5fc29ea1f60e74bb418bb71b137853e72b3221658881c925bef7914b729ef1
|
| 3 |
+
size 33831722856
|
model-00042-layer043-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8d2956c625801fb552381009db2b996ea57da5630bb7c1dee67562e34f8f9910
|
| 3 |
+
size 33831722856
|
model-00044-layer045-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7083acb097db0c79fe0eb7618eac389fc57902ae8352ab71379b050417cd8c2e
|
| 3 |
+
size 33831722856
|
model-00047-layer048-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:165edec1f5efcf3d2e58fc864a6cdfee66236f324f9ac94c53be13e0f828f7af
|
| 3 |
+
size 33831722856
|
model-00052-layer053-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5f6ed83ffda28e608edd0cfb91f595b10236a8972736023c0ccfec8efdfa7ace
|
| 3 |
+
size 33831722856
|
model-00053-layer054-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7882919d8abde1282e5cb2db7940157c538600306b08be25894e1ac27adc09b8
|
| 3 |
+
size 33831722856
|
model-00055-layer056-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8649684b3f8472aa13c1f5105e979475a5f73eeb424f49f401a80f3b301f2152
|
| 3 |
+
size 33831722856
|
model-00059-layer060-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dacbdbac98d354269d94973944e4fc2cfcb8229327d146cb767d7f75da475bf9
|
| 3 |
+
size 33831722856
|
model-00061-layer062-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4f886477a0fc03624cad9958b635dd1dbd9582b3acdfc364909a4baa6e87c24d
|
| 3 |
+
size 33831722856
|
model-00064-layer065-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7df77c77f008c3397e2a98cbcfe764201834a5fbac4d99ba50acb5963aa7714a
|
| 3 |
+
size 33831722856
|
model-00066-layer067-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:44f463f101b6562d9ef0966b7a155020fdaea490d2f06b3723b0e63e8dea269c
|
| 3 |
+
size 33831722856
|
model-00067-layer068-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a286c13e986e4263d66d265b47b2408b6d1811cbf14c83e313caf79a35e545dd
|
| 3 |
+
size 33831722856
|
model-00073-layer074-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6e6f1694c6eed798bf4de6bdeba73bf548cd70ceff235a26e028024bb6f76ee9
|
| 3 |
+
size 33831722856
|
model-00080-layer081-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:aec66655195d3d48b31d05f5db762781205101f381dff1886ad434a0a4451312
|
| 3 |
+
size 33831722856
|
model-00086-layer087-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2d76ed31e2e0a3d7c69beecfa584b4ce05e776740676ac43d163e42507dd75e8
|
| 3 |
+
size 33831722856
|
model-00090-layer091-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8f734838a9d8dcda7b3b78db14f054849942832927c4e025ec984e1f130c1c8b
|
| 3 |
+
size 33831722856
|
model-00094-layer095-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c66ee0305d2705f2043f8a3323ced88979252329ac32318250e0f6020a7a9021
|
| 3 |
+
size 33831722856
|
model-00096-layer097-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e809dedce5e03b47fb8b97781ac0285072b92af2fab3a6618f6f43f55115389b
|
| 3 |
+
size 33831722856
|
model-00098-layer099-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b4dbcd120d38087c33c8429aecd25af423541b3a479bbbce8c99c0486067e9a4
|
| 3 |
+
size 33831722856
|
model-00099-layer100-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f8578be7bfbc9cf1daaf2ef0b4edecaec44421b5b1114a3783fbc81e13c7dcc3
|
| 3 |
+
size 33831727464
|
model-00100-layer101-experts.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:406b350372893fcd81f6e81f7d9d2761d876c2402e0242849ab71df0d1f85088
|
| 3 |
+
size 33831727464
|
model.safetensors.index.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d4d5eea83cd1e5218418ecc849be0c3a1865b2e963ee5bcbe6f03a7ed730f347
|
| 3 |
+
size 49086552
|
tiktoken.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b6c497a7469b33ced9c38afb1ad6e47f03f5e5dc05f15930799210ec050c5103
|
| 3 |
+
size 2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|
+
from pathlib import Path
|
| 6 |
+
from typing import (
|
| 7 |
+
cast,
|
| 8 |
+
Tuple,
|
| 9 |
+
Dict,
|
| 10 |
+
Iterator,
|
| 11 |
+
List,
|
| 12 |
+
Union,
|
| 13 |
+
Optional,
|
| 14 |
+
)
|
| 15 |
+
from shutil import copyfile
|
| 16 |
+
from tiktoken.load import load_tiktoken_bpe
|
| 17 |
+
from tokenizers import AddedToken, pre_tokenizers, Regex
|
| 18 |
+
from transformers.tokenization_utils import PreTrainedTokenizer
|
| 19 |
+
from transformers.models.gpt2.tokenization_gpt2 import bytes_to_unicode
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
logger = getLogger(__name__)
|
| 24 |
+
VOCAB_FILES_NAMES = {"vocab_file": "tiktoken.model"}
|
| 25 |
+
|
| 26 |
+
class TikTokenTokenizer(PreTrainedTokenizer):
|
| 27 |
+
"""
|
| 28 |
+
Tokenizing and encoding/decoding text using the Tiktoken tokenizer. See megatron/tokenizer/tiktoken_tokenizer.py.
|
| 29 |
+
|
| 30 |
+
This tokenizer inherits from [`PreTrainedTokenizer`] which contains most of the main methods. Users should refer to
|
| 31 |
+
this superclass for more information regarding those methods.
|
| 32 |
+
|
| 33 |
+
Args:
|
| 34 |
+
vocab_file (`str`):
|
| 35 |
+
The path to the Tiktoken model file.
|
| 36 |
+
bos_token (`str` or `tokenizers.AddedToken`, *optional*, defaults to `"<|begin_of_text|>",`):
|
| 37 |
+
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.
|
| 38 |
+
eos_token (`str` or `tokenizers.AddedToken`, *optional*, defaults to `"<|end_of_text|>"`):
|
| 39 |
+
The end of sequence token.
|
| 40 |
+
unk_token (`str` or `tokenizers.AddedToken`, *optional*, defaults to `"<|reserved_special_token_249|>"`):
|
| 41 |
+
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
|
| 42 |
+
token instead. The second to last item in special_tokens.
|
| 43 |
+
pad_token (`str` or `tokenizers.AddedToken`, *optional*, defaults to `"<|reserved_special_token_250|>"`):
|
| 44 |
+
The token used for padding, for example when batching sequences of different lengths.
|
| 45 |
+
additional_special_tokens (list of `str`, *optional*):
|
| 46 |
+
A tuple or a list of additional tokens, which will be marked as `special`, meaning that they will be
|
| 47 |
+
skipped when decoding if `skip_special_tokens` is set to `True`.
|
| 48 |
+
"""
|
| 49 |
+
|
| 50 |
+
vocab_files_names = VOCAB_FILES_NAMES
|
| 51 |
+
|
| 52 |
+
model_input_names = ["input_ids", "attention_mask"]
|
| 53 |
+
|
| 54 |
+
special_tokens: Dict[str, int]
|
| 55 |
+
|
| 56 |
+
num_reserved_special_tokens = 256
|
| 57 |
+
|
| 58 |
+
pat_str = "|".join(
|
| 59 |
+
[
|
| 60 |
+
r"""[\p{Han}]+""",
|
| 61 |
+
r"""[^\r\n\p{L}\p{N}]?[\p{Lu}\p{Lt}\p{Lm}\p{Lo}\p{M}&&[^\p{Han}]]*[\p{Ll}\p{Lm}\p{Lo}\p{M}&&[^\p{Han}]]+(?i:'s|'t|'re|'ve|'m|'ll|'d)?""",
|
| 62 |
+
r"""[^\r\n\p{L}\p{N}]?[\p{Lu}\p{Lt}\p{Lm}\p{Lo}\p{M}&&[^\p{Han}]]+[\p{Ll}\p{Lm}\p{Lo}\p{M}&&[^\p{Han}]]*(?i:'s|'t|'re|'ve|'m|'ll|'d)?""",
|
| 63 |
+
r"""\p{N}{1,3}""",
|
| 64 |
+
r""" ?[^\s\p{L}\p{N}]+[\r\n]*""",
|
| 65 |
+
r"""\s*[\r\n]+""",
|
| 66 |
+
r"""\s+(?!\S)""",
|
| 67 |
+
r"""\s+""",
|
| 68 |
+
]
|
| 69 |
+
)
|
| 70 |
+
|
| 71 |
+
def __init__(
|
| 72 |
+
self,
|
| 73 |
+
vocab_file,
|
| 74 |
+
bos_token: Union[str, AddedToken]="[BOS]",
|
| 75 |
+
eos_token: Union[str, AddedToken]="[EOS]",
|
| 76 |
+
unk_token: Union[str, AddedToken, None]=None,
|
| 77 |
+
pad_token: Union[str, AddedToken, None]=None,
|
| 78 |
+
additional_special_tokens: List[str]=None,
|
| 79 |
+
added_tokens_decoder: Optional[dict] = None,
|
| 80 |
+
**kwargs,
|
| 81 |
+
):
|
| 82 |
+
assert os.path.isfile(vocab_file), vocab_file
|
| 83 |
+
|
| 84 |
+
if additional_special_tokens is None:
|
| 85 |
+
additional_special_tokens = [
|
| 86 |
+
"<|im_end|>",
|
| 87 |
+
"<|im_user|>",
|
| 88 |
+
"<|im_assistant|>",
|
| 89 |
+
"<|start_header_id|>",
|
| 90 |
+
"<|end_header_id|>",
|
| 91 |
+
"[EOT]",
|
| 92 |
+
"<|im_system|>",
|
| 93 |
+
"<|im_middle|>",
|
| 94 |
+
]
|
| 95 |
+
|
| 96 |
+
special_tokens_mapping = {
|
| 97 |
+
i: added_tokens_decoder[i].content for i in added_tokens_decoder
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
self.vocab_file = vocab_file
|
| 101 |
+
mergeable_ranks = load_tiktoken_bpe(vocab_file)
|
| 102 |
+
num_base_tokens = len(mergeable_ranks)
|
| 103 |
+
self.special_tokens = {
|
| 104 |
+
special_tokens_mapping.get(i, f"<|reserved_token_{i}|>"): i
|
| 105 |
+
for i in range(
|
| 106 |
+
num_base_tokens, num_base_tokens + self.num_reserved_special_tokens + 2
|
| 107 |
+
)
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
|
| 111 |
+
|
| 112 |
+
self.model = tiktoken.Encoding(
|
| 113 |
+
name=Path(vocab_file).name,
|
| 114 |
+
pat_str=self.pat_str,
|
| 115 |
+
mergeable_ranks=mergeable_ranks,
|
| 116 |
+
special_tokens=self.special_tokens,
|
| 117 |
+
)
|
| 118 |
+
logger.info(f"Reloaded tiktoken model from {vocab_file}")
|
| 119 |
+
|
| 120 |
+
self.n_words: int = self.model.n_vocab
|
| 121 |
+
# BOS / EOS token IDs
|
| 122 |
+
self.bos_id: int = self.special_tokens[str(bos_token)]
|
| 123 |
+
self.eos_id: int = self.special_tokens[str(eos_token)]
|
| 124 |
+
logger.info(
|
| 125 |
+
f"#words: {self.n_words} - BOS ID: {self.bos_id} - EOS ID: {self.eos_id}"
|
| 126 |
+
)
|
| 127 |
+
|
| 128 |
+
self.pad_id: int = self.special_tokens[str(pad_token)]
|
| 129 |
+
self.unk_id: int = self.special_tokens[str(unk_token)]
|
| 130 |
+
|
| 131 |
+
self.byte_encoder = bytes_to_unicode()
|
| 132 |
+
self.byte_decoder = {v: k for k, v in self.byte_encoder.items()}
|
| 133 |
+
|
| 134 |
+
self.decoder = {}
|
| 135 |
+
for i in range(self.n_words):
|
| 136 |
+
# Taken from https://gist.github.com/xenova/a452a6474428de0182b17605a98631ee
|
| 137 |
+
decoding = ''.join([
|
| 138 |
+
self.byte_encoder[ord(char)] for char in
|
| 139 |
+
self.model.decode_single_token_bytes(i).decode('latin-1')
|
| 140 |
+
])
|
| 141 |
+
self.decoder[i] = decoding
|
| 142 |
+
|
| 143 |
+
self.encoder = {}
|
| 144 |
+
for i in range(self.n_words):
|
| 145 |
+
if i in self.decoder:
|
| 146 |
+
self.encoder[self.decoder[i]] = i
|
| 147 |
+
|
| 148 |
+
super().__init__(
|
| 149 |
+
bos_token=bos_token,
|
| 150 |
+
eos_token=eos_token,
|
| 151 |
+
unk_token=unk_token,
|
| 152 |
+
pad_token=pad_token,
|
| 153 |
+
additional_special_tokens=additional_special_tokens,
|
| 154 |
+
**kwargs,
|
| 155 |
+
)
|
| 156 |
+
self.all_special_ids_set = set(self.all_special_ids)
|
| 157 |
+
|
| 158 |
+
def encode(
|
| 159 |
+
self,
|
| 160 |
+
text: str,
|
| 161 |
+
allow_special_tokens: bool = True,
|
| 162 |
+
**kwargs
|
| 163 |
+
) -> List[int]:
|
| 164 |
+
"""
|
| 165 |
+
Encodes a string into a list of token IDs.
|
| 166 |
+
|
| 167 |
+
Args:
|
| 168 |
+
text (str): The input string to be encoded.
|
| 169 |
+
|
| 170 |
+
Returns:
|
| 171 |
+
list[int]: A list of token IDs.
|
| 172 |
+
"""
|
| 173 |
+
# If there are other args, we should call super().encode because there are a lot of code
|
| 174 |
+
# to handle those args. supper().encode finally will call _tokenize and _convert_token_to_id.
|
| 175 |
+
# NOTE: our encode method is not compatible with the super().encode method,
|
| 176 |
+
# e.g. split_special_tokens' default is True in our encode method.
|
| 177 |
+
if len(kwargs) > 0:
|
| 178 |
+
logger.warning( f"Calling super().encode with {kwargs}" )
|
| 179 |
+
return super().encode(text, **kwargs)
|
| 180 |
+
|
| 181 |
+
assert type(text) is str
|
| 182 |
+
|
| 183 |
+
# The tiktoken tokenizer can handle <=400k chars without
|
| 184 |
+
# pyo3_runtime.PanicException.
|
| 185 |
+
TIKTOKEN_MAX_ENCODE_CHARS = 400_000
|
| 186 |
+
|
| 187 |
+
# https://github.com/openai/tiktoken/issues/195
|
| 188 |
+
# Here we iterate over subsequences and split if we exceed the limit
|
| 189 |
+
# of max consecutive non-whitespace or whitespace characters.
|
| 190 |
+
MAX_NO_WHITESPACES_CHARS = 25_000
|
| 191 |
+
|
| 192 |
+
texts = self.pre_tokenizer_process(text)
|
| 193 |
+
|
| 194 |
+
all_substrs = []
|
| 195 |
+
for text in texts:
|
| 196 |
+
substrs = (
|
| 197 |
+
substr
|
| 198 |
+
for i in range(0, len(text), TIKTOKEN_MAX_ENCODE_CHARS)
|
| 199 |
+
for substr in self._split_whitespaces_or_nonwhitespaces(
|
| 200 |
+
text[i: i + TIKTOKEN_MAX_ENCODE_CHARS], MAX_NO_WHITESPACES_CHARS
|
| 201 |
+
)
|
| 202 |
+
)
|
| 203 |
+
all_substrs.extend(substrs)
|
| 204 |
+
|
| 205 |
+
t: List[int] = []
|
| 206 |
+
for substr in all_substrs:
|
| 207 |
+
if allow_special_tokens:
|
| 208 |
+
t.extend(
|
| 209 |
+
# we should consider special token as a common token
|
| 210 |
+
self.model.encode(
|
| 211 |
+
substr,
|
| 212 |
+
allowed_special="all",
|
| 213 |
+
)
|
| 214 |
+
)
|
| 215 |
+
else:
|
| 216 |
+
t.extend(
|
| 217 |
+
# we should consider special token as a common token
|
| 218 |
+
self.model.encode(
|
| 219 |
+
substr,
|
| 220 |
+
disallowed_special=(),
|
| 221 |
+
)
|
| 222 |
+
)
|
| 223 |
+
|
| 224 |
+
return t
|
| 225 |
+
|
| 226 |
+
def decode(
|
| 227 |
+
self,
|
| 228 |
+
token_ids: Union[int, List[int]],
|
| 229 |
+
**kwargs
|
| 230 |
+
) -> str:
|
| 231 |
+
"""
|
| 232 |
+
Decodes a list of token IDs into a string.
|
| 233 |
+
|
| 234 |
+
Args:
|
| 235 |
+
token_ids (List[int]): The list of token IDs to be decoded.
|
| 236 |
+
|
| 237 |
+
Returns:
|
| 238 |
+
str: The decoded string.
|
| 239 |
+
"""
|
| 240 |
+
# If there are other args, we should call super().decode because there are a lot of code
|
| 241 |
+
# to handle those args. supper().encode finally will call convert_tokens_to_string and _convert_id_to_token.
|
| 242 |
+
if len(kwargs) > 0:
|
| 243 |
+
return super().decode(token_ids, **kwargs)
|
| 244 |
+
|
| 245 |
+
if type(token_ids) is int:
|
| 246 |
+
token_ids = [token_ids]
|
| 247 |
+
|
| 248 |
+
return self.model.decode(cast(List[int], token_ids))
|
| 249 |
+
|
| 250 |
+
@staticmethod
|
| 251 |
+
def _split_whitespaces_or_nonwhitespaces(
|
| 252 |
+
s: str, max_consecutive_slice_len: int
|
| 253 |
+
) -> Iterator[str]:
|
| 254 |
+
"""
|
| 255 |
+
Splits the string `s` so that each substring contains no more than `max_consecutive_slice_len`
|
| 256 |
+
consecutive whitespaces or consecutive non-whitespaces.
|
| 257 |
+
"""
|
| 258 |
+
current_slice_len = 0
|
| 259 |
+
current_slice_is_space = s[0].isspace() if len(s) > 0 else False
|
| 260 |
+
slice_start = 0
|
| 261 |
+
|
| 262 |
+
for i in range(len(s)):
|
| 263 |
+
is_now_space = s[i].isspace()
|
| 264 |
+
|
| 265 |
+
if current_slice_is_space ^ is_now_space:
|
| 266 |
+
current_slice_len = 1
|
| 267 |
+
current_slice_is_space = is_now_space
|
| 268 |
+
else:
|
| 269 |
+
current_slice_len += 1
|
| 270 |
+
if current_slice_len > max_consecutive_slice_len:
|
| 271 |
+
yield s[slice_start:i]
|
| 272 |
+
slice_start = i
|
| 273 |
+
current_slice_len = 1
|
| 274 |
+
yield s[slice_start:]
|
| 275 |
+
|
| 276 |
+
def pre_tokenizer_process(self, text: str) -> List[str]:
|
| 277 |
+
"""
|
| 278 |
+
pre-tokenizes the input text into a list of tokens.
|
| 279 |
+
This method is used to split the input text into smaller chunks for internal processing.
|
| 280 |
+
"""
|
| 281 |
+
return [text]
|
| 282 |
+
|
| 283 |
+
|
| 284 |
+
""" ----- Below are the abstract methods required by PreTrainedTokenizer ----- """
|
| 285 |
+
@property
|
| 286 |
+
def vocab_size(self) -> int:
|
| 287 |
+
return self.n_words
|
| 288 |
+
|
| 289 |
+
def get_vocab(self) -> Dict[str, int]:
|
| 290 |
+
return self.encoder
|
| 291 |
+
|
| 292 |
+
def _tokenize(self, text: str, **kwargs) -> List[str]:
|
| 293 |
+
return [
|
| 294 |
+
self.decoder[t]
|
| 295 |
+
for t in self.encode(text)
|
| 296 |
+
]
|
| 297 |
+
|
| 298 |
+
def _convert_token_to_id(self, token: str) -> int:
|
| 299 |
+
return self.encoder.get(token, self.unk_id)
|
| 300 |
+
|
| 301 |
+
def _convert_id_to_token(self, index: int) -> str:
|
| 302 |
+
return self.decoder.get(index)
|
| 303 |
+
|
| 304 |
+
@staticmethod
|
| 305 |
+
def clean_up_tokenization(out_string: str) -> str:
|
| 306 |
+
return out_string
|
| 307 |
+
|
| 308 |
+
def convert_tokens_to_string(self, tokens: List[str]) -> str:
|
| 309 |
+
text = ''.join(tokens)
|
| 310 |
+
text = bytearray([self.byte_decoder[c] for c in text]).decode('utf-8', 'replace')
|
| 311 |
+
return text
|
| 312 |
+
|
| 313 |
+
def save_vocabulary(self, save_directory: str, filename_prefix: Optional[str] = None) -> Tuple[str]:
|
| 314 |
+
if not os.path.isdir(save_directory):
|
| 315 |
+
raise ValueError(f"vocabulary path ({save_directory}) should be a directory")
|
| 316 |
+
out_vocab_file = os.path.join(
|
| 317 |
+
save_directory, (filename_prefix + "-" if filename_prefix else "") + VOCAB_FILES_NAMES["vocab_file"]
|
| 318 |
+
)
|
| 319 |
+
|
| 320 |
+
if os.path.abspath(self.vocab_file) != os.path.abspath(out_vocab_file) and os.path.isfile(self.vocab_file):
|
| 321 |
+
copyfile(self.vocab_file, out_vocab_file)
|
| 322 |
+
|
| 323 |
+
return (out_vocab_file,)
|