Instructions to use brainworkup/Laguna-XS-2.1-oQ4e with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use brainworkup/Laguna-XS-2.1-oQ4e with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir Laguna-XS-2.1-oQ4e brainworkup/Laguna-XS-2.1-oQ4e
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Upload Laguna-XS-2.1-oQ4e via oMLX
Browse files- README.md +22 -0
- chat_template.jinja +93 -0
- config.json +3459 -0
- configuration_laguna.py +251 -0
- generation_config.json +25 -0
- model-00001-of-00004.safetensors +3 -0
- model-00002-of-00004.safetensors +3 -0
- model-00003-of-00004.safetensors +3 -0
- model-00004-of-00004.safetensors +3 -0
- model.safetensors.index.json +0 -0
- modeling_laguna.py +896 -0
- oq_imatrix_report.json +604 -0
- special_tokens_map.json +9 -0
- tokenizer.json +0 -0
- tokenizer_config.json +576 -0
README.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: mlx
|
| 3 |
+
tags:
|
| 4 |
+
- mlx
|
| 5 |
+
- oq
|
| 6 |
+
- quantized
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
> [!IMPORTANT]
|
| 10 |
+
> This quantization was uploaded on **2026-08-01** and replaces a previous version.
|
| 11 |
+
> If you downloaded this model before this date, please re-download for the updated weights.
|
| 12 |
+
|
| 13 |
+
# Laguna-XS-2.1-oQ4e
|
| 14 |
+
|
| 15 |
+
This model was quantized using [oQ](https://github.com/jundot/omlx) (oMLX v0.5.4rc2) mixed-precision quantization.
|
| 16 |
+
|
| 17 |
+
## Quantization details
|
| 18 |
+
|
| 19 |
+
- **Model type**: laguna
|
| 20 |
+
- **Bits**: 4
|
| 21 |
+
- **Group size**: 64
|
| 22 |
+
- **Format**: MLX safetensors
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{#- Iteration on laguna_glm_thinking_v8/chat_template.jinja -#}
|
| 2 |
+
{#- No formatting instructions -#}
|
| 3 |
+
{{- "〈|EOS|〉" -}}
|
| 4 |
+
{%- set enable_thinking = enable_thinking | default(false) -%}
|
| 5 |
+
{%- set add_generation_prompt = add_generation_prompt | default(false) -%}
|
| 6 |
+
|
| 7 |
+
{#- ───── header (system message) ───── -#}
|
| 8 |
+
{#- A caller-supplied system message with empty content opts out of the default below, producing no <system> block — used to train without a system message. -#}
|
| 9 |
+
{%- set system_message = "You are a helpful, conversationally-fluent assistant made by Poolside. You are here to be helpful to users through natural language conversations." -%}
|
| 10 |
+
{%- if messages and messages[0].role == "system" -%}
|
| 11 |
+
{%- set system_message = messages[0].content -%}
|
| 12 |
+
{%- set messages = messages[1:] -%}
|
| 13 |
+
{%- endif -%}
|
| 14 |
+
|
| 15 |
+
{%- set has_sys = system_message and system_message.strip() -%}
|
| 16 |
+
{%- if has_sys or tools or enable_thinking -%}
|
| 17 |
+
{{- "<system>" -}}
|
| 18 |
+
|
| 19 |
+
{%- if has_sys -%}
|
| 20 |
+
{{- system_message.rstrip() -}}
|
| 21 |
+
{%- if tools -%}{{- "\n\n" -}}{%- endif -%}
|
| 22 |
+
{%- endif -%}
|
| 23 |
+
|
| 24 |
+
{%- if tools -%}
|
| 25 |
+
{{- "### Tools\n\n" -}}
|
| 26 |
+
{{- "You may call functions to assist with the user query.\n" -}}
|
| 27 |
+
{{- "All available function signatures are listed below:\n" -}}
|
| 28 |
+
{{- "<available_tools>\n" -}}
|
| 29 |
+
{%- for tool in tools -%}
|
| 30 |
+
{{- (tool | tojson) ~ "\n" -}}
|
| 31 |
+
{%- endfor -%}
|
| 32 |
+
{{- "</available_tools>" -}}
|
| 33 |
+
{%- endif -%}
|
| 34 |
+
|
| 35 |
+
{{- "</system>\n" -}}
|
| 36 |
+
{%- endif -%}
|
| 37 |
+
|
| 38 |
+
{#- ───── main loop ───── -#}
|
| 39 |
+
{%- for message in messages -%}
|
| 40 |
+
{%- set content = message.content if message.content is string else "" -%}
|
| 41 |
+
{%- if message.role == "user" -%}
|
| 42 |
+
{{- "<user>" + content + "</user>\n" -}}
|
| 43 |
+
{%- elif message.role == "assistant" -%}
|
| 44 |
+
{%- generation -%}
|
| 45 |
+
{{- "<assistant>" -}}
|
| 46 |
+
{#- Extract reasoning content from message.reasoning (vLLM field name) or message.reasoning_content -#}
|
| 47 |
+
{%- set reasoning_content = '' -%}
|
| 48 |
+
{%- if message.reasoning is string -%}
|
| 49 |
+
{%- set reasoning_content = message.reasoning -%}
|
| 50 |
+
{%- elif message.reasoning_content is string -%}
|
| 51 |
+
{%- set reasoning_content = message.reasoning_content -%}
|
| 52 |
+
{%- endif -%}
|
| 53 |
+
{#- Display reasoning content for all messages if enable_thinking -#}
|
| 54 |
+
{%- if enable_thinking -%}
|
| 55 |
+
{{- '<think>' + reasoning_content + '</think>' -}}
|
| 56 |
+
{%- else -%}
|
| 57 |
+
{{- '</think>' -}}
|
| 58 |
+
{%- endif -%}
|
| 59 |
+
{#- Display main content (trailing newline only when no tool_calls follow) -#}
|
| 60 |
+
{%- if content -%}
|
| 61 |
+
{{- content -}}
|
| 62 |
+
{%- endif -%}
|
| 63 |
+
{%- if message.tool_calls -%}
|
| 64 |
+
{%- for tool_call in message.tool_calls -%}
|
| 65 |
+
{%- set function_data = tool_call.function -%}
|
| 66 |
+
{{- '<tool_call>' + function_data.name -}}
|
| 67 |
+
{%- set _args = function_data.arguments -%}
|
| 68 |
+
{%- for k, v in _args.items() -%}
|
| 69 |
+
{{- "<arg_key>" ~ k ~ "</arg_key>" -}}
|
| 70 |
+
{{- "<arg_value>" -}}{{- v | tojson(ensure_ascii=False) if v is not string else v -}}{{- "</arg_value>" -}}
|
| 71 |
+
{%- endfor -%}
|
| 72 |
+
{{- "</tool_call>" -}}
|
| 73 |
+
{%- endfor -%}
|
| 74 |
+
{%- endif -%}
|
| 75 |
+
{{- "</assistant>\n" -}}
|
| 76 |
+
{%- endgeneration -%}
|
| 77 |
+
{%- elif message.role == "tool" -%}
|
| 78 |
+
{{- "<tool_response>" + content + "</tool_response>\n" -}}
|
| 79 |
+
{%- elif message.role == "system" -%}
|
| 80 |
+
{#- Render additional system messages (the first one, if any, is handled separately in the header and was sliced off above) -#}
|
| 81 |
+
{{- "<system>" + content + "</system>\n" -}}
|
| 82 |
+
{%- endif -%}
|
| 83 |
+
{%- endfor -%}
|
| 84 |
+
{#- ───── generation prompt ───── -#}
|
| 85 |
+
{%- if add_generation_prompt -%}
|
| 86 |
+
{{- "<assistant>" -}}
|
| 87 |
+
{#- ───── Include reasoning mode directive ───── -#}
|
| 88 |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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"LagunaForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"auto_map": {
|
| 6 |
+
"AutoConfig": "configuration_laguna.LagunaConfig",
|
| 7 |
+
"AutoModelForCausalLM": "modeling_laguna.LagunaForCausalLM"
|
| 8 |
+
},
|
| 9 |
+
"model_type": "laguna",
|
| 10 |
+
"vocab_size": 100352,
|
| 11 |
+
"hidden_size": 2048,
|
| 12 |
+
"intermediate_size": 8192,
|
| 13 |
+
"num_hidden_layers": 40,
|
| 14 |
+
"num_attention_heads": 48,
|
| 15 |
+
"num_key_value_heads": 8,
|
| 16 |
+
"head_dim": 128,
|
| 17 |
+
"max_position_embeddings": 262144,
|
| 18 |
+
"attention_bias": false,
|
| 19 |
+
"attention_dropout": 0.0,
|
| 20 |
+
"rms_norm_eps": 1e-06,
|
| 21 |
+
"num_experts": 256,
|
| 22 |
+
"num_experts_per_tok": 8,
|
| 23 |
+
"moe_intermediate_size": 512,
|
| 24 |
+
"shared_expert_intermediate_size": 512,
|
| 25 |
+
"norm_topk_prob": true,
|
| 26 |
+
"router_aux_loss_coef": 0.0,
|
| 27 |
+
"decoder_sparse_step": 1,
|
| 28 |
+
"mlp_only_layers": [
|
| 29 |
+
0
|
| 30 |
+
],
|
| 31 |
+
"bos_token_id": 2,
|
| 32 |
+
"eos_token_id": [
|
| 33 |
+
2,
|
| 34 |
+
24
|
| 35 |
+
],
|
| 36 |
+
"pad_token_id": 9,
|
| 37 |
+
"tie_word_embeddings": false,
|
| 38 |
+
"use_cache": true,
|
| 39 |
+
"torch_dtype": "bfloat16",
|
| 40 |
+
"gating": "per-head",
|
| 41 |
+
"sliding_window": 512,
|
| 42 |
+
"rope_parameters": {
|
| 43 |
+
"full_attention": {
|
| 44 |
+
"rope_theta": 500000.0,
|
| 45 |
+
"rope_type": "yarn",
|
| 46 |
+
"factor": 32.0,
|
| 47 |
+
"original_max_position_embeddings": 8192,
|
| 48 |
+
"beta_slow": 1.0,
|
| 49 |
+
"beta_fast": 64.0,
|
| 50 |
+
"attention_factor": 1.3465735902799727,
|
| 51 |
+
"partial_rotary_factor": 0.5
|
| 52 |
+
},
|
| 53 |
+
"sliding_attention": {
|
| 54 |
+
"rope_type": "default",
|
| 55 |
+
"rope_theta": 10000.0,
|
| 56 |
+
"partial_rotary_factor": 1.0
|
| 57 |
+
}
|
| 58 |
+
},
|
| 59 |
+
"layer_types": [
|
| 60 |
+
"full_attention",
|
| 61 |
+
"sliding_attention",
|
| 62 |
+
"sliding_attention",
|
| 63 |
+
"sliding_attention",
|
| 64 |
+
"full_attention",
|
| 65 |
+
"sliding_attention",
|
| 66 |
+
"sliding_attention",
|
| 67 |
+
"sliding_attention",
|
| 68 |
+
"full_attention",
|
| 69 |
+
"sliding_attention",
|
| 70 |
+
"sliding_attention",
|
| 71 |
+
"sliding_attention",
|
| 72 |
+
"full_attention",
|
| 73 |
+
"sliding_attention",
|
| 74 |
+
"sliding_attention",
|
| 75 |
+
"sliding_attention",
|
| 76 |
+
"full_attention",
|
| 77 |
+
"sliding_attention",
|
| 78 |
+
"sliding_attention",
|
| 79 |
+
"sliding_attention",
|
| 80 |
+
"full_attention",
|
| 81 |
+
"sliding_attention",
|
| 82 |
+
"sliding_attention",
|
| 83 |
+
"sliding_attention",
|
| 84 |
+
"full_attention",
|
| 85 |
+
"sliding_attention",
|
| 86 |
+
"sliding_attention",
|
| 87 |
+
"sliding_attention",
|
| 88 |
+
"full_attention",
|
| 89 |
+
"sliding_attention",
|
| 90 |
+
"sliding_attention",
|
| 91 |
+
"sliding_attention",
|
| 92 |
+
"full_attention",
|
| 93 |
+
"sliding_attention",
|
| 94 |
+
"sliding_attention",
|
| 95 |
+
"sliding_attention",
|
| 96 |
+
"full_attention",
|
| 97 |
+
"sliding_attention",
|
| 98 |
+
"sliding_attention",
|
| 99 |
+
"sliding_attention"
|
| 100 |
+
],
|
| 101 |
+
"moe_apply_router_weight_on_input": false,
|
| 102 |
+
"mlp_layer_types": [
|
| 103 |
+
"dense",
|
| 104 |
+
"sparse",
|
| 105 |
+
"sparse",
|
| 106 |
+
"sparse",
|
| 107 |
+
"sparse",
|
| 108 |
+
"sparse",
|
| 109 |
+
"sparse",
|
| 110 |
+
"sparse",
|
| 111 |
+
"sparse",
|
| 112 |
+
"sparse",
|
| 113 |
+
"sparse",
|
| 114 |
+
"sparse",
|
| 115 |
+
"sparse",
|
| 116 |
+
"sparse",
|
| 117 |
+
"sparse",
|
| 118 |
+
"sparse",
|
| 119 |
+
"sparse",
|
| 120 |
+
"sparse",
|
| 121 |
+
"sparse",
|
| 122 |
+
"sparse",
|
| 123 |
+
"sparse",
|
| 124 |
+
"sparse",
|
| 125 |
+
"sparse",
|
| 126 |
+
"sparse",
|
| 127 |
+
"sparse",
|
| 128 |
+
"sparse",
|
| 129 |
+
"sparse",
|
| 130 |
+
"sparse",
|
| 131 |
+
"sparse",
|
| 132 |
+
"sparse",
|
| 133 |
+
"sparse",
|
| 134 |
+
"sparse",
|
| 135 |
+
"sparse",
|
| 136 |
+
"sparse",
|
| 137 |
+
"sparse",
|
| 138 |
+
"sparse",
|
| 139 |
+
"sparse",
|
| 140 |
+
"sparse",
|
| 141 |
+
"sparse",
|
| 142 |
+
"sparse"
|
| 143 |
+
],
|
| 144 |
+
"gating_types": [
|
| 145 |
+
"per_head",
|
| 146 |
+
"per_head",
|
| 147 |
+
"per_head",
|
| 148 |
+
"per_head",
|
| 149 |
+
"per_head",
|
| 150 |
+
"per_head",
|
| 151 |
+
"per_head",
|
| 152 |
+
"per_head",
|
| 153 |
+
"per_head",
|
| 154 |
+
"per_head",
|
| 155 |
+
"per_head",
|
| 156 |
+
"per_head",
|
| 157 |
+
"per_head",
|
| 158 |
+
"per_head",
|
| 159 |
+
"per_head",
|
| 160 |
+
"per_head",
|
| 161 |
+
"per_head",
|
| 162 |
+
"per_head",
|
| 163 |
+
"per_head",
|
| 164 |
+
"per_head",
|
| 165 |
+
"per_head",
|
| 166 |
+
"per_head",
|
| 167 |
+
"per_head",
|
| 168 |
+
"per_head",
|
| 169 |
+
"per_head",
|
| 170 |
+
"per_head",
|
| 171 |
+
"per_head",
|
| 172 |
+
"per_head",
|
| 173 |
+
"per_head",
|
| 174 |
+
"per_head",
|
| 175 |
+
"per_head",
|
| 176 |
+
"per_head",
|
| 177 |
+
"per_head",
|
| 178 |
+
"per_head",
|
| 179 |
+
"per_head",
|
| 180 |
+
"per_head",
|
| 181 |
+
"per_head",
|
| 182 |
+
"per_head",
|
| 183 |
+
"per_head",
|
| 184 |
+
"per_head"
|
| 185 |
+
],
|
| 186 |
+
"moe_routed_scaling_factor": 2.5,
|
| 187 |
+
"num_attention_heads_per_layer": [
|
| 188 |
+
48,
|
| 189 |
+
64,
|
| 190 |
+
64,
|
| 191 |
+
64,
|
| 192 |
+
48,
|
| 193 |
+
64,
|
| 194 |
+
64,
|
| 195 |
+
64,
|
| 196 |
+
48,
|
| 197 |
+
64,
|
| 198 |
+
64,
|
| 199 |
+
64,
|
| 200 |
+
48,
|
| 201 |
+
64,
|
| 202 |
+
64,
|
| 203 |
+
64,
|
| 204 |
+
48,
|
| 205 |
+
64,
|
| 206 |
+
64,
|
| 207 |
+
64,
|
| 208 |
+
48,
|
| 209 |
+
64,
|
| 210 |
+
64,
|
| 211 |
+
64,
|
| 212 |
+
48,
|
| 213 |
+
64,
|
| 214 |
+
64,
|
| 215 |
+
64,
|
| 216 |
+
48,
|
| 217 |
+
64,
|
| 218 |
+
64,
|
| 219 |
+
64,
|
| 220 |
+
48,
|
| 221 |
+
64,
|
| 222 |
+
64,
|
| 223 |
+
64,
|
| 224 |
+
48,
|
| 225 |
+
64,
|
| 226 |
+
64,
|
| 227 |
+
64
|
| 228 |
+
],
|
| 229 |
+
"quantization": {
|
| 230 |
+
"group_size": 64,
|
| 231 |
+
"bits": 4,
|
| 232 |
+
"mode": "affine",
|
| 233 |
+
"lm_head": {
|
| 234 |
+
"bits": 8,
|
| 235 |
+
"group_size": 64,
|
| 236 |
+
"mode": "affine"
|
| 237 |
+
},
|
| 238 |
+
"model.embed_tokens": {
|
| 239 |
+
"bits": 8,
|
| 240 |
+
"group_size": 64,
|
| 241 |
+
"mode": "affine"
|
| 242 |
+
},
|
| 243 |
+
"model.layers.0.mlp.down_proj": {
|
| 244 |
+
"bits": 6,
|
| 245 |
+
"group_size": 64,
|
| 246 |
+
"mode": "affine"
|
| 247 |
+
},
|
| 248 |
+
"model.layers.0.mlp.gate_proj": {
|
| 249 |
+
"bits": 6,
|
| 250 |
+
"group_size": 64,
|
| 251 |
+
"mode": "affine"
|
| 252 |
+
},
|
| 253 |
+
"model.layers.0.mlp.up_proj": {
|
| 254 |
+
"bits": 6,
|
| 255 |
+
"group_size": 64,
|
| 256 |
+
"mode": "affine"
|
| 257 |
+
},
|
| 258 |
+
"model.layers.0.self_attn.g_proj": {
|
| 259 |
+
"bits": 6,
|
| 260 |
+
"group_size": 64,
|
| 261 |
+
"mode": "affine"
|
| 262 |
+
},
|
| 263 |
+
"model.layers.0.self_attn.k_proj": {
|
| 264 |
+
"bits": 6,
|
| 265 |
+
"group_size": 64,
|
| 266 |
+
"mode": "affine"
|
| 267 |
+
},
|
| 268 |
+
"model.layers.0.self_attn.o_proj": {
|
| 269 |
+
"bits": 6,
|
| 270 |
+
"group_size": 64,
|
| 271 |
+
"mode": "affine"
|
| 272 |
+
},
|
| 273 |
+
"model.layers.0.self_attn.q_proj": {
|
| 274 |
+
"bits": 6,
|
| 275 |
+
"group_size": 64,
|
| 276 |
+
"mode": "affine"
|
| 277 |
+
},
|
| 278 |
+
"model.layers.0.self_attn.v_proj": {
|
| 279 |
+
"bits": 6,
|
| 280 |
+
"group_size": 64,
|
| 281 |
+
"mode": "affine"
|
| 282 |
+
},
|
| 283 |
+
"model.layers.1.mlp.shared_expert.down_proj": {
|
| 284 |
+
"bits": 8,
|
| 285 |
+
"group_size": 128,
|
| 286 |
+
"mode": "affine"
|
| 287 |
+
},
|
| 288 |
+
"model.layers.1.mlp.shared_expert.gate_proj": {
|
| 289 |
+
"bits": 8,
|
| 290 |
+
"group_size": 128,
|
| 291 |
+
"mode": "affine"
|
| 292 |
+
},
|
| 293 |
+
"model.layers.1.mlp.shared_expert.up_proj": {
|
| 294 |
+
"bits": 8,
|
| 295 |
+
"group_size": 128,
|
| 296 |
+
"mode": "affine"
|
| 297 |
+
},
|
| 298 |
+
"model.layers.1.self_attn.g_proj": {
|
| 299 |
+
"bits": 6,
|
| 300 |
+
"group_size": 64,
|
| 301 |
+
"mode": "affine"
|
| 302 |
+
},
|
| 303 |
+
"model.layers.1.self_attn.k_proj": {
|
| 304 |
+
"bits": 6,
|
| 305 |
+
"group_size": 64,
|
| 306 |
+
"mode": "affine"
|
| 307 |
+
},
|
| 308 |
+
"model.layers.1.self_attn.o_proj": {
|
| 309 |
+
"bits": 6,
|
| 310 |
+
"group_size": 64,
|
| 311 |
+
"mode": "affine"
|
| 312 |
+
},
|
| 313 |
+
"model.layers.1.self_attn.q_proj": {
|
| 314 |
+
"bits": 6,
|
| 315 |
+
"group_size": 64,
|
| 316 |
+
"mode": "affine"
|
| 317 |
+
},
|
| 318 |
+
"model.layers.1.self_attn.v_proj": {
|
| 319 |
+
"bits": 8,
|
| 320 |
+
"group_size": 64,
|
| 321 |
+
"mode": "affine"
|
| 322 |
+
},
|
| 323 |
+
"model.layers.10.mlp.shared_expert.down_proj": {
|
| 324 |
+
"bits": 8,
|
| 325 |
+
"group_size": 128,
|
| 326 |
+
"mode": "affine"
|
| 327 |
+
},
|
| 328 |
+
"model.layers.10.mlp.shared_expert.gate_proj": {
|
| 329 |
+
"bits": 8,
|
| 330 |
+
"group_size": 128,
|
| 331 |
+
"mode": "affine"
|
| 332 |
+
},
|
| 333 |
+
"model.layers.10.mlp.shared_expert.up_proj": {
|
| 334 |
+
"bits": 8,
|
| 335 |
+
"group_size": 128,
|
| 336 |
+
"mode": "affine"
|
| 337 |
+
},
|
| 338 |
+
"model.layers.10.self_attn.g_proj": {
|
| 339 |
+
"bits": 6,
|
| 340 |
+
"group_size": 64,
|
| 341 |
+
"mode": "affine"
|
| 342 |
+
},
|
| 343 |
+
"model.layers.10.self_attn.k_proj": {
|
| 344 |
+
"bits": 6,
|
| 345 |
+
"group_size": 64,
|
| 346 |
+
"mode": "affine"
|
| 347 |
+
},
|
| 348 |
+
"model.layers.10.self_attn.o_proj": {
|
| 349 |
+
"bits": 6,
|
| 350 |
+
"group_size": 64,
|
| 351 |
+
"mode": "affine"
|
| 352 |
+
},
|
| 353 |
+
"model.layers.10.self_attn.q_proj": {
|
| 354 |
+
"bits": 6,
|
| 355 |
+
"group_size": 64,
|
| 356 |
+
"mode": "affine"
|
| 357 |
+
},
|
| 358 |
+
"model.layers.10.self_attn.v_proj": {
|
| 359 |
+
"bits": 6,
|
| 360 |
+
"group_size": 64,
|
| 361 |
+
"mode": "affine"
|
| 362 |
+
},
|
| 363 |
+
"model.layers.11.mlp.shared_expert.down_proj": {
|
| 364 |
+
"bits": 8,
|
| 365 |
+
"group_size": 128,
|
| 366 |
+
"mode": "affine"
|
| 367 |
+
},
|
| 368 |
+
"model.layers.11.mlp.shared_expert.gate_proj": {
|
| 369 |
+
"bits": 8,
|
| 370 |
+
"group_size": 128,
|
| 371 |
+
"mode": "affine"
|
| 372 |
+
},
|
| 373 |
+
"model.layers.11.mlp.shared_expert.up_proj": {
|
| 374 |
+
"bits": 8,
|
| 375 |
+
"group_size": 128,
|
| 376 |
+
"mode": "affine"
|
| 377 |
+
},
|
| 378 |
+
"model.layers.11.self_attn.g_proj": {
|
| 379 |
+
"bits": 6,
|
| 380 |
+
"group_size": 64,
|
| 381 |
+
"mode": "affine"
|
| 382 |
+
},
|
| 383 |
+
"model.layers.11.self_attn.k_proj": {
|
| 384 |
+
"bits": 6,
|
| 385 |
+
"group_size": 64,
|
| 386 |
+
"mode": "affine"
|
| 387 |
+
},
|
| 388 |
+
"model.layers.11.self_attn.o_proj": {
|
| 389 |
+
"bits": 6,
|
| 390 |
+
"group_size": 64,
|
| 391 |
+
"mode": "affine"
|
| 392 |
+
},
|
| 393 |
+
"model.layers.11.self_attn.q_proj": {
|
| 394 |
+
"bits": 6,
|
| 395 |
+
"group_size": 64,
|
| 396 |
+
"mode": "affine"
|
| 397 |
+
},
|
| 398 |
+
"model.layers.11.self_attn.v_proj": {
|
| 399 |
+
"bits": 6,
|
| 400 |
+
"group_size": 64,
|
| 401 |
+
"mode": "affine"
|
| 402 |
+
},
|
| 403 |
+
"model.layers.12.mlp.shared_expert.down_proj": {
|
| 404 |
+
"bits": 8,
|
| 405 |
+
"group_size": 128,
|
| 406 |
+
"mode": "affine"
|
| 407 |
+
},
|
| 408 |
+
"model.layers.12.mlp.shared_expert.gate_proj": {
|
| 409 |
+
"bits": 8,
|
| 410 |
+
"group_size": 128,
|
| 411 |
+
"mode": "affine"
|
| 412 |
+
},
|
| 413 |
+
"model.layers.12.mlp.shared_expert.up_proj": {
|
| 414 |
+
"bits": 8,
|
| 415 |
+
"group_size": 128,
|
| 416 |
+
"mode": "affine"
|
| 417 |
+
},
|
| 418 |
+
"model.layers.12.self_attn.g_proj": {
|
| 419 |
+
"bits": 8,
|
| 420 |
+
"group_size": 64,
|
| 421 |
+
"mode": "affine"
|
| 422 |
+
},
|
| 423 |
+
"model.layers.12.self_attn.k_proj": {
|
| 424 |
+
"bits": 8,
|
| 425 |
+
"group_size": 64,
|
| 426 |
+
"mode": "affine"
|
| 427 |
+
},
|
| 428 |
+
"model.layers.12.self_attn.o_proj": {
|
| 429 |
+
"bits": 8,
|
| 430 |
+
"group_size": 64,
|
| 431 |
+
"mode": "affine"
|
| 432 |
+
},
|
| 433 |
+
"model.layers.12.self_attn.q_proj": {
|
| 434 |
+
"bits": 8,
|
| 435 |
+
"group_size": 64,
|
| 436 |
+
"mode": "affine"
|
| 437 |
+
},
|
| 438 |
+
"model.layers.12.self_attn.v_proj": {
|
| 439 |
+
"bits": 8,
|
| 440 |
+
"group_size": 64,
|
| 441 |
+
"mode": "affine"
|
| 442 |
+
},
|
| 443 |
+
"model.layers.13.mlp.shared_expert.down_proj": {
|
| 444 |
+
"bits": 8,
|
| 445 |
+
"group_size": 128,
|
| 446 |
+
"mode": "affine"
|
| 447 |
+
},
|
| 448 |
+
"model.layers.13.mlp.shared_expert.gate_proj": {
|
| 449 |
+
"bits": 8,
|
| 450 |
+
"group_size": 128,
|
| 451 |
+
"mode": "affine"
|
| 452 |
+
},
|
| 453 |
+
"model.layers.13.mlp.shared_expert.up_proj": {
|
| 454 |
+
"bits": 8,
|
| 455 |
+
"group_size": 128,
|
| 456 |
+
"mode": "affine"
|
| 457 |
+
},
|
| 458 |
+
"model.layers.13.self_attn.g_proj": {
|
| 459 |
+
"bits": 6,
|
| 460 |
+
"group_size": 64,
|
| 461 |
+
"mode": "affine"
|
| 462 |
+
},
|
| 463 |
+
"model.layers.13.self_attn.k_proj": {
|
| 464 |
+
"bits": 6,
|
| 465 |
+
"group_size": 64,
|
| 466 |
+
"mode": "affine"
|
| 467 |
+
},
|
| 468 |
+
"model.layers.13.self_attn.o_proj": {
|
| 469 |
+
"bits": 6,
|
| 470 |
+
"group_size": 64,
|
| 471 |
+
"mode": "affine"
|
| 472 |
+
},
|
| 473 |
+
"model.layers.13.self_attn.q_proj": {
|
| 474 |
+
"bits": 6,
|
| 475 |
+
"group_size": 64,
|
| 476 |
+
"mode": "affine"
|
| 477 |
+
},
|
| 478 |
+
"model.layers.13.self_attn.v_proj": {
|
| 479 |
+
"bits": 6,
|
| 480 |
+
"group_size": 64,
|
| 481 |
+
"mode": "affine"
|
| 482 |
+
},
|
| 483 |
+
"model.layers.14.mlp.shared_expert.down_proj": {
|
| 484 |
+
"bits": 8,
|
| 485 |
+
"group_size": 128,
|
| 486 |
+
"mode": "affine"
|
| 487 |
+
},
|
| 488 |
+
"model.layers.14.mlp.shared_expert.gate_proj": {
|
| 489 |
+
"bits": 8,
|
| 490 |
+
"group_size": 128,
|
| 491 |
+
"mode": "affine"
|
| 492 |
+
},
|
| 493 |
+
"model.layers.14.mlp.shared_expert.up_proj": {
|
| 494 |
+
"bits": 8,
|
| 495 |
+
"group_size": 128,
|
| 496 |
+
"mode": "affine"
|
| 497 |
+
},
|
| 498 |
+
"model.layers.14.self_attn.g_proj": {
|
| 499 |
+
"bits": 6,
|
| 500 |
+
"group_size": 64,
|
| 501 |
+
"mode": "affine"
|
| 502 |
+
},
|
| 503 |
+
"model.layers.14.self_attn.k_proj": {
|
| 504 |
+
"bits": 6,
|
| 505 |
+
"group_size": 64,
|
| 506 |
+
"mode": "affine"
|
| 507 |
+
},
|
| 508 |
+
"model.layers.14.self_attn.o_proj": {
|
| 509 |
+
"bits": 6,
|
| 510 |
+
"group_size": 64,
|
| 511 |
+
"mode": "affine"
|
| 512 |
+
},
|
| 513 |
+
"model.layers.14.self_attn.q_proj": {
|
| 514 |
+
"bits": 6,
|
| 515 |
+
"group_size": 64,
|
| 516 |
+
"mode": "affine"
|
| 517 |
+
},
|
| 518 |
+
"model.layers.14.self_attn.v_proj": {
|
| 519 |
+
"bits": 6,
|
| 520 |
+
"group_size": 64,
|
| 521 |
+
"mode": "affine"
|
| 522 |
+
},
|
| 523 |
+
"model.layers.15.mlp.shared_expert.down_proj": {
|
| 524 |
+
"bits": 8,
|
| 525 |
+
"group_size": 128,
|
| 526 |
+
"mode": "affine"
|
| 527 |
+
},
|
| 528 |
+
"model.layers.15.mlp.shared_expert.gate_proj": {
|
| 529 |
+
"bits": 8,
|
| 530 |
+
"group_size": 128,
|
| 531 |
+
"mode": "affine"
|
| 532 |
+
},
|
| 533 |
+
"model.layers.15.mlp.shared_expert.up_proj": {
|
| 534 |
+
"bits": 8,
|
| 535 |
+
"group_size": 128,
|
| 536 |
+
"mode": "affine"
|
| 537 |
+
},
|
| 538 |
+
"model.layers.15.self_attn.g_proj": {
|
| 539 |
+
"bits": 6,
|
| 540 |
+
"group_size": 64,
|
| 541 |
+
"mode": "affine"
|
| 542 |
+
},
|
| 543 |
+
"model.layers.15.self_attn.k_proj": {
|
| 544 |
+
"bits": 6,
|
| 545 |
+
"group_size": 64,
|
| 546 |
+
"mode": "affine"
|
| 547 |
+
},
|
| 548 |
+
"model.layers.15.self_attn.o_proj": {
|
| 549 |
+
"bits": 6,
|
| 550 |
+
"group_size": 64,
|
| 551 |
+
"mode": "affine"
|
| 552 |
+
},
|
| 553 |
+
"model.layers.15.self_attn.q_proj": {
|
| 554 |
+
"bits": 6,
|
| 555 |
+
"group_size": 64,
|
| 556 |
+
"mode": "affine"
|
| 557 |
+
},
|
| 558 |
+
"model.layers.15.self_attn.v_proj": {
|
| 559 |
+
"bits": 6,
|
| 560 |
+
"group_size": 64,
|
| 561 |
+
"mode": "affine"
|
| 562 |
+
},
|
| 563 |
+
"model.layers.16.mlp.shared_expert.down_proj": {
|
| 564 |
+
"bits": 8,
|
| 565 |
+
"group_size": 128,
|
| 566 |
+
"mode": "affine"
|
| 567 |
+
},
|
| 568 |
+
"model.layers.16.mlp.shared_expert.gate_proj": {
|
| 569 |
+
"bits": 8,
|
| 570 |
+
"group_size": 128,
|
| 571 |
+
"mode": "affine"
|
| 572 |
+
},
|
| 573 |
+
"model.layers.16.mlp.shared_expert.up_proj": {
|
| 574 |
+
"bits": 8,
|
| 575 |
+
"group_size": 128,
|
| 576 |
+
"mode": "affine"
|
| 577 |
+
},
|
| 578 |
+
"model.layers.16.self_attn.g_proj": {
|
| 579 |
+
"bits": 8,
|
| 580 |
+
"group_size": 64,
|
| 581 |
+
"mode": "affine"
|
| 582 |
+
},
|
| 583 |
+
"model.layers.16.self_attn.k_proj": {
|
| 584 |
+
"bits": 8,
|
| 585 |
+
"group_size": 64,
|
| 586 |
+
"mode": "affine"
|
| 587 |
+
},
|
| 588 |
+
"model.layers.16.self_attn.o_proj": {
|
| 589 |
+
"bits": 8,
|
| 590 |
+
"group_size": 64,
|
| 591 |
+
"mode": "affine"
|
| 592 |
+
},
|
| 593 |
+
"model.layers.16.self_attn.q_proj": {
|
| 594 |
+
"bits": 8,
|
| 595 |
+
"group_size": 64,
|
| 596 |
+
"mode": "affine"
|
| 597 |
+
},
|
| 598 |
+
"model.layers.16.self_attn.v_proj": {
|
| 599 |
+
"bits": 8,
|
| 600 |
+
"group_size": 64,
|
| 601 |
+
"mode": "affine"
|
| 602 |
+
},
|
| 603 |
+
"model.layers.17.mlp.shared_expert.down_proj": {
|
| 604 |
+
"bits": 8,
|
| 605 |
+
"group_size": 128,
|
| 606 |
+
"mode": "affine"
|
| 607 |
+
},
|
| 608 |
+
"model.layers.17.mlp.shared_expert.gate_proj": {
|
| 609 |
+
"bits": 8,
|
| 610 |
+
"group_size": 128,
|
| 611 |
+
"mode": "affine"
|
| 612 |
+
},
|
| 613 |
+
"model.layers.17.mlp.shared_expert.up_proj": {
|
| 614 |
+
"bits": 8,
|
| 615 |
+
"group_size": 128,
|
| 616 |
+
"mode": "affine"
|
| 617 |
+
},
|
| 618 |
+
"model.layers.17.self_attn.g_proj": {
|
| 619 |
+
"bits": 8,
|
| 620 |
+
"group_size": 64,
|
| 621 |
+
"mode": "affine"
|
| 622 |
+
},
|
| 623 |
+
"model.layers.17.self_attn.k_proj": {
|
| 624 |
+
"bits": 8,
|
| 625 |
+
"group_size": 64,
|
| 626 |
+
"mode": "affine"
|
| 627 |
+
},
|
| 628 |
+
"model.layers.17.self_attn.o_proj": {
|
| 629 |
+
"bits": 8,
|
| 630 |
+
"group_size": 64,
|
| 631 |
+
"mode": "affine"
|
| 632 |
+
},
|
| 633 |
+
"model.layers.17.self_attn.q_proj": {
|
| 634 |
+
"bits": 8,
|
| 635 |
+
"group_size": 64,
|
| 636 |
+
"mode": "affine"
|
| 637 |
+
},
|
| 638 |
+
"model.layers.17.self_attn.v_proj": {
|
| 639 |
+
"bits": 8,
|
| 640 |
+
"group_size": 64,
|
| 641 |
+
"mode": "affine"
|
| 642 |
+
},
|
| 643 |
+
"model.layers.18.mlp.shared_expert.down_proj": {
|
| 644 |
+
"bits": 8,
|
| 645 |
+
"group_size": 128,
|
| 646 |
+
"mode": "affine"
|
| 647 |
+
},
|
| 648 |
+
"model.layers.18.mlp.shared_expert.gate_proj": {
|
| 649 |
+
"bits": 8,
|
| 650 |
+
"group_size": 128,
|
| 651 |
+
"mode": "affine"
|
| 652 |
+
},
|
| 653 |
+
"model.layers.18.mlp.shared_expert.up_proj": {
|
| 654 |
+
"bits": 8,
|
| 655 |
+
"group_size": 128,
|
| 656 |
+
"mode": "affine"
|
| 657 |
+
},
|
| 658 |
+
"model.layers.18.self_attn.g_proj": {
|
| 659 |
+
"bits": 8,
|
| 660 |
+
"group_size": 64,
|
| 661 |
+
"mode": "affine"
|
| 662 |
+
},
|
| 663 |
+
"model.layers.18.self_attn.k_proj": {
|
| 664 |
+
"bits": 8,
|
| 665 |
+
"group_size": 64,
|
| 666 |
+
"mode": "affine"
|
| 667 |
+
},
|
| 668 |
+
"model.layers.18.self_attn.o_proj": {
|
| 669 |
+
"bits": 8,
|
| 670 |
+
"group_size": 64,
|
| 671 |
+
"mode": "affine"
|
| 672 |
+
},
|
| 673 |
+
"model.layers.18.self_attn.q_proj": {
|
| 674 |
+
"bits": 8,
|
| 675 |
+
"group_size": 64,
|
| 676 |
+
"mode": "affine"
|
| 677 |
+
},
|
| 678 |
+
"model.layers.18.self_attn.v_proj": {
|
| 679 |
+
"bits": 8,
|
| 680 |
+
"group_size": 64,
|
| 681 |
+
"mode": "affine"
|
| 682 |
+
},
|
| 683 |
+
"model.layers.19.mlp.shared_expert.down_proj": {
|
| 684 |
+
"bits": 8,
|
| 685 |
+
"group_size": 128,
|
| 686 |
+
"mode": "affine"
|
| 687 |
+
},
|
| 688 |
+
"model.layers.19.mlp.shared_expert.gate_proj": {
|
| 689 |
+
"bits": 8,
|
| 690 |
+
"group_size": 128,
|
| 691 |
+
"mode": "affine"
|
| 692 |
+
},
|
| 693 |
+
"model.layers.19.mlp.shared_expert.up_proj": {
|
| 694 |
+
"bits": 8,
|
| 695 |
+
"group_size": 128,
|
| 696 |
+
"mode": "affine"
|
| 697 |
+
},
|
| 698 |
+
"model.layers.19.self_attn.g_proj": {
|
| 699 |
+
"bits": 6,
|
| 700 |
+
"group_size": 64,
|
| 701 |
+
"mode": "affine"
|
| 702 |
+
},
|
| 703 |
+
"model.layers.19.self_attn.k_proj": {
|
| 704 |
+
"bits": 6,
|
| 705 |
+
"group_size": 64,
|
| 706 |
+
"mode": "affine"
|
| 707 |
+
},
|
| 708 |
+
"model.layers.19.self_attn.o_proj": {
|
| 709 |
+
"bits": 6,
|
| 710 |
+
"group_size": 64,
|
| 711 |
+
"mode": "affine"
|
| 712 |
+
},
|
| 713 |
+
"model.layers.19.self_attn.q_proj": {
|
| 714 |
+
"bits": 6,
|
| 715 |
+
"group_size": 64,
|
| 716 |
+
"mode": "affine"
|
| 717 |
+
},
|
| 718 |
+
"model.layers.19.self_attn.v_proj": {
|
| 719 |
+
"bits": 8,
|
| 720 |
+
"group_size": 64,
|
| 721 |
+
"mode": "affine"
|
| 722 |
+
},
|
| 723 |
+
"model.layers.2.mlp.shared_expert.down_proj": {
|
| 724 |
+
"bits": 8,
|
| 725 |
+
"group_size": 128,
|
| 726 |
+
"mode": "affine"
|
| 727 |
+
},
|
| 728 |
+
"model.layers.2.mlp.shared_expert.gate_proj": {
|
| 729 |
+
"bits": 8,
|
| 730 |
+
"group_size": 128,
|
| 731 |
+
"mode": "affine"
|
| 732 |
+
},
|
| 733 |
+
"model.layers.2.mlp.shared_expert.up_proj": {
|
| 734 |
+
"bits": 8,
|
| 735 |
+
"group_size": 128,
|
| 736 |
+
"mode": "affine"
|
| 737 |
+
},
|
| 738 |
+
"model.layers.2.self_attn.g_proj": {
|
| 739 |
+
"bits": 6,
|
| 740 |
+
"group_size": 64,
|
| 741 |
+
"mode": "affine"
|
| 742 |
+
},
|
| 743 |
+
"model.layers.2.self_attn.k_proj": {
|
| 744 |
+
"bits": 6,
|
| 745 |
+
"group_size": 64,
|
| 746 |
+
"mode": "affine"
|
| 747 |
+
},
|
| 748 |
+
"model.layers.2.self_attn.o_proj": {
|
| 749 |
+
"bits": 6,
|
| 750 |
+
"group_size": 64,
|
| 751 |
+
"mode": "affine"
|
| 752 |
+
},
|
| 753 |
+
"model.layers.2.self_attn.q_proj": {
|
| 754 |
+
"bits": 6,
|
| 755 |
+
"group_size": 64,
|
| 756 |
+
"mode": "affine"
|
| 757 |
+
},
|
| 758 |
+
"model.layers.2.self_attn.v_proj": {
|
| 759 |
+
"bits": 6,
|
| 760 |
+
"group_size": 64,
|
| 761 |
+
"mode": "affine"
|
| 762 |
+
},
|
| 763 |
+
"model.layers.20.mlp.shared_expert.down_proj": {
|
| 764 |
+
"bits": 8,
|
| 765 |
+
"group_size": 128,
|
| 766 |
+
"mode": "affine"
|
| 767 |
+
},
|
| 768 |
+
"model.layers.20.mlp.shared_expert.gate_proj": {
|
| 769 |
+
"bits": 8,
|
| 770 |
+
"group_size": 128,
|
| 771 |
+
"mode": "affine"
|
| 772 |
+
},
|
| 773 |
+
"model.layers.20.mlp.shared_expert.up_proj": {
|
| 774 |
+
"bits": 8,
|
| 775 |
+
"group_size": 128,
|
| 776 |
+
"mode": "affine"
|
| 777 |
+
},
|
| 778 |
+
"model.layers.20.self_attn.g_proj": {
|
| 779 |
+
"bits": 8,
|
| 780 |
+
"group_size": 64,
|
| 781 |
+
"mode": "affine"
|
| 782 |
+
},
|
| 783 |
+
"model.layers.20.self_attn.k_proj": {
|
| 784 |
+
"bits": 8,
|
| 785 |
+
"group_size": 64,
|
| 786 |
+
"mode": "affine"
|
| 787 |
+
},
|
| 788 |
+
"model.layers.20.self_attn.o_proj": {
|
| 789 |
+
"bits": 8,
|
| 790 |
+
"group_size": 64,
|
| 791 |
+
"mode": "affine"
|
| 792 |
+
},
|
| 793 |
+
"model.layers.20.self_attn.q_proj": {
|
| 794 |
+
"bits": 8,
|
| 795 |
+
"group_size": 64,
|
| 796 |
+
"mode": "affine"
|
| 797 |
+
},
|
| 798 |
+
"model.layers.20.self_attn.v_proj": {
|
| 799 |
+
"bits": 8,
|
| 800 |
+
"group_size": 64,
|
| 801 |
+
"mode": "affine"
|
| 802 |
+
},
|
| 803 |
+
"model.layers.21.mlp.shared_expert.down_proj": {
|
| 804 |
+
"bits": 8,
|
| 805 |
+
"group_size": 128,
|
| 806 |
+
"mode": "affine"
|
| 807 |
+
},
|
| 808 |
+
"model.layers.21.mlp.shared_expert.gate_proj": {
|
| 809 |
+
"bits": 8,
|
| 810 |
+
"group_size": 128,
|
| 811 |
+
"mode": "affine"
|
| 812 |
+
},
|
| 813 |
+
"model.layers.21.mlp.shared_expert.up_proj": {
|
| 814 |
+
"bits": 8,
|
| 815 |
+
"group_size": 128,
|
| 816 |
+
"mode": "affine"
|
| 817 |
+
},
|
| 818 |
+
"model.layers.21.self_attn.g_proj": {
|
| 819 |
+
"bits": 6,
|
| 820 |
+
"group_size": 64,
|
| 821 |
+
"mode": "affine"
|
| 822 |
+
},
|
| 823 |
+
"model.layers.21.self_attn.k_proj": {
|
| 824 |
+
"bits": 6,
|
| 825 |
+
"group_size": 64,
|
| 826 |
+
"mode": "affine"
|
| 827 |
+
},
|
| 828 |
+
"model.layers.21.self_attn.o_proj": {
|
| 829 |
+
"bits": 6,
|
| 830 |
+
"group_size": 64,
|
| 831 |
+
"mode": "affine"
|
| 832 |
+
},
|
| 833 |
+
"model.layers.21.self_attn.q_proj": {
|
| 834 |
+
"bits": 6,
|
| 835 |
+
"group_size": 64,
|
| 836 |
+
"mode": "affine"
|
| 837 |
+
},
|
| 838 |
+
"model.layers.21.self_attn.v_proj": {
|
| 839 |
+
"bits": 6,
|
| 840 |
+
"group_size": 64,
|
| 841 |
+
"mode": "affine"
|
| 842 |
+
},
|
| 843 |
+
"model.layers.22.mlp.shared_expert.down_proj": {
|
| 844 |
+
"bits": 8,
|
| 845 |
+
"group_size": 128,
|
| 846 |
+
"mode": "affine"
|
| 847 |
+
},
|
| 848 |
+
"model.layers.22.mlp.shared_expert.gate_proj": {
|
| 849 |
+
"bits": 8,
|
| 850 |
+
"group_size": 128,
|
| 851 |
+
"mode": "affine"
|
| 852 |
+
},
|
| 853 |
+
"model.layers.22.mlp.shared_expert.up_proj": {
|
| 854 |
+
"bits": 8,
|
| 855 |
+
"group_size": 128,
|
| 856 |
+
"mode": "affine"
|
| 857 |
+
},
|
| 858 |
+
"model.layers.22.self_attn.g_proj": {
|
| 859 |
+
"bits": 6,
|
| 860 |
+
"group_size": 64,
|
| 861 |
+
"mode": "affine"
|
| 862 |
+
},
|
| 863 |
+
"model.layers.22.self_attn.k_proj": {
|
| 864 |
+
"bits": 6,
|
| 865 |
+
"group_size": 64,
|
| 866 |
+
"mode": "affine"
|
| 867 |
+
},
|
| 868 |
+
"model.layers.22.self_attn.o_proj": {
|
| 869 |
+
"bits": 6,
|
| 870 |
+
"group_size": 64,
|
| 871 |
+
"mode": "affine"
|
| 872 |
+
},
|
| 873 |
+
"model.layers.22.self_attn.q_proj": {
|
| 874 |
+
"bits": 6,
|
| 875 |
+
"group_size": 64,
|
| 876 |
+
"mode": "affine"
|
| 877 |
+
},
|
| 878 |
+
"model.layers.22.self_attn.v_proj": {
|
| 879 |
+
"bits": 6,
|
| 880 |
+
"group_size": 64,
|
| 881 |
+
"mode": "affine"
|
| 882 |
+
},
|
| 883 |
+
"model.layers.23.mlp.shared_expert.down_proj": {
|
| 884 |
+
"bits": 8,
|
| 885 |
+
"group_size": 128,
|
| 886 |
+
"mode": "affine"
|
| 887 |
+
},
|
| 888 |
+
"model.layers.23.mlp.shared_expert.gate_proj": {
|
| 889 |
+
"bits": 8,
|
| 890 |
+
"group_size": 128,
|
| 891 |
+
"mode": "affine"
|
| 892 |
+
},
|
| 893 |
+
"model.layers.23.mlp.shared_expert.up_proj": {
|
| 894 |
+
"bits": 8,
|
| 895 |
+
"group_size": 128,
|
| 896 |
+
"mode": "affine"
|
| 897 |
+
},
|
| 898 |
+
"model.layers.23.self_attn.g_proj": {
|
| 899 |
+
"bits": 6,
|
| 900 |
+
"group_size": 64,
|
| 901 |
+
"mode": "affine"
|
| 902 |
+
},
|
| 903 |
+
"model.layers.23.self_attn.k_proj": {
|
| 904 |
+
"bits": 6,
|
| 905 |
+
"group_size": 64,
|
| 906 |
+
"mode": "affine"
|
| 907 |
+
},
|
| 908 |
+
"model.layers.23.self_attn.o_proj": {
|
| 909 |
+
"bits": 6,
|
| 910 |
+
"group_size": 64,
|
| 911 |
+
"mode": "affine"
|
| 912 |
+
},
|
| 913 |
+
"model.layers.23.self_attn.q_proj": {
|
| 914 |
+
"bits": 6,
|
| 915 |
+
"group_size": 64,
|
| 916 |
+
"mode": "affine"
|
| 917 |
+
},
|
| 918 |
+
"model.layers.23.self_attn.v_proj": {
|
| 919 |
+
"bits": 6,
|
| 920 |
+
"group_size": 64,
|
| 921 |
+
"mode": "affine"
|
| 922 |
+
},
|
| 923 |
+
"model.layers.24.mlp.shared_expert.down_proj": {
|
| 924 |
+
"bits": 8,
|
| 925 |
+
"group_size": 128,
|
| 926 |
+
"mode": "affine"
|
| 927 |
+
},
|
| 928 |
+
"model.layers.24.mlp.shared_expert.gate_proj": {
|
| 929 |
+
"bits": 8,
|
| 930 |
+
"group_size": 128,
|
| 931 |
+
"mode": "affine"
|
| 932 |
+
},
|
| 933 |
+
"model.layers.24.mlp.shared_expert.up_proj": {
|
| 934 |
+
"bits": 8,
|
| 935 |
+
"group_size": 128,
|
| 936 |
+
"mode": "affine"
|
| 937 |
+
},
|
| 938 |
+
"model.layers.24.self_attn.g_proj": {
|
| 939 |
+
"bits": 8,
|
| 940 |
+
"group_size": 64,
|
| 941 |
+
"mode": "affine"
|
| 942 |
+
},
|
| 943 |
+
"model.layers.24.self_attn.k_proj": {
|
| 944 |
+
"bits": 8,
|
| 945 |
+
"group_size": 64,
|
| 946 |
+
"mode": "affine"
|
| 947 |
+
},
|
| 948 |
+
"model.layers.24.self_attn.o_proj": {
|
| 949 |
+
"bits": 8,
|
| 950 |
+
"group_size": 64,
|
| 951 |
+
"mode": "affine"
|
| 952 |
+
},
|
| 953 |
+
"model.layers.24.self_attn.q_proj": {
|
| 954 |
+
"bits": 8,
|
| 955 |
+
"group_size": 64,
|
| 956 |
+
"mode": "affine"
|
| 957 |
+
},
|
| 958 |
+
"model.layers.24.self_attn.v_proj": {
|
| 959 |
+
"bits": 8,
|
| 960 |
+
"group_size": 64,
|
| 961 |
+
"mode": "affine"
|
| 962 |
+
},
|
| 963 |
+
"model.layers.25.mlp.shared_expert.down_proj": {
|
| 964 |
+
"bits": 8,
|
| 965 |
+
"group_size": 128,
|
| 966 |
+
"mode": "affine"
|
| 967 |
+
},
|
| 968 |
+
"model.layers.25.mlp.shared_expert.gate_proj": {
|
| 969 |
+
"bits": 8,
|
| 970 |
+
"group_size": 128,
|
| 971 |
+
"mode": "affine"
|
| 972 |
+
},
|
| 973 |
+
"model.layers.25.mlp.shared_expert.up_proj": {
|
| 974 |
+
"bits": 8,
|
| 975 |
+
"group_size": 128,
|
| 976 |
+
"mode": "affine"
|
| 977 |
+
},
|
| 978 |
+
"model.layers.25.self_attn.g_proj": {
|
| 979 |
+
"bits": 6,
|
| 980 |
+
"group_size": 64,
|
| 981 |
+
"mode": "affine"
|
| 982 |
+
},
|
| 983 |
+
"model.layers.25.self_attn.k_proj": {
|
| 984 |
+
"bits": 6,
|
| 985 |
+
"group_size": 64,
|
| 986 |
+
"mode": "affine"
|
| 987 |
+
},
|
| 988 |
+
"model.layers.25.self_attn.o_proj": {
|
| 989 |
+
"bits": 6,
|
| 990 |
+
"group_size": 64,
|
| 991 |
+
"mode": "affine"
|
| 992 |
+
},
|
| 993 |
+
"model.layers.25.self_attn.q_proj": {
|
| 994 |
+
"bits": 6,
|
| 995 |
+
"group_size": 64,
|
| 996 |
+
"mode": "affine"
|
| 997 |
+
},
|
| 998 |
+
"model.layers.25.self_attn.v_proj": {
|
| 999 |
+
"bits": 6,
|
| 1000 |
+
"group_size": 64,
|
| 1001 |
+
"mode": "affine"
|
| 1002 |
+
},
|
| 1003 |
+
"model.layers.26.mlp.shared_expert.down_proj": {
|
| 1004 |
+
"bits": 8,
|
| 1005 |
+
"group_size": 128,
|
| 1006 |
+
"mode": "affine"
|
| 1007 |
+
},
|
| 1008 |
+
"model.layers.26.mlp.shared_expert.gate_proj": {
|
| 1009 |
+
"bits": 8,
|
| 1010 |
+
"group_size": 128,
|
| 1011 |
+
"mode": "affine"
|
| 1012 |
+
},
|
| 1013 |
+
"model.layers.26.mlp.shared_expert.up_proj": {
|
| 1014 |
+
"bits": 8,
|
| 1015 |
+
"group_size": 128,
|
| 1016 |
+
"mode": "affine"
|
| 1017 |
+
},
|
| 1018 |
+
"model.layers.26.self_attn.g_proj": {
|
| 1019 |
+
"bits": 6,
|
| 1020 |
+
"group_size": 64,
|
| 1021 |
+
"mode": "affine"
|
| 1022 |
+
},
|
| 1023 |
+
"model.layers.26.self_attn.k_proj": {
|
| 1024 |
+
"bits": 6,
|
| 1025 |
+
"group_size": 64,
|
| 1026 |
+
"mode": "affine"
|
| 1027 |
+
},
|
| 1028 |
+
"model.layers.26.self_attn.o_proj": {
|
| 1029 |
+
"bits": 6,
|
| 1030 |
+
"group_size": 64,
|
| 1031 |
+
"mode": "affine"
|
| 1032 |
+
},
|
| 1033 |
+
"model.layers.26.self_attn.q_proj": {
|
| 1034 |
+
"bits": 6,
|
| 1035 |
+
"group_size": 64,
|
| 1036 |
+
"mode": "affine"
|
| 1037 |
+
},
|
| 1038 |
+
"model.layers.26.self_attn.v_proj": {
|
| 1039 |
+
"bits": 6,
|
| 1040 |
+
"group_size": 64,
|
| 1041 |
+
"mode": "affine"
|
| 1042 |
+
},
|
| 1043 |
+
"model.layers.27.mlp.shared_expert.down_proj": {
|
| 1044 |
+
"bits": 8,
|
| 1045 |
+
"group_size": 128,
|
| 1046 |
+
"mode": "affine"
|
| 1047 |
+
},
|
| 1048 |
+
"model.layers.27.mlp.shared_expert.gate_proj": {
|
| 1049 |
+
"bits": 8,
|
| 1050 |
+
"group_size": 128,
|
| 1051 |
+
"mode": "affine"
|
| 1052 |
+
},
|
| 1053 |
+
"model.layers.27.mlp.shared_expert.up_proj": {
|
| 1054 |
+
"bits": 8,
|
| 1055 |
+
"group_size": 128,
|
| 1056 |
+
"mode": "affine"
|
| 1057 |
+
},
|
| 1058 |
+
"model.layers.27.self_attn.g_proj": {
|
| 1059 |
+
"bits": 6,
|
| 1060 |
+
"group_size": 64,
|
| 1061 |
+
"mode": "affine"
|
| 1062 |
+
},
|
| 1063 |
+
"model.layers.27.self_attn.k_proj": {
|
| 1064 |
+
"bits": 6,
|
| 1065 |
+
"group_size": 64,
|
| 1066 |
+
"mode": "affine"
|
| 1067 |
+
},
|
| 1068 |
+
"model.layers.27.self_attn.o_proj": {
|
| 1069 |
+
"bits": 6,
|
| 1070 |
+
"group_size": 64,
|
| 1071 |
+
"mode": "affine"
|
| 1072 |
+
},
|
| 1073 |
+
"model.layers.27.self_attn.q_proj": {
|
| 1074 |
+
"bits": 6,
|
| 1075 |
+
"group_size": 64,
|
| 1076 |
+
"mode": "affine"
|
| 1077 |
+
},
|
| 1078 |
+
"model.layers.27.self_attn.v_proj": {
|
| 1079 |
+
"bits": 6,
|
| 1080 |
+
"group_size": 64,
|
| 1081 |
+
"mode": "affine"
|
| 1082 |
+
},
|
| 1083 |
+
"model.layers.28.mlp.shared_expert.down_proj": {
|
| 1084 |
+
"bits": 8,
|
| 1085 |
+
"group_size": 128,
|
| 1086 |
+
"mode": "affine"
|
| 1087 |
+
},
|
| 1088 |
+
"model.layers.28.mlp.shared_expert.gate_proj": {
|
| 1089 |
+
"bits": 8,
|
| 1090 |
+
"group_size": 128,
|
| 1091 |
+
"mode": "affine"
|
| 1092 |
+
},
|
| 1093 |
+
"model.layers.28.mlp.shared_expert.up_proj": {
|
| 1094 |
+
"bits": 8,
|
| 1095 |
+
"group_size": 128,
|
| 1096 |
+
"mode": "affine"
|
| 1097 |
+
},
|
| 1098 |
+
"model.layers.28.self_attn.g_proj": {
|
| 1099 |
+
"bits": 8,
|
| 1100 |
+
"group_size": 64,
|
| 1101 |
+
"mode": "affine"
|
| 1102 |
+
},
|
| 1103 |
+
"model.layers.28.self_attn.k_proj": {
|
| 1104 |
+
"bits": 8,
|
| 1105 |
+
"group_size": 64,
|
| 1106 |
+
"mode": "affine"
|
| 1107 |
+
},
|
| 1108 |
+
"model.layers.28.self_attn.o_proj": {
|
| 1109 |
+
"bits": 8,
|
| 1110 |
+
"group_size": 64,
|
| 1111 |
+
"mode": "affine"
|
| 1112 |
+
},
|
| 1113 |
+
"model.layers.28.self_attn.q_proj": {
|
| 1114 |
+
"bits": 8,
|
| 1115 |
+
"group_size": 64,
|
| 1116 |
+
"mode": "affine"
|
| 1117 |
+
},
|
| 1118 |
+
"model.layers.28.self_attn.v_proj": {
|
| 1119 |
+
"bits": 8,
|
| 1120 |
+
"group_size": 64,
|
| 1121 |
+
"mode": "affine"
|
| 1122 |
+
},
|
| 1123 |
+
"model.layers.29.mlp.shared_expert.down_proj": {
|
| 1124 |
+
"bits": 8,
|
| 1125 |
+
"group_size": 128,
|
| 1126 |
+
"mode": "affine"
|
| 1127 |
+
},
|
| 1128 |
+
"model.layers.29.mlp.shared_expert.gate_proj": {
|
| 1129 |
+
"bits": 8,
|
| 1130 |
+
"group_size": 128,
|
| 1131 |
+
"mode": "affine"
|
| 1132 |
+
},
|
| 1133 |
+
"model.layers.29.mlp.shared_expert.up_proj": {
|
| 1134 |
+
"bits": 8,
|
| 1135 |
+
"group_size": 128,
|
| 1136 |
+
"mode": "affine"
|
| 1137 |
+
},
|
| 1138 |
+
"model.layers.29.self_attn.g_proj": {
|
| 1139 |
+
"bits": 6,
|
| 1140 |
+
"group_size": 64,
|
| 1141 |
+
"mode": "affine"
|
| 1142 |
+
},
|
| 1143 |
+
"model.layers.29.self_attn.k_proj": {
|
| 1144 |
+
"bits": 6,
|
| 1145 |
+
"group_size": 64,
|
| 1146 |
+
"mode": "affine"
|
| 1147 |
+
},
|
| 1148 |
+
"model.layers.29.self_attn.o_proj": {
|
| 1149 |
+
"bits": 6,
|
| 1150 |
+
"group_size": 64,
|
| 1151 |
+
"mode": "affine"
|
| 1152 |
+
},
|
| 1153 |
+
"model.layers.29.self_attn.q_proj": {
|
| 1154 |
+
"bits": 6,
|
| 1155 |
+
"group_size": 64,
|
| 1156 |
+
"mode": "affine"
|
| 1157 |
+
},
|
| 1158 |
+
"model.layers.29.self_attn.v_proj": {
|
| 1159 |
+
"bits": 6,
|
| 1160 |
+
"group_size": 64,
|
| 1161 |
+
"mode": "affine"
|
| 1162 |
+
},
|
| 1163 |
+
"model.layers.3.mlp.shared_expert.down_proj": {
|
| 1164 |
+
"bits": 8,
|
| 1165 |
+
"group_size": 128,
|
| 1166 |
+
"mode": "affine"
|
| 1167 |
+
},
|
| 1168 |
+
"model.layers.3.mlp.shared_expert.gate_proj": {
|
| 1169 |
+
"bits": 8,
|
| 1170 |
+
"group_size": 128,
|
| 1171 |
+
"mode": "affine"
|
| 1172 |
+
},
|
| 1173 |
+
"model.layers.3.mlp.shared_expert.up_proj": {
|
| 1174 |
+
"bits": 8,
|
| 1175 |
+
"group_size": 128,
|
| 1176 |
+
"mode": "affine"
|
| 1177 |
+
},
|
| 1178 |
+
"model.layers.3.self_attn.g_proj": {
|
| 1179 |
+
"bits": 5,
|
| 1180 |
+
"group_size": 64,
|
| 1181 |
+
"mode": "affine"
|
| 1182 |
+
},
|
| 1183 |
+
"model.layers.3.self_attn.k_proj": {
|
| 1184 |
+
"bits": 5,
|
| 1185 |
+
"group_size": 64,
|
| 1186 |
+
"mode": "affine"
|
| 1187 |
+
},
|
| 1188 |
+
"model.layers.3.self_attn.o_proj": {
|
| 1189 |
+
"bits": 5,
|
| 1190 |
+
"group_size": 64,
|
| 1191 |
+
"mode": "affine"
|
| 1192 |
+
},
|
| 1193 |
+
"model.layers.3.self_attn.q_proj": {
|
| 1194 |
+
"bits": 5,
|
| 1195 |
+
"group_size": 64,
|
| 1196 |
+
"mode": "affine"
|
| 1197 |
+
},
|
| 1198 |
+
"model.layers.3.self_attn.v_proj": {
|
| 1199 |
+
"bits": 5,
|
| 1200 |
+
"group_size": 64,
|
| 1201 |
+
"mode": "affine"
|
| 1202 |
+
},
|
| 1203 |
+
"model.layers.30.mlp.shared_expert.down_proj": {
|
| 1204 |
+
"bits": 8,
|
| 1205 |
+
"group_size": 128,
|
| 1206 |
+
"mode": "affine"
|
| 1207 |
+
},
|
| 1208 |
+
"model.layers.30.mlp.shared_expert.gate_proj": {
|
| 1209 |
+
"bits": 8,
|
| 1210 |
+
"group_size": 128,
|
| 1211 |
+
"mode": "affine"
|
| 1212 |
+
},
|
| 1213 |
+
"model.layers.30.mlp.shared_expert.up_proj": {
|
| 1214 |
+
"bits": 8,
|
| 1215 |
+
"group_size": 128,
|
| 1216 |
+
"mode": "affine"
|
| 1217 |
+
},
|
| 1218 |
+
"model.layers.30.self_attn.g_proj": {
|
| 1219 |
+
"bits": 5,
|
| 1220 |
+
"group_size": 64,
|
| 1221 |
+
"mode": "affine"
|
| 1222 |
+
},
|
| 1223 |
+
"model.layers.30.self_attn.k_proj": {
|
| 1224 |
+
"bits": 5,
|
| 1225 |
+
"group_size": 64,
|
| 1226 |
+
"mode": "affine"
|
| 1227 |
+
},
|
| 1228 |
+
"model.layers.30.self_attn.o_proj": {
|
| 1229 |
+
"bits": 5,
|
| 1230 |
+
"group_size": 64,
|
| 1231 |
+
"mode": "affine"
|
| 1232 |
+
},
|
| 1233 |
+
"model.layers.30.self_attn.q_proj": {
|
| 1234 |
+
"bits": 5,
|
| 1235 |
+
"group_size": 64,
|
| 1236 |
+
"mode": "affine"
|
| 1237 |
+
},
|
| 1238 |
+
"model.layers.30.self_attn.v_proj": {
|
| 1239 |
+
"bits": 5,
|
| 1240 |
+
"group_size": 64,
|
| 1241 |
+
"mode": "affine"
|
| 1242 |
+
},
|
| 1243 |
+
"model.layers.31.mlp.shared_expert.down_proj": {
|
| 1244 |
+
"bits": 8,
|
| 1245 |
+
"group_size": 128,
|
| 1246 |
+
"mode": "affine"
|
| 1247 |
+
},
|
| 1248 |
+
"model.layers.31.mlp.shared_expert.gate_proj": {
|
| 1249 |
+
"bits": 8,
|
| 1250 |
+
"group_size": 128,
|
| 1251 |
+
"mode": "affine"
|
| 1252 |
+
},
|
| 1253 |
+
"model.layers.31.mlp.shared_expert.up_proj": {
|
| 1254 |
+
"bits": 8,
|
| 1255 |
+
"group_size": 128,
|
| 1256 |
+
"mode": "affine"
|
| 1257 |
+
},
|
| 1258 |
+
"model.layers.31.self_attn.g_proj": {
|
| 1259 |
+
"bits": 5,
|
| 1260 |
+
"group_size": 64,
|
| 1261 |
+
"mode": "affine"
|
| 1262 |
+
},
|
| 1263 |
+
"model.layers.31.self_attn.k_proj": {
|
| 1264 |
+
"bits": 5,
|
| 1265 |
+
"group_size": 64,
|
| 1266 |
+
"mode": "affine"
|
| 1267 |
+
},
|
| 1268 |
+
"model.layers.31.self_attn.o_proj": {
|
| 1269 |
+
"bits": 5,
|
| 1270 |
+
"group_size": 64,
|
| 1271 |
+
"mode": "affine"
|
| 1272 |
+
},
|
| 1273 |
+
"model.layers.31.self_attn.q_proj": {
|
| 1274 |
+
"bits": 5,
|
| 1275 |
+
"group_size": 64,
|
| 1276 |
+
"mode": "affine"
|
| 1277 |
+
},
|
| 1278 |
+
"model.layers.31.self_attn.v_proj": {
|
| 1279 |
+
"bits": 5,
|
| 1280 |
+
"group_size": 64,
|
| 1281 |
+
"mode": "affine"
|
| 1282 |
+
},
|
| 1283 |
+
"model.layers.32.mlp.shared_expert.down_proj": {
|
| 1284 |
+
"bits": 8,
|
| 1285 |
+
"group_size": 128,
|
| 1286 |
+
"mode": "affine"
|
| 1287 |
+
},
|
| 1288 |
+
"model.layers.32.mlp.shared_expert.gate_proj": {
|
| 1289 |
+
"bits": 8,
|
| 1290 |
+
"group_size": 128,
|
| 1291 |
+
"mode": "affine"
|
| 1292 |
+
},
|
| 1293 |
+
"model.layers.32.mlp.shared_expert.up_proj": {
|
| 1294 |
+
"bits": 8,
|
| 1295 |
+
"group_size": 128,
|
| 1296 |
+
"mode": "affine"
|
| 1297 |
+
},
|
| 1298 |
+
"model.layers.32.self_attn.g_proj": {
|
| 1299 |
+
"bits": 6,
|
| 1300 |
+
"group_size": 64,
|
| 1301 |
+
"mode": "affine"
|
| 1302 |
+
},
|
| 1303 |
+
"model.layers.32.self_attn.k_proj": {
|
| 1304 |
+
"bits": 6,
|
| 1305 |
+
"group_size": 64,
|
| 1306 |
+
"mode": "affine"
|
| 1307 |
+
},
|
| 1308 |
+
"model.layers.32.self_attn.o_proj": {
|
| 1309 |
+
"bits": 6,
|
| 1310 |
+
"group_size": 64,
|
| 1311 |
+
"mode": "affine"
|
| 1312 |
+
},
|
| 1313 |
+
"model.layers.32.self_attn.q_proj": {
|
| 1314 |
+
"bits": 6,
|
| 1315 |
+
"group_size": 64,
|
| 1316 |
+
"mode": "affine"
|
| 1317 |
+
},
|
| 1318 |
+
"model.layers.32.self_attn.v_proj": {
|
| 1319 |
+
"bits": 6,
|
| 1320 |
+
"group_size": 64,
|
| 1321 |
+
"mode": "affine"
|
| 1322 |
+
},
|
| 1323 |
+
"model.layers.33.mlp.shared_expert.down_proj": {
|
| 1324 |
+
"bits": 8,
|
| 1325 |
+
"group_size": 128,
|
| 1326 |
+
"mode": "affine"
|
| 1327 |
+
},
|
| 1328 |
+
"model.layers.33.mlp.shared_expert.gate_proj": {
|
| 1329 |
+
"bits": 8,
|
| 1330 |
+
"group_size": 128,
|
| 1331 |
+
"mode": "affine"
|
| 1332 |
+
},
|
| 1333 |
+
"model.layers.33.mlp.shared_expert.up_proj": {
|
| 1334 |
+
"bits": 8,
|
| 1335 |
+
"group_size": 128,
|
| 1336 |
+
"mode": "affine"
|
| 1337 |
+
},
|
| 1338 |
+
"model.layers.33.self_attn.g_proj": {
|
| 1339 |
+
"bits": 5,
|
| 1340 |
+
"group_size": 64,
|
| 1341 |
+
"mode": "affine"
|
| 1342 |
+
},
|
| 1343 |
+
"model.layers.33.self_attn.k_proj": {
|
| 1344 |
+
"bits": 5,
|
| 1345 |
+
"group_size": 64,
|
| 1346 |
+
"mode": "affine"
|
| 1347 |
+
},
|
| 1348 |
+
"model.layers.33.self_attn.o_proj": {
|
| 1349 |
+
"bits": 5,
|
| 1350 |
+
"group_size": 64,
|
| 1351 |
+
"mode": "affine"
|
| 1352 |
+
},
|
| 1353 |
+
"model.layers.33.self_attn.q_proj": {
|
| 1354 |
+
"bits": 5,
|
| 1355 |
+
"group_size": 64,
|
| 1356 |
+
"mode": "affine"
|
| 1357 |
+
},
|
| 1358 |
+
"model.layers.33.self_attn.v_proj": {
|
| 1359 |
+
"bits": 5,
|
| 1360 |
+
"group_size": 64,
|
| 1361 |
+
"mode": "affine"
|
| 1362 |
+
},
|
| 1363 |
+
"model.layers.34.mlp.shared_expert.down_proj": {
|
| 1364 |
+
"bits": 8,
|
| 1365 |
+
"group_size": 128,
|
| 1366 |
+
"mode": "affine"
|
| 1367 |
+
},
|
| 1368 |
+
"model.layers.34.mlp.shared_expert.gate_proj": {
|
| 1369 |
+
"bits": 8,
|
| 1370 |
+
"group_size": 128,
|
| 1371 |
+
"mode": "affine"
|
| 1372 |
+
},
|
| 1373 |
+
"model.layers.34.mlp.shared_expert.up_proj": {
|
| 1374 |
+
"bits": 8,
|
| 1375 |
+
"group_size": 128,
|
| 1376 |
+
"mode": "affine"
|
| 1377 |
+
},
|
| 1378 |
+
"model.layers.34.self_attn.g_proj": {
|
| 1379 |
+
"bits": 5,
|
| 1380 |
+
"group_size": 64,
|
| 1381 |
+
"mode": "affine"
|
| 1382 |
+
},
|
| 1383 |
+
"model.layers.34.self_attn.k_proj": {
|
| 1384 |
+
"bits": 5,
|
| 1385 |
+
"group_size": 64,
|
| 1386 |
+
"mode": "affine"
|
| 1387 |
+
},
|
| 1388 |
+
"model.layers.34.self_attn.o_proj": {
|
| 1389 |
+
"bits": 5,
|
| 1390 |
+
"group_size": 64,
|
| 1391 |
+
"mode": "affine"
|
| 1392 |
+
},
|
| 1393 |
+
"model.layers.34.self_attn.q_proj": {
|
| 1394 |
+
"bits": 5,
|
| 1395 |
+
"group_size": 64,
|
| 1396 |
+
"mode": "affine"
|
| 1397 |
+
},
|
| 1398 |
+
"model.layers.34.self_attn.v_proj": {
|
| 1399 |
+
"bits": 5,
|
| 1400 |
+
"group_size": 64,
|
| 1401 |
+
"mode": "affine"
|
| 1402 |
+
},
|
| 1403 |
+
"model.layers.35.mlp.shared_expert.down_proj": {
|
| 1404 |
+
"bits": 8,
|
| 1405 |
+
"group_size": 128,
|
| 1406 |
+
"mode": "affine"
|
| 1407 |
+
},
|
| 1408 |
+
"model.layers.35.mlp.shared_expert.gate_proj": {
|
| 1409 |
+
"bits": 8,
|
| 1410 |
+
"group_size": 128,
|
| 1411 |
+
"mode": "affine"
|
| 1412 |
+
},
|
| 1413 |
+
"model.layers.35.mlp.shared_expert.up_proj": {
|
| 1414 |
+
"bits": 8,
|
| 1415 |
+
"group_size": 128,
|
| 1416 |
+
"mode": "affine"
|
| 1417 |
+
},
|
| 1418 |
+
"model.layers.35.self_attn.g_proj": {
|
| 1419 |
+
"bits": 5,
|
| 1420 |
+
"group_size": 64,
|
| 1421 |
+
"mode": "affine"
|
| 1422 |
+
},
|
| 1423 |
+
"model.layers.35.self_attn.k_proj": {
|
| 1424 |
+
"bits": 5,
|
| 1425 |
+
"group_size": 64,
|
| 1426 |
+
"mode": "affine"
|
| 1427 |
+
},
|
| 1428 |
+
"model.layers.35.self_attn.o_proj": {
|
| 1429 |
+
"bits": 5,
|
| 1430 |
+
"group_size": 64,
|
| 1431 |
+
"mode": "affine"
|
| 1432 |
+
},
|
| 1433 |
+
"model.layers.35.self_attn.q_proj": {
|
| 1434 |
+
"bits": 5,
|
| 1435 |
+
"group_size": 64,
|
| 1436 |
+
"mode": "affine"
|
| 1437 |
+
},
|
| 1438 |
+
"model.layers.35.self_attn.v_proj": {
|
| 1439 |
+
"bits": 5,
|
| 1440 |
+
"group_size": 64,
|
| 1441 |
+
"mode": "affine"
|
| 1442 |
+
},
|
| 1443 |
+
"model.layers.36.mlp.shared_expert.down_proj": {
|
| 1444 |
+
"bits": 8,
|
| 1445 |
+
"group_size": 128,
|
| 1446 |
+
"mode": "affine"
|
| 1447 |
+
},
|
| 1448 |
+
"model.layers.36.mlp.shared_expert.gate_proj": {
|
| 1449 |
+
"bits": 8,
|
| 1450 |
+
"group_size": 128,
|
| 1451 |
+
"mode": "affine"
|
| 1452 |
+
},
|
| 1453 |
+
"model.layers.36.mlp.shared_expert.up_proj": {
|
| 1454 |
+
"bits": 8,
|
| 1455 |
+
"group_size": 128,
|
| 1456 |
+
"mode": "affine"
|
| 1457 |
+
},
|
| 1458 |
+
"model.layers.36.self_attn.g_proj": {
|
| 1459 |
+
"bits": 8,
|
| 1460 |
+
"group_size": 64,
|
| 1461 |
+
"mode": "affine"
|
| 1462 |
+
},
|
| 1463 |
+
"model.layers.36.self_attn.k_proj": {
|
| 1464 |
+
"bits": 8,
|
| 1465 |
+
"group_size": 64,
|
| 1466 |
+
"mode": "affine"
|
| 1467 |
+
},
|
| 1468 |
+
"model.layers.36.self_attn.o_proj": {
|
| 1469 |
+
"bits": 8,
|
| 1470 |
+
"group_size": 64,
|
| 1471 |
+
"mode": "affine"
|
| 1472 |
+
},
|
| 1473 |
+
"model.layers.36.self_attn.q_proj": {
|
| 1474 |
+
"bits": 8,
|
| 1475 |
+
"group_size": 64,
|
| 1476 |
+
"mode": "affine"
|
| 1477 |
+
},
|
| 1478 |
+
"model.layers.36.self_attn.v_proj": {
|
| 1479 |
+
"bits": 8,
|
| 1480 |
+
"group_size": 64,
|
| 1481 |
+
"mode": "affine"
|
| 1482 |
+
},
|
| 1483 |
+
"model.layers.37.mlp.shared_expert.down_proj": {
|
| 1484 |
+
"bits": 8,
|
| 1485 |
+
"group_size": 128,
|
| 1486 |
+
"mode": "affine"
|
| 1487 |
+
},
|
| 1488 |
+
"model.layers.37.mlp.shared_expert.gate_proj": {
|
| 1489 |
+
"bits": 8,
|
| 1490 |
+
"group_size": 128,
|
| 1491 |
+
"mode": "affine"
|
| 1492 |
+
},
|
| 1493 |
+
"model.layers.37.mlp.shared_expert.up_proj": {
|
| 1494 |
+
"bits": 8,
|
| 1495 |
+
"group_size": 128,
|
| 1496 |
+
"mode": "affine"
|
| 1497 |
+
},
|
| 1498 |
+
"model.layers.37.self_attn.g_proj": {
|
| 1499 |
+
"bits": 6,
|
| 1500 |
+
"group_size": 64,
|
| 1501 |
+
"mode": "affine"
|
| 1502 |
+
},
|
| 1503 |
+
"model.layers.37.self_attn.k_proj": {
|
| 1504 |
+
"bits": 6,
|
| 1505 |
+
"group_size": 64,
|
| 1506 |
+
"mode": "affine"
|
| 1507 |
+
},
|
| 1508 |
+
"model.layers.37.self_attn.o_proj": {
|
| 1509 |
+
"bits": 6,
|
| 1510 |
+
"group_size": 64,
|
| 1511 |
+
"mode": "affine"
|
| 1512 |
+
},
|
| 1513 |
+
"model.layers.37.self_attn.q_proj": {
|
| 1514 |
+
"bits": 6,
|
| 1515 |
+
"group_size": 64,
|
| 1516 |
+
"mode": "affine"
|
| 1517 |
+
},
|
| 1518 |
+
"model.layers.37.self_attn.v_proj": {
|
| 1519 |
+
"bits": 6,
|
| 1520 |
+
"group_size": 64,
|
| 1521 |
+
"mode": "affine"
|
| 1522 |
+
},
|
| 1523 |
+
"model.layers.38.mlp.shared_expert.down_proj": {
|
| 1524 |
+
"bits": 8,
|
| 1525 |
+
"group_size": 128,
|
| 1526 |
+
"mode": "affine"
|
| 1527 |
+
},
|
| 1528 |
+
"model.layers.38.mlp.shared_expert.gate_proj": {
|
| 1529 |
+
"bits": 8,
|
| 1530 |
+
"group_size": 128,
|
| 1531 |
+
"mode": "affine"
|
| 1532 |
+
},
|
| 1533 |
+
"model.layers.38.mlp.shared_expert.up_proj": {
|
| 1534 |
+
"bits": 8,
|
| 1535 |
+
"group_size": 128,
|
| 1536 |
+
"mode": "affine"
|
| 1537 |
+
},
|
| 1538 |
+
"model.layers.38.self_attn.g_proj": {
|
| 1539 |
+
"bits": 6,
|
| 1540 |
+
"group_size": 64,
|
| 1541 |
+
"mode": "affine"
|
| 1542 |
+
},
|
| 1543 |
+
"model.layers.38.self_attn.k_proj": {
|
| 1544 |
+
"bits": 6,
|
| 1545 |
+
"group_size": 64,
|
| 1546 |
+
"mode": "affine"
|
| 1547 |
+
},
|
| 1548 |
+
"model.layers.38.self_attn.o_proj": {
|
| 1549 |
+
"bits": 6,
|
| 1550 |
+
"group_size": 64,
|
| 1551 |
+
"mode": "affine"
|
| 1552 |
+
},
|
| 1553 |
+
"model.layers.38.self_attn.q_proj": {
|
| 1554 |
+
"bits": 6,
|
| 1555 |
+
"group_size": 64,
|
| 1556 |
+
"mode": "affine"
|
| 1557 |
+
},
|
| 1558 |
+
"model.layers.38.self_attn.v_proj": {
|
| 1559 |
+
"bits": 6,
|
| 1560 |
+
"group_size": 64,
|
| 1561 |
+
"mode": "affine"
|
| 1562 |
+
},
|
| 1563 |
+
"model.layers.39.mlp.shared_expert.down_proj": {
|
| 1564 |
+
"bits": 8,
|
| 1565 |
+
"group_size": 128,
|
| 1566 |
+
"mode": "affine"
|
| 1567 |
+
},
|
| 1568 |
+
"model.layers.39.mlp.shared_expert.gate_proj": {
|
| 1569 |
+
"bits": 8,
|
| 1570 |
+
"group_size": 128,
|
| 1571 |
+
"mode": "affine"
|
| 1572 |
+
},
|
| 1573 |
+
"model.layers.39.mlp.shared_expert.up_proj": {
|
| 1574 |
+
"bits": 8,
|
| 1575 |
+
"group_size": 128,
|
| 1576 |
+
"mode": "affine"
|
| 1577 |
+
},
|
| 1578 |
+
"model.layers.39.self_attn.g_proj": {
|
| 1579 |
+
"bits": 5,
|
| 1580 |
+
"group_size": 64,
|
| 1581 |
+
"mode": "affine"
|
| 1582 |
+
},
|
| 1583 |
+
"model.layers.39.self_attn.k_proj": {
|
| 1584 |
+
"bits": 5,
|
| 1585 |
+
"group_size": 64,
|
| 1586 |
+
"mode": "affine"
|
| 1587 |
+
},
|
| 1588 |
+
"model.layers.39.self_attn.o_proj": {
|
| 1589 |
+
"bits": 5,
|
| 1590 |
+
"group_size": 64,
|
| 1591 |
+
"mode": "affine"
|
| 1592 |
+
},
|
| 1593 |
+
"model.layers.39.self_attn.q_proj": {
|
| 1594 |
+
"bits": 5,
|
| 1595 |
+
"group_size": 64,
|
| 1596 |
+
"mode": "affine"
|
| 1597 |
+
},
|
| 1598 |
+
"model.layers.39.self_attn.v_proj": {
|
| 1599 |
+
"bits": 5,
|
| 1600 |
+
"group_size": 64,
|
| 1601 |
+
"mode": "affine"
|
| 1602 |
+
},
|
| 1603 |
+
"model.layers.4.mlp.shared_expert.down_proj": {
|
| 1604 |
+
"bits": 8,
|
| 1605 |
+
"group_size": 128,
|
| 1606 |
+
"mode": "affine"
|
| 1607 |
+
},
|
| 1608 |
+
"model.layers.4.mlp.shared_expert.gate_proj": {
|
| 1609 |
+
"bits": 8,
|
| 1610 |
+
"group_size": 128,
|
| 1611 |
+
"mode": "affine"
|
| 1612 |
+
},
|
| 1613 |
+
"model.layers.4.mlp.shared_expert.up_proj": {
|
| 1614 |
+
"bits": 8,
|
| 1615 |
+
"group_size": 128,
|
| 1616 |
+
"mode": "affine"
|
| 1617 |
+
},
|
| 1618 |
+
"model.layers.4.self_attn.g_proj": {
|
| 1619 |
+
"bits": 5,
|
| 1620 |
+
"group_size": 64,
|
| 1621 |
+
"mode": "affine"
|
| 1622 |
+
},
|
| 1623 |
+
"model.layers.4.self_attn.k_proj": {
|
| 1624 |
+
"bits": 5,
|
| 1625 |
+
"group_size": 64,
|
| 1626 |
+
"mode": "affine"
|
| 1627 |
+
},
|
| 1628 |
+
"model.layers.4.self_attn.o_proj": {
|
| 1629 |
+
"bits": 5,
|
| 1630 |
+
"group_size": 64,
|
| 1631 |
+
"mode": "affine"
|
| 1632 |
+
},
|
| 1633 |
+
"model.layers.4.self_attn.q_proj": {
|
| 1634 |
+
"bits": 5,
|
| 1635 |
+
"group_size": 64,
|
| 1636 |
+
"mode": "affine"
|
| 1637 |
+
},
|
| 1638 |
+
"model.layers.4.self_attn.v_proj": {
|
| 1639 |
+
"bits": 5,
|
| 1640 |
+
"group_size": 64,
|
| 1641 |
+
"mode": "affine"
|
| 1642 |
+
},
|
| 1643 |
+
"model.layers.5.mlp.shared_expert.down_proj": {
|
| 1644 |
+
"bits": 8,
|
| 1645 |
+
"group_size": 128,
|
| 1646 |
+
"mode": "affine"
|
| 1647 |
+
},
|
| 1648 |
+
"model.layers.5.mlp.shared_expert.gate_proj": {
|
| 1649 |
+
"bits": 8,
|
| 1650 |
+
"group_size": 128,
|
| 1651 |
+
"mode": "affine"
|
| 1652 |
+
},
|
| 1653 |
+
"model.layers.5.mlp.shared_expert.up_proj": {
|
| 1654 |
+
"bits": 8,
|
| 1655 |
+
"group_size": 128,
|
| 1656 |
+
"mode": "affine"
|
| 1657 |
+
},
|
| 1658 |
+
"model.layers.5.self_attn.g_proj": {
|
| 1659 |
+
"bits": 6,
|
| 1660 |
+
"group_size": 64,
|
| 1661 |
+
"mode": "affine"
|
| 1662 |
+
},
|
| 1663 |
+
"model.layers.5.self_attn.k_proj": {
|
| 1664 |
+
"bits": 6,
|
| 1665 |
+
"group_size": 64,
|
| 1666 |
+
"mode": "affine"
|
| 1667 |
+
},
|
| 1668 |
+
"model.layers.5.self_attn.o_proj": {
|
| 1669 |
+
"bits": 6,
|
| 1670 |
+
"group_size": 64,
|
| 1671 |
+
"mode": "affine"
|
| 1672 |
+
},
|
| 1673 |
+
"model.layers.5.self_attn.q_proj": {
|
| 1674 |
+
"bits": 6,
|
| 1675 |
+
"group_size": 64,
|
| 1676 |
+
"mode": "affine"
|
| 1677 |
+
},
|
| 1678 |
+
"model.layers.5.self_attn.v_proj": {
|
| 1679 |
+
"bits": 6,
|
| 1680 |
+
"group_size": 64,
|
| 1681 |
+
"mode": "affine"
|
| 1682 |
+
},
|
| 1683 |
+
"model.layers.6.mlp.shared_expert.down_proj": {
|
| 1684 |
+
"bits": 8,
|
| 1685 |
+
"group_size": 128,
|
| 1686 |
+
"mode": "affine"
|
| 1687 |
+
},
|
| 1688 |
+
"model.layers.6.mlp.shared_expert.gate_proj": {
|
| 1689 |
+
"bits": 8,
|
| 1690 |
+
"group_size": 128,
|
| 1691 |
+
"mode": "affine"
|
| 1692 |
+
},
|
| 1693 |
+
"model.layers.6.mlp.shared_expert.up_proj": {
|
| 1694 |
+
"bits": 8,
|
| 1695 |
+
"group_size": 128,
|
| 1696 |
+
"mode": "affine"
|
| 1697 |
+
},
|
| 1698 |
+
"model.layers.6.self_attn.g_proj": {
|
| 1699 |
+
"bits": 6,
|
| 1700 |
+
"group_size": 64,
|
| 1701 |
+
"mode": "affine"
|
| 1702 |
+
},
|
| 1703 |
+
"model.layers.6.self_attn.k_proj": {
|
| 1704 |
+
"bits": 6,
|
| 1705 |
+
"group_size": 64,
|
| 1706 |
+
"mode": "affine"
|
| 1707 |
+
},
|
| 1708 |
+
"model.layers.6.self_attn.o_proj": {
|
| 1709 |
+
"bits": 6,
|
| 1710 |
+
"group_size": 64,
|
| 1711 |
+
"mode": "affine"
|
| 1712 |
+
},
|
| 1713 |
+
"model.layers.6.self_attn.q_proj": {
|
| 1714 |
+
"bits": 6,
|
| 1715 |
+
"group_size": 64,
|
| 1716 |
+
"mode": "affine"
|
| 1717 |
+
},
|
| 1718 |
+
"model.layers.6.self_attn.v_proj": {
|
| 1719 |
+
"bits": 6,
|
| 1720 |
+
"group_size": 64,
|
| 1721 |
+
"mode": "affine"
|
| 1722 |
+
},
|
| 1723 |
+
"model.layers.7.mlp.shared_expert.down_proj": {
|
| 1724 |
+
"bits": 8,
|
| 1725 |
+
"group_size": 128,
|
| 1726 |
+
"mode": "affine"
|
| 1727 |
+
},
|
| 1728 |
+
"model.layers.7.mlp.shared_expert.gate_proj": {
|
| 1729 |
+
"bits": 8,
|
| 1730 |
+
"group_size": 128,
|
| 1731 |
+
"mode": "affine"
|
| 1732 |
+
},
|
| 1733 |
+
"model.layers.7.mlp.shared_expert.up_proj": {
|
| 1734 |
+
"bits": 8,
|
| 1735 |
+
"group_size": 128,
|
| 1736 |
+
"mode": "affine"
|
| 1737 |
+
},
|
| 1738 |
+
"model.layers.7.self_attn.g_proj": {
|
| 1739 |
+
"bits": 6,
|
| 1740 |
+
"group_size": 64,
|
| 1741 |
+
"mode": "affine"
|
| 1742 |
+
},
|
| 1743 |
+
"model.layers.7.self_attn.k_proj": {
|
| 1744 |
+
"bits": 6,
|
| 1745 |
+
"group_size": 64,
|
| 1746 |
+
"mode": "affine"
|
| 1747 |
+
},
|
| 1748 |
+
"model.layers.7.self_attn.o_proj": {
|
| 1749 |
+
"bits": 6,
|
| 1750 |
+
"group_size": 64,
|
| 1751 |
+
"mode": "affine"
|
| 1752 |
+
},
|
| 1753 |
+
"model.layers.7.self_attn.q_proj": {
|
| 1754 |
+
"bits": 6,
|
| 1755 |
+
"group_size": 64,
|
| 1756 |
+
"mode": "affine"
|
| 1757 |
+
},
|
| 1758 |
+
"model.layers.7.self_attn.v_proj": {
|
| 1759 |
+
"bits": 6,
|
| 1760 |
+
"group_size": 64,
|
| 1761 |
+
"mode": "affine"
|
| 1762 |
+
},
|
| 1763 |
+
"model.layers.8.mlp.shared_expert.down_proj": {
|
| 1764 |
+
"bits": 8,
|
| 1765 |
+
"group_size": 128,
|
| 1766 |
+
"mode": "affine"
|
| 1767 |
+
},
|
| 1768 |
+
"model.layers.8.mlp.shared_expert.gate_proj": {
|
| 1769 |
+
"bits": 8,
|
| 1770 |
+
"group_size": 128,
|
| 1771 |
+
"mode": "affine"
|
| 1772 |
+
},
|
| 1773 |
+
"model.layers.8.mlp.shared_expert.up_proj": {
|
| 1774 |
+
"bits": 8,
|
| 1775 |
+
"group_size": 128,
|
| 1776 |
+
"mode": "affine"
|
| 1777 |
+
},
|
| 1778 |
+
"model.layers.8.self_attn.g_proj": {
|
| 1779 |
+
"bits": 6,
|
| 1780 |
+
"group_size": 64,
|
| 1781 |
+
"mode": "affine"
|
| 1782 |
+
},
|
| 1783 |
+
"model.layers.8.self_attn.k_proj": {
|
| 1784 |
+
"bits": 6,
|
| 1785 |
+
"group_size": 64,
|
| 1786 |
+
"mode": "affine"
|
| 1787 |
+
},
|
| 1788 |
+
"model.layers.8.self_attn.o_proj": {
|
| 1789 |
+
"bits": 6,
|
| 1790 |
+
"group_size": 64,
|
| 1791 |
+
"mode": "affine"
|
| 1792 |
+
},
|
| 1793 |
+
"model.layers.8.self_attn.q_proj": {
|
| 1794 |
+
"bits": 6,
|
| 1795 |
+
"group_size": 64,
|
| 1796 |
+
"mode": "affine"
|
| 1797 |
+
},
|
| 1798 |
+
"model.layers.8.self_attn.v_proj": {
|
| 1799 |
+
"bits": 6,
|
| 1800 |
+
"group_size": 64,
|
| 1801 |
+
"mode": "affine"
|
| 1802 |
+
},
|
| 1803 |
+
"model.layers.9.mlp.shared_expert.down_proj": {
|
| 1804 |
+
"bits": 8,
|
| 1805 |
+
"group_size": 128,
|
| 1806 |
+
"mode": "affine"
|
| 1807 |
+
},
|
| 1808 |
+
"model.layers.9.mlp.shared_expert.gate_proj": {
|
| 1809 |
+
"bits": 8,
|
| 1810 |
+
"group_size": 128,
|
| 1811 |
+
"mode": "affine"
|
| 1812 |
+
},
|
| 1813 |
+
"model.layers.9.mlp.shared_expert.up_proj": {
|
| 1814 |
+
"bits": 8,
|
| 1815 |
+
"group_size": 128,
|
| 1816 |
+
"mode": "affine"
|
| 1817 |
+
},
|
| 1818 |
+
"model.layers.9.self_attn.g_proj": {
|
| 1819 |
+
"bits": 6,
|
| 1820 |
+
"group_size": 64,
|
| 1821 |
+
"mode": "affine"
|
| 1822 |
+
},
|
| 1823 |
+
"model.layers.9.self_attn.k_proj": {
|
| 1824 |
+
"bits": 6,
|
| 1825 |
+
"group_size": 64,
|
| 1826 |
+
"mode": "affine"
|
| 1827 |
+
},
|
| 1828 |
+
"model.layers.9.self_attn.o_proj": {
|
| 1829 |
+
"bits": 6,
|
| 1830 |
+
"group_size": 64,
|
| 1831 |
+
"mode": "affine"
|
| 1832 |
+
},
|
| 1833 |
+
"model.layers.9.self_attn.q_proj": {
|
| 1834 |
+
"bits": 6,
|
| 1835 |
+
"group_size": 64,
|
| 1836 |
+
"mode": "affine"
|
| 1837 |
+
},
|
| 1838 |
+
"model.layers.9.self_attn.v_proj": {
|
| 1839 |
+
"bits": 6,
|
| 1840 |
+
"group_size": 64,
|
| 1841 |
+
"mode": "affine"
|
| 1842 |
+
}
|
| 1843 |
+
},
|
| 1844 |
+
"quantization_config": {
|
| 1845 |
+
"group_size": 64,
|
| 1846 |
+
"bits": 4,
|
| 1847 |
+
"mode": "affine",
|
| 1848 |
+
"lm_head": {
|
| 1849 |
+
"bits": 8,
|
| 1850 |
+
"group_size": 64,
|
| 1851 |
+
"mode": "affine"
|
| 1852 |
+
},
|
| 1853 |
+
"model.embed_tokens": {
|
| 1854 |
+
"bits": 8,
|
| 1855 |
+
"group_size": 64,
|
| 1856 |
+
"mode": "affine"
|
| 1857 |
+
},
|
| 1858 |
+
"model.layers.0.mlp.down_proj": {
|
| 1859 |
+
"bits": 6,
|
| 1860 |
+
"group_size": 64,
|
| 1861 |
+
"mode": "affine"
|
| 1862 |
+
},
|
| 1863 |
+
"model.layers.0.mlp.gate_proj": {
|
| 1864 |
+
"bits": 6,
|
| 1865 |
+
"group_size": 64,
|
| 1866 |
+
"mode": "affine"
|
| 1867 |
+
},
|
| 1868 |
+
"model.layers.0.mlp.up_proj": {
|
| 1869 |
+
"bits": 6,
|
| 1870 |
+
"group_size": 64,
|
| 1871 |
+
"mode": "affine"
|
| 1872 |
+
},
|
| 1873 |
+
"model.layers.0.self_attn.g_proj": {
|
| 1874 |
+
"bits": 6,
|
| 1875 |
+
"group_size": 64,
|
| 1876 |
+
"mode": "affine"
|
| 1877 |
+
},
|
| 1878 |
+
"model.layers.0.self_attn.k_proj": {
|
| 1879 |
+
"bits": 6,
|
| 1880 |
+
"group_size": 64,
|
| 1881 |
+
"mode": "affine"
|
| 1882 |
+
},
|
| 1883 |
+
"model.layers.0.self_attn.o_proj": {
|
| 1884 |
+
"bits": 6,
|
| 1885 |
+
"group_size": 64,
|
| 1886 |
+
"mode": "affine"
|
| 1887 |
+
},
|
| 1888 |
+
"model.layers.0.self_attn.q_proj": {
|
| 1889 |
+
"bits": 6,
|
| 1890 |
+
"group_size": 64,
|
| 1891 |
+
"mode": "affine"
|
| 1892 |
+
},
|
| 1893 |
+
"model.layers.0.self_attn.v_proj": {
|
| 1894 |
+
"bits": 6,
|
| 1895 |
+
"group_size": 64,
|
| 1896 |
+
"mode": "affine"
|
| 1897 |
+
},
|
| 1898 |
+
"model.layers.1.mlp.shared_expert.down_proj": {
|
| 1899 |
+
"bits": 8,
|
| 1900 |
+
"group_size": 128,
|
| 1901 |
+
"mode": "affine"
|
| 1902 |
+
},
|
| 1903 |
+
"model.layers.1.mlp.shared_expert.gate_proj": {
|
| 1904 |
+
"bits": 8,
|
| 1905 |
+
"group_size": 128,
|
| 1906 |
+
"mode": "affine"
|
| 1907 |
+
},
|
| 1908 |
+
"model.layers.1.mlp.shared_expert.up_proj": {
|
| 1909 |
+
"bits": 8,
|
| 1910 |
+
"group_size": 128,
|
| 1911 |
+
"mode": "affine"
|
| 1912 |
+
},
|
| 1913 |
+
"model.layers.1.self_attn.g_proj": {
|
| 1914 |
+
"bits": 6,
|
| 1915 |
+
"group_size": 64,
|
| 1916 |
+
"mode": "affine"
|
| 1917 |
+
},
|
| 1918 |
+
"model.layers.1.self_attn.k_proj": {
|
| 1919 |
+
"bits": 6,
|
| 1920 |
+
"group_size": 64,
|
| 1921 |
+
"mode": "affine"
|
| 1922 |
+
},
|
| 1923 |
+
"model.layers.1.self_attn.o_proj": {
|
| 1924 |
+
"bits": 6,
|
| 1925 |
+
"group_size": 64,
|
| 1926 |
+
"mode": "affine"
|
| 1927 |
+
},
|
| 1928 |
+
"model.layers.1.self_attn.q_proj": {
|
| 1929 |
+
"bits": 6,
|
| 1930 |
+
"group_size": 64,
|
| 1931 |
+
"mode": "affine"
|
| 1932 |
+
},
|
| 1933 |
+
"model.layers.1.self_attn.v_proj": {
|
| 1934 |
+
"bits": 8,
|
| 1935 |
+
"group_size": 64,
|
| 1936 |
+
"mode": "affine"
|
| 1937 |
+
},
|
| 1938 |
+
"model.layers.10.mlp.shared_expert.down_proj": {
|
| 1939 |
+
"bits": 8,
|
| 1940 |
+
"group_size": 128,
|
| 1941 |
+
"mode": "affine"
|
| 1942 |
+
},
|
| 1943 |
+
"model.layers.10.mlp.shared_expert.gate_proj": {
|
| 1944 |
+
"bits": 8,
|
| 1945 |
+
"group_size": 128,
|
| 1946 |
+
"mode": "affine"
|
| 1947 |
+
},
|
| 1948 |
+
"model.layers.10.mlp.shared_expert.up_proj": {
|
| 1949 |
+
"bits": 8,
|
| 1950 |
+
"group_size": 128,
|
| 1951 |
+
"mode": "affine"
|
| 1952 |
+
},
|
| 1953 |
+
"model.layers.10.self_attn.g_proj": {
|
| 1954 |
+
"bits": 6,
|
| 1955 |
+
"group_size": 64,
|
| 1956 |
+
"mode": "affine"
|
| 1957 |
+
},
|
| 1958 |
+
"model.layers.10.self_attn.k_proj": {
|
| 1959 |
+
"bits": 6,
|
| 1960 |
+
"group_size": 64,
|
| 1961 |
+
"mode": "affine"
|
| 1962 |
+
},
|
| 1963 |
+
"model.layers.10.self_attn.o_proj": {
|
| 1964 |
+
"bits": 6,
|
| 1965 |
+
"group_size": 64,
|
| 1966 |
+
"mode": "affine"
|
| 1967 |
+
},
|
| 1968 |
+
"model.layers.10.self_attn.q_proj": {
|
| 1969 |
+
"bits": 6,
|
| 1970 |
+
"group_size": 64,
|
| 1971 |
+
"mode": "affine"
|
| 1972 |
+
},
|
| 1973 |
+
"model.layers.10.self_attn.v_proj": {
|
| 1974 |
+
"bits": 6,
|
| 1975 |
+
"group_size": 64,
|
| 1976 |
+
"mode": "affine"
|
| 1977 |
+
},
|
| 1978 |
+
"model.layers.11.mlp.shared_expert.down_proj": {
|
| 1979 |
+
"bits": 8,
|
| 1980 |
+
"group_size": 128,
|
| 1981 |
+
"mode": "affine"
|
| 1982 |
+
},
|
| 1983 |
+
"model.layers.11.mlp.shared_expert.gate_proj": {
|
| 1984 |
+
"bits": 8,
|
| 1985 |
+
"group_size": 128,
|
| 1986 |
+
"mode": "affine"
|
| 1987 |
+
},
|
| 1988 |
+
"model.layers.11.mlp.shared_expert.up_proj": {
|
| 1989 |
+
"bits": 8,
|
| 1990 |
+
"group_size": 128,
|
| 1991 |
+
"mode": "affine"
|
| 1992 |
+
},
|
| 1993 |
+
"model.layers.11.self_attn.g_proj": {
|
| 1994 |
+
"bits": 6,
|
| 1995 |
+
"group_size": 64,
|
| 1996 |
+
"mode": "affine"
|
| 1997 |
+
},
|
| 1998 |
+
"model.layers.11.self_attn.k_proj": {
|
| 1999 |
+
"bits": 6,
|
| 2000 |
+
"group_size": 64,
|
| 2001 |
+
"mode": "affine"
|
| 2002 |
+
},
|
| 2003 |
+
"model.layers.11.self_attn.o_proj": {
|
| 2004 |
+
"bits": 6,
|
| 2005 |
+
"group_size": 64,
|
| 2006 |
+
"mode": "affine"
|
| 2007 |
+
},
|
| 2008 |
+
"model.layers.11.self_attn.q_proj": {
|
| 2009 |
+
"bits": 6,
|
| 2010 |
+
"group_size": 64,
|
| 2011 |
+
"mode": "affine"
|
| 2012 |
+
},
|
| 2013 |
+
"model.layers.11.self_attn.v_proj": {
|
| 2014 |
+
"bits": 6,
|
| 2015 |
+
"group_size": 64,
|
| 2016 |
+
"mode": "affine"
|
| 2017 |
+
},
|
| 2018 |
+
"model.layers.12.mlp.shared_expert.down_proj": {
|
| 2019 |
+
"bits": 8,
|
| 2020 |
+
"group_size": 128,
|
| 2021 |
+
"mode": "affine"
|
| 2022 |
+
},
|
| 2023 |
+
"model.layers.12.mlp.shared_expert.gate_proj": {
|
| 2024 |
+
"bits": 8,
|
| 2025 |
+
"group_size": 128,
|
| 2026 |
+
"mode": "affine"
|
| 2027 |
+
},
|
| 2028 |
+
"model.layers.12.mlp.shared_expert.up_proj": {
|
| 2029 |
+
"bits": 8,
|
| 2030 |
+
"group_size": 128,
|
| 2031 |
+
"mode": "affine"
|
| 2032 |
+
},
|
| 2033 |
+
"model.layers.12.self_attn.g_proj": {
|
| 2034 |
+
"bits": 8,
|
| 2035 |
+
"group_size": 64,
|
| 2036 |
+
"mode": "affine"
|
| 2037 |
+
},
|
| 2038 |
+
"model.layers.12.self_attn.k_proj": {
|
| 2039 |
+
"bits": 8,
|
| 2040 |
+
"group_size": 64,
|
| 2041 |
+
"mode": "affine"
|
| 2042 |
+
},
|
| 2043 |
+
"model.layers.12.self_attn.o_proj": {
|
| 2044 |
+
"bits": 8,
|
| 2045 |
+
"group_size": 64,
|
| 2046 |
+
"mode": "affine"
|
| 2047 |
+
},
|
| 2048 |
+
"model.layers.12.self_attn.q_proj": {
|
| 2049 |
+
"bits": 8,
|
| 2050 |
+
"group_size": 64,
|
| 2051 |
+
"mode": "affine"
|
| 2052 |
+
},
|
| 2053 |
+
"model.layers.12.self_attn.v_proj": {
|
| 2054 |
+
"bits": 8,
|
| 2055 |
+
"group_size": 64,
|
| 2056 |
+
"mode": "affine"
|
| 2057 |
+
},
|
| 2058 |
+
"model.layers.13.mlp.shared_expert.down_proj": {
|
| 2059 |
+
"bits": 8,
|
| 2060 |
+
"group_size": 128,
|
| 2061 |
+
"mode": "affine"
|
| 2062 |
+
},
|
| 2063 |
+
"model.layers.13.mlp.shared_expert.gate_proj": {
|
| 2064 |
+
"bits": 8,
|
| 2065 |
+
"group_size": 128,
|
| 2066 |
+
"mode": "affine"
|
| 2067 |
+
},
|
| 2068 |
+
"model.layers.13.mlp.shared_expert.up_proj": {
|
| 2069 |
+
"bits": 8,
|
| 2070 |
+
"group_size": 128,
|
| 2071 |
+
"mode": "affine"
|
| 2072 |
+
},
|
| 2073 |
+
"model.layers.13.self_attn.g_proj": {
|
| 2074 |
+
"bits": 6,
|
| 2075 |
+
"group_size": 64,
|
| 2076 |
+
"mode": "affine"
|
| 2077 |
+
},
|
| 2078 |
+
"model.layers.13.self_attn.k_proj": {
|
| 2079 |
+
"bits": 6,
|
| 2080 |
+
"group_size": 64,
|
| 2081 |
+
"mode": "affine"
|
| 2082 |
+
},
|
| 2083 |
+
"model.layers.13.self_attn.o_proj": {
|
| 2084 |
+
"bits": 6,
|
| 2085 |
+
"group_size": 64,
|
| 2086 |
+
"mode": "affine"
|
| 2087 |
+
},
|
| 2088 |
+
"model.layers.13.self_attn.q_proj": {
|
| 2089 |
+
"bits": 6,
|
| 2090 |
+
"group_size": 64,
|
| 2091 |
+
"mode": "affine"
|
| 2092 |
+
},
|
| 2093 |
+
"model.layers.13.self_attn.v_proj": {
|
| 2094 |
+
"bits": 6,
|
| 2095 |
+
"group_size": 64,
|
| 2096 |
+
"mode": "affine"
|
| 2097 |
+
},
|
| 2098 |
+
"model.layers.14.mlp.shared_expert.down_proj": {
|
| 2099 |
+
"bits": 8,
|
| 2100 |
+
"group_size": 128,
|
| 2101 |
+
"mode": "affine"
|
| 2102 |
+
},
|
| 2103 |
+
"model.layers.14.mlp.shared_expert.gate_proj": {
|
| 2104 |
+
"bits": 8,
|
| 2105 |
+
"group_size": 128,
|
| 2106 |
+
"mode": "affine"
|
| 2107 |
+
},
|
| 2108 |
+
"model.layers.14.mlp.shared_expert.up_proj": {
|
| 2109 |
+
"bits": 8,
|
| 2110 |
+
"group_size": 128,
|
| 2111 |
+
"mode": "affine"
|
| 2112 |
+
},
|
| 2113 |
+
"model.layers.14.self_attn.g_proj": {
|
| 2114 |
+
"bits": 6,
|
| 2115 |
+
"group_size": 64,
|
| 2116 |
+
"mode": "affine"
|
| 2117 |
+
},
|
| 2118 |
+
"model.layers.14.self_attn.k_proj": {
|
| 2119 |
+
"bits": 6,
|
| 2120 |
+
"group_size": 64,
|
| 2121 |
+
"mode": "affine"
|
| 2122 |
+
},
|
| 2123 |
+
"model.layers.14.self_attn.o_proj": {
|
| 2124 |
+
"bits": 6,
|
| 2125 |
+
"group_size": 64,
|
| 2126 |
+
"mode": "affine"
|
| 2127 |
+
},
|
| 2128 |
+
"model.layers.14.self_attn.q_proj": {
|
| 2129 |
+
"bits": 6,
|
| 2130 |
+
"group_size": 64,
|
| 2131 |
+
"mode": "affine"
|
| 2132 |
+
},
|
| 2133 |
+
"model.layers.14.self_attn.v_proj": {
|
| 2134 |
+
"bits": 6,
|
| 2135 |
+
"group_size": 64,
|
| 2136 |
+
"mode": "affine"
|
| 2137 |
+
},
|
| 2138 |
+
"model.layers.15.mlp.shared_expert.down_proj": {
|
| 2139 |
+
"bits": 8,
|
| 2140 |
+
"group_size": 128,
|
| 2141 |
+
"mode": "affine"
|
| 2142 |
+
},
|
| 2143 |
+
"model.layers.15.mlp.shared_expert.gate_proj": {
|
| 2144 |
+
"bits": 8,
|
| 2145 |
+
"group_size": 128,
|
| 2146 |
+
"mode": "affine"
|
| 2147 |
+
},
|
| 2148 |
+
"model.layers.15.mlp.shared_expert.up_proj": {
|
| 2149 |
+
"bits": 8,
|
| 2150 |
+
"group_size": 128,
|
| 2151 |
+
"mode": "affine"
|
| 2152 |
+
},
|
| 2153 |
+
"model.layers.15.self_attn.g_proj": {
|
| 2154 |
+
"bits": 6,
|
| 2155 |
+
"group_size": 64,
|
| 2156 |
+
"mode": "affine"
|
| 2157 |
+
},
|
| 2158 |
+
"model.layers.15.self_attn.k_proj": {
|
| 2159 |
+
"bits": 6,
|
| 2160 |
+
"group_size": 64,
|
| 2161 |
+
"mode": "affine"
|
| 2162 |
+
},
|
| 2163 |
+
"model.layers.15.self_attn.o_proj": {
|
| 2164 |
+
"bits": 6,
|
| 2165 |
+
"group_size": 64,
|
| 2166 |
+
"mode": "affine"
|
| 2167 |
+
},
|
| 2168 |
+
"model.layers.15.self_attn.q_proj": {
|
| 2169 |
+
"bits": 6,
|
| 2170 |
+
"group_size": 64,
|
| 2171 |
+
"mode": "affine"
|
| 2172 |
+
},
|
| 2173 |
+
"model.layers.15.self_attn.v_proj": {
|
| 2174 |
+
"bits": 6,
|
| 2175 |
+
"group_size": 64,
|
| 2176 |
+
"mode": "affine"
|
| 2177 |
+
},
|
| 2178 |
+
"model.layers.16.mlp.shared_expert.down_proj": {
|
| 2179 |
+
"bits": 8,
|
| 2180 |
+
"group_size": 128,
|
| 2181 |
+
"mode": "affine"
|
| 2182 |
+
},
|
| 2183 |
+
"model.layers.16.mlp.shared_expert.gate_proj": {
|
| 2184 |
+
"bits": 8,
|
| 2185 |
+
"group_size": 128,
|
| 2186 |
+
"mode": "affine"
|
| 2187 |
+
},
|
| 2188 |
+
"model.layers.16.mlp.shared_expert.up_proj": {
|
| 2189 |
+
"bits": 8,
|
| 2190 |
+
"group_size": 128,
|
| 2191 |
+
"mode": "affine"
|
| 2192 |
+
},
|
| 2193 |
+
"model.layers.16.self_attn.g_proj": {
|
| 2194 |
+
"bits": 8,
|
| 2195 |
+
"group_size": 64,
|
| 2196 |
+
"mode": "affine"
|
| 2197 |
+
},
|
| 2198 |
+
"model.layers.16.self_attn.k_proj": {
|
| 2199 |
+
"bits": 8,
|
| 2200 |
+
"group_size": 64,
|
| 2201 |
+
"mode": "affine"
|
| 2202 |
+
},
|
| 2203 |
+
"model.layers.16.self_attn.o_proj": {
|
| 2204 |
+
"bits": 8,
|
| 2205 |
+
"group_size": 64,
|
| 2206 |
+
"mode": "affine"
|
| 2207 |
+
},
|
| 2208 |
+
"model.layers.16.self_attn.q_proj": {
|
| 2209 |
+
"bits": 8,
|
| 2210 |
+
"group_size": 64,
|
| 2211 |
+
"mode": "affine"
|
| 2212 |
+
},
|
| 2213 |
+
"model.layers.16.self_attn.v_proj": {
|
| 2214 |
+
"bits": 8,
|
| 2215 |
+
"group_size": 64,
|
| 2216 |
+
"mode": "affine"
|
| 2217 |
+
},
|
| 2218 |
+
"model.layers.17.mlp.shared_expert.down_proj": {
|
| 2219 |
+
"bits": 8,
|
| 2220 |
+
"group_size": 128,
|
| 2221 |
+
"mode": "affine"
|
| 2222 |
+
},
|
| 2223 |
+
"model.layers.17.mlp.shared_expert.gate_proj": {
|
| 2224 |
+
"bits": 8,
|
| 2225 |
+
"group_size": 128,
|
| 2226 |
+
"mode": "affine"
|
| 2227 |
+
},
|
| 2228 |
+
"model.layers.17.mlp.shared_expert.up_proj": {
|
| 2229 |
+
"bits": 8,
|
| 2230 |
+
"group_size": 128,
|
| 2231 |
+
"mode": "affine"
|
| 2232 |
+
},
|
| 2233 |
+
"model.layers.17.self_attn.g_proj": {
|
| 2234 |
+
"bits": 8,
|
| 2235 |
+
"group_size": 64,
|
| 2236 |
+
"mode": "affine"
|
| 2237 |
+
},
|
| 2238 |
+
"model.layers.17.self_attn.k_proj": {
|
| 2239 |
+
"bits": 8,
|
| 2240 |
+
"group_size": 64,
|
| 2241 |
+
"mode": "affine"
|
| 2242 |
+
},
|
| 2243 |
+
"model.layers.17.self_attn.o_proj": {
|
| 2244 |
+
"bits": 8,
|
| 2245 |
+
"group_size": 64,
|
| 2246 |
+
"mode": "affine"
|
| 2247 |
+
},
|
| 2248 |
+
"model.layers.17.self_attn.q_proj": {
|
| 2249 |
+
"bits": 8,
|
| 2250 |
+
"group_size": 64,
|
| 2251 |
+
"mode": "affine"
|
| 2252 |
+
},
|
| 2253 |
+
"model.layers.17.self_attn.v_proj": {
|
| 2254 |
+
"bits": 8,
|
| 2255 |
+
"group_size": 64,
|
| 2256 |
+
"mode": "affine"
|
| 2257 |
+
},
|
| 2258 |
+
"model.layers.18.mlp.shared_expert.down_proj": {
|
| 2259 |
+
"bits": 8,
|
| 2260 |
+
"group_size": 128,
|
| 2261 |
+
"mode": "affine"
|
| 2262 |
+
},
|
| 2263 |
+
"model.layers.18.mlp.shared_expert.gate_proj": {
|
| 2264 |
+
"bits": 8,
|
| 2265 |
+
"group_size": 128,
|
| 2266 |
+
"mode": "affine"
|
| 2267 |
+
},
|
| 2268 |
+
"model.layers.18.mlp.shared_expert.up_proj": {
|
| 2269 |
+
"bits": 8,
|
| 2270 |
+
"group_size": 128,
|
| 2271 |
+
"mode": "affine"
|
| 2272 |
+
},
|
| 2273 |
+
"model.layers.18.self_attn.g_proj": {
|
| 2274 |
+
"bits": 8,
|
| 2275 |
+
"group_size": 64,
|
| 2276 |
+
"mode": "affine"
|
| 2277 |
+
},
|
| 2278 |
+
"model.layers.18.self_attn.k_proj": {
|
| 2279 |
+
"bits": 8,
|
| 2280 |
+
"group_size": 64,
|
| 2281 |
+
"mode": "affine"
|
| 2282 |
+
},
|
| 2283 |
+
"model.layers.18.self_attn.o_proj": {
|
| 2284 |
+
"bits": 8,
|
| 2285 |
+
"group_size": 64,
|
| 2286 |
+
"mode": "affine"
|
| 2287 |
+
},
|
| 2288 |
+
"model.layers.18.self_attn.q_proj": {
|
| 2289 |
+
"bits": 8,
|
| 2290 |
+
"group_size": 64,
|
| 2291 |
+
"mode": "affine"
|
| 2292 |
+
},
|
| 2293 |
+
"model.layers.18.self_attn.v_proj": {
|
| 2294 |
+
"bits": 8,
|
| 2295 |
+
"group_size": 64,
|
| 2296 |
+
"mode": "affine"
|
| 2297 |
+
},
|
| 2298 |
+
"model.layers.19.mlp.shared_expert.down_proj": {
|
| 2299 |
+
"bits": 8,
|
| 2300 |
+
"group_size": 128,
|
| 2301 |
+
"mode": "affine"
|
| 2302 |
+
},
|
| 2303 |
+
"model.layers.19.mlp.shared_expert.gate_proj": {
|
| 2304 |
+
"bits": 8,
|
| 2305 |
+
"group_size": 128,
|
| 2306 |
+
"mode": "affine"
|
| 2307 |
+
},
|
| 2308 |
+
"model.layers.19.mlp.shared_expert.up_proj": {
|
| 2309 |
+
"bits": 8,
|
| 2310 |
+
"group_size": 128,
|
| 2311 |
+
"mode": "affine"
|
| 2312 |
+
},
|
| 2313 |
+
"model.layers.19.self_attn.g_proj": {
|
| 2314 |
+
"bits": 6,
|
| 2315 |
+
"group_size": 64,
|
| 2316 |
+
"mode": "affine"
|
| 2317 |
+
},
|
| 2318 |
+
"model.layers.19.self_attn.k_proj": {
|
| 2319 |
+
"bits": 6,
|
| 2320 |
+
"group_size": 64,
|
| 2321 |
+
"mode": "affine"
|
| 2322 |
+
},
|
| 2323 |
+
"model.layers.19.self_attn.o_proj": {
|
| 2324 |
+
"bits": 6,
|
| 2325 |
+
"group_size": 64,
|
| 2326 |
+
"mode": "affine"
|
| 2327 |
+
},
|
| 2328 |
+
"model.layers.19.self_attn.q_proj": {
|
| 2329 |
+
"bits": 6,
|
| 2330 |
+
"group_size": 64,
|
| 2331 |
+
"mode": "affine"
|
| 2332 |
+
},
|
| 2333 |
+
"model.layers.19.self_attn.v_proj": {
|
| 2334 |
+
"bits": 8,
|
| 2335 |
+
"group_size": 64,
|
| 2336 |
+
"mode": "affine"
|
| 2337 |
+
},
|
| 2338 |
+
"model.layers.2.mlp.shared_expert.down_proj": {
|
| 2339 |
+
"bits": 8,
|
| 2340 |
+
"group_size": 128,
|
| 2341 |
+
"mode": "affine"
|
| 2342 |
+
},
|
| 2343 |
+
"model.layers.2.mlp.shared_expert.gate_proj": {
|
| 2344 |
+
"bits": 8,
|
| 2345 |
+
"group_size": 128,
|
| 2346 |
+
"mode": "affine"
|
| 2347 |
+
},
|
| 2348 |
+
"model.layers.2.mlp.shared_expert.up_proj": {
|
| 2349 |
+
"bits": 8,
|
| 2350 |
+
"group_size": 128,
|
| 2351 |
+
"mode": "affine"
|
| 2352 |
+
},
|
| 2353 |
+
"model.layers.2.self_attn.g_proj": {
|
| 2354 |
+
"bits": 6,
|
| 2355 |
+
"group_size": 64,
|
| 2356 |
+
"mode": "affine"
|
| 2357 |
+
},
|
| 2358 |
+
"model.layers.2.self_attn.k_proj": {
|
| 2359 |
+
"bits": 6,
|
| 2360 |
+
"group_size": 64,
|
| 2361 |
+
"mode": "affine"
|
| 2362 |
+
},
|
| 2363 |
+
"model.layers.2.self_attn.o_proj": {
|
| 2364 |
+
"bits": 6,
|
| 2365 |
+
"group_size": 64,
|
| 2366 |
+
"mode": "affine"
|
| 2367 |
+
},
|
| 2368 |
+
"model.layers.2.self_attn.q_proj": {
|
| 2369 |
+
"bits": 6,
|
| 2370 |
+
"group_size": 64,
|
| 2371 |
+
"mode": "affine"
|
| 2372 |
+
},
|
| 2373 |
+
"model.layers.2.self_attn.v_proj": {
|
| 2374 |
+
"bits": 6,
|
| 2375 |
+
"group_size": 64,
|
| 2376 |
+
"mode": "affine"
|
| 2377 |
+
},
|
| 2378 |
+
"model.layers.20.mlp.shared_expert.down_proj": {
|
| 2379 |
+
"bits": 8,
|
| 2380 |
+
"group_size": 128,
|
| 2381 |
+
"mode": "affine"
|
| 2382 |
+
},
|
| 2383 |
+
"model.layers.20.mlp.shared_expert.gate_proj": {
|
| 2384 |
+
"bits": 8,
|
| 2385 |
+
"group_size": 128,
|
| 2386 |
+
"mode": "affine"
|
| 2387 |
+
},
|
| 2388 |
+
"model.layers.20.mlp.shared_expert.up_proj": {
|
| 2389 |
+
"bits": 8,
|
| 2390 |
+
"group_size": 128,
|
| 2391 |
+
"mode": "affine"
|
| 2392 |
+
},
|
| 2393 |
+
"model.layers.20.self_attn.g_proj": {
|
| 2394 |
+
"bits": 8,
|
| 2395 |
+
"group_size": 64,
|
| 2396 |
+
"mode": "affine"
|
| 2397 |
+
},
|
| 2398 |
+
"model.layers.20.self_attn.k_proj": {
|
| 2399 |
+
"bits": 8,
|
| 2400 |
+
"group_size": 64,
|
| 2401 |
+
"mode": "affine"
|
| 2402 |
+
},
|
| 2403 |
+
"model.layers.20.self_attn.o_proj": {
|
| 2404 |
+
"bits": 8,
|
| 2405 |
+
"group_size": 64,
|
| 2406 |
+
"mode": "affine"
|
| 2407 |
+
},
|
| 2408 |
+
"model.layers.20.self_attn.q_proj": {
|
| 2409 |
+
"bits": 8,
|
| 2410 |
+
"group_size": 64,
|
| 2411 |
+
"mode": "affine"
|
| 2412 |
+
},
|
| 2413 |
+
"model.layers.20.self_attn.v_proj": {
|
| 2414 |
+
"bits": 8,
|
| 2415 |
+
"group_size": 64,
|
| 2416 |
+
"mode": "affine"
|
| 2417 |
+
},
|
| 2418 |
+
"model.layers.21.mlp.shared_expert.down_proj": {
|
| 2419 |
+
"bits": 8,
|
| 2420 |
+
"group_size": 128,
|
| 2421 |
+
"mode": "affine"
|
| 2422 |
+
},
|
| 2423 |
+
"model.layers.21.mlp.shared_expert.gate_proj": {
|
| 2424 |
+
"bits": 8,
|
| 2425 |
+
"group_size": 128,
|
| 2426 |
+
"mode": "affine"
|
| 2427 |
+
},
|
| 2428 |
+
"model.layers.21.mlp.shared_expert.up_proj": {
|
| 2429 |
+
"bits": 8,
|
| 2430 |
+
"group_size": 128,
|
| 2431 |
+
"mode": "affine"
|
| 2432 |
+
},
|
| 2433 |
+
"model.layers.21.self_attn.g_proj": {
|
| 2434 |
+
"bits": 6,
|
| 2435 |
+
"group_size": 64,
|
| 2436 |
+
"mode": "affine"
|
| 2437 |
+
},
|
| 2438 |
+
"model.layers.21.self_attn.k_proj": {
|
| 2439 |
+
"bits": 6,
|
| 2440 |
+
"group_size": 64,
|
| 2441 |
+
"mode": "affine"
|
| 2442 |
+
},
|
| 2443 |
+
"model.layers.21.self_attn.o_proj": {
|
| 2444 |
+
"bits": 6,
|
| 2445 |
+
"group_size": 64,
|
| 2446 |
+
"mode": "affine"
|
| 2447 |
+
},
|
| 2448 |
+
"model.layers.21.self_attn.q_proj": {
|
| 2449 |
+
"bits": 6,
|
| 2450 |
+
"group_size": 64,
|
| 2451 |
+
"mode": "affine"
|
| 2452 |
+
},
|
| 2453 |
+
"model.layers.21.self_attn.v_proj": {
|
| 2454 |
+
"bits": 6,
|
| 2455 |
+
"group_size": 64,
|
| 2456 |
+
"mode": "affine"
|
| 2457 |
+
},
|
| 2458 |
+
"model.layers.22.mlp.shared_expert.down_proj": {
|
| 2459 |
+
"bits": 8,
|
| 2460 |
+
"group_size": 128,
|
| 2461 |
+
"mode": "affine"
|
| 2462 |
+
},
|
| 2463 |
+
"model.layers.22.mlp.shared_expert.gate_proj": {
|
| 2464 |
+
"bits": 8,
|
| 2465 |
+
"group_size": 128,
|
| 2466 |
+
"mode": "affine"
|
| 2467 |
+
},
|
| 2468 |
+
"model.layers.22.mlp.shared_expert.up_proj": {
|
| 2469 |
+
"bits": 8,
|
| 2470 |
+
"group_size": 128,
|
| 2471 |
+
"mode": "affine"
|
| 2472 |
+
},
|
| 2473 |
+
"model.layers.22.self_attn.g_proj": {
|
| 2474 |
+
"bits": 6,
|
| 2475 |
+
"group_size": 64,
|
| 2476 |
+
"mode": "affine"
|
| 2477 |
+
},
|
| 2478 |
+
"model.layers.22.self_attn.k_proj": {
|
| 2479 |
+
"bits": 6,
|
| 2480 |
+
"group_size": 64,
|
| 2481 |
+
"mode": "affine"
|
| 2482 |
+
},
|
| 2483 |
+
"model.layers.22.self_attn.o_proj": {
|
| 2484 |
+
"bits": 6,
|
| 2485 |
+
"group_size": 64,
|
| 2486 |
+
"mode": "affine"
|
| 2487 |
+
},
|
| 2488 |
+
"model.layers.22.self_attn.q_proj": {
|
| 2489 |
+
"bits": 6,
|
| 2490 |
+
"group_size": 64,
|
| 2491 |
+
"mode": "affine"
|
| 2492 |
+
},
|
| 2493 |
+
"model.layers.22.self_attn.v_proj": {
|
| 2494 |
+
"bits": 6,
|
| 2495 |
+
"group_size": 64,
|
| 2496 |
+
"mode": "affine"
|
| 2497 |
+
},
|
| 2498 |
+
"model.layers.23.mlp.shared_expert.down_proj": {
|
| 2499 |
+
"bits": 8,
|
| 2500 |
+
"group_size": 128,
|
| 2501 |
+
"mode": "affine"
|
| 2502 |
+
},
|
| 2503 |
+
"model.layers.23.mlp.shared_expert.gate_proj": {
|
| 2504 |
+
"bits": 8,
|
| 2505 |
+
"group_size": 128,
|
| 2506 |
+
"mode": "affine"
|
| 2507 |
+
},
|
| 2508 |
+
"model.layers.23.mlp.shared_expert.up_proj": {
|
| 2509 |
+
"bits": 8,
|
| 2510 |
+
"group_size": 128,
|
| 2511 |
+
"mode": "affine"
|
| 2512 |
+
},
|
| 2513 |
+
"model.layers.23.self_attn.g_proj": {
|
| 2514 |
+
"bits": 6,
|
| 2515 |
+
"group_size": 64,
|
| 2516 |
+
"mode": "affine"
|
| 2517 |
+
},
|
| 2518 |
+
"model.layers.23.self_attn.k_proj": {
|
| 2519 |
+
"bits": 6,
|
| 2520 |
+
"group_size": 64,
|
| 2521 |
+
"mode": "affine"
|
| 2522 |
+
},
|
| 2523 |
+
"model.layers.23.self_attn.o_proj": {
|
| 2524 |
+
"bits": 6,
|
| 2525 |
+
"group_size": 64,
|
| 2526 |
+
"mode": "affine"
|
| 2527 |
+
},
|
| 2528 |
+
"model.layers.23.self_attn.q_proj": {
|
| 2529 |
+
"bits": 6,
|
| 2530 |
+
"group_size": 64,
|
| 2531 |
+
"mode": "affine"
|
| 2532 |
+
},
|
| 2533 |
+
"model.layers.23.self_attn.v_proj": {
|
| 2534 |
+
"bits": 6,
|
| 2535 |
+
"group_size": 64,
|
| 2536 |
+
"mode": "affine"
|
| 2537 |
+
},
|
| 2538 |
+
"model.layers.24.mlp.shared_expert.down_proj": {
|
| 2539 |
+
"bits": 8,
|
| 2540 |
+
"group_size": 128,
|
| 2541 |
+
"mode": "affine"
|
| 2542 |
+
},
|
| 2543 |
+
"model.layers.24.mlp.shared_expert.gate_proj": {
|
| 2544 |
+
"bits": 8,
|
| 2545 |
+
"group_size": 128,
|
| 2546 |
+
"mode": "affine"
|
| 2547 |
+
},
|
| 2548 |
+
"model.layers.24.mlp.shared_expert.up_proj": {
|
| 2549 |
+
"bits": 8,
|
| 2550 |
+
"group_size": 128,
|
| 2551 |
+
"mode": "affine"
|
| 2552 |
+
},
|
| 2553 |
+
"model.layers.24.self_attn.g_proj": {
|
| 2554 |
+
"bits": 8,
|
| 2555 |
+
"group_size": 64,
|
| 2556 |
+
"mode": "affine"
|
| 2557 |
+
},
|
| 2558 |
+
"model.layers.24.self_attn.k_proj": {
|
| 2559 |
+
"bits": 8,
|
| 2560 |
+
"group_size": 64,
|
| 2561 |
+
"mode": "affine"
|
| 2562 |
+
},
|
| 2563 |
+
"model.layers.24.self_attn.o_proj": {
|
| 2564 |
+
"bits": 8,
|
| 2565 |
+
"group_size": 64,
|
| 2566 |
+
"mode": "affine"
|
| 2567 |
+
},
|
| 2568 |
+
"model.layers.24.self_attn.q_proj": {
|
| 2569 |
+
"bits": 8,
|
| 2570 |
+
"group_size": 64,
|
| 2571 |
+
"mode": "affine"
|
| 2572 |
+
},
|
| 2573 |
+
"model.layers.24.self_attn.v_proj": {
|
| 2574 |
+
"bits": 8,
|
| 2575 |
+
"group_size": 64,
|
| 2576 |
+
"mode": "affine"
|
| 2577 |
+
},
|
| 2578 |
+
"model.layers.25.mlp.shared_expert.down_proj": {
|
| 2579 |
+
"bits": 8,
|
| 2580 |
+
"group_size": 128,
|
| 2581 |
+
"mode": "affine"
|
| 2582 |
+
},
|
| 2583 |
+
"model.layers.25.mlp.shared_expert.gate_proj": {
|
| 2584 |
+
"bits": 8,
|
| 2585 |
+
"group_size": 128,
|
| 2586 |
+
"mode": "affine"
|
| 2587 |
+
},
|
| 2588 |
+
"model.layers.25.mlp.shared_expert.up_proj": {
|
| 2589 |
+
"bits": 8,
|
| 2590 |
+
"group_size": 128,
|
| 2591 |
+
"mode": "affine"
|
| 2592 |
+
},
|
| 2593 |
+
"model.layers.25.self_attn.g_proj": {
|
| 2594 |
+
"bits": 6,
|
| 2595 |
+
"group_size": 64,
|
| 2596 |
+
"mode": "affine"
|
| 2597 |
+
},
|
| 2598 |
+
"model.layers.25.self_attn.k_proj": {
|
| 2599 |
+
"bits": 6,
|
| 2600 |
+
"group_size": 64,
|
| 2601 |
+
"mode": "affine"
|
| 2602 |
+
},
|
| 2603 |
+
"model.layers.25.self_attn.o_proj": {
|
| 2604 |
+
"bits": 6,
|
| 2605 |
+
"group_size": 64,
|
| 2606 |
+
"mode": "affine"
|
| 2607 |
+
},
|
| 2608 |
+
"model.layers.25.self_attn.q_proj": {
|
| 2609 |
+
"bits": 6,
|
| 2610 |
+
"group_size": 64,
|
| 2611 |
+
"mode": "affine"
|
| 2612 |
+
},
|
| 2613 |
+
"model.layers.25.self_attn.v_proj": {
|
| 2614 |
+
"bits": 6,
|
| 2615 |
+
"group_size": 64,
|
| 2616 |
+
"mode": "affine"
|
| 2617 |
+
},
|
| 2618 |
+
"model.layers.26.mlp.shared_expert.down_proj": {
|
| 2619 |
+
"bits": 8,
|
| 2620 |
+
"group_size": 128,
|
| 2621 |
+
"mode": "affine"
|
| 2622 |
+
},
|
| 2623 |
+
"model.layers.26.mlp.shared_expert.gate_proj": {
|
| 2624 |
+
"bits": 8,
|
| 2625 |
+
"group_size": 128,
|
| 2626 |
+
"mode": "affine"
|
| 2627 |
+
},
|
| 2628 |
+
"model.layers.26.mlp.shared_expert.up_proj": {
|
| 2629 |
+
"bits": 8,
|
| 2630 |
+
"group_size": 128,
|
| 2631 |
+
"mode": "affine"
|
| 2632 |
+
},
|
| 2633 |
+
"model.layers.26.self_attn.g_proj": {
|
| 2634 |
+
"bits": 6,
|
| 2635 |
+
"group_size": 64,
|
| 2636 |
+
"mode": "affine"
|
| 2637 |
+
},
|
| 2638 |
+
"model.layers.26.self_attn.k_proj": {
|
| 2639 |
+
"bits": 6,
|
| 2640 |
+
"group_size": 64,
|
| 2641 |
+
"mode": "affine"
|
| 2642 |
+
},
|
| 2643 |
+
"model.layers.26.self_attn.o_proj": {
|
| 2644 |
+
"bits": 6,
|
| 2645 |
+
"group_size": 64,
|
| 2646 |
+
"mode": "affine"
|
| 2647 |
+
},
|
| 2648 |
+
"model.layers.26.self_attn.q_proj": {
|
| 2649 |
+
"bits": 6,
|
| 2650 |
+
"group_size": 64,
|
| 2651 |
+
"mode": "affine"
|
| 2652 |
+
},
|
| 2653 |
+
"model.layers.26.self_attn.v_proj": {
|
| 2654 |
+
"bits": 6,
|
| 2655 |
+
"group_size": 64,
|
| 2656 |
+
"mode": "affine"
|
| 2657 |
+
},
|
| 2658 |
+
"model.layers.27.mlp.shared_expert.down_proj": {
|
| 2659 |
+
"bits": 8,
|
| 2660 |
+
"group_size": 128,
|
| 2661 |
+
"mode": "affine"
|
| 2662 |
+
},
|
| 2663 |
+
"model.layers.27.mlp.shared_expert.gate_proj": {
|
| 2664 |
+
"bits": 8,
|
| 2665 |
+
"group_size": 128,
|
| 2666 |
+
"mode": "affine"
|
| 2667 |
+
},
|
| 2668 |
+
"model.layers.27.mlp.shared_expert.up_proj": {
|
| 2669 |
+
"bits": 8,
|
| 2670 |
+
"group_size": 128,
|
| 2671 |
+
"mode": "affine"
|
| 2672 |
+
},
|
| 2673 |
+
"model.layers.27.self_attn.g_proj": {
|
| 2674 |
+
"bits": 6,
|
| 2675 |
+
"group_size": 64,
|
| 2676 |
+
"mode": "affine"
|
| 2677 |
+
},
|
| 2678 |
+
"model.layers.27.self_attn.k_proj": {
|
| 2679 |
+
"bits": 6,
|
| 2680 |
+
"group_size": 64,
|
| 2681 |
+
"mode": "affine"
|
| 2682 |
+
},
|
| 2683 |
+
"model.layers.27.self_attn.o_proj": {
|
| 2684 |
+
"bits": 6,
|
| 2685 |
+
"group_size": 64,
|
| 2686 |
+
"mode": "affine"
|
| 2687 |
+
},
|
| 2688 |
+
"model.layers.27.self_attn.q_proj": {
|
| 2689 |
+
"bits": 6,
|
| 2690 |
+
"group_size": 64,
|
| 2691 |
+
"mode": "affine"
|
| 2692 |
+
},
|
| 2693 |
+
"model.layers.27.self_attn.v_proj": {
|
| 2694 |
+
"bits": 6,
|
| 2695 |
+
"group_size": 64,
|
| 2696 |
+
"mode": "affine"
|
| 2697 |
+
},
|
| 2698 |
+
"model.layers.28.mlp.shared_expert.down_proj": {
|
| 2699 |
+
"bits": 8,
|
| 2700 |
+
"group_size": 128,
|
| 2701 |
+
"mode": "affine"
|
| 2702 |
+
},
|
| 2703 |
+
"model.layers.28.mlp.shared_expert.gate_proj": {
|
| 2704 |
+
"bits": 8,
|
| 2705 |
+
"group_size": 128,
|
| 2706 |
+
"mode": "affine"
|
| 2707 |
+
},
|
| 2708 |
+
"model.layers.28.mlp.shared_expert.up_proj": {
|
| 2709 |
+
"bits": 8,
|
| 2710 |
+
"group_size": 128,
|
| 2711 |
+
"mode": "affine"
|
| 2712 |
+
},
|
| 2713 |
+
"model.layers.28.self_attn.g_proj": {
|
| 2714 |
+
"bits": 8,
|
| 2715 |
+
"group_size": 64,
|
| 2716 |
+
"mode": "affine"
|
| 2717 |
+
},
|
| 2718 |
+
"model.layers.28.self_attn.k_proj": {
|
| 2719 |
+
"bits": 8,
|
| 2720 |
+
"group_size": 64,
|
| 2721 |
+
"mode": "affine"
|
| 2722 |
+
},
|
| 2723 |
+
"model.layers.28.self_attn.o_proj": {
|
| 2724 |
+
"bits": 8,
|
| 2725 |
+
"group_size": 64,
|
| 2726 |
+
"mode": "affine"
|
| 2727 |
+
},
|
| 2728 |
+
"model.layers.28.self_attn.q_proj": {
|
| 2729 |
+
"bits": 8,
|
| 2730 |
+
"group_size": 64,
|
| 2731 |
+
"mode": "affine"
|
| 2732 |
+
},
|
| 2733 |
+
"model.layers.28.self_attn.v_proj": {
|
| 2734 |
+
"bits": 8,
|
| 2735 |
+
"group_size": 64,
|
| 2736 |
+
"mode": "affine"
|
| 2737 |
+
},
|
| 2738 |
+
"model.layers.29.mlp.shared_expert.down_proj": {
|
| 2739 |
+
"bits": 8,
|
| 2740 |
+
"group_size": 128,
|
| 2741 |
+
"mode": "affine"
|
| 2742 |
+
},
|
| 2743 |
+
"model.layers.29.mlp.shared_expert.gate_proj": {
|
| 2744 |
+
"bits": 8,
|
| 2745 |
+
"group_size": 128,
|
| 2746 |
+
"mode": "affine"
|
| 2747 |
+
},
|
| 2748 |
+
"model.layers.29.mlp.shared_expert.up_proj": {
|
| 2749 |
+
"bits": 8,
|
| 2750 |
+
"group_size": 128,
|
| 2751 |
+
"mode": "affine"
|
| 2752 |
+
},
|
| 2753 |
+
"model.layers.29.self_attn.g_proj": {
|
| 2754 |
+
"bits": 6,
|
| 2755 |
+
"group_size": 64,
|
| 2756 |
+
"mode": "affine"
|
| 2757 |
+
},
|
| 2758 |
+
"model.layers.29.self_attn.k_proj": {
|
| 2759 |
+
"bits": 6,
|
| 2760 |
+
"group_size": 64,
|
| 2761 |
+
"mode": "affine"
|
| 2762 |
+
},
|
| 2763 |
+
"model.layers.29.self_attn.o_proj": {
|
| 2764 |
+
"bits": 6,
|
| 2765 |
+
"group_size": 64,
|
| 2766 |
+
"mode": "affine"
|
| 2767 |
+
},
|
| 2768 |
+
"model.layers.29.self_attn.q_proj": {
|
| 2769 |
+
"bits": 6,
|
| 2770 |
+
"group_size": 64,
|
| 2771 |
+
"mode": "affine"
|
| 2772 |
+
},
|
| 2773 |
+
"model.layers.29.self_attn.v_proj": {
|
| 2774 |
+
"bits": 6,
|
| 2775 |
+
"group_size": 64,
|
| 2776 |
+
"mode": "affine"
|
| 2777 |
+
},
|
| 2778 |
+
"model.layers.3.mlp.shared_expert.down_proj": {
|
| 2779 |
+
"bits": 8,
|
| 2780 |
+
"group_size": 128,
|
| 2781 |
+
"mode": "affine"
|
| 2782 |
+
},
|
| 2783 |
+
"model.layers.3.mlp.shared_expert.gate_proj": {
|
| 2784 |
+
"bits": 8,
|
| 2785 |
+
"group_size": 128,
|
| 2786 |
+
"mode": "affine"
|
| 2787 |
+
},
|
| 2788 |
+
"model.layers.3.mlp.shared_expert.up_proj": {
|
| 2789 |
+
"bits": 8,
|
| 2790 |
+
"group_size": 128,
|
| 2791 |
+
"mode": "affine"
|
| 2792 |
+
},
|
| 2793 |
+
"model.layers.3.self_attn.g_proj": {
|
| 2794 |
+
"bits": 5,
|
| 2795 |
+
"group_size": 64,
|
| 2796 |
+
"mode": "affine"
|
| 2797 |
+
},
|
| 2798 |
+
"model.layers.3.self_attn.k_proj": {
|
| 2799 |
+
"bits": 5,
|
| 2800 |
+
"group_size": 64,
|
| 2801 |
+
"mode": "affine"
|
| 2802 |
+
},
|
| 2803 |
+
"model.layers.3.self_attn.o_proj": {
|
| 2804 |
+
"bits": 5,
|
| 2805 |
+
"group_size": 64,
|
| 2806 |
+
"mode": "affine"
|
| 2807 |
+
},
|
| 2808 |
+
"model.layers.3.self_attn.q_proj": {
|
| 2809 |
+
"bits": 5,
|
| 2810 |
+
"group_size": 64,
|
| 2811 |
+
"mode": "affine"
|
| 2812 |
+
},
|
| 2813 |
+
"model.layers.3.self_attn.v_proj": {
|
| 2814 |
+
"bits": 5,
|
| 2815 |
+
"group_size": 64,
|
| 2816 |
+
"mode": "affine"
|
| 2817 |
+
},
|
| 2818 |
+
"model.layers.30.mlp.shared_expert.down_proj": {
|
| 2819 |
+
"bits": 8,
|
| 2820 |
+
"group_size": 128,
|
| 2821 |
+
"mode": "affine"
|
| 2822 |
+
},
|
| 2823 |
+
"model.layers.30.mlp.shared_expert.gate_proj": {
|
| 2824 |
+
"bits": 8,
|
| 2825 |
+
"group_size": 128,
|
| 2826 |
+
"mode": "affine"
|
| 2827 |
+
},
|
| 2828 |
+
"model.layers.30.mlp.shared_expert.up_proj": {
|
| 2829 |
+
"bits": 8,
|
| 2830 |
+
"group_size": 128,
|
| 2831 |
+
"mode": "affine"
|
| 2832 |
+
},
|
| 2833 |
+
"model.layers.30.self_attn.g_proj": {
|
| 2834 |
+
"bits": 5,
|
| 2835 |
+
"group_size": 64,
|
| 2836 |
+
"mode": "affine"
|
| 2837 |
+
},
|
| 2838 |
+
"model.layers.30.self_attn.k_proj": {
|
| 2839 |
+
"bits": 5,
|
| 2840 |
+
"group_size": 64,
|
| 2841 |
+
"mode": "affine"
|
| 2842 |
+
},
|
| 2843 |
+
"model.layers.30.self_attn.o_proj": {
|
| 2844 |
+
"bits": 5,
|
| 2845 |
+
"group_size": 64,
|
| 2846 |
+
"mode": "affine"
|
| 2847 |
+
},
|
| 2848 |
+
"model.layers.30.self_attn.q_proj": {
|
| 2849 |
+
"bits": 5,
|
| 2850 |
+
"group_size": 64,
|
| 2851 |
+
"mode": "affine"
|
| 2852 |
+
},
|
| 2853 |
+
"model.layers.30.self_attn.v_proj": {
|
| 2854 |
+
"bits": 5,
|
| 2855 |
+
"group_size": 64,
|
| 2856 |
+
"mode": "affine"
|
| 2857 |
+
},
|
| 2858 |
+
"model.layers.31.mlp.shared_expert.down_proj": {
|
| 2859 |
+
"bits": 8,
|
| 2860 |
+
"group_size": 128,
|
| 2861 |
+
"mode": "affine"
|
| 2862 |
+
},
|
| 2863 |
+
"model.layers.31.mlp.shared_expert.gate_proj": {
|
| 2864 |
+
"bits": 8,
|
| 2865 |
+
"group_size": 128,
|
| 2866 |
+
"mode": "affine"
|
| 2867 |
+
},
|
| 2868 |
+
"model.layers.31.mlp.shared_expert.up_proj": {
|
| 2869 |
+
"bits": 8,
|
| 2870 |
+
"group_size": 128,
|
| 2871 |
+
"mode": "affine"
|
| 2872 |
+
},
|
| 2873 |
+
"model.layers.31.self_attn.g_proj": {
|
| 2874 |
+
"bits": 5,
|
| 2875 |
+
"group_size": 64,
|
| 2876 |
+
"mode": "affine"
|
| 2877 |
+
},
|
| 2878 |
+
"model.layers.31.self_attn.k_proj": {
|
| 2879 |
+
"bits": 5,
|
| 2880 |
+
"group_size": 64,
|
| 2881 |
+
"mode": "affine"
|
| 2882 |
+
},
|
| 2883 |
+
"model.layers.31.self_attn.o_proj": {
|
| 2884 |
+
"bits": 5,
|
| 2885 |
+
"group_size": 64,
|
| 2886 |
+
"mode": "affine"
|
| 2887 |
+
},
|
| 2888 |
+
"model.layers.31.self_attn.q_proj": {
|
| 2889 |
+
"bits": 5,
|
| 2890 |
+
"group_size": 64,
|
| 2891 |
+
"mode": "affine"
|
| 2892 |
+
},
|
| 2893 |
+
"model.layers.31.self_attn.v_proj": {
|
| 2894 |
+
"bits": 5,
|
| 2895 |
+
"group_size": 64,
|
| 2896 |
+
"mode": "affine"
|
| 2897 |
+
},
|
| 2898 |
+
"model.layers.32.mlp.shared_expert.down_proj": {
|
| 2899 |
+
"bits": 8,
|
| 2900 |
+
"group_size": 128,
|
| 2901 |
+
"mode": "affine"
|
| 2902 |
+
},
|
| 2903 |
+
"model.layers.32.mlp.shared_expert.gate_proj": {
|
| 2904 |
+
"bits": 8,
|
| 2905 |
+
"group_size": 128,
|
| 2906 |
+
"mode": "affine"
|
| 2907 |
+
},
|
| 2908 |
+
"model.layers.32.mlp.shared_expert.up_proj": {
|
| 2909 |
+
"bits": 8,
|
| 2910 |
+
"group_size": 128,
|
| 2911 |
+
"mode": "affine"
|
| 2912 |
+
},
|
| 2913 |
+
"model.layers.32.self_attn.g_proj": {
|
| 2914 |
+
"bits": 6,
|
| 2915 |
+
"group_size": 64,
|
| 2916 |
+
"mode": "affine"
|
| 2917 |
+
},
|
| 2918 |
+
"model.layers.32.self_attn.k_proj": {
|
| 2919 |
+
"bits": 6,
|
| 2920 |
+
"group_size": 64,
|
| 2921 |
+
"mode": "affine"
|
| 2922 |
+
},
|
| 2923 |
+
"model.layers.32.self_attn.o_proj": {
|
| 2924 |
+
"bits": 6,
|
| 2925 |
+
"group_size": 64,
|
| 2926 |
+
"mode": "affine"
|
| 2927 |
+
},
|
| 2928 |
+
"model.layers.32.self_attn.q_proj": {
|
| 2929 |
+
"bits": 6,
|
| 2930 |
+
"group_size": 64,
|
| 2931 |
+
"mode": "affine"
|
| 2932 |
+
},
|
| 2933 |
+
"model.layers.32.self_attn.v_proj": {
|
| 2934 |
+
"bits": 6,
|
| 2935 |
+
"group_size": 64,
|
| 2936 |
+
"mode": "affine"
|
| 2937 |
+
},
|
| 2938 |
+
"model.layers.33.mlp.shared_expert.down_proj": {
|
| 2939 |
+
"bits": 8,
|
| 2940 |
+
"group_size": 128,
|
| 2941 |
+
"mode": "affine"
|
| 2942 |
+
},
|
| 2943 |
+
"model.layers.33.mlp.shared_expert.gate_proj": {
|
| 2944 |
+
"bits": 8,
|
| 2945 |
+
"group_size": 128,
|
| 2946 |
+
"mode": "affine"
|
| 2947 |
+
},
|
| 2948 |
+
"model.layers.33.mlp.shared_expert.up_proj": {
|
| 2949 |
+
"bits": 8,
|
| 2950 |
+
"group_size": 128,
|
| 2951 |
+
"mode": "affine"
|
| 2952 |
+
},
|
| 2953 |
+
"model.layers.33.self_attn.g_proj": {
|
| 2954 |
+
"bits": 5,
|
| 2955 |
+
"group_size": 64,
|
| 2956 |
+
"mode": "affine"
|
| 2957 |
+
},
|
| 2958 |
+
"model.layers.33.self_attn.k_proj": {
|
| 2959 |
+
"bits": 5,
|
| 2960 |
+
"group_size": 64,
|
| 2961 |
+
"mode": "affine"
|
| 2962 |
+
},
|
| 2963 |
+
"model.layers.33.self_attn.o_proj": {
|
| 2964 |
+
"bits": 5,
|
| 2965 |
+
"group_size": 64,
|
| 2966 |
+
"mode": "affine"
|
| 2967 |
+
},
|
| 2968 |
+
"model.layers.33.self_attn.q_proj": {
|
| 2969 |
+
"bits": 5,
|
| 2970 |
+
"group_size": 64,
|
| 2971 |
+
"mode": "affine"
|
| 2972 |
+
},
|
| 2973 |
+
"model.layers.33.self_attn.v_proj": {
|
| 2974 |
+
"bits": 5,
|
| 2975 |
+
"group_size": 64,
|
| 2976 |
+
"mode": "affine"
|
| 2977 |
+
},
|
| 2978 |
+
"model.layers.34.mlp.shared_expert.down_proj": {
|
| 2979 |
+
"bits": 8,
|
| 2980 |
+
"group_size": 128,
|
| 2981 |
+
"mode": "affine"
|
| 2982 |
+
},
|
| 2983 |
+
"model.layers.34.mlp.shared_expert.gate_proj": {
|
| 2984 |
+
"bits": 8,
|
| 2985 |
+
"group_size": 128,
|
| 2986 |
+
"mode": "affine"
|
| 2987 |
+
},
|
| 2988 |
+
"model.layers.34.mlp.shared_expert.up_proj": {
|
| 2989 |
+
"bits": 8,
|
| 2990 |
+
"group_size": 128,
|
| 2991 |
+
"mode": "affine"
|
| 2992 |
+
},
|
| 2993 |
+
"model.layers.34.self_attn.g_proj": {
|
| 2994 |
+
"bits": 5,
|
| 2995 |
+
"group_size": 64,
|
| 2996 |
+
"mode": "affine"
|
| 2997 |
+
},
|
| 2998 |
+
"model.layers.34.self_attn.k_proj": {
|
| 2999 |
+
"bits": 5,
|
| 3000 |
+
"group_size": 64,
|
| 3001 |
+
"mode": "affine"
|
| 3002 |
+
},
|
| 3003 |
+
"model.layers.34.self_attn.o_proj": {
|
| 3004 |
+
"bits": 5,
|
| 3005 |
+
"group_size": 64,
|
| 3006 |
+
"mode": "affine"
|
| 3007 |
+
},
|
| 3008 |
+
"model.layers.34.self_attn.q_proj": {
|
| 3009 |
+
"bits": 5,
|
| 3010 |
+
"group_size": 64,
|
| 3011 |
+
"mode": "affine"
|
| 3012 |
+
},
|
| 3013 |
+
"model.layers.34.self_attn.v_proj": {
|
| 3014 |
+
"bits": 5,
|
| 3015 |
+
"group_size": 64,
|
| 3016 |
+
"mode": "affine"
|
| 3017 |
+
},
|
| 3018 |
+
"model.layers.35.mlp.shared_expert.down_proj": {
|
| 3019 |
+
"bits": 8,
|
| 3020 |
+
"group_size": 128,
|
| 3021 |
+
"mode": "affine"
|
| 3022 |
+
},
|
| 3023 |
+
"model.layers.35.mlp.shared_expert.gate_proj": {
|
| 3024 |
+
"bits": 8,
|
| 3025 |
+
"group_size": 128,
|
| 3026 |
+
"mode": "affine"
|
| 3027 |
+
},
|
| 3028 |
+
"model.layers.35.mlp.shared_expert.up_proj": {
|
| 3029 |
+
"bits": 8,
|
| 3030 |
+
"group_size": 128,
|
| 3031 |
+
"mode": "affine"
|
| 3032 |
+
},
|
| 3033 |
+
"model.layers.35.self_attn.g_proj": {
|
| 3034 |
+
"bits": 5,
|
| 3035 |
+
"group_size": 64,
|
| 3036 |
+
"mode": "affine"
|
| 3037 |
+
},
|
| 3038 |
+
"model.layers.35.self_attn.k_proj": {
|
| 3039 |
+
"bits": 5,
|
| 3040 |
+
"group_size": 64,
|
| 3041 |
+
"mode": "affine"
|
| 3042 |
+
},
|
| 3043 |
+
"model.layers.35.self_attn.o_proj": {
|
| 3044 |
+
"bits": 5,
|
| 3045 |
+
"group_size": 64,
|
| 3046 |
+
"mode": "affine"
|
| 3047 |
+
},
|
| 3048 |
+
"model.layers.35.self_attn.q_proj": {
|
| 3049 |
+
"bits": 5,
|
| 3050 |
+
"group_size": 64,
|
| 3051 |
+
"mode": "affine"
|
| 3052 |
+
},
|
| 3053 |
+
"model.layers.35.self_attn.v_proj": {
|
| 3054 |
+
"bits": 5,
|
| 3055 |
+
"group_size": 64,
|
| 3056 |
+
"mode": "affine"
|
| 3057 |
+
},
|
| 3058 |
+
"model.layers.36.mlp.shared_expert.down_proj": {
|
| 3059 |
+
"bits": 8,
|
| 3060 |
+
"group_size": 128,
|
| 3061 |
+
"mode": "affine"
|
| 3062 |
+
},
|
| 3063 |
+
"model.layers.36.mlp.shared_expert.gate_proj": {
|
| 3064 |
+
"bits": 8,
|
| 3065 |
+
"group_size": 128,
|
| 3066 |
+
"mode": "affine"
|
| 3067 |
+
},
|
| 3068 |
+
"model.layers.36.mlp.shared_expert.up_proj": {
|
| 3069 |
+
"bits": 8,
|
| 3070 |
+
"group_size": 128,
|
| 3071 |
+
"mode": "affine"
|
| 3072 |
+
},
|
| 3073 |
+
"model.layers.36.self_attn.g_proj": {
|
| 3074 |
+
"bits": 8,
|
| 3075 |
+
"group_size": 64,
|
| 3076 |
+
"mode": "affine"
|
| 3077 |
+
},
|
| 3078 |
+
"model.layers.36.self_attn.k_proj": {
|
| 3079 |
+
"bits": 8,
|
| 3080 |
+
"group_size": 64,
|
| 3081 |
+
"mode": "affine"
|
| 3082 |
+
},
|
| 3083 |
+
"model.layers.36.self_attn.o_proj": {
|
| 3084 |
+
"bits": 8,
|
| 3085 |
+
"group_size": 64,
|
| 3086 |
+
"mode": "affine"
|
| 3087 |
+
},
|
| 3088 |
+
"model.layers.36.self_attn.q_proj": {
|
| 3089 |
+
"bits": 8,
|
| 3090 |
+
"group_size": 64,
|
| 3091 |
+
"mode": "affine"
|
| 3092 |
+
},
|
| 3093 |
+
"model.layers.36.self_attn.v_proj": {
|
| 3094 |
+
"bits": 8,
|
| 3095 |
+
"group_size": 64,
|
| 3096 |
+
"mode": "affine"
|
| 3097 |
+
},
|
| 3098 |
+
"model.layers.37.mlp.shared_expert.down_proj": {
|
| 3099 |
+
"bits": 8,
|
| 3100 |
+
"group_size": 128,
|
| 3101 |
+
"mode": "affine"
|
| 3102 |
+
},
|
| 3103 |
+
"model.layers.37.mlp.shared_expert.gate_proj": {
|
| 3104 |
+
"bits": 8,
|
| 3105 |
+
"group_size": 128,
|
| 3106 |
+
"mode": "affine"
|
| 3107 |
+
},
|
| 3108 |
+
"model.layers.37.mlp.shared_expert.up_proj": {
|
| 3109 |
+
"bits": 8,
|
| 3110 |
+
"group_size": 128,
|
| 3111 |
+
"mode": "affine"
|
| 3112 |
+
},
|
| 3113 |
+
"model.layers.37.self_attn.g_proj": {
|
| 3114 |
+
"bits": 6,
|
| 3115 |
+
"group_size": 64,
|
| 3116 |
+
"mode": "affine"
|
| 3117 |
+
},
|
| 3118 |
+
"model.layers.37.self_attn.k_proj": {
|
| 3119 |
+
"bits": 6,
|
| 3120 |
+
"group_size": 64,
|
| 3121 |
+
"mode": "affine"
|
| 3122 |
+
},
|
| 3123 |
+
"model.layers.37.self_attn.o_proj": {
|
| 3124 |
+
"bits": 6,
|
| 3125 |
+
"group_size": 64,
|
| 3126 |
+
"mode": "affine"
|
| 3127 |
+
},
|
| 3128 |
+
"model.layers.37.self_attn.q_proj": {
|
| 3129 |
+
"bits": 6,
|
| 3130 |
+
"group_size": 64,
|
| 3131 |
+
"mode": "affine"
|
| 3132 |
+
},
|
| 3133 |
+
"model.layers.37.self_attn.v_proj": {
|
| 3134 |
+
"bits": 6,
|
| 3135 |
+
"group_size": 64,
|
| 3136 |
+
"mode": "affine"
|
| 3137 |
+
},
|
| 3138 |
+
"model.layers.38.mlp.shared_expert.down_proj": {
|
| 3139 |
+
"bits": 8,
|
| 3140 |
+
"group_size": 128,
|
| 3141 |
+
"mode": "affine"
|
| 3142 |
+
},
|
| 3143 |
+
"model.layers.38.mlp.shared_expert.gate_proj": {
|
| 3144 |
+
"bits": 8,
|
| 3145 |
+
"group_size": 128,
|
| 3146 |
+
"mode": "affine"
|
| 3147 |
+
},
|
| 3148 |
+
"model.layers.38.mlp.shared_expert.up_proj": {
|
| 3149 |
+
"bits": 8,
|
| 3150 |
+
"group_size": 128,
|
| 3151 |
+
"mode": "affine"
|
| 3152 |
+
},
|
| 3153 |
+
"model.layers.38.self_attn.g_proj": {
|
| 3154 |
+
"bits": 6,
|
| 3155 |
+
"group_size": 64,
|
| 3156 |
+
"mode": "affine"
|
| 3157 |
+
},
|
| 3158 |
+
"model.layers.38.self_attn.k_proj": {
|
| 3159 |
+
"bits": 6,
|
| 3160 |
+
"group_size": 64,
|
| 3161 |
+
"mode": "affine"
|
| 3162 |
+
},
|
| 3163 |
+
"model.layers.38.self_attn.o_proj": {
|
| 3164 |
+
"bits": 6,
|
| 3165 |
+
"group_size": 64,
|
| 3166 |
+
"mode": "affine"
|
| 3167 |
+
},
|
| 3168 |
+
"model.layers.38.self_attn.q_proj": {
|
| 3169 |
+
"bits": 6,
|
| 3170 |
+
"group_size": 64,
|
| 3171 |
+
"mode": "affine"
|
| 3172 |
+
},
|
| 3173 |
+
"model.layers.38.self_attn.v_proj": {
|
| 3174 |
+
"bits": 6,
|
| 3175 |
+
"group_size": 64,
|
| 3176 |
+
"mode": "affine"
|
| 3177 |
+
},
|
| 3178 |
+
"model.layers.39.mlp.shared_expert.down_proj": {
|
| 3179 |
+
"bits": 8,
|
| 3180 |
+
"group_size": 128,
|
| 3181 |
+
"mode": "affine"
|
| 3182 |
+
},
|
| 3183 |
+
"model.layers.39.mlp.shared_expert.gate_proj": {
|
| 3184 |
+
"bits": 8,
|
| 3185 |
+
"group_size": 128,
|
| 3186 |
+
"mode": "affine"
|
| 3187 |
+
},
|
| 3188 |
+
"model.layers.39.mlp.shared_expert.up_proj": {
|
| 3189 |
+
"bits": 8,
|
| 3190 |
+
"group_size": 128,
|
| 3191 |
+
"mode": "affine"
|
| 3192 |
+
},
|
| 3193 |
+
"model.layers.39.self_attn.g_proj": {
|
| 3194 |
+
"bits": 5,
|
| 3195 |
+
"group_size": 64,
|
| 3196 |
+
"mode": "affine"
|
| 3197 |
+
},
|
| 3198 |
+
"model.layers.39.self_attn.k_proj": {
|
| 3199 |
+
"bits": 5,
|
| 3200 |
+
"group_size": 64,
|
| 3201 |
+
"mode": "affine"
|
| 3202 |
+
},
|
| 3203 |
+
"model.layers.39.self_attn.o_proj": {
|
| 3204 |
+
"bits": 5,
|
| 3205 |
+
"group_size": 64,
|
| 3206 |
+
"mode": "affine"
|
| 3207 |
+
},
|
| 3208 |
+
"model.layers.39.self_attn.q_proj": {
|
| 3209 |
+
"bits": 5,
|
| 3210 |
+
"group_size": 64,
|
| 3211 |
+
"mode": "affine"
|
| 3212 |
+
},
|
| 3213 |
+
"model.layers.39.self_attn.v_proj": {
|
| 3214 |
+
"bits": 5,
|
| 3215 |
+
"group_size": 64,
|
| 3216 |
+
"mode": "affine"
|
| 3217 |
+
},
|
| 3218 |
+
"model.layers.4.mlp.shared_expert.down_proj": {
|
| 3219 |
+
"bits": 8,
|
| 3220 |
+
"group_size": 128,
|
| 3221 |
+
"mode": "affine"
|
| 3222 |
+
},
|
| 3223 |
+
"model.layers.4.mlp.shared_expert.gate_proj": {
|
| 3224 |
+
"bits": 8,
|
| 3225 |
+
"group_size": 128,
|
| 3226 |
+
"mode": "affine"
|
| 3227 |
+
},
|
| 3228 |
+
"model.layers.4.mlp.shared_expert.up_proj": {
|
| 3229 |
+
"bits": 8,
|
| 3230 |
+
"group_size": 128,
|
| 3231 |
+
"mode": "affine"
|
| 3232 |
+
},
|
| 3233 |
+
"model.layers.4.self_attn.g_proj": {
|
| 3234 |
+
"bits": 5,
|
| 3235 |
+
"group_size": 64,
|
| 3236 |
+
"mode": "affine"
|
| 3237 |
+
},
|
| 3238 |
+
"model.layers.4.self_attn.k_proj": {
|
| 3239 |
+
"bits": 5,
|
| 3240 |
+
"group_size": 64,
|
| 3241 |
+
"mode": "affine"
|
| 3242 |
+
},
|
| 3243 |
+
"model.layers.4.self_attn.o_proj": {
|
| 3244 |
+
"bits": 5,
|
| 3245 |
+
"group_size": 64,
|
| 3246 |
+
"mode": "affine"
|
| 3247 |
+
},
|
| 3248 |
+
"model.layers.4.self_attn.q_proj": {
|
| 3249 |
+
"bits": 5,
|
| 3250 |
+
"group_size": 64,
|
| 3251 |
+
"mode": "affine"
|
| 3252 |
+
},
|
| 3253 |
+
"model.layers.4.self_attn.v_proj": {
|
| 3254 |
+
"bits": 5,
|
| 3255 |
+
"group_size": 64,
|
| 3256 |
+
"mode": "affine"
|
| 3257 |
+
},
|
| 3258 |
+
"model.layers.5.mlp.shared_expert.down_proj": {
|
| 3259 |
+
"bits": 8,
|
| 3260 |
+
"group_size": 128,
|
| 3261 |
+
"mode": "affine"
|
| 3262 |
+
},
|
| 3263 |
+
"model.layers.5.mlp.shared_expert.gate_proj": {
|
| 3264 |
+
"bits": 8,
|
| 3265 |
+
"group_size": 128,
|
| 3266 |
+
"mode": "affine"
|
| 3267 |
+
},
|
| 3268 |
+
"model.layers.5.mlp.shared_expert.up_proj": {
|
| 3269 |
+
"bits": 8,
|
| 3270 |
+
"group_size": 128,
|
| 3271 |
+
"mode": "affine"
|
| 3272 |
+
},
|
| 3273 |
+
"model.layers.5.self_attn.g_proj": {
|
| 3274 |
+
"bits": 6,
|
| 3275 |
+
"group_size": 64,
|
| 3276 |
+
"mode": "affine"
|
| 3277 |
+
},
|
| 3278 |
+
"model.layers.5.self_attn.k_proj": {
|
| 3279 |
+
"bits": 6,
|
| 3280 |
+
"group_size": 64,
|
| 3281 |
+
"mode": "affine"
|
| 3282 |
+
},
|
| 3283 |
+
"model.layers.5.self_attn.o_proj": {
|
| 3284 |
+
"bits": 6,
|
| 3285 |
+
"group_size": 64,
|
| 3286 |
+
"mode": "affine"
|
| 3287 |
+
},
|
| 3288 |
+
"model.layers.5.self_attn.q_proj": {
|
| 3289 |
+
"bits": 6,
|
| 3290 |
+
"group_size": 64,
|
| 3291 |
+
"mode": "affine"
|
| 3292 |
+
},
|
| 3293 |
+
"model.layers.5.self_attn.v_proj": {
|
| 3294 |
+
"bits": 6,
|
| 3295 |
+
"group_size": 64,
|
| 3296 |
+
"mode": "affine"
|
| 3297 |
+
},
|
| 3298 |
+
"model.layers.6.mlp.shared_expert.down_proj": {
|
| 3299 |
+
"bits": 8,
|
| 3300 |
+
"group_size": 128,
|
| 3301 |
+
"mode": "affine"
|
| 3302 |
+
},
|
| 3303 |
+
"model.layers.6.mlp.shared_expert.gate_proj": {
|
| 3304 |
+
"bits": 8,
|
| 3305 |
+
"group_size": 128,
|
| 3306 |
+
"mode": "affine"
|
| 3307 |
+
},
|
| 3308 |
+
"model.layers.6.mlp.shared_expert.up_proj": {
|
| 3309 |
+
"bits": 8,
|
| 3310 |
+
"group_size": 128,
|
| 3311 |
+
"mode": "affine"
|
| 3312 |
+
},
|
| 3313 |
+
"model.layers.6.self_attn.g_proj": {
|
| 3314 |
+
"bits": 6,
|
| 3315 |
+
"group_size": 64,
|
| 3316 |
+
"mode": "affine"
|
| 3317 |
+
},
|
| 3318 |
+
"model.layers.6.self_attn.k_proj": {
|
| 3319 |
+
"bits": 6,
|
| 3320 |
+
"group_size": 64,
|
| 3321 |
+
"mode": "affine"
|
| 3322 |
+
},
|
| 3323 |
+
"model.layers.6.self_attn.o_proj": {
|
| 3324 |
+
"bits": 6,
|
| 3325 |
+
"group_size": 64,
|
| 3326 |
+
"mode": "affine"
|
| 3327 |
+
},
|
| 3328 |
+
"model.layers.6.self_attn.q_proj": {
|
| 3329 |
+
"bits": 6,
|
| 3330 |
+
"group_size": 64,
|
| 3331 |
+
"mode": "affine"
|
| 3332 |
+
},
|
| 3333 |
+
"model.layers.6.self_attn.v_proj": {
|
| 3334 |
+
"bits": 6,
|
| 3335 |
+
"group_size": 64,
|
| 3336 |
+
"mode": "affine"
|
| 3337 |
+
},
|
| 3338 |
+
"model.layers.7.mlp.shared_expert.down_proj": {
|
| 3339 |
+
"bits": 8,
|
| 3340 |
+
"group_size": 128,
|
| 3341 |
+
"mode": "affine"
|
| 3342 |
+
},
|
| 3343 |
+
"model.layers.7.mlp.shared_expert.gate_proj": {
|
| 3344 |
+
"bits": 8,
|
| 3345 |
+
"group_size": 128,
|
| 3346 |
+
"mode": "affine"
|
| 3347 |
+
},
|
| 3348 |
+
"model.layers.7.mlp.shared_expert.up_proj": {
|
| 3349 |
+
"bits": 8,
|
| 3350 |
+
"group_size": 128,
|
| 3351 |
+
"mode": "affine"
|
| 3352 |
+
},
|
| 3353 |
+
"model.layers.7.self_attn.g_proj": {
|
| 3354 |
+
"bits": 6,
|
| 3355 |
+
"group_size": 64,
|
| 3356 |
+
"mode": "affine"
|
| 3357 |
+
},
|
| 3358 |
+
"model.layers.7.self_attn.k_proj": {
|
| 3359 |
+
"bits": 6,
|
| 3360 |
+
"group_size": 64,
|
| 3361 |
+
"mode": "affine"
|
| 3362 |
+
},
|
| 3363 |
+
"model.layers.7.self_attn.o_proj": {
|
| 3364 |
+
"bits": 6,
|
| 3365 |
+
"group_size": 64,
|
| 3366 |
+
"mode": "affine"
|
| 3367 |
+
},
|
| 3368 |
+
"model.layers.7.self_attn.q_proj": {
|
| 3369 |
+
"bits": 6,
|
| 3370 |
+
"group_size": 64,
|
| 3371 |
+
"mode": "affine"
|
| 3372 |
+
},
|
| 3373 |
+
"model.layers.7.self_attn.v_proj": {
|
| 3374 |
+
"bits": 6,
|
| 3375 |
+
"group_size": 64,
|
| 3376 |
+
"mode": "affine"
|
| 3377 |
+
},
|
| 3378 |
+
"model.layers.8.mlp.shared_expert.down_proj": {
|
| 3379 |
+
"bits": 8,
|
| 3380 |
+
"group_size": 128,
|
| 3381 |
+
"mode": "affine"
|
| 3382 |
+
},
|
| 3383 |
+
"model.layers.8.mlp.shared_expert.gate_proj": {
|
| 3384 |
+
"bits": 8,
|
| 3385 |
+
"group_size": 128,
|
| 3386 |
+
"mode": "affine"
|
| 3387 |
+
},
|
| 3388 |
+
"model.layers.8.mlp.shared_expert.up_proj": {
|
| 3389 |
+
"bits": 8,
|
| 3390 |
+
"group_size": 128,
|
| 3391 |
+
"mode": "affine"
|
| 3392 |
+
},
|
| 3393 |
+
"model.layers.8.self_attn.g_proj": {
|
| 3394 |
+
"bits": 6,
|
| 3395 |
+
"group_size": 64,
|
| 3396 |
+
"mode": "affine"
|
| 3397 |
+
},
|
| 3398 |
+
"model.layers.8.self_attn.k_proj": {
|
| 3399 |
+
"bits": 6,
|
| 3400 |
+
"group_size": 64,
|
| 3401 |
+
"mode": "affine"
|
| 3402 |
+
},
|
| 3403 |
+
"model.layers.8.self_attn.o_proj": {
|
| 3404 |
+
"bits": 6,
|
| 3405 |
+
"group_size": 64,
|
| 3406 |
+
"mode": "affine"
|
| 3407 |
+
},
|
| 3408 |
+
"model.layers.8.self_attn.q_proj": {
|
| 3409 |
+
"bits": 6,
|
| 3410 |
+
"group_size": 64,
|
| 3411 |
+
"mode": "affine"
|
| 3412 |
+
},
|
| 3413 |
+
"model.layers.8.self_attn.v_proj": {
|
| 3414 |
+
"bits": 6,
|
| 3415 |
+
"group_size": 64,
|
| 3416 |
+
"mode": "affine"
|
| 3417 |
+
},
|
| 3418 |
+
"model.layers.9.mlp.shared_expert.down_proj": {
|
| 3419 |
+
"bits": 8,
|
| 3420 |
+
"group_size": 128,
|
| 3421 |
+
"mode": "affine"
|
| 3422 |
+
},
|
| 3423 |
+
"model.layers.9.mlp.shared_expert.gate_proj": {
|
| 3424 |
+
"bits": 8,
|
| 3425 |
+
"group_size": 128,
|
| 3426 |
+
"mode": "affine"
|
| 3427 |
+
},
|
| 3428 |
+
"model.layers.9.mlp.shared_expert.up_proj": {
|
| 3429 |
+
"bits": 8,
|
| 3430 |
+
"group_size": 128,
|
| 3431 |
+
"mode": "affine"
|
| 3432 |
+
},
|
| 3433 |
+
"model.layers.9.self_attn.g_proj": {
|
| 3434 |
+
"bits": 6,
|
| 3435 |
+
"group_size": 64,
|
| 3436 |
+
"mode": "affine"
|
| 3437 |
+
},
|
| 3438 |
+
"model.layers.9.self_attn.k_proj": {
|
| 3439 |
+
"bits": 6,
|
| 3440 |
+
"group_size": 64,
|
| 3441 |
+
"mode": "affine"
|
| 3442 |
+
},
|
| 3443 |
+
"model.layers.9.self_attn.o_proj": {
|
| 3444 |
+
"bits": 6,
|
| 3445 |
+
"group_size": 64,
|
| 3446 |
+
"mode": "affine"
|
| 3447 |
+
},
|
| 3448 |
+
"model.layers.9.self_attn.q_proj": {
|
| 3449 |
+
"bits": 6,
|
| 3450 |
+
"group_size": 64,
|
| 3451 |
+
"mode": "affine"
|
| 3452 |
+
},
|
| 3453 |
+
"model.layers.9.self_attn.v_proj": {
|
| 3454 |
+
"bits": 6,
|
| 3455 |
+
"group_size": 64,
|
| 3456 |
+
"mode": "affine"
|
| 3457 |
+
}
|
| 3458 |
+
}
|
| 3459 |
+
}
|
configuration_laguna.py
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright 2025 Poolside and the HuggingFace Inc. team. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
from transformers.configuration_utils import PreTrainedConfig
|
| 15 |
+
from transformers.modeling_rope_utils import RopeParameters
|
| 16 |
+
from transformers.utils.import_utils import is_causal_conv1d_available, is_flash_linear_attention_available
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
class LagunaConfig(PreTrainedConfig):
|
| 20 |
+
r"""
|
| 21 |
+
Configuration class for Laguna model.
|
| 22 |
+
|
| 23 |
+
Laguna is Poolside's MoE architecture with:
|
| 24 |
+
- Attention output gating (softplus gate)
|
| 25 |
+
- Sigmoid routing instead of softmax
|
| 26 |
+
- No QKV bias
|
| 27 |
+
- Explicit head_dim parameter
|
| 28 |
+
|
| 29 |
+
Args:
|
| 30 |
+
head_dim (`int`, *optional*, defaults to 128):
|
| 31 |
+
Dimension of attention heads. Laguna uses explicit head_dim rather than
|
| 32 |
+
computing it from hidden_size // num_attention_heads.
|
| 33 |
+
qkv_bias (`bool`, *optional*, defaults to `False`):
|
| 34 |
+
Whether to add bias to QKV projections. Laguna uses no QKV bias.
|
| 35 |
+
attention_bias (`bool`, *optional*, defaults to `False`):
|
| 36 |
+
Whether to add bias to attention output projection. Laguna uses no attention bias.
|
| 37 |
+
gating (`bool` or `str`, *optional*, defaults to `True`):
|
| 38 |
+
Attention output gating mode. When ``True`` or ``"per-element"`` a g_proj
|
| 39 |
+
linear layer with output size ``num_attention_heads * head_dim`` is added
|
| 40 |
+
and ``attn_output = attn_output * softplus(g_proj(x))``. When ``"per-head"``
|
| 41 |
+
g_proj has output size ``num_attention_heads`` and the gate broadcasts across
|
| 42 |
+
``head_dim``. When ``False`` no gating is applied.
|
| 43 |
+
partial_rotary_factor (`float`, *optional*):
|
| 44 |
+
Fraction of head_dim to apply rotary embeddings to. When set, this value is
|
| 45 |
+
injected into ``rope_parameters`` (and ``swa_rope_parameters``) if not already
|
| 46 |
+
specified there. When ``None`` the default behaviour of the rope implementation
|
| 47 |
+
is used (typically full rotary).
|
| 48 |
+
num_attention_heads_per_layer (`list[int]`, *optional*):
|
| 49 |
+
Optional per-layer override for ``num_attention_heads``. When provided the list
|
| 50 |
+
length must equal ``num_hidden_layers`` and each entry is the head count used by
|
| 51 |
+
that layer. When ``None`` every layer uses ``num_attention_heads``.
|
| 52 |
+
vocab_size (`int`, *optional*, defaults to 100352):
|
| 53 |
+
Vocabulary size of the Laguna model.
|
| 54 |
+
hidden_size (`int`, *optional*, defaults to 2048):
|
| 55 |
+
Dimension of the hidden representations.
|
| 56 |
+
intermediate_size (`int`, *optional*, defaults to 8192):
|
| 57 |
+
Dimension of the MLP representations for dense layers.
|
| 58 |
+
num_hidden_layers (`int`, *optional*, defaults to 48):
|
| 59 |
+
Number of hidden layers in the Transformer.
|
| 60 |
+
num_attention_heads (`int`, *optional*, defaults to 32):
|
| 61 |
+
Number of attention heads.
|
| 62 |
+
num_key_value_heads (`int`, *optional*, defaults to 8):
|
| 63 |
+
Number of key-value heads for GQA.
|
| 64 |
+
max_position_embeddings (`int`, *optional*, defaults to 4096):
|
| 65 |
+
Maximum sequence length.
|
| 66 |
+
rms_norm_eps (`float`, *optional*, defaults to 1e-6):
|
| 67 |
+
Epsilon for RMSNorm layers.
|
| 68 |
+
sliding_window (`int`, *optional*):
|
| 69 |
+
Sliding window attention size. Used by layers whose type in ``layer_types``
|
| 70 |
+
is ``"sliding_attention"``. When ``None``, all layers use full attention.
|
| 71 |
+
layer_types (`list[str]`, *optional*):
|
| 72 |
+
Per-layer attention type. Each element should be ``"sliding_attention"`` or
|
| 73 |
+
``"full_attention"``. Length must equal ``num_hidden_layers``. When ``None``,
|
| 74 |
+
all layers default to global attention.
|
| 75 |
+
swa_attention_sink_enabled (`bool`, *optional*, defaults to `False`):
|
| 76 |
+
Whether to enable learnable attention sinks on sliding-window attention layers.
|
| 77 |
+
When enabled, a per-head bias parameter is added that allows the model to attend
|
| 78 |
+
to position 0 even when it falls outside the sliding window.
|
| 79 |
+
swa_rope_parameters (`RopeParameters`, *optional*):
|
| 80 |
+
Separate RoPE configuration for sliding-window attention layers. When ``None``,
|
| 81 |
+
SWA layers use the same RoPE as global attention layers.
|
| 82 |
+
num_experts (`int`, *optional*, defaults to 256):
|
| 83 |
+
Number of routed experts.
|
| 84 |
+
num_experts_per_tok (`int`, *optional*, defaults to 16):
|
| 85 |
+
Number of experts selected per token (top-k).
|
| 86 |
+
moe_intermediate_size (`int`, *optional*, defaults to 1024):
|
| 87 |
+
Intermediate size of routed experts.
|
| 88 |
+
shared_expert_intermediate_size (`int`, *optional*, defaults to 1024):
|
| 89 |
+
Intermediate size of the shared expert.
|
| 90 |
+
norm_topk_prob (`bool`, *optional*, defaults to `True`):
|
| 91 |
+
Whether to normalize top-k routing probabilities.
|
| 92 |
+
decoder_sparse_step (`int`, *optional*, defaults to 1):
|
| 93 |
+
Frequency of MoE layers (1 = every layer is MoE after mlp_only_layers).
|
| 94 |
+
mlp_only_layers (`list[int]`, *optional*, defaults to `[0]`):
|
| 95 |
+
Layer indices that use dense MLP instead of MoE.
|
| 96 |
+
router_aux_loss_coef (`float`, *optional*, defaults to 0.001):
|
| 97 |
+
Auxiliary loss coefficient for load balancing.
|
| 98 |
+
moe_routed_scaling_factor (`float`, *optional*, defaults to 1.0):
|
| 99 |
+
Scalar multiplier applied to the routed-expert output before combining with the
|
| 100 |
+
shared-expert output.
|
| 101 |
+
moe_apply_router_weight_on_input (`bool`, *optional*, defaults to `False`):
|
| 102 |
+
When ``True`` the top-k routing weights are multiplied into each expert's input
|
| 103 |
+
rather than its output. Matches the numerical form used by the trained checkpoint.
|
| 104 |
+
moe_router_logit_softcapping (`float`, *optional*, defaults to 0.0):
|
| 105 |
+
Optional soft-capping value ``c`` applied to router logits as
|
| 106 |
+
``x = tanh(x / c) * c`` before sigmoid + top-k. Disabled when ``0``.
|
| 107 |
+
rope_parameters (`RopeParameters`, *optional*):
|
| 108 |
+
RoPE configuration. Defaults to rope_theta=500000.0.
|
| 109 |
+
"""
|
| 110 |
+
|
| 111 |
+
model_type = "laguna"
|
| 112 |
+
keys_to_ignore_at_inference = ["past_key_values"]
|
| 113 |
+
# PreTrainedConfig in transformers v5 no longer auto-declares these; subclasses
|
| 114 |
+
# opt in by providing class-level annotations with defaults.
|
| 115 |
+
pad_token_id: int | None = None
|
| 116 |
+
bos_token_id: int | None = None
|
| 117 |
+
eos_token_id: int | list[int] | None = None
|
| 118 |
+
base_model_tp_plan = {
|
| 119 |
+
"layers.*.self_attn.q_proj": "colwise",
|
| 120 |
+
"layers.*.self_attn.k_proj": "colwise",
|
| 121 |
+
"layers.*.self_attn.v_proj": "colwise",
|
| 122 |
+
"layers.*.self_attn.g_proj": "colwise", # Laguna-specific gating projection
|
| 123 |
+
"layers.*.self_attn.o_proj": "rowwise",
|
| 124 |
+
"layers.*.mlp.gate_proj": "colwise",
|
| 125 |
+
"layers.*.mlp.up_proj": "colwise",
|
| 126 |
+
"layers.*.mlp.down_proj": "rowwise",
|
| 127 |
+
}
|
| 128 |
+
base_model_pp_plan = {
|
| 129 |
+
"embed_tokens": (["input_ids"], ["inputs_embeds"]),
|
| 130 |
+
"layers": (["hidden_states", "attention_mask"], ["hidden_states"]),
|
| 131 |
+
"norm": (["hidden_states"], ["hidden_states"]),
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
def __init__(
|
| 135 |
+
self,
|
| 136 |
+
vocab_size: int = 100352,
|
| 137 |
+
hidden_size: int = 2048,
|
| 138 |
+
intermediate_size: int = 8192,
|
| 139 |
+
num_hidden_layers: int = 48,
|
| 140 |
+
num_attention_heads: int = 32,
|
| 141 |
+
num_key_value_heads: int = 8,
|
| 142 |
+
head_dim: int = 128,
|
| 143 |
+
qkv_bias: bool = False,
|
| 144 |
+
attention_bias: bool = False,
|
| 145 |
+
gating: bool | str = True,
|
| 146 |
+
hidden_act: str = "silu",
|
| 147 |
+
max_position_embeddings: int = 4096,
|
| 148 |
+
initializer_range: float = 0.02,
|
| 149 |
+
rms_norm_eps: float = 1e-6,
|
| 150 |
+
use_cache: bool = True,
|
| 151 |
+
tie_word_embeddings: bool = False,
|
| 152 |
+
rope_parameters: RopeParameters | dict[str, RopeParameters] | None = None,
|
| 153 |
+
partial_rotary_factor: float | None = None,
|
| 154 |
+
attention_dropout: float = 0.0,
|
| 155 |
+
sliding_window: int | None = None,
|
| 156 |
+
layer_types: list[str] | None = None,
|
| 157 |
+
num_attention_heads_per_layer: list[int] | None = None,
|
| 158 |
+
swa_attention_sink_enabled: bool = False,
|
| 159 |
+
swa_rope_parameters: RopeParameters | None = None,
|
| 160 |
+
num_experts: int = 256,
|
| 161 |
+
num_experts_per_tok: int = 16,
|
| 162 |
+
moe_intermediate_size: int = 1024,
|
| 163 |
+
shared_expert_intermediate_size: int = 1024,
|
| 164 |
+
norm_topk_prob: bool = True,
|
| 165 |
+
decoder_sparse_step: int = 1,
|
| 166 |
+
mlp_only_layers: list[int] | None = None,
|
| 167 |
+
router_aux_loss_coef: float = 0.001,
|
| 168 |
+
moe_routed_scaling_factor: float = 1.0,
|
| 169 |
+
moe_apply_router_weight_on_input: bool = False,
|
| 170 |
+
moe_router_logit_softcapping: float = 0.0,
|
| 171 |
+
output_router_logits: bool = False,
|
| 172 |
+
**kwargs,
|
| 173 |
+
):
|
| 174 |
+
# Default mlp_only_layers: first layer is dense (moe_first_k_dense_replace=1)
|
| 175 |
+
if mlp_only_layers is None:
|
| 176 |
+
mlp_only_layers = [0]
|
| 177 |
+
|
| 178 |
+
# Default layer_types: all layers use full attention (Laguna-M). Laguna-XS
|
| 179 |
+
# ships an explicit list with a mix of "full_attention" and "sliding_attention".
|
| 180 |
+
# Downstream mask builders (``create_masks_for_generate``) iterate
|
| 181 |
+
# ``layer_types``, so it must be a list — not left as ``None``.
|
| 182 |
+
if layer_types is None:
|
| 183 |
+
layer_types = ["full_attention"] * num_hidden_layers
|
| 184 |
+
|
| 185 |
+
# Default rope_parameters with Laguna's theta
|
| 186 |
+
if rope_parameters is None:
|
| 187 |
+
rope_parameters = {"rope_type": "default", "rope_theta": 500000.0}
|
| 188 |
+
|
| 189 |
+
# config.json stores SWA rope nested in rope_parameters["sliding_attention"]
|
| 190 |
+
# and carries no top-level swa_rope_parameters. Derive it here, else the
|
| 191 |
+
# sliding-window layers silently reuse the full-attention rope.
|
| 192 |
+
if swa_rope_parameters is None and isinstance(rope_parameters, dict):
|
| 193 |
+
swa_rope_parameters = rope_parameters.get("sliding_attention")
|
| 194 |
+
|
| 195 |
+
# If ``partial_rotary_factor`` is set at the top level, inject it into any
|
| 196 |
+
# rope dict that does not already carry one so the rotary embedding picks
|
| 197 |
+
# it up consistently for both full-attention and SWA layers.
|
| 198 |
+
if partial_rotary_factor is not None:
|
| 199 |
+
if isinstance(rope_parameters, dict) and "partial_rotary_factor" not in rope_parameters:
|
| 200 |
+
rope_parameters = {**rope_parameters, "partial_rotary_factor": partial_rotary_factor}
|
| 201 |
+
if (
|
| 202 |
+
isinstance(swa_rope_parameters, dict)
|
| 203 |
+
and "partial_rotary_factor" not in swa_rope_parameters
|
| 204 |
+
):
|
| 205 |
+
swa_rope_parameters = {
|
| 206 |
+
**swa_rope_parameters,
|
| 207 |
+
"partial_rotary_factor": partial_rotary_factor,
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
self.vocab_size = vocab_size
|
| 211 |
+
self.hidden_size = hidden_size
|
| 212 |
+
self.intermediate_size = intermediate_size
|
| 213 |
+
self.num_hidden_layers = num_hidden_layers
|
| 214 |
+
self.num_attention_heads = num_attention_heads
|
| 215 |
+
self.num_key_value_heads = num_key_value_heads
|
| 216 |
+
self.head_dim = head_dim
|
| 217 |
+
self.qkv_bias = qkv_bias
|
| 218 |
+
self.attention_bias = attention_bias
|
| 219 |
+
self.gating = gating
|
| 220 |
+
self.hidden_act = hidden_act
|
| 221 |
+
self.max_position_embeddings = max_position_embeddings
|
| 222 |
+
self.initializer_range = initializer_range
|
| 223 |
+
self.rms_norm_eps = rms_norm_eps
|
| 224 |
+
self.use_cache = use_cache
|
| 225 |
+
self.rope_parameters = rope_parameters
|
| 226 |
+
self.partial_rotary_factor = partial_rotary_factor
|
| 227 |
+
self.attention_dropout = attention_dropout
|
| 228 |
+
# Sliding window attention arguments
|
| 229 |
+
self.sliding_window = sliding_window
|
| 230 |
+
self.layer_types = layer_types
|
| 231 |
+
self.num_attention_heads_per_layer = num_attention_heads_per_layer
|
| 232 |
+
self.swa_attention_sink_enabled = swa_attention_sink_enabled
|
| 233 |
+
self.swa_rope_parameters = swa_rope_parameters
|
| 234 |
+
# MoE arguments
|
| 235 |
+
self.num_experts = num_experts
|
| 236 |
+
self.num_experts_per_tok = num_experts_per_tok
|
| 237 |
+
self.moe_intermediate_size = moe_intermediate_size
|
| 238 |
+
self.shared_expert_intermediate_size = shared_expert_intermediate_size
|
| 239 |
+
self.norm_topk_prob = norm_topk_prob
|
| 240 |
+
self.decoder_sparse_step = decoder_sparse_step
|
| 241 |
+
self.mlp_only_layers = mlp_only_layers
|
| 242 |
+
self.router_aux_loss_coef = router_aux_loss_coef
|
| 243 |
+
self.moe_routed_scaling_factor = moe_routed_scaling_factor
|
| 244 |
+
self.moe_apply_router_weight_on_input = moe_apply_router_weight_on_input
|
| 245 |
+
self.moe_router_logit_softcapping = moe_router_logit_softcapping
|
| 246 |
+
self.output_router_logits = output_router_logits
|
| 247 |
+
|
| 248 |
+
super().__init__(tie_word_embeddings=tie_word_embeddings, **kwargs)
|
| 249 |
+
|
| 250 |
+
|
| 251 |
+
__all__ = ["LagunaConfig"]
|
generation_config.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 2,
|
| 3 |
+
"do_sample": true,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
2,
|
| 6 |
+
24
|
| 7 |
+
],
|
| 8 |
+
"max_new_tokens": 32768,
|
| 9 |
+
"pad_token_id": 9,
|
| 10 |
+
"temperature": 1.0,
|
| 11 |
+
"top_p": 1.0,
|
| 12 |
+
"min_p": 0.0,
|
| 13 |
+
"top_k": 20,
|
| 14 |
+
"speculative_config": {
|
| 15 |
+
"method": "dflash",
|
| 16 |
+
"source": "huggingface",
|
| 17 |
+
"model": "poolside/Laguna-XS-2.1-DFlash",
|
| 18 |
+
"num_speculative_tokens": 15
|
| 19 |
+
},
|
| 20 |
+
"tool_call_parser": "poolside_v1",
|
| 21 |
+
"reasoning_parser": "poolside_v1",
|
| 22 |
+
"default_chat_template_kwargs": {
|
| 23 |
+
"enable_thinking": true
|
| 24 |
+
}
|
| 25 |
+
}
|
model-00001-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8a73c1fb58d8bc502b6b7955c9f904ef34da7ec217d6509934aa43afaa9afa91
|
| 3 |
+
size 5006473409
|
model-00002-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1ed5f3dc01aa2b09231d426e8da4bda69a5e782c96bad52c77f38277667b8683
|
| 3 |
+
size 5133840956
|
model-00003-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:780cf01f34d7a200ffb83c357135f6f68340cda5ff3907f6a4b7eb0926f74a1d
|
| 3 |
+
size 5133840954
|
model-00004-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:963c81c13cf68c122d018e1ac274d7096e709307cf259fe1bd13ee1f236ac3ae
|
| 3 |
+
size 4227869028
|
model.safetensors.index.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
modeling_laguna.py
ADDED
|
@@ -0,0 +1,896 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
from collections.abc import Callable
|
| 16 |
+
|
| 17 |
+
import torch
|
| 18 |
+
import torch.nn.functional as F
|
| 19 |
+
from torch import nn
|
| 20 |
+
|
| 21 |
+
from transformers.activations import ACT2FN
|
| 22 |
+
from transformers.cache_utils import Cache
|
| 23 |
+
from transformers.integrations import use_experts_implementation, use_kernelized_func
|
| 24 |
+
from transformers.modeling_flash_attention_utils import FlashAttentionKwargs
|
| 25 |
+
from transformers.modeling_layers import GradientCheckpointingLayer
|
| 26 |
+
from transformers.modeling_outputs import MoeModelOutputWithPast
|
| 27 |
+
from transformers.modeling_utils import ALL_ATTENTION_FUNCTIONS
|
| 28 |
+
from transformers.processing_utils import Unpack
|
| 29 |
+
from transformers.utils import auto_docstring, can_return_tuple, is_grouped_mm_available
|
| 30 |
+
from transformers.utils.generic import TransformersKwargs, merge_with_config_defaults
|
| 31 |
+
from transformers.utils.output_capturing import OutputRecorder, capture_outputs
|
| 32 |
+
from transformers.cache_utils import DynamicCache
|
| 33 |
+
from transformers.generation import GenerationMixin
|
| 34 |
+
from transformers.integrations import use_kernel_forward_from_hub
|
| 35 |
+
from transformers.masking_utils import create_causal_mask
|
| 36 |
+
from transformers.modeling_rope_utils import ROPE_INIT_FUNCTIONS, dynamic_rope_update
|
| 37 |
+
from transformers.modeling_utils import PreTrainedModel
|
| 38 |
+
from transformers.utils.generic import maybe_autocast
|
| 39 |
+
from .configuration_laguna import LagunaConfig
|
| 40 |
+
|
| 41 |
+
from transformers import initialization as init
|
| 42 |
+
from transformers.masking_utils import create_sliding_window_causal_mask
|
| 43 |
+
from transformers.modeling_outputs import MoeCausalLMOutputWithPast
|
| 44 |
+
from transformers.utils.import_utils import is_causal_conv1d_available, is_flash_linear_attention_available
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
@use_kernel_forward_from_hub("RMSNorm")
|
| 48 |
+
class LagunaRMSNorm(nn.Module):
|
| 49 |
+
def __init__(self, hidden_size, eps: float = 1e-6) -> None:
|
| 50 |
+
"""
|
| 51 |
+
LagunaRMSNorm is equivalent to T5LayerNorm
|
| 52 |
+
"""
|
| 53 |
+
super().__init__()
|
| 54 |
+
self.weight = nn.Parameter(torch.ones(hidden_size))
|
| 55 |
+
self.variance_epsilon = eps
|
| 56 |
+
|
| 57 |
+
def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
|
| 58 |
+
input_dtype = hidden_states.dtype
|
| 59 |
+
hidden_states = hidden_states.to(torch.float32)
|
| 60 |
+
variance = hidden_states.pow(2).mean(-1, keepdim=True)
|
| 61 |
+
hidden_states = hidden_states * torch.rsqrt(variance + self.variance_epsilon)
|
| 62 |
+
return self.weight * hidden_states.to(input_dtype)
|
| 63 |
+
|
| 64 |
+
def extra_repr(self):
|
| 65 |
+
return f"{tuple(self.weight.shape)}, eps={self.variance_epsilon}"
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
class LagunaRotaryEmbedding(nn.Module):
|
| 69 |
+
inv_freq: torch.Tensor # fix linting for `register_buffer`
|
| 70 |
+
|
| 71 |
+
def __init__(self, config: LagunaConfig, device=None):
|
| 72 |
+
super().__init__()
|
| 73 |
+
self.max_seq_len_cached = config.max_position_embeddings
|
| 74 |
+
self.original_max_seq_len = config.max_position_embeddings
|
| 75 |
+
|
| 76 |
+
self.config = config
|
| 77 |
+
|
| 78 |
+
self.rope_type = self.config.rope_parameters["rope_type"]
|
| 79 |
+
rope_init_fn: Callable = self.compute_default_rope_parameters
|
| 80 |
+
if self.rope_type != "default":
|
| 81 |
+
rope_init_fn = ROPE_INIT_FUNCTIONS[self.rope_type]
|
| 82 |
+
inv_freq, self.attention_scaling = rope_init_fn(self.config, device)
|
| 83 |
+
|
| 84 |
+
self.register_buffer("inv_freq", inv_freq, persistent=False)
|
| 85 |
+
self.register_buffer("original_inv_freq", inv_freq.clone(), persistent=False)
|
| 86 |
+
|
| 87 |
+
@staticmethod
|
| 88 |
+
def compute_default_rope_parameters(
|
| 89 |
+
config, device=None, seq_len=None) -> tuple["torch.Tensor", float]:
|
| 90 |
+
"""
|
| 91 |
+
Computes the inverse frequencies according to the original RoPE implementation
|
| 92 |
+
Args:
|
| 93 |
+
config ([`~transformers.PreTrainedConfig`]):
|
| 94 |
+
The model configuration.
|
| 95 |
+
device (`torch.device`):
|
| 96 |
+
The device to use for initialization of the inverse frequencies.
|
| 97 |
+
seq_len (`int`, *optional*):
|
| 98 |
+
The current sequence length. Unused for this type of RoPE.
|
| 99 |
+
Returns:
|
| 100 |
+
Tuple of (`torch.Tensor`, `float`), containing the inverse frequencies for the RoPE embeddings and the
|
| 101 |
+
post-processing scaling factor applied to the computed cos/sin (unused in this type of RoPE).
|
| 102 |
+
"""
|
| 103 |
+
base = config.rope_parameters["rope_theta"]
|
| 104 |
+
head_dim = (
|
| 105 |
+
getattr(config, "head_dim", None) or config.hidden_size // config.num_attention_heads
|
| 106 |
+
)
|
| 107 |
+
partial = config.rope_parameters.get("partial_rotary_factor", 1.0)
|
| 108 |
+
dim = int(head_dim * partial)
|
| 109 |
+
inv_freq = 1.0 / (
|
| 110 |
+
base ** (torch.arange(0, dim, 2, dtype=torch.int64).to(device=device, dtype=torch.float) / dim)
|
| 111 |
+
)
|
| 112 |
+
return inv_freq, 1.0
|
| 113 |
+
|
| 114 |
+
@torch.no_grad()
|
| 115 |
+
@dynamic_rope_update # power user: used with advanced RoPE types (e.g. dynamic rope)
|
| 116 |
+
def forward(self, x, position_ids):
|
| 117 |
+
inv_freq_expanded = self.inv_freq[None, :, None].float().expand(position_ids.shape[0], -1, 1).to(x.device)
|
| 118 |
+
position_ids_expanded = position_ids[:, None, :].float()
|
| 119 |
+
|
| 120 |
+
device_type = x.device.type if isinstance(x.device.type, str) and x.device.type != "mps" else "cpu"
|
| 121 |
+
with maybe_autocast(device_type=device_type, enabled=False): # Force float32
|
| 122 |
+
freqs = (inv_freq_expanded.float() @ position_ids_expanded.float()).transpose(1, 2)
|
| 123 |
+
emb = torch.cat((freqs, freqs), dim=-1)
|
| 124 |
+
cos = emb.cos() * self.attention_scaling
|
| 125 |
+
sin = emb.sin() * self.attention_scaling
|
| 126 |
+
|
| 127 |
+
return cos.to(dtype=x.dtype), sin.to(dtype=x.dtype)
|
| 128 |
+
|
| 129 |
+
|
| 130 |
+
class LagunaMLP(nn.Module):
|
| 131 |
+
def __init__(self, config, intermediate_size=None):
|
| 132 |
+
super().__init__()
|
| 133 |
+
self.config = config
|
| 134 |
+
self.hidden_size = config.hidden_size
|
| 135 |
+
self.intermediate_size = config.intermediate_size if intermediate_size is None else intermediate_size
|
| 136 |
+
self.gate_proj = nn.Linear(self.hidden_size, self.intermediate_size, bias=False)
|
| 137 |
+
self.up_proj = nn.Linear(self.hidden_size, self.intermediate_size, bias=False)
|
| 138 |
+
self.down_proj = nn.Linear(self.intermediate_size, self.hidden_size, bias=False)
|
| 139 |
+
self.act_fn = ACT2FN[config.hidden_act]
|
| 140 |
+
|
| 141 |
+
def forward(self, x):
|
| 142 |
+
down_proj = self.down_proj(self.act_fn(self.gate_proj(x)) * self.up_proj(x))
|
| 143 |
+
return down_proj
|
| 144 |
+
|
| 145 |
+
|
| 146 |
+
class LagunaTopKRouter(nn.Module):
|
| 147 |
+
"""Laguna MoE router using sigmoid scoring (not softmax).
|
| 148 |
+
|
| 149 |
+
Supports optional router-logit soft-capping and auxiliary-loss-free load
|
| 150 |
+
balancing (arXiv:2408.15664): the per-expert bias ``e_score_correction_bias``
|
| 151 |
+
is added to selection scores but the returned routing weights remain unbiased.
|
| 152 |
+
The bias lives on the router so accelerate's per-module hooks can co-locate it
|
| 153 |
+
with the gate — moving it to the experts module would cross a hook boundary
|
| 154 |
+
and leave the bias on meta under ``device_map="auto"`` / CPU-offload.
|
| 155 |
+
"""
|
| 156 |
+
def __init__(self, config):
|
| 157 |
+
super().__init__()
|
| 158 |
+
self.top_k = config.num_experts_per_tok
|
| 159 |
+
self.num_experts = config.num_experts
|
| 160 |
+
self.norm_topk_prob = config.norm_topk_prob
|
| 161 |
+
self.hidden_dim = config.hidden_size
|
| 162 |
+
self.weight = nn.Parameter(torch.zeros(self.num_experts, self.hidden_dim))
|
| 163 |
+
# Zero-initialised so inference on checkpoints that don't ship the bias
|
| 164 |
+
# is a no-op. ``_checkpoint_conversion_mapping`` below remaps the
|
| 165 |
+
# ``mlp.experts.e_score_correction_bias`` key from vLLM-trained
|
| 166 |
+
# checkpoints onto this attribute.
|
| 167 |
+
self.e_score_correction_bias = nn.Parameter(
|
| 168 |
+
torch.zeros(config.num_experts), requires_grad=False
|
| 169 |
+
)
|
| 170 |
+
self.router_logit_softcapping = float(
|
| 171 |
+
getattr(config, "moe_router_logit_softcapping", 0.0) or 0.0
|
| 172 |
+
)
|
| 173 |
+
|
| 174 |
+
def forward(self,
|
| 175 |
+
hidden_states: torch.Tensor,
|
| 176 |
+
) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
|
| 177 |
+
hidden_states = hidden_states.reshape(-1, self.hidden_dim)
|
| 178 |
+
router_logits = F.linear(hidden_states, self.weight).float()
|
| 179 |
+
if self.router_logit_softcapping > 0.0:
|
| 180 |
+
router_logits = (
|
| 181 |
+
torch.tanh(router_logits / self.router_logit_softcapping) * self.router_logit_softcapping
|
| 182 |
+
)
|
| 183 |
+
routing_scores = torch.sigmoid(router_logits)
|
| 184 |
+
scores_for_selection = routing_scores + self.e_score_correction_bias.to(routing_scores.dtype)
|
| 185 |
+
_, selected_experts = torch.topk(scores_for_selection, self.top_k, dim=-1)
|
| 186 |
+
routing_weights = routing_scores.gather(-1, selected_experts)
|
| 187 |
+
if self.norm_topk_prob:
|
| 188 |
+
routing_weights = routing_weights / routing_weights.sum(dim=-1, keepdim=True)
|
| 189 |
+
routing_weights = routing_weights.to(hidden_states.dtype)
|
| 190 |
+
return router_logits, routing_weights, selected_experts
|
| 191 |
+
|
| 192 |
+
|
| 193 |
+
@use_experts_implementation
|
| 194 |
+
class LagunaExperts(nn.Module):
|
| 195 |
+
"""Fused expert weights as 3D tensors for batched execution."""
|
| 196 |
+
|
| 197 |
+
def __init__(self, config):
|
| 198 |
+
super().__init__()
|
| 199 |
+
self.num_experts = config.num_experts
|
| 200 |
+
self.hidden_dim = config.hidden_size
|
| 201 |
+
self.intermediate_dim = config.moe_intermediate_size
|
| 202 |
+
self.gate_up_proj = nn.Parameter(torch.empty(self.num_experts, 2 * self.intermediate_dim, self.hidden_dim))
|
| 203 |
+
self.down_proj = nn.Parameter(torch.empty(self.num_experts, self.hidden_dim, self.intermediate_dim))
|
| 204 |
+
self.act_fn = ACT2FN[config.hidden_act]
|
| 205 |
+
|
| 206 |
+
def forward(
|
| 207 |
+
self,
|
| 208 |
+
hidden_states: torch.Tensor,
|
| 209 |
+
top_k_index: torch.Tensor,
|
| 210 |
+
top_k_weights: torch.Tensor,
|
| 211 |
+
) -> torch.Tensor:
|
| 212 |
+
final_hidden_states = torch.zeros_like(hidden_states)
|
| 213 |
+
with torch.no_grad():
|
| 214 |
+
expert_mask = F.one_hot(top_k_index, num_classes=self.num_experts)
|
| 215 |
+
expert_mask = expert_mask.permute(2, 1, 0)
|
| 216 |
+
expert_hit = torch.greater(expert_mask.sum(dim=(-1, -2)), 0).nonzero()
|
| 217 |
+
|
| 218 |
+
for expert_idx in expert_hit:
|
| 219 |
+
expert_idx = expert_idx[0]
|
| 220 |
+
if expert_idx == self.num_experts:
|
| 221 |
+
continue
|
| 222 |
+
top_k_pos, token_idx = torch.where(expert_mask[expert_idx])
|
| 223 |
+
current_state = hidden_states[token_idx]
|
| 224 |
+
gate, up = F.linear(current_state, self.gate_up_proj[expert_idx]).chunk(2, dim=-1)
|
| 225 |
+
current_hidden_states = self.act_fn(gate) * up
|
| 226 |
+
current_hidden_states = F.linear(current_hidden_states, self.down_proj[expert_idx])
|
| 227 |
+
current_hidden_states = current_hidden_states * top_k_weights[token_idx, top_k_pos, None]
|
| 228 |
+
final_hidden_states.index_add_(0, token_idx, current_hidden_states.to(final_hidden_states.dtype))
|
| 229 |
+
|
| 230 |
+
return final_hidden_states
|
| 231 |
+
|
| 232 |
+
|
| 233 |
+
class LagunaSparseMoeBlock(nn.Module):
|
| 234 |
+
"""Laguna MoE block using sigmoid router, fused expert tensors, and a shared expert."""
|
| 235 |
+
|
| 236 |
+
def __init__(self, config):
|
| 237 |
+
super().__init__()
|
| 238 |
+
self.num_experts = config.num_experts
|
| 239 |
+
self.routed_scaling_factor = float(getattr(config, "moe_routed_scaling_factor", 1.0))
|
| 240 |
+
# ``moe_apply_router_weight_on_input=True`` would require scaling each expert's
|
| 241 |
+
# input (rather than its output) by the routing weight. Supporting it cleanly
|
| 242 |
+
# alongside the fused experts kernels (``grouped_mm`` / ``batched_mm``) is future
|
| 243 |
+
# work; for now we fail loudly so a checkpoint that needs it can't silently
|
| 244 |
+
# diverge from its numerical form.
|
| 245 |
+
if getattr(config, "moe_apply_router_weight_on_input", False):
|
| 246 |
+
raise NotImplementedError(
|
| 247 |
+
"moe_apply_router_weight_on_input=True is not yet supported in the "
|
| 248 |
+
"transformers implementation of Laguna."
|
| 249 |
+
)
|
| 250 |
+
self.gate = LagunaTopKRouter(config)
|
| 251 |
+
self.experts = LagunaExperts(config)
|
| 252 |
+
self.shared_expert = LagunaMLP(config, intermediate_size=config.shared_expert_intermediate_size)
|
| 253 |
+
|
| 254 |
+
def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
|
| 255 |
+
batch_size, sequence_length, hidden_dim = hidden_states.shape
|
| 256 |
+
hidden_states = hidden_states.view(-1, hidden_dim)
|
| 257 |
+
|
| 258 |
+
shared_expert_output = self.shared_expert(hidden_states)
|
| 259 |
+
_, routing_weights, selected_experts = self.gate(hidden_states)
|
| 260 |
+
expert_output = self.experts(hidden_states, selected_experts, routing_weights)
|
| 261 |
+
if self.routed_scaling_factor != 1.0:
|
| 262 |
+
expert_output = expert_output * self.routed_scaling_factor
|
| 263 |
+
|
| 264 |
+
expert_output = expert_output + shared_expert_output
|
| 265 |
+
expert_output = expert_output.reshape(batch_size, sequence_length, hidden_dim)
|
| 266 |
+
return expert_output
|
| 267 |
+
|
| 268 |
+
|
| 269 |
+
def rotate_half(x):
|
| 270 |
+
"""Rotates half the hidden dims of the input."""
|
| 271 |
+
x1 = x[..., : x.shape[-1] // 2]
|
| 272 |
+
x2 = x[..., x.shape[-1] // 2 :]
|
| 273 |
+
return torch.cat((-x2, x1), dim=-1)
|
| 274 |
+
|
| 275 |
+
|
| 276 |
+
# Adapted from transformers.models.glm.modular_glm.apply_rotary_pos_emb
|
| 277 |
+
def apply_rotary_pos_emb(q, k, cos, sin, unsqueeze_dim=1):
|
| 278 |
+
"""Applies Rotary Position Embedding to the query and key tensors.
|
| 279 |
+
|
| 280 |
+
Removes the interleaving of cos and sin from GLM
|
| 281 |
+
|
| 282 |
+
Args:
|
| 283 |
+
q (`torch.Tensor`): The query tensor.
|
| 284 |
+
k (`torch.Tensor`): The key tensor.
|
| 285 |
+
cos (`torch.Tensor`): The cosine part of the rotary embedding.
|
| 286 |
+
sin (`torch.Tensor`): The sine part of the rotary embedding.
|
| 287 |
+
unsqueeze_dim (`int`, *optional*, defaults to 1):
|
| 288 |
+
The 'unsqueeze_dim' argument specifies the dimension along which to unsqueeze cos[position_ids] and
|
| 289 |
+
sin[position_ids] so that they can be properly broadcasted to the dimensions of q and k. For example, note
|
| 290 |
+
that cos[position_ids] and sin[position_ids] have the shape [batch_size, seq_len, head_dim]. Then, if q and
|
| 291 |
+
k have the shape [batch_size, heads, seq_len, head_dim], then setting unsqueeze_dim=1 makes
|
| 292 |
+
cos[position_ids] and sin[position_ids] broadcastable to the shapes of q and k. Similarly, if q and k have
|
| 293 |
+
the shape [batch_size, seq_len, heads, head_dim], then set unsqueeze_dim=2.
|
| 294 |
+
Returns:
|
| 295 |
+
`tuple(torch.Tensor)` comprising of the query and key tensors rotated using the Rotary Position Embedding.
|
| 296 |
+
"""
|
| 297 |
+
cos = cos.unsqueeze(unsqueeze_dim)
|
| 298 |
+
sin = sin.unsqueeze(unsqueeze_dim)
|
| 299 |
+
|
| 300 |
+
# Keep half or full tensor for later concatenation
|
| 301 |
+
rotary_dim = cos.shape[-1]
|
| 302 |
+
q_rot, q_pass = q[..., :rotary_dim], q[..., rotary_dim:]
|
| 303 |
+
k_rot, k_pass = k[..., :rotary_dim], k[..., rotary_dim:]
|
| 304 |
+
|
| 305 |
+
# Apply rotary embeddings on the first half or full tensor
|
| 306 |
+
q_embed = (q_rot * cos) + (rotate_half(q_rot) * sin)
|
| 307 |
+
k_embed = (k_rot * cos) + (rotate_half(k_rot) * sin)
|
| 308 |
+
|
| 309 |
+
# Concatenate back to full shape
|
| 310 |
+
q_embed = torch.cat([q_embed, q_pass], dim=-1)
|
| 311 |
+
k_embed = torch.cat([k_embed, k_pass], dim=-1)
|
| 312 |
+
return q_embed, k_embed
|
| 313 |
+
|
| 314 |
+
|
| 315 |
+
def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor:
|
| 316 |
+
"""
|
| 317 |
+
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch,
|
| 318 |
+
num_key_value_heads, seqlen, head_dim) to (batch, num_attention_heads, seqlen, head_dim)
|
| 319 |
+
"""
|
| 320 |
+
batch, num_key_value_heads, slen, head_dim = hidden_states.shape
|
| 321 |
+
if n_rep == 1:
|
| 322 |
+
return hidden_states
|
| 323 |
+
hidden_states = hidden_states[:, :, None, :, :].expand(batch, num_key_value_heads, n_rep, slen, head_dim)
|
| 324 |
+
return hidden_states.reshape(batch, num_key_value_heads * n_rep, slen, head_dim)
|
| 325 |
+
|
| 326 |
+
|
| 327 |
+
def eager_attention_forward(
|
| 328 |
+
module: nn.Module,
|
| 329 |
+
query: torch.Tensor,
|
| 330 |
+
key: torch.Tensor,
|
| 331 |
+
value: torch.Tensor,
|
| 332 |
+
attention_mask: torch.Tensor | None,
|
| 333 |
+
scaling: float,
|
| 334 |
+
dropout: float = 0.0,
|
| 335 |
+
**kwargs: Unpack[TransformersKwargs],
|
| 336 |
+
):
|
| 337 |
+
key_states = repeat_kv(key, module.num_key_value_groups)
|
| 338 |
+
value_states = repeat_kv(value, module.num_key_value_groups)
|
| 339 |
+
|
| 340 |
+
attn_weights = torch.matmul(query, key_states.transpose(2, 3)) * scaling
|
| 341 |
+
if attention_mask is not None:
|
| 342 |
+
attn_weights = attn_weights + attention_mask
|
| 343 |
+
|
| 344 |
+
attn_weights = nn.functional.softmax(attn_weights, dim=-1, dtype=torch.float32).to(query.dtype)
|
| 345 |
+
attn_weights = nn.functional.dropout(attn_weights, p=dropout, training=module.training)
|
| 346 |
+
attn_output = torch.matmul(attn_weights, value_states)
|
| 347 |
+
attn_output = attn_output.transpose(1, 2).contiguous()
|
| 348 |
+
|
| 349 |
+
return attn_output, attn_weights
|
| 350 |
+
|
| 351 |
+
|
| 352 |
+
# Laguna attention is identical to Qwen2MoE attention except:
|
| 353 |
+
# - No QKV bias
|
| 354 |
+
# - Explicit head_dim from config
|
| 355 |
+
# - Output gating: attn_output = attn_output * softplus(g_proj(hidden_states)) (optional)
|
| 356 |
+
# - Per-layer sliding window attention with optional attention sinks
|
| 357 |
+
@use_kernelized_func(apply_rotary_pos_emb)
|
| 358 |
+
class LagunaAttention(nn.Module):
|
| 359 |
+
def __init__(self, config: LagunaConfig, layer_idx: int, num_heads: int | None = None):
|
| 360 |
+
super().__init__()
|
| 361 |
+
self.config = config
|
| 362 |
+
self.layer_idx = layer_idx
|
| 363 |
+
self.head_dim = config.head_dim
|
| 364 |
+
# Allow the caller (decoder layer) to supply a per-layer head count; fall back
|
| 365 |
+
# to config.num_attention_heads when not provided.
|
| 366 |
+
self.num_heads = num_heads if num_heads is not None else config.num_attention_heads
|
| 367 |
+
self.num_key_value_groups = self.num_heads // config.num_key_value_heads
|
| 368 |
+
self.scaling = self.head_dim**-0.5
|
| 369 |
+
self.attention_dropout = config.attention_dropout
|
| 370 |
+
self.is_causal = True
|
| 371 |
+
|
| 372 |
+
# Per-layer sliding window (follows Gemma2/Cohere2 convention)
|
| 373 |
+
layer_types = getattr(config, "layer_types", None)
|
| 374 |
+
if layer_types is not None:
|
| 375 |
+
self.is_sliding = layer_types[layer_idx] == "sliding_attention"
|
| 376 |
+
self.sliding_window = config.sliding_window if self.is_sliding else None
|
| 377 |
+
else:
|
| 378 |
+
self.is_sliding = False
|
| 379 |
+
self.sliding_window = None
|
| 380 |
+
|
| 381 |
+
# Laguna: no QKV bias, explicit head_dim
|
| 382 |
+
self.q_proj = nn.Linear(config.hidden_size, self.num_heads * config.head_dim, bias=False)
|
| 383 |
+
self.k_proj = nn.Linear(config.hidden_size, config.num_key_value_heads * config.head_dim, bias=False)
|
| 384 |
+
self.v_proj = nn.Linear(config.hidden_size, config.num_key_value_heads * config.head_dim, bias=False)
|
| 385 |
+
self.o_proj = nn.Linear(self.num_heads * config.head_dim, config.hidden_size, bias=False)
|
| 386 |
+
|
| 387 |
+
# Laguna-specific: optional gating projection.
|
| 388 |
+
# ``gating`` may be:
|
| 389 |
+
# - True / "per-element": one gate per (head, head_dim) channel
|
| 390 |
+
# - "per-head": one gate per head, broadcast across head_dim
|
| 391 |
+
# - False: no gating
|
| 392 |
+
gating = getattr(config, "gating", True)
|
| 393 |
+
self.gating = bool(gating)
|
| 394 |
+
self.gate_per_head = gating == "per-head"
|
| 395 |
+
if self.gating:
|
| 396 |
+
g_out = self.num_heads if self.gate_per_head else self.num_heads * config.head_dim
|
| 397 |
+
self.g_proj = nn.Linear(config.hidden_size, g_out, bias=False)
|
| 398 |
+
|
| 399 |
+
# Attention sinks (learnable per-head bias for SWA layers)
|
| 400 |
+
if self.is_sliding and getattr(config, "swa_attention_sink_enabled", False):
|
| 401 |
+
self.sink = nn.Parameter(torch.zeros(self.num_heads))
|
| 402 |
+
|
| 403 |
+
# QK normalization (RMSNorm applied per-head after reshape, before RoPE)
|
| 404 |
+
self.q_norm = LagunaRMSNorm(config.head_dim, eps=config.rms_norm_eps)
|
| 405 |
+
self.k_norm = LagunaRMSNorm(config.head_dim, eps=config.rms_norm_eps)
|
| 406 |
+
|
| 407 |
+
def forward(
|
| 408 |
+
self,
|
| 409 |
+
hidden_states: torch.Tensor,
|
| 410 |
+
position_embeddings: tuple[torch.Tensor, torch.Tensor],
|
| 411 |
+
attention_mask: torch.Tensor | None,
|
| 412 |
+
past_key_values: Cache | None = None,
|
| 413 |
+
**kwargs: Unpack[FlashAttentionKwargs],
|
| 414 |
+
) -> tuple[torch.Tensor, torch.Tensor | None]:
|
| 415 |
+
input_shape = hidden_states.shape[:-1]
|
| 416 |
+
hidden_shape = (*input_shape, -1, self.head_dim)
|
| 417 |
+
|
| 418 |
+
query_states = self.q_proj(hidden_states)
|
| 419 |
+
key_states = self.k_proj(hidden_states)
|
| 420 |
+
value_states = self.v_proj(hidden_states)
|
| 421 |
+
|
| 422 |
+
query_states = query_states.view(hidden_shape).transpose(1, 2)
|
| 423 |
+
key_states = key_states.view(hidden_shape).transpose(1, 2)
|
| 424 |
+
value_states = value_states.view(hidden_shape).transpose(1, 2)
|
| 425 |
+
|
| 426 |
+
# QK normalization (applied per-head before RoPE)
|
| 427 |
+
query_states = self.q_norm(query_states)
|
| 428 |
+
key_states = self.k_norm(key_states)
|
| 429 |
+
|
| 430 |
+
cos, sin = position_embeddings
|
| 431 |
+
query_states, key_states = apply_rotary_pos_emb(query_states, key_states, cos, sin)
|
| 432 |
+
|
| 433 |
+
if past_key_values is not None:
|
| 434 |
+
key_states, value_states = past_key_values.update(key_states, value_states, self.layer_idx)
|
| 435 |
+
|
| 436 |
+
# ``attention_mask`` here is already the correct mask for this layer type —
|
| 437 |
+
# ``LagunaModel.forward`` builds separate full-attention and sliding-attention
|
| 438 |
+
# masks (using ``create_causal_mask`` / ``create_sliding_window_causal_mask``)
|
| 439 |
+
# and the decoder layer passes the right one in.
|
| 440 |
+
attention_interface: Callable = eager_attention_forward
|
| 441 |
+
if self.config._attn_implementation != "eager":
|
| 442 |
+
attention_interface = ALL_ATTENTION_FUNCTIONS[self.config._attn_implementation]
|
| 443 |
+
|
| 444 |
+
attn_output, attn_weights = attention_interface(
|
| 445 |
+
self,
|
| 446 |
+
query_states,
|
| 447 |
+
key_states,
|
| 448 |
+
value_states,
|
| 449 |
+
attention_mask,
|
| 450 |
+
dropout=0.0 if not self.training else self.attention_dropout,
|
| 451 |
+
scaling=self.scaling,
|
| 452 |
+
**kwargs,
|
| 453 |
+
)
|
| 454 |
+
|
| 455 |
+
attn_output = attn_output.reshape(*input_shape, -1).contiguous()
|
| 456 |
+
|
| 457 |
+
# Laguna-specific: apply gating BEFORE o_proj (optional)
|
| 458 |
+
if self.gating:
|
| 459 |
+
gate = F.softplus(self.g_proj(hidden_states).float()).to(attn_output.dtype)
|
| 460 |
+
if self.gate_per_head:
|
| 461 |
+
# gate: [..., num_heads]; broadcast across head_dim
|
| 462 |
+
attn_shape = attn_output.shape
|
| 463 |
+
attn_output = (
|
| 464 |
+
attn_output.view(*attn_shape[:-1], self.num_heads, self.head_dim)
|
| 465 |
+
* gate.unsqueeze(-1)
|
| 466 |
+
).view(attn_shape)
|
| 467 |
+
else:
|
| 468 |
+
attn_output = attn_output * gate
|
| 469 |
+
|
| 470 |
+
attn_output = self.o_proj(attn_output)
|
| 471 |
+
|
| 472 |
+
return attn_output, attn_weights
|
| 473 |
+
|
| 474 |
+
class LagunaDecoderLayer(GradientCheckpointingLayer):
|
| 475 |
+
"""Laguna decoder layer with gated attention and sigmoid-routed MoE."""
|
| 476 |
+
|
| 477 |
+
def __init__(self, config: LagunaConfig, layer_idx: int):
|
| 478 |
+
super().__init__()
|
| 479 |
+
per_layer_heads = getattr(config, "num_attention_heads_per_layer", None)
|
| 480 |
+
layer_num_heads = (
|
| 481 |
+
per_layer_heads[layer_idx] if per_layer_heads is not None else config.num_attention_heads
|
| 482 |
+
)
|
| 483 |
+
# Layer type drives mask and position-embedding dispatch in ``LagunaModel.forward``.
|
| 484 |
+
layer_types = getattr(config, "layer_types", None)
|
| 485 |
+
self.attention_type = layer_types[layer_idx] if layer_types is not None else "full_attention"
|
| 486 |
+
self.self_attn = LagunaAttention(config, layer_idx, num_heads=layer_num_heads)
|
| 487 |
+
# Use MoE or dense MLP based on layer configuration
|
| 488 |
+
if (layer_idx not in config.mlp_only_layers) and (
|
| 489 |
+
config.num_experts > 0 and (layer_idx + 1) % config.decoder_sparse_step == 0
|
| 490 |
+
):
|
| 491 |
+
self.mlp = LagunaSparseMoeBlock(config)
|
| 492 |
+
else:
|
| 493 |
+
self.mlp = LagunaMLP(config, intermediate_size=config.intermediate_size)
|
| 494 |
+
self.input_layernorm = LagunaRMSNorm(config.hidden_size, eps=config.rms_norm_eps)
|
| 495 |
+
self.post_attention_layernorm = LagunaRMSNorm(config.hidden_size, eps=config.rms_norm_eps)
|
| 496 |
+
self.hidden_size = config.hidden_size
|
| 497 |
+
|
| 498 |
+
def forward(
|
| 499 |
+
self,
|
| 500 |
+
hidden_states: torch.Tensor,
|
| 501 |
+
attention_mask: torch.Tensor | None = None,
|
| 502 |
+
position_ids: torch.LongTensor | None = None,
|
| 503 |
+
past_key_values: Cache | None = None,
|
| 504 |
+
use_cache: bool | None = False,
|
| 505 |
+
position_embeddings: tuple[torch.Tensor, torch.Tensor] | None = None,
|
| 506 |
+
**kwargs: Unpack[TransformersKwargs],
|
| 507 |
+
) -> torch.Tensor:
|
| 508 |
+
residual = hidden_states
|
| 509 |
+
hidden_states = self.input_layernorm(hidden_states)
|
| 510 |
+
# Self Attention
|
| 511 |
+
hidden_states, _ = self.self_attn(
|
| 512 |
+
hidden_states=hidden_states,
|
| 513 |
+
attention_mask=attention_mask,
|
| 514 |
+
position_ids=position_ids,
|
| 515 |
+
past_key_values=past_key_values,
|
| 516 |
+
use_cache=use_cache,
|
| 517 |
+
position_embeddings=position_embeddings,
|
| 518 |
+
**kwargs,
|
| 519 |
+
)
|
| 520 |
+
hidden_states = residual + hidden_states
|
| 521 |
+
|
| 522 |
+
# Fully Connected
|
| 523 |
+
residual = hidden_states
|
| 524 |
+
hidden_states = self.post_attention_layernorm(hidden_states)
|
| 525 |
+
hidden_states = self.mlp(hidden_states)
|
| 526 |
+
hidden_states = residual + hidden_states
|
| 527 |
+
return hidden_states
|
| 528 |
+
|
| 529 |
+
|
| 530 |
+
@auto_docstring
|
| 531 |
+
class LagunaPreTrainedModel(PreTrainedModel):
|
| 532 |
+
config: LagunaConfig
|
| 533 |
+
base_model_prefix = "model"
|
| 534 |
+
supports_gradient_checkpointing = True
|
| 535 |
+
_no_split_modules = ["LagunaDecoderLayer"]
|
| 536 |
+
_skip_keys_device_placement = ["past_key_values"]
|
| 537 |
+
_supports_flash_attn = True
|
| 538 |
+
_supports_sdpa = True
|
| 539 |
+
_supports_flex_attn = True
|
| 540 |
+
_can_compile_fullgraph = (
|
| 541 |
+
is_grouped_mm_available()
|
| 542 |
+
) # https://huggingface.co/docs/transformers/experts_interface#torchcompile
|
| 543 |
+
_supports_attention_backend = True
|
| 544 |
+
_can_record_outputs = {
|
| 545 |
+
"router_logits": OutputRecorder(LagunaTopKRouter, index=0),
|
| 546 |
+
"hidden_states": LagunaDecoderLayer,
|
| 547 |
+
"attentions": LagunaAttention,
|
| 548 |
+
}
|
| 549 |
+
# vLLM-trained Laguna checkpoints store the aux-loss-free routing bias on the
|
| 550 |
+
# experts module (``mlp.experts.e_score_correction_bias``). In this impl the
|
| 551 |
+
# bias lives on the router to stay co-located with its consumer across
|
| 552 |
+
# accelerate's per-module hooks, so remap the legacy key on load.
|
| 553 |
+
_checkpoint_conversion_mapping = {
|
| 554 |
+
r"^(.*)\.mlp\.experts\.e_score_correction_bias$": r"\1.mlp.gate.e_score_correction_bias",
|
| 555 |
+
}
|
| 556 |
+
|
| 557 |
+
@torch.no_grad()
|
| 558 |
+
def _init_weights(self, module):
|
| 559 |
+
super()._init_weights(module)
|
| 560 |
+
std = self.config.initializer_range
|
| 561 |
+
if isinstance(module, LagunaExperts):
|
| 562 |
+
init.normal_(module.gate_up_proj, mean=0.0, std=std)
|
| 563 |
+
init.normal_(module.down_proj, mean=0.0, std=std)
|
| 564 |
+
elif isinstance(module, LagunaTopKRouter):
|
| 565 |
+
init.normal_(module.weight, mean=0.0, std=std)
|
| 566 |
+
# Bare ``nn.Parameter``s that are not covered by the parent's generic
|
| 567 |
+
# Linear/Embedding/norm handling need their own rules so that the
|
| 568 |
+
# __init__ and from_pretrained(state_dict={}) paths produce identical
|
| 569 |
+
# weights under a fixed seed.
|
| 570 |
+
if isinstance(module, LagunaTopKRouter):
|
| 571 |
+
torch.nn.init.zeros_(module.e_score_correction_bias)
|
| 572 |
+
if isinstance(module, LagunaAttention) and hasattr(module, "sink"):
|
| 573 |
+
torch.nn.init.zeros_(module.sink)
|
| 574 |
+
|
| 575 |
+
|
| 576 |
+
class LagunaModel(LagunaPreTrainedModel):
|
| 577 |
+
def __init__(self, config: LagunaConfig):
|
| 578 |
+
super().__init__(config)
|
| 579 |
+
self.padding_idx = config.pad_token_id
|
| 580 |
+
self.vocab_size = config.vocab_size
|
| 581 |
+
|
| 582 |
+
self.embed_tokens = nn.Embedding(config.vocab_size, config.hidden_size, self.padding_idx)
|
| 583 |
+
self.layers = nn.ModuleList(
|
| 584 |
+
[LagunaDecoderLayer(config, layer_idx) for layer_idx in range(config.num_hidden_layers)]
|
| 585 |
+
)
|
| 586 |
+
self.norm = LagunaRMSNorm(config.hidden_size, eps=config.rms_norm_eps)
|
| 587 |
+
|
| 588 |
+
# ``LagunaRotaryEmbedding`` inherits ``Qwen2MoeRotaryEmbedding``'s flat-shape
|
| 589 |
+
# contract — it reads ``config.rope_parameters["rope_type"]`` at the outer
|
| 590 |
+
# level. Laguna stores rope nested by layer type (``{"full_attention": {...},
|
| 591 |
+
# ...}``), so pass a config clone with the full-attention sub-dict flattened.
|
| 592 |
+
rp = getattr(config, "rope_parameters", None)
|
| 593 |
+
if isinstance(rp, dict) and isinstance(rp.get("full_attention"), dict):
|
| 594 |
+
import copy
|
| 595 |
+
full_config = copy.deepcopy(config)
|
| 596 |
+
full_config.rope_parameters = dict(rp["full_attention"])
|
| 597 |
+
self.rotary_emb = LagunaRotaryEmbedding(config=full_config)
|
| 598 |
+
else:
|
| 599 |
+
self.rotary_emb = LagunaRotaryEmbedding(config=config)
|
| 600 |
+
|
| 601 |
+
# Separate RoPE for sliding-window attention layers (when configured).
|
| 602 |
+
# Be careful with ``partial_rotary_factor`` — ``PreTrainedConfig.standardize_rope_params``
|
| 603 |
+
# unconditionally overwrites ``rope_parameters["partial_rotary_factor"]`` with
|
| 604 |
+
# ``self.partial_rotary_factor``, so we must align the top-level field on the
|
| 605 |
+
# cloned config to the SWA value, otherwise the global partial factor silently
|
| 606 |
+
# clobbers the SWA one.
|
| 607 |
+
if getattr(config, "swa_rope_parameters", None) is not None:
|
| 608 |
+
import copy
|
| 609 |
+
|
| 610 |
+
swa_config = copy.deepcopy(config)
|
| 611 |
+
swa_config.rope_parameters = dict(config.swa_rope_parameters)
|
| 612 |
+
swa_partial = swa_config.rope_parameters.get("partial_rotary_factor")
|
| 613 |
+
swa_config.partial_rotary_factor = swa_partial
|
| 614 |
+
self.swa_rotary_emb = LagunaRotaryEmbedding(config=swa_config)
|
| 615 |
+
else:
|
| 616 |
+
self.swa_rotary_emb = None
|
| 617 |
+
|
| 618 |
+
self.gradient_checkpointing = False
|
| 619 |
+
|
| 620 |
+
# Initialize weights and apply final processing
|
| 621 |
+
self.post_init()
|
| 622 |
+
|
| 623 |
+
@merge_with_config_defaults
|
| 624 |
+
@capture_outputs
|
| 625 |
+
@auto_docstring
|
| 626 |
+
def forward(
|
| 627 |
+
self,
|
| 628 |
+
input_ids: torch.LongTensor | None = None,
|
| 629 |
+
attention_mask: torch.Tensor | None = None,
|
| 630 |
+
position_ids: torch.LongTensor | None = None,
|
| 631 |
+
past_key_values: Cache | None = None,
|
| 632 |
+
inputs_embeds: torch.FloatTensor | None = None,
|
| 633 |
+
use_cache: bool | None = None,
|
| 634 |
+
**kwargs: Unpack[TransformersKwargs],
|
| 635 |
+
) -> MoeModelOutputWithPast:
|
| 636 |
+
from transformers.cache_utils import DynamicCache
|
| 637 |
+
from transformers.masking_utils import create_causal_mask, create_sliding_window_causal_mask
|
| 638 |
+
|
| 639 |
+
if (input_ids is None) ^ (inputs_embeds is not None):
|
| 640 |
+
raise ValueError("You must specify exactly one of input_ids or inputs_embeds")
|
| 641 |
+
|
| 642 |
+
if inputs_embeds is None:
|
| 643 |
+
inputs_embeds = self.embed_tokens(input_ids)
|
| 644 |
+
|
| 645 |
+
if use_cache and past_key_values is None:
|
| 646 |
+
past_key_values = DynamicCache(config=self.config)
|
| 647 |
+
|
| 648 |
+
if position_ids is None:
|
| 649 |
+
past_seen_tokens = past_key_values.get_seq_length() if past_key_values is not None else 0
|
| 650 |
+
position_ids = (
|
| 651 |
+
torch.arange(inputs_embeds.shape[1], device=inputs_embeds.device) + past_seen_tokens
|
| 652 |
+
).unsqueeze(0)
|
| 653 |
+
|
| 654 |
+
# Build one mask per layer-type so each layer can be dispatched with the right
|
| 655 |
+
# attention pattern (follows the afmoe / cohere2 v5 convention).
|
| 656 |
+
layer_types = getattr(self.config, "layer_types", None)
|
| 657 |
+
has_swa = layer_types is not None and "sliding_attention" in layer_types
|
| 658 |
+
if not isinstance(causal_mask_mapping := attention_mask, dict):
|
| 659 |
+
mask_kwargs = {
|
| 660 |
+
"config": self.config,
|
| 661 |
+
"inputs_embeds": inputs_embeds,
|
| 662 |
+
"attention_mask": attention_mask,
|
| 663 |
+
"past_key_values": past_key_values,
|
| 664 |
+
"position_ids": position_ids,
|
| 665 |
+
}
|
| 666 |
+
causal_mask_mapping = {"full_attention": create_causal_mask(**mask_kwargs)}
|
| 667 |
+
if has_swa:
|
| 668 |
+
causal_mask_mapping["sliding_attention"] = create_sliding_window_causal_mask(**mask_kwargs)
|
| 669 |
+
|
| 670 |
+
hidden_states = inputs_embeds
|
| 671 |
+
global_pe = self.rotary_emb(hidden_states, position_ids)
|
| 672 |
+
# Per-layer-type position embeddings: Laguna optionally uses a different rope for
|
| 673 |
+
# sliding layers (``swa_rope_parameters``). When absent, SWA layers share the
|
| 674 |
+
# global rope.
|
| 675 |
+
if has_swa:
|
| 676 |
+
swa_pe = (
|
| 677 |
+
self.swa_rotary_emb(hidden_states, position_ids)
|
| 678 |
+
if self.swa_rotary_emb is not None
|
| 679 |
+
else global_pe
|
| 680 |
+
)
|
| 681 |
+
position_embeddings_mapping = {"full_attention": global_pe, "sliding_attention": swa_pe}
|
| 682 |
+
else:
|
| 683 |
+
position_embeddings_mapping = None
|
| 684 |
+
|
| 685 |
+
for decoder_layer in self.layers[: self.config.num_hidden_layers]:
|
| 686 |
+
layer_attn_mask = causal_mask_mapping[decoder_layer.attention_type]
|
| 687 |
+
layer_pos_emb = (
|
| 688 |
+
position_embeddings_mapping[decoder_layer.attention_type]
|
| 689 |
+
if position_embeddings_mapping is not None
|
| 690 |
+
else global_pe
|
| 691 |
+
)
|
| 692 |
+
hidden_states = decoder_layer(
|
| 693 |
+
hidden_states,
|
| 694 |
+
attention_mask=layer_attn_mask,
|
| 695 |
+
position_ids=position_ids,
|
| 696 |
+
past_key_values=past_key_values,
|
| 697 |
+
use_cache=use_cache,
|
| 698 |
+
position_embeddings=layer_pos_emb,
|
| 699 |
+
**kwargs,
|
| 700 |
+
)
|
| 701 |
+
|
| 702 |
+
hidden_states = self.norm(hidden_states)
|
| 703 |
+
|
| 704 |
+
return MoeModelOutputWithPast(
|
| 705 |
+
last_hidden_state=hidden_states,
|
| 706 |
+
past_key_values=past_key_values,
|
| 707 |
+
)
|
| 708 |
+
|
| 709 |
+
|
| 710 |
+
def load_balancing_loss_func(
|
| 711 |
+
gate_logits: torch.Tensor | tuple[torch.Tensor] | None,
|
| 712 |
+
num_experts: int | None = None,
|
| 713 |
+
top_k=2,
|
| 714 |
+
attention_mask: torch.Tensor | None = None,
|
| 715 |
+
) -> torch.Tensor | int:
|
| 716 |
+
r"""
|
| 717 |
+
Computes auxiliary load balancing loss as in Switch Transformer - implemented in Pytorch.
|
| 718 |
+
|
| 719 |
+
See Switch Transformer (https://huggingface.co/papers/2101.03961) for more details. This function implements the loss
|
| 720 |
+
function presented in equations (4) - (6) of the paper. It aims at penalizing cases where the routing between
|
| 721 |
+
experts is too unbalanced.
|
| 722 |
+
|
| 723 |
+
Args:
|
| 724 |
+
gate_logits:
|
| 725 |
+
Logits from the `gate`, should be a tuple of model.config.num_hidden_layers tensors of
|
| 726 |
+
shape [batch_size X sequence_length, num_experts].
|
| 727 |
+
num_experts:
|
| 728 |
+
Number of experts
|
| 729 |
+
top_k:
|
| 730 |
+
The number of experts to route per-token, can be also interpreted as the `top-k` routing
|
| 731 |
+
parameter.
|
| 732 |
+
attention_mask (`torch.Tensor`, *optional*):
|
| 733 |
+
The attention_mask used in forward function
|
| 734 |
+
shape [batch_size X sequence_length] if not None.
|
| 735 |
+
|
| 736 |
+
Returns:
|
| 737 |
+
The auxiliary loss.
|
| 738 |
+
"""
|
| 739 |
+
if gate_logits is None or not isinstance(gate_logits, tuple):
|
| 740 |
+
return 0
|
| 741 |
+
|
| 742 |
+
if isinstance(gate_logits, tuple):
|
| 743 |
+
compute_device = gate_logits[0].device
|
| 744 |
+
concatenated_gate_logits = torch.cat([layer_gate.to(compute_device) for layer_gate in gate_logits], dim=0)
|
| 745 |
+
|
| 746 |
+
routing_weights = torch.nn.functional.softmax(concatenated_gate_logits, dim=-1)
|
| 747 |
+
|
| 748 |
+
_, selected_experts = torch.topk(routing_weights, top_k, dim=-1)
|
| 749 |
+
|
| 750 |
+
expert_mask = torch.nn.functional.one_hot(selected_experts, num_experts)
|
| 751 |
+
|
| 752 |
+
if attention_mask is None:
|
| 753 |
+
# Compute the percentage of tokens routed to each experts
|
| 754 |
+
tokens_per_expert = torch.mean(expert_mask.float(), dim=0)
|
| 755 |
+
|
| 756 |
+
# Compute the average probability of routing to these experts
|
| 757 |
+
router_prob_per_expert = torch.mean(routing_weights, dim=0)
|
| 758 |
+
else:
|
| 759 |
+
batch_size, sequence_length = attention_mask.shape
|
| 760 |
+
num_hidden_layers = concatenated_gate_logits.shape[0] // (batch_size * sequence_length)
|
| 761 |
+
|
| 762 |
+
# Compute the mask that masks all padding tokens as 0 with the same shape of expert_mask
|
| 763 |
+
expert_attention_mask = (
|
| 764 |
+
attention_mask[None, :, :, None, None]
|
| 765 |
+
.expand((num_hidden_layers, batch_size, sequence_length, top_k, num_experts))
|
| 766 |
+
.reshape(-1, top_k, num_experts)
|
| 767 |
+
.to(compute_device)
|
| 768 |
+
)
|
| 769 |
+
|
| 770 |
+
# Compute the percentage of tokens routed to each experts
|
| 771 |
+
tokens_per_expert = torch.sum(expert_mask.float() * expert_attention_mask, dim=0) / torch.sum(
|
| 772 |
+
expert_attention_mask, dim=0
|
| 773 |
+
)
|
| 774 |
+
|
| 775 |
+
# Compute the mask that masks all padding tokens as 0 with the same shape of tokens_per_expert
|
| 776 |
+
router_per_expert_attention_mask = (
|
| 777 |
+
attention_mask[None, :, :, None]
|
| 778 |
+
.expand((num_hidden_layers, batch_size, sequence_length, num_experts))
|
| 779 |
+
.reshape(-1, num_experts)
|
| 780 |
+
.to(compute_device)
|
| 781 |
+
)
|
| 782 |
+
|
| 783 |
+
# Compute the average probability of routing to these experts
|
| 784 |
+
router_prob_per_expert = torch.sum(routing_weights * router_per_expert_attention_mask, dim=0) / torch.sum(
|
| 785 |
+
router_per_expert_attention_mask, dim=0
|
| 786 |
+
)
|
| 787 |
+
|
| 788 |
+
overall_loss = torch.sum(tokens_per_expert * router_prob_per_expert.unsqueeze(0))
|
| 789 |
+
return overall_loss * num_experts
|
| 790 |
+
|
| 791 |
+
|
| 792 |
+
@auto_docstring
|
| 793 |
+
class LagunaForCausalLM(LagunaPreTrainedModel, GenerationMixin):
|
| 794 |
+
_tied_weights_keys = {"lm_head.weight": "model.embed_tokens.weight"}
|
| 795 |
+
_tp_plan = {"lm_head": "colwise_gather_output"}
|
| 796 |
+
_pp_plan = {"lm_head": (["hidden_states"], ["logits"])}
|
| 797 |
+
|
| 798 |
+
def __init__(self, config):
|
| 799 |
+
super().__init__(config)
|
| 800 |
+
self.model = LagunaModel(config)
|
| 801 |
+
self.vocab_size = config.vocab_size
|
| 802 |
+
self.lm_head = nn.Linear(config.hidden_size, config.vocab_size, bias=False)
|
| 803 |
+
self.router_aux_loss_coef = config.router_aux_loss_coef
|
| 804 |
+
self.num_experts = config.num_experts
|
| 805 |
+
self.num_experts_per_tok = config.num_experts_per_tok
|
| 806 |
+
|
| 807 |
+
# Initialize weights and apply final processing
|
| 808 |
+
self.post_init()
|
| 809 |
+
|
| 810 |
+
@can_return_tuple
|
| 811 |
+
@auto_docstring
|
| 812 |
+
def forward(
|
| 813 |
+
self,
|
| 814 |
+
input_ids: torch.LongTensor | None = None,
|
| 815 |
+
attention_mask: torch.Tensor | None = None,
|
| 816 |
+
position_ids: torch.LongTensor | None = None,
|
| 817 |
+
past_key_values: Cache | None = None,
|
| 818 |
+
inputs_embeds: torch.FloatTensor | None = None,
|
| 819 |
+
labels: torch.LongTensor | None = None,
|
| 820 |
+
use_cache: bool | None = None,
|
| 821 |
+
output_router_logits: bool | None = None,
|
| 822 |
+
logits_to_keep: int | torch.Tensor = 0,
|
| 823 |
+
**kwargs: Unpack[TransformersKwargs],
|
| 824 |
+
) -> MoeCausalLMOutputWithPast:
|
| 825 |
+
r"""
|
| 826 |
+
labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
|
| 827 |
+
Labels for computing the masked language modeling loss. Indices should either be in `[0, ...,
|
| 828 |
+
config.vocab_size]` or -100 (see `input_ids` docstring). Tokens with indices set to `-100` are ignored
|
| 829 |
+
(masked), the loss is only computed for the tokens with labels in `[0, ..., config.vocab_size]`.
|
| 830 |
+
"""
|
| 831 |
+
|
| 832 |
+
output_router_logits = (
|
| 833 |
+
output_router_logits if output_router_logits is not None else self.config.output_router_logits
|
| 834 |
+
)
|
| 835 |
+
|
| 836 |
+
# decoder outputs consists of (dec_features, layer_state, dec_hidden, dec_attn)
|
| 837 |
+
outputs: MoeModelOutputWithPast = self.model(
|
| 838 |
+
input_ids=input_ids,
|
| 839 |
+
attention_mask=attention_mask,
|
| 840 |
+
position_ids=position_ids,
|
| 841 |
+
past_key_values=past_key_values,
|
| 842 |
+
inputs_embeds=inputs_embeds,
|
| 843 |
+
use_cache=use_cache,
|
| 844 |
+
output_router_logits=output_router_logits,
|
| 845 |
+
**kwargs,
|
| 846 |
+
)
|
| 847 |
+
|
| 848 |
+
hidden_states = outputs.last_hidden_state
|
| 849 |
+
# Only compute necessary logits, and do not upcast them to float if we are not computing the loss
|
| 850 |
+
slice_indices = slice(-logits_to_keep, None) if isinstance(logits_to_keep, int) else logits_to_keep
|
| 851 |
+
logits = self.lm_head(hidden_states[:, slice_indices, :])
|
| 852 |
+
|
| 853 |
+
loss = None
|
| 854 |
+
if labels is not None:
|
| 855 |
+
loss = self.loss_function(logits, labels, self.vocab_size, **kwargs)
|
| 856 |
+
|
| 857 |
+
aux_loss = None
|
| 858 |
+
if output_router_logits:
|
| 859 |
+
aux_loss = load_balancing_loss_func(
|
| 860 |
+
outputs.router_logits,
|
| 861 |
+
self.num_experts,
|
| 862 |
+
self.num_experts_per_tok,
|
| 863 |
+
attention_mask,
|
| 864 |
+
)
|
| 865 |
+
if labels is not None:
|
| 866 |
+
loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device
|
| 867 |
+
|
| 868 |
+
return MoeCausalLMOutputWithPast(
|
| 869 |
+
loss=loss,
|
| 870 |
+
aux_loss=aux_loss,
|
| 871 |
+
logits=logits,
|
| 872 |
+
past_key_values=outputs.past_key_values,
|
| 873 |
+
hidden_states=outputs.hidden_states,
|
| 874 |
+
attentions=outputs.attentions,
|
| 875 |
+
router_logits=outputs.router_logits,
|
| 876 |
+
)
|
| 877 |
+
|
| 878 |
+
|
| 879 |
+
__all__ = ["LagunaForCausalLM", "LagunaModel", "LagunaPreTrainedModel"]
|
| 880 |
+
|
| 881 |
+
|
| 882 |
+
# --- Added: register the native Laguna checkpoint-conversion for trust_remote_code loads.
|
| 883 |
+
# transformers >=5.12 skips checkpoint-conversion mappings for custom (remote) code
|
| 884 |
+
# unless explicitly registered, which broke loading the shipped per-expert MoE weights.
|
| 885 |
+
try:
|
| 886 |
+
from transformers.conversion_mapping import (
|
| 887 |
+
get_checkpoint_conversion_mapping as _lg_get,
|
| 888 |
+
register_checkpoint_conversion_mapping as _lg_reg,
|
| 889 |
+
USER_REGISTERED_MAPPINGS as _lg_user,
|
| 890 |
+
)
|
| 891 |
+
if "laguna" not in _lg_user:
|
| 892 |
+
_lg_m = _lg_get("laguna")
|
| 893 |
+
if _lg_m is not None:
|
| 894 |
+
_lg_reg("laguna", _lg_m, overwrite=True)
|
| 895 |
+
except Exception:
|
| 896 |
+
pass
|
oq_imatrix_report.json
ADDED
|
@@ -0,0 +1,604 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"enabled": true,
|
| 3 |
+
"cache_path": "/Users/joey/.omlx/models/.oqe_imatrix/Laguna-XS-2.1-ef57f884fbb6-s128-l512.npz",
|
| 4 |
+
"cache_reused": false,
|
| 5 |
+
"entry_count": 476,
|
| 6 |
+
"calib_dataset": "oqe_code_multilingual",
|
| 7 |
+
"collection": {
|
| 8 |
+
"dataset": "oqe_code_multilingual",
|
| 9 |
+
"requested_samples": 128,
|
| 10 |
+
"seq_length": 512,
|
| 11 |
+
"adaptive": true,
|
| 12 |
+
"adaptive_step_samples": 128,
|
| 13 |
+
"adaptive_max_samples": 1024,
|
| 14 |
+
"available_samples": 1024,
|
| 15 |
+
"micro_batch_size": 4,
|
| 16 |
+
"micro_batches": 122,
|
| 17 |
+
"batch_plan": {
|
| 18 |
+
"micro_batch_size": 4,
|
| 19 |
+
"estimated_sample_bytes": 33554432,
|
| 20 |
+
"capture_budget_bytes": 158482620,
|
| 21 |
+
"system_available_bytes": 34689581056,
|
| 22 |
+
"metal_available_bytes": 49386953048,
|
| 23 |
+
"live_available_bytes": 34689581056,
|
| 24 |
+
"model_bytes": 18841319027,
|
| 25 |
+
"remaining_available_bytes": 15848262029,
|
| 26 |
+
"fits_one_sample": true,
|
| 27 |
+
"hidden_size": 2048,
|
| 28 |
+
"num_experts": 256,
|
| 29 |
+
"top_k": 8,
|
| 30 |
+
"gemma4_state_bytes": 0,
|
| 31 |
+
"num_hidden_layers": 40,
|
| 32 |
+
"num_kv_shared_layers": 0,
|
| 33 |
+
"per_layer_input_size": 0
|
| 34 |
+
},
|
| 35 |
+
"processed_samples": 488,
|
| 36 |
+
"installed_modules": 477,
|
| 37 |
+
"capture_module_classes": {
|
| 38 |
+
"Linear": 39,
|
| 39 |
+
"QuantizedLinear": 321,
|
| 40 |
+
"QuantizedSwitchLinear": 117
|
| 41 |
+
},
|
| 42 |
+
"switch_capture_modules": 117,
|
| 43 |
+
"requires_expert_counts": true,
|
| 44 |
+
"coverage_sufficient": true,
|
| 45 |
+
"collection_sufficient": true,
|
| 46 |
+
"coverage": {
|
| 47 |
+
"has_expert_counts": true,
|
| 48 |
+
"expert_modules": 117,
|
| 49 |
+
"total_experts": 29952,
|
| 50 |
+
"active_experts": 29952,
|
| 51 |
+
"zero_count_experts": 0,
|
| 52 |
+
"active_ratio": 1.0,
|
| 53 |
+
"min_count": 2,
|
| 54 |
+
"p05_count": 1118.0,
|
| 55 |
+
"p10_count": 1696.0,
|
| 56 |
+
"median_count": 5101.0,
|
| 57 |
+
"max_count": 155973,
|
| 58 |
+
"min_required_count": 16,
|
| 59 |
+
"required_percentile": 5
|
| 60 |
+
},
|
| 61 |
+
"rounds": [
|
| 62 |
+
{
|
| 63 |
+
"processed_samples": 128,
|
| 64 |
+
"coverage_sufficient": false,
|
| 65 |
+
"collection_sufficient": false,
|
| 66 |
+
"coverage": {
|
| 67 |
+
"has_expert_counts": true,
|
| 68 |
+
"expert_modules": 117,
|
| 69 |
+
"total_experts": 29952,
|
| 70 |
+
"active_experts": 29946,
|
| 71 |
+
"zero_count_experts": 6,
|
| 72 |
+
"active_ratio": 0.9997996794871795,
|
| 73 |
+
"min_count": 0,
|
| 74 |
+
"p05_count": 309.0,
|
| 75 |
+
"p10_count": 457.0,
|
| 76 |
+
"median_count": 1365.0,
|
| 77 |
+
"max_count": 40236,
|
| 78 |
+
"min_required_count": 16,
|
| 79 |
+
"required_percentile": 5
|
| 80 |
+
}
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"processed_samples": 256,
|
| 84 |
+
"coverage_sufficient": false,
|
| 85 |
+
"collection_sufficient": false,
|
| 86 |
+
"coverage": {
|
| 87 |
+
"has_expert_counts": true,
|
| 88 |
+
"expert_modules": 117,
|
| 89 |
+
"total_experts": 29952,
|
| 90 |
+
"active_experts": 29949,
|
| 91 |
+
"zero_count_experts": 3,
|
| 92 |
+
"active_ratio": 0.9998998397435898,
|
| 93 |
+
"min_count": 0,
|
| 94 |
+
"p05_count": 576.0,
|
| 95 |
+
"p10_count": 868.0,
|
| 96 |
+
"median_count": 2629.0,
|
| 97 |
+
"max_count": 84278,
|
| 98 |
+
"min_required_count": 16,
|
| 99 |
+
"required_percentile": 5
|
| 100 |
+
}
|
| 101 |
+
},
|
| 102 |
+
{
|
| 103 |
+
"processed_samples": 384,
|
| 104 |
+
"coverage_sufficient": false,
|
| 105 |
+
"collection_sufficient": false,
|
| 106 |
+
"coverage": {
|
| 107 |
+
"has_expert_counts": true,
|
| 108 |
+
"expert_modules": 117,
|
| 109 |
+
"total_experts": 29952,
|
| 110 |
+
"active_experts": 29949,
|
| 111 |
+
"zero_count_experts": 3,
|
| 112 |
+
"active_ratio": 0.9998998397435898,
|
| 113 |
+
"min_count": 0,
|
| 114 |
+
"p05_count": 866.0,
|
| 115 |
+
"p10_count": 1306.0,
|
| 116 |
+
"median_count": 3958.5,
|
| 117 |
+
"max_count": 125186,
|
| 118 |
+
"min_required_count": 16,
|
| 119 |
+
"required_percentile": 5
|
| 120 |
+
}
|
| 121 |
+
},
|
| 122 |
+
{
|
| 123 |
+
"processed_samples": 488,
|
| 124 |
+
"coverage_sufficient": true,
|
| 125 |
+
"collection_sufficient": true,
|
| 126 |
+
"coverage": {
|
| 127 |
+
"has_expert_counts": true,
|
| 128 |
+
"expert_modules": 117,
|
| 129 |
+
"total_experts": 29952,
|
| 130 |
+
"active_experts": 29952,
|
| 131 |
+
"zero_count_experts": 0,
|
| 132 |
+
"active_ratio": 1.0,
|
| 133 |
+
"min_count": 2,
|
| 134 |
+
"p05_count": 1118.0,
|
| 135 |
+
"p10_count": 1696.0,
|
| 136 |
+
"median_count": 5101.0,
|
| 137 |
+
"max_count": 155973,
|
| 138 |
+
"min_required_count": 16,
|
| 139 |
+
"required_percentile": 5
|
| 140 |
+
}
|
| 141 |
+
}
|
| 142 |
+
]
|
| 143 |
+
},
|
| 144 |
+
"expert_coverage": {
|
| 145 |
+
"has_expert_counts": true,
|
| 146 |
+
"expert_modules": 117,
|
| 147 |
+
"total_experts": 29952,
|
| 148 |
+
"active_experts": 29952,
|
| 149 |
+
"zero_count_experts": 0,
|
| 150 |
+
"active_ratio": 1.0,
|
| 151 |
+
"min_count": 2,
|
| 152 |
+
"p05_count": 1118.0,
|
| 153 |
+
"p10_count": 1696.0,
|
| 154 |
+
"median_count": 5101.0,
|
| 155 |
+
"max_count": 155973,
|
| 156 |
+
"min_required_count": 16,
|
| 157 |
+
"required_percentile": 5
|
| 158 |
+
},
|
| 159 |
+
"applied": [
|
| 160 |
+
"model.layers.0.mlp.down_proj",
|
| 161 |
+
"model.layers.0.mlp.gate_proj",
|
| 162 |
+
"model.layers.0.mlp.up_proj",
|
| 163 |
+
"model.layers.0.self_attn.g_proj",
|
| 164 |
+
"model.layers.0.self_attn.k_proj",
|
| 165 |
+
"model.layers.0.self_attn.o_proj",
|
| 166 |
+
"model.layers.0.self_attn.q_proj",
|
| 167 |
+
"model.layers.0.self_attn.v_proj",
|
| 168 |
+
"model.layers.1.mlp.shared_expert.down_proj",
|
| 169 |
+
"model.layers.1.mlp.shared_expert.gate_proj",
|
| 170 |
+
"model.layers.1.mlp.shared_expert.up_proj",
|
| 171 |
+
"model.layers.1.mlp.switch_mlp.down_proj",
|
| 172 |
+
"model.layers.1.mlp.switch_mlp.gate_proj",
|
| 173 |
+
"model.layers.1.mlp.switch_mlp.up_proj",
|
| 174 |
+
"model.layers.1.self_attn.g_proj",
|
| 175 |
+
"model.layers.1.self_attn.k_proj",
|
| 176 |
+
"model.layers.1.self_attn.o_proj",
|
| 177 |
+
"model.layers.1.self_attn.q_proj",
|
| 178 |
+
"model.layers.1.self_attn.v_proj",
|
| 179 |
+
"model.layers.10.mlp.shared_expert.down_proj",
|
| 180 |
+
"model.layers.10.mlp.shared_expert.gate_proj",
|
| 181 |
+
"model.layers.10.mlp.shared_expert.up_proj",
|
| 182 |
+
"model.layers.10.mlp.switch_mlp.down_proj",
|
| 183 |
+
"model.layers.10.mlp.switch_mlp.gate_proj",
|
| 184 |
+
"model.layers.10.mlp.switch_mlp.up_proj",
|
| 185 |
+
"model.layers.10.self_attn.g_proj",
|
| 186 |
+
"model.layers.10.self_attn.k_proj",
|
| 187 |
+
"model.layers.10.self_attn.o_proj",
|
| 188 |
+
"model.layers.10.self_attn.q_proj",
|
| 189 |
+
"model.layers.10.self_attn.v_proj",
|
| 190 |
+
"model.layers.11.mlp.shared_expert.down_proj",
|
| 191 |
+
"model.layers.11.mlp.shared_expert.gate_proj",
|
| 192 |
+
"model.layers.11.mlp.shared_expert.up_proj",
|
| 193 |
+
"model.layers.11.mlp.switch_mlp.down_proj",
|
| 194 |
+
"model.layers.11.mlp.switch_mlp.gate_proj",
|
| 195 |
+
"model.layers.11.mlp.switch_mlp.up_proj",
|
| 196 |
+
"model.layers.11.self_attn.g_proj",
|
| 197 |
+
"model.layers.11.self_attn.k_proj",
|
| 198 |
+
"model.layers.11.self_attn.o_proj",
|
| 199 |
+
"model.layers.11.self_attn.q_proj",
|
| 200 |
+
"model.layers.11.self_attn.v_proj",
|
| 201 |
+
"model.layers.12.mlp.shared_expert.down_proj",
|
| 202 |
+
"model.layers.12.mlp.shared_expert.gate_proj",
|
| 203 |
+
"model.layers.12.mlp.shared_expert.up_proj",
|
| 204 |
+
"model.layers.12.mlp.switch_mlp.down_proj",
|
| 205 |
+
"model.layers.12.mlp.switch_mlp.gate_proj",
|
| 206 |
+
"model.layers.12.mlp.switch_mlp.up_proj",
|
| 207 |
+
"model.layers.12.self_attn.g_proj",
|
| 208 |
+
"model.layers.12.self_attn.k_proj",
|
| 209 |
+
"model.layers.12.self_attn.o_proj",
|
| 210 |
+
"model.layers.12.self_attn.q_proj",
|
| 211 |
+
"model.layers.12.self_attn.v_proj",
|
| 212 |
+
"model.layers.13.mlp.shared_expert.down_proj",
|
| 213 |
+
"model.layers.13.mlp.shared_expert.gate_proj",
|
| 214 |
+
"model.layers.13.mlp.shared_expert.up_proj",
|
| 215 |
+
"model.layers.13.mlp.switch_mlp.down_proj",
|
| 216 |
+
"model.layers.13.mlp.switch_mlp.gate_proj",
|
| 217 |
+
"model.layers.13.mlp.switch_mlp.up_proj",
|
| 218 |
+
"model.layers.13.self_attn.g_proj",
|
| 219 |
+
"model.layers.13.self_attn.k_proj",
|
| 220 |
+
"model.layers.13.self_attn.o_proj",
|
| 221 |
+
"model.layers.13.self_attn.q_proj",
|
| 222 |
+
"model.layers.13.self_attn.v_proj",
|
| 223 |
+
"model.layers.14.mlp.shared_expert.down_proj",
|
| 224 |
+
"model.layers.14.mlp.shared_expert.gate_proj",
|
| 225 |
+
"model.layers.14.mlp.shared_expert.up_proj",
|
| 226 |
+
"model.layers.14.mlp.switch_mlp.down_proj",
|
| 227 |
+
"model.layers.14.mlp.switch_mlp.gate_proj",
|
| 228 |
+
"model.layers.14.mlp.switch_mlp.up_proj",
|
| 229 |
+
"model.layers.14.self_attn.g_proj",
|
| 230 |
+
"model.layers.14.self_attn.k_proj",
|
| 231 |
+
"model.layers.14.self_attn.o_proj",
|
| 232 |
+
"model.layers.14.self_attn.q_proj",
|
| 233 |
+
"model.layers.14.self_attn.v_proj",
|
| 234 |
+
"model.layers.15.mlp.shared_expert.down_proj",
|
| 235 |
+
"model.layers.15.mlp.shared_expert.gate_proj",
|
| 236 |
+
"model.layers.15.mlp.shared_expert.up_proj",
|
| 237 |
+
"model.layers.15.mlp.switch_mlp.down_proj",
|
| 238 |
+
"model.layers.15.mlp.switch_mlp.gate_proj",
|
| 239 |
+
"model.layers.15.mlp.switch_mlp.up_proj",
|
| 240 |
+
"model.layers.15.self_attn.g_proj",
|
| 241 |
+
"model.layers.15.self_attn.k_proj",
|
| 242 |
+
"model.layers.15.self_attn.o_proj",
|
| 243 |
+
"model.layers.15.self_attn.q_proj",
|
| 244 |
+
"model.layers.15.self_attn.v_proj",
|
| 245 |
+
"model.layers.16.mlp.shared_expert.down_proj",
|
| 246 |
+
"model.layers.16.mlp.shared_expert.gate_proj",
|
| 247 |
+
"model.layers.16.mlp.shared_expert.up_proj",
|
| 248 |
+
"model.layers.16.mlp.switch_mlp.down_proj",
|
| 249 |
+
"model.layers.16.mlp.switch_mlp.gate_proj",
|
| 250 |
+
"model.layers.16.mlp.switch_mlp.up_proj",
|
| 251 |
+
"model.layers.16.self_attn.g_proj",
|
| 252 |
+
"model.layers.16.self_attn.k_proj",
|
| 253 |
+
"model.layers.16.self_attn.o_proj",
|
| 254 |
+
"model.layers.16.self_attn.q_proj",
|
| 255 |
+
"model.layers.16.self_attn.v_proj",
|
| 256 |
+
"model.layers.17.mlp.shared_expert.down_proj",
|
| 257 |
+
"model.layers.17.mlp.shared_expert.gate_proj",
|
| 258 |
+
"model.layers.17.mlp.shared_expert.up_proj",
|
| 259 |
+
"model.layers.17.mlp.switch_mlp.down_proj",
|
| 260 |
+
"model.layers.17.mlp.switch_mlp.gate_proj",
|
| 261 |
+
"model.layers.17.mlp.switch_mlp.up_proj",
|
| 262 |
+
"model.layers.17.self_attn.g_proj",
|
| 263 |
+
"model.layers.17.self_attn.k_proj",
|
| 264 |
+
"model.layers.17.self_attn.o_proj",
|
| 265 |
+
"model.layers.17.self_attn.q_proj",
|
| 266 |
+
"model.layers.17.self_attn.v_proj",
|
| 267 |
+
"model.layers.18.mlp.shared_expert.down_proj",
|
| 268 |
+
"model.layers.18.mlp.shared_expert.gate_proj",
|
| 269 |
+
"model.layers.18.mlp.shared_expert.up_proj",
|
| 270 |
+
"model.layers.18.mlp.switch_mlp.down_proj",
|
| 271 |
+
"model.layers.18.mlp.switch_mlp.gate_proj",
|
| 272 |
+
"model.layers.18.mlp.switch_mlp.up_proj",
|
| 273 |
+
"model.layers.18.self_attn.g_proj",
|
| 274 |
+
"model.layers.18.self_attn.k_proj",
|
| 275 |
+
"model.layers.18.self_attn.o_proj",
|
| 276 |
+
"model.layers.18.self_attn.q_proj",
|
| 277 |
+
"model.layers.18.self_attn.v_proj",
|
| 278 |
+
"model.layers.19.mlp.shared_expert.down_proj",
|
| 279 |
+
"model.layers.19.mlp.shared_expert.gate_proj",
|
| 280 |
+
"model.layers.19.mlp.shared_expert.up_proj",
|
| 281 |
+
"model.layers.19.mlp.switch_mlp.down_proj",
|
| 282 |
+
"model.layers.19.mlp.switch_mlp.gate_proj",
|
| 283 |
+
"model.layers.19.mlp.switch_mlp.up_proj",
|
| 284 |
+
"model.layers.19.self_attn.g_proj",
|
| 285 |
+
"model.layers.19.self_attn.k_proj",
|
| 286 |
+
"model.layers.19.self_attn.o_proj",
|
| 287 |
+
"model.layers.19.self_attn.q_proj",
|
| 288 |
+
"model.layers.19.self_attn.v_proj",
|
| 289 |
+
"model.layers.2.mlp.shared_expert.down_proj",
|
| 290 |
+
"model.layers.2.mlp.shared_expert.gate_proj",
|
| 291 |
+
"model.layers.2.mlp.shared_expert.up_proj",
|
| 292 |
+
"model.layers.2.mlp.switch_mlp.down_proj",
|
| 293 |
+
"model.layers.2.mlp.switch_mlp.gate_proj",
|
| 294 |
+
"model.layers.2.mlp.switch_mlp.up_proj",
|
| 295 |
+
"model.layers.2.self_attn.g_proj",
|
| 296 |
+
"model.layers.2.self_attn.k_proj",
|
| 297 |
+
"model.layers.2.self_attn.o_proj",
|
| 298 |
+
"model.layers.2.self_attn.q_proj",
|
| 299 |
+
"model.layers.2.self_attn.v_proj",
|
| 300 |
+
"model.layers.20.mlp.shared_expert.down_proj",
|
| 301 |
+
"model.layers.20.mlp.shared_expert.gate_proj",
|
| 302 |
+
"model.layers.20.mlp.shared_expert.up_proj",
|
| 303 |
+
"model.layers.20.mlp.switch_mlp.down_proj",
|
| 304 |
+
"model.layers.20.mlp.switch_mlp.gate_proj",
|
| 305 |
+
"model.layers.20.mlp.switch_mlp.up_proj",
|
| 306 |
+
"model.layers.20.self_attn.g_proj",
|
| 307 |
+
"model.layers.20.self_attn.k_proj",
|
| 308 |
+
"model.layers.20.self_attn.o_proj",
|
| 309 |
+
"model.layers.20.self_attn.q_proj",
|
| 310 |
+
"model.layers.20.self_attn.v_proj",
|
| 311 |
+
"model.layers.21.mlp.shared_expert.down_proj",
|
| 312 |
+
"model.layers.21.mlp.shared_expert.gate_proj",
|
| 313 |
+
"model.layers.21.mlp.shared_expert.up_proj",
|
| 314 |
+
"model.layers.21.mlp.switch_mlp.down_proj",
|
| 315 |
+
"model.layers.21.mlp.switch_mlp.gate_proj",
|
| 316 |
+
"model.layers.21.mlp.switch_mlp.up_proj",
|
| 317 |
+
"model.layers.21.self_attn.g_proj",
|
| 318 |
+
"model.layers.21.self_attn.k_proj",
|
| 319 |
+
"model.layers.21.self_attn.o_proj",
|
| 320 |
+
"model.layers.21.self_attn.q_proj",
|
| 321 |
+
"model.layers.21.self_attn.v_proj",
|
| 322 |
+
"model.layers.22.mlp.shared_expert.down_proj",
|
| 323 |
+
"model.layers.22.mlp.shared_expert.gate_proj",
|
| 324 |
+
"model.layers.22.mlp.shared_expert.up_proj",
|
| 325 |
+
"model.layers.22.mlp.switch_mlp.down_proj",
|
| 326 |
+
"model.layers.22.mlp.switch_mlp.gate_proj",
|
| 327 |
+
"model.layers.22.mlp.switch_mlp.up_proj",
|
| 328 |
+
"model.layers.22.self_attn.g_proj",
|
| 329 |
+
"model.layers.22.self_attn.k_proj",
|
| 330 |
+
"model.layers.22.self_attn.o_proj",
|
| 331 |
+
"model.layers.22.self_attn.q_proj",
|
| 332 |
+
"model.layers.22.self_attn.v_proj",
|
| 333 |
+
"model.layers.23.mlp.shared_expert.down_proj",
|
| 334 |
+
"model.layers.23.mlp.shared_expert.gate_proj",
|
| 335 |
+
"model.layers.23.mlp.shared_expert.up_proj",
|
| 336 |
+
"model.layers.23.mlp.switch_mlp.down_proj",
|
| 337 |
+
"model.layers.23.mlp.switch_mlp.gate_proj",
|
| 338 |
+
"model.layers.23.mlp.switch_mlp.up_proj",
|
| 339 |
+
"model.layers.23.self_attn.g_proj",
|
| 340 |
+
"model.layers.23.self_attn.k_proj",
|
| 341 |
+
"model.layers.23.self_attn.o_proj",
|
| 342 |
+
"model.layers.23.self_attn.q_proj",
|
| 343 |
+
"model.layers.23.self_attn.v_proj",
|
| 344 |
+
"model.layers.24.mlp.shared_expert.down_proj",
|
| 345 |
+
"model.layers.24.mlp.shared_expert.gate_proj",
|
| 346 |
+
"model.layers.24.mlp.shared_expert.up_proj",
|
| 347 |
+
"model.layers.24.mlp.switch_mlp.down_proj",
|
| 348 |
+
"model.layers.24.mlp.switch_mlp.gate_proj",
|
| 349 |
+
"model.layers.24.mlp.switch_mlp.up_proj",
|
| 350 |
+
"model.layers.24.self_attn.g_proj",
|
| 351 |
+
"model.layers.24.self_attn.k_proj",
|
| 352 |
+
"model.layers.24.self_attn.o_proj",
|
| 353 |
+
"model.layers.24.self_attn.q_proj",
|
| 354 |
+
"model.layers.24.self_attn.v_proj",
|
| 355 |
+
"model.layers.25.mlp.shared_expert.down_proj",
|
| 356 |
+
"model.layers.25.mlp.shared_expert.gate_proj",
|
| 357 |
+
"model.layers.25.mlp.shared_expert.up_proj",
|
| 358 |
+
"model.layers.25.mlp.switch_mlp.down_proj",
|
| 359 |
+
"model.layers.25.mlp.switch_mlp.gate_proj",
|
| 360 |
+
"model.layers.25.mlp.switch_mlp.up_proj",
|
| 361 |
+
"model.layers.25.self_attn.g_proj",
|
| 362 |
+
"model.layers.25.self_attn.k_proj",
|
| 363 |
+
"model.layers.25.self_attn.o_proj",
|
| 364 |
+
"model.layers.25.self_attn.q_proj",
|
| 365 |
+
"model.layers.25.self_attn.v_proj",
|
| 366 |
+
"model.layers.26.mlp.shared_expert.down_proj",
|
| 367 |
+
"model.layers.26.mlp.shared_expert.gate_proj",
|
| 368 |
+
"model.layers.26.mlp.shared_expert.up_proj",
|
| 369 |
+
"model.layers.26.mlp.switch_mlp.down_proj",
|
| 370 |
+
"model.layers.26.mlp.switch_mlp.gate_proj",
|
| 371 |
+
"model.layers.26.mlp.switch_mlp.up_proj",
|
| 372 |
+
"model.layers.26.self_attn.g_proj",
|
| 373 |
+
"model.layers.26.self_attn.k_proj",
|
| 374 |
+
"model.layers.26.self_attn.o_proj",
|
| 375 |
+
"model.layers.26.self_attn.q_proj",
|
| 376 |
+
"model.layers.26.self_attn.v_proj",
|
| 377 |
+
"model.layers.27.mlp.shared_expert.down_proj",
|
| 378 |
+
"model.layers.27.mlp.shared_expert.gate_proj",
|
| 379 |
+
"model.layers.27.mlp.shared_expert.up_proj",
|
| 380 |
+
"model.layers.27.mlp.switch_mlp.down_proj",
|
| 381 |
+
"model.layers.27.mlp.switch_mlp.gate_proj",
|
| 382 |
+
"model.layers.27.mlp.switch_mlp.up_proj",
|
| 383 |
+
"model.layers.27.self_attn.g_proj",
|
| 384 |
+
"model.layers.27.self_attn.k_proj",
|
| 385 |
+
"model.layers.27.self_attn.o_proj",
|
| 386 |
+
"model.layers.27.self_attn.q_proj",
|
| 387 |
+
"model.layers.27.self_attn.v_proj",
|
| 388 |
+
"model.layers.28.mlp.shared_expert.down_proj",
|
| 389 |
+
"model.layers.28.mlp.shared_expert.gate_proj",
|
| 390 |
+
"model.layers.28.mlp.shared_expert.up_proj",
|
| 391 |
+
"model.layers.28.mlp.switch_mlp.down_proj",
|
| 392 |
+
"model.layers.28.mlp.switch_mlp.gate_proj",
|
| 393 |
+
"model.layers.28.mlp.switch_mlp.up_proj",
|
| 394 |
+
"model.layers.28.self_attn.g_proj",
|
| 395 |
+
"model.layers.28.self_attn.k_proj",
|
| 396 |
+
"model.layers.28.self_attn.o_proj",
|
| 397 |
+
"model.layers.28.self_attn.q_proj",
|
| 398 |
+
"model.layers.28.self_attn.v_proj",
|
| 399 |
+
"model.layers.29.mlp.shared_expert.down_proj",
|
| 400 |
+
"model.layers.29.mlp.shared_expert.gate_proj",
|
| 401 |
+
"model.layers.29.mlp.shared_expert.up_proj",
|
| 402 |
+
"model.layers.29.mlp.switch_mlp.down_proj",
|
| 403 |
+
"model.layers.29.mlp.switch_mlp.gate_proj",
|
| 404 |
+
"model.layers.29.mlp.switch_mlp.up_proj",
|
| 405 |
+
"model.layers.29.self_attn.g_proj",
|
| 406 |
+
"model.layers.29.self_attn.k_proj",
|
| 407 |
+
"model.layers.29.self_attn.o_proj",
|
| 408 |
+
"model.layers.29.self_attn.q_proj",
|
| 409 |
+
"model.layers.29.self_attn.v_proj",
|
| 410 |
+
"model.layers.3.mlp.shared_expert.down_proj",
|
| 411 |
+
"model.layers.3.mlp.shared_expert.gate_proj",
|
| 412 |
+
"model.layers.3.mlp.shared_expert.up_proj",
|
| 413 |
+
"model.layers.3.mlp.switch_mlp.down_proj",
|
| 414 |
+
"model.layers.3.mlp.switch_mlp.gate_proj",
|
| 415 |
+
"model.layers.3.mlp.switch_mlp.up_proj",
|
| 416 |
+
"model.layers.3.self_attn.g_proj",
|
| 417 |
+
"model.layers.3.self_attn.k_proj",
|
| 418 |
+
"model.layers.3.self_attn.o_proj",
|
| 419 |
+
"model.layers.3.self_attn.q_proj",
|
| 420 |
+
"model.layers.3.self_attn.v_proj",
|
| 421 |
+
"model.layers.30.mlp.shared_expert.down_proj",
|
| 422 |
+
"model.layers.30.mlp.shared_expert.gate_proj",
|
| 423 |
+
"model.layers.30.mlp.shared_expert.up_proj",
|
| 424 |
+
"model.layers.30.mlp.switch_mlp.down_proj",
|
| 425 |
+
"model.layers.30.mlp.switch_mlp.gate_proj",
|
| 426 |
+
"model.layers.30.mlp.switch_mlp.up_proj",
|
| 427 |
+
"model.layers.30.self_attn.g_proj",
|
| 428 |
+
"model.layers.30.self_attn.k_proj",
|
| 429 |
+
"model.layers.30.self_attn.o_proj",
|
| 430 |
+
"model.layers.30.self_attn.q_proj",
|
| 431 |
+
"model.layers.30.self_attn.v_proj",
|
| 432 |
+
"model.layers.31.mlp.shared_expert.down_proj",
|
| 433 |
+
"model.layers.31.mlp.shared_expert.gate_proj",
|
| 434 |
+
"model.layers.31.mlp.shared_expert.up_proj",
|
| 435 |
+
"model.layers.31.mlp.switch_mlp.down_proj",
|
| 436 |
+
"model.layers.31.mlp.switch_mlp.gate_proj",
|
| 437 |
+
"model.layers.31.mlp.switch_mlp.up_proj",
|
| 438 |
+
"model.layers.31.self_attn.g_proj",
|
| 439 |
+
"model.layers.31.self_attn.k_proj",
|
| 440 |
+
"model.layers.31.self_attn.o_proj",
|
| 441 |
+
"model.layers.31.self_attn.q_proj",
|
| 442 |
+
"model.layers.31.self_attn.v_proj",
|
| 443 |
+
"model.layers.32.mlp.shared_expert.down_proj",
|
| 444 |
+
"model.layers.32.mlp.shared_expert.gate_proj",
|
| 445 |
+
"model.layers.32.mlp.shared_expert.up_proj",
|
| 446 |
+
"model.layers.32.mlp.switch_mlp.down_proj",
|
| 447 |
+
"model.layers.32.mlp.switch_mlp.gate_proj",
|
| 448 |
+
"model.layers.32.mlp.switch_mlp.up_proj",
|
| 449 |
+
"model.layers.32.self_attn.g_proj",
|
| 450 |
+
"model.layers.32.self_attn.k_proj",
|
| 451 |
+
"model.layers.32.self_attn.o_proj",
|
| 452 |
+
"model.layers.32.self_attn.q_proj",
|
| 453 |
+
"model.layers.32.self_attn.v_proj",
|
| 454 |
+
"model.layers.33.mlp.shared_expert.down_proj",
|
| 455 |
+
"model.layers.33.mlp.shared_expert.gate_proj",
|
| 456 |
+
"model.layers.33.mlp.shared_expert.up_proj",
|
| 457 |
+
"model.layers.33.mlp.switch_mlp.down_proj",
|
| 458 |
+
"model.layers.33.mlp.switch_mlp.gate_proj",
|
| 459 |
+
"model.layers.33.mlp.switch_mlp.up_proj",
|
| 460 |
+
"model.layers.33.self_attn.g_proj",
|
| 461 |
+
"model.layers.33.self_attn.k_proj",
|
| 462 |
+
"model.layers.33.self_attn.o_proj",
|
| 463 |
+
"model.layers.33.self_attn.q_proj",
|
| 464 |
+
"model.layers.33.self_attn.v_proj",
|
| 465 |
+
"model.layers.34.mlp.shared_expert.down_proj",
|
| 466 |
+
"model.layers.34.mlp.shared_expert.gate_proj",
|
| 467 |
+
"model.layers.34.mlp.shared_expert.up_proj",
|
| 468 |
+
"model.layers.34.mlp.switch_mlp.down_proj",
|
| 469 |
+
"model.layers.34.mlp.switch_mlp.gate_proj",
|
| 470 |
+
"model.layers.34.mlp.switch_mlp.up_proj",
|
| 471 |
+
"model.layers.34.self_attn.g_proj",
|
| 472 |
+
"model.layers.34.self_attn.k_proj",
|
| 473 |
+
"model.layers.34.self_attn.o_proj",
|
| 474 |
+
"model.layers.34.self_attn.q_proj",
|
| 475 |
+
"model.layers.34.self_attn.v_proj",
|
| 476 |
+
"model.layers.35.mlp.shared_expert.down_proj",
|
| 477 |
+
"model.layers.35.mlp.shared_expert.gate_proj",
|
| 478 |
+
"model.layers.35.mlp.shared_expert.up_proj",
|
| 479 |
+
"model.layers.35.mlp.switch_mlp.down_proj",
|
| 480 |
+
"model.layers.35.mlp.switch_mlp.gate_proj",
|
| 481 |
+
"model.layers.35.mlp.switch_mlp.up_proj",
|
| 482 |
+
"model.layers.35.self_attn.g_proj",
|
| 483 |
+
"model.layers.35.self_attn.k_proj",
|
| 484 |
+
"model.layers.35.self_attn.o_proj",
|
| 485 |
+
"model.layers.35.self_attn.q_proj",
|
| 486 |
+
"model.layers.35.self_attn.v_proj",
|
| 487 |
+
"model.layers.36.mlp.shared_expert.down_proj",
|
| 488 |
+
"model.layers.36.mlp.shared_expert.gate_proj",
|
| 489 |
+
"model.layers.36.mlp.shared_expert.up_proj",
|
| 490 |
+
"model.layers.36.mlp.switch_mlp.down_proj",
|
| 491 |
+
"model.layers.36.mlp.switch_mlp.gate_proj",
|
| 492 |
+
"model.layers.36.mlp.switch_mlp.up_proj",
|
| 493 |
+
"model.layers.36.self_attn.g_proj",
|
| 494 |
+
"model.layers.36.self_attn.k_proj",
|
| 495 |
+
"model.layers.36.self_attn.o_proj",
|
| 496 |
+
"model.layers.36.self_attn.q_proj",
|
| 497 |
+
"model.layers.36.self_attn.v_proj",
|
| 498 |
+
"model.layers.37.mlp.shared_expert.down_proj",
|
| 499 |
+
"model.layers.37.mlp.shared_expert.gate_proj",
|
| 500 |
+
"model.layers.37.mlp.shared_expert.up_proj",
|
| 501 |
+
"model.layers.37.mlp.switch_mlp.down_proj",
|
| 502 |
+
"model.layers.37.mlp.switch_mlp.gate_proj",
|
| 503 |
+
"model.layers.37.mlp.switch_mlp.up_proj",
|
| 504 |
+
"model.layers.37.self_attn.g_proj",
|
| 505 |
+
"model.layers.37.self_attn.k_proj",
|
| 506 |
+
"model.layers.37.self_attn.o_proj",
|
| 507 |
+
"model.layers.37.self_attn.q_proj",
|
| 508 |
+
"model.layers.37.self_attn.v_proj",
|
| 509 |
+
"model.layers.38.mlp.shared_expert.down_proj",
|
| 510 |
+
"model.layers.38.mlp.shared_expert.gate_proj",
|
| 511 |
+
"model.layers.38.mlp.shared_expert.up_proj",
|
| 512 |
+
"model.layers.38.mlp.switch_mlp.down_proj",
|
| 513 |
+
"model.layers.38.mlp.switch_mlp.gate_proj",
|
| 514 |
+
"model.layers.38.mlp.switch_mlp.up_proj",
|
| 515 |
+
"model.layers.38.self_attn.g_proj",
|
| 516 |
+
"model.layers.38.self_attn.k_proj",
|
| 517 |
+
"model.layers.38.self_attn.o_proj",
|
| 518 |
+
"model.layers.38.self_attn.q_proj",
|
| 519 |
+
"model.layers.38.self_attn.v_proj",
|
| 520 |
+
"model.layers.39.mlp.shared_expert.down_proj",
|
| 521 |
+
"model.layers.39.mlp.shared_expert.gate_proj",
|
| 522 |
+
"model.layers.39.mlp.shared_expert.up_proj",
|
| 523 |
+
"model.layers.39.mlp.switch_mlp.down_proj",
|
| 524 |
+
"model.layers.39.mlp.switch_mlp.gate_proj",
|
| 525 |
+
"model.layers.39.mlp.switch_mlp.up_proj",
|
| 526 |
+
"model.layers.39.self_attn.g_proj",
|
| 527 |
+
"model.layers.39.self_attn.k_proj",
|
| 528 |
+
"model.layers.39.self_attn.o_proj",
|
| 529 |
+
"model.layers.39.self_attn.q_proj",
|
| 530 |
+
"model.layers.39.self_attn.v_proj",
|
| 531 |
+
"model.layers.4.mlp.shared_expert.down_proj",
|
| 532 |
+
"model.layers.4.mlp.shared_expert.gate_proj",
|
| 533 |
+
"model.layers.4.mlp.shared_expert.up_proj",
|
| 534 |
+
"model.layers.4.mlp.switch_mlp.down_proj",
|
| 535 |
+
"model.layers.4.mlp.switch_mlp.gate_proj",
|
| 536 |
+
"model.layers.4.mlp.switch_mlp.up_proj",
|
| 537 |
+
"model.layers.4.self_attn.g_proj",
|
| 538 |
+
"model.layers.4.self_attn.k_proj",
|
| 539 |
+
"model.layers.4.self_attn.o_proj",
|
| 540 |
+
"model.layers.4.self_attn.q_proj",
|
| 541 |
+
"model.layers.4.self_attn.v_proj",
|
| 542 |
+
"model.layers.5.mlp.shared_expert.down_proj",
|
| 543 |
+
"model.layers.5.mlp.shared_expert.gate_proj",
|
| 544 |
+
"model.layers.5.mlp.shared_expert.up_proj",
|
| 545 |
+
"model.layers.5.mlp.switch_mlp.down_proj",
|
| 546 |
+
"model.layers.5.mlp.switch_mlp.gate_proj",
|
| 547 |
+
"model.layers.5.mlp.switch_mlp.up_proj",
|
| 548 |
+
"model.layers.5.self_attn.g_proj",
|
| 549 |
+
"model.layers.5.self_attn.k_proj",
|
| 550 |
+
"model.layers.5.self_attn.o_proj",
|
| 551 |
+
"model.layers.5.self_attn.q_proj",
|
| 552 |
+
"model.layers.5.self_attn.v_proj",
|
| 553 |
+
"model.layers.6.mlp.shared_expert.down_proj",
|
| 554 |
+
"model.layers.6.mlp.shared_expert.gate_proj",
|
| 555 |
+
"model.layers.6.mlp.shared_expert.up_proj",
|
| 556 |
+
"model.layers.6.mlp.switch_mlp.down_proj",
|
| 557 |
+
"model.layers.6.mlp.switch_mlp.gate_proj",
|
| 558 |
+
"model.layers.6.mlp.switch_mlp.up_proj",
|
| 559 |
+
"model.layers.6.self_attn.g_proj",
|
| 560 |
+
"model.layers.6.self_attn.k_proj",
|
| 561 |
+
"model.layers.6.self_attn.o_proj",
|
| 562 |
+
"model.layers.6.self_attn.q_proj",
|
| 563 |
+
"model.layers.6.self_attn.v_proj",
|
| 564 |
+
"model.layers.7.mlp.shared_expert.down_proj",
|
| 565 |
+
"model.layers.7.mlp.shared_expert.gate_proj",
|
| 566 |
+
"model.layers.7.mlp.shared_expert.up_proj",
|
| 567 |
+
"model.layers.7.mlp.switch_mlp.down_proj",
|
| 568 |
+
"model.layers.7.mlp.switch_mlp.gate_proj",
|
| 569 |
+
"model.layers.7.mlp.switch_mlp.up_proj",
|
| 570 |
+
"model.layers.7.self_attn.g_proj",
|
| 571 |
+
"model.layers.7.self_attn.k_proj",
|
| 572 |
+
"model.layers.7.self_attn.o_proj",
|
| 573 |
+
"model.layers.7.self_attn.q_proj",
|
| 574 |
+
"model.layers.7.self_attn.v_proj",
|
| 575 |
+
"model.layers.8.mlp.shared_expert.down_proj",
|
| 576 |
+
"model.layers.8.mlp.shared_expert.gate_proj",
|
| 577 |
+
"model.layers.8.mlp.shared_expert.up_proj",
|
| 578 |
+
"model.layers.8.mlp.switch_mlp.down_proj",
|
| 579 |
+
"model.layers.8.mlp.switch_mlp.gate_proj",
|
| 580 |
+
"model.layers.8.mlp.switch_mlp.up_proj",
|
| 581 |
+
"model.layers.8.self_attn.g_proj",
|
| 582 |
+
"model.layers.8.self_attn.k_proj",
|
| 583 |
+
"model.layers.8.self_attn.o_proj",
|
| 584 |
+
"model.layers.8.self_attn.q_proj",
|
| 585 |
+
"model.layers.8.self_attn.v_proj",
|
| 586 |
+
"model.layers.9.mlp.shared_expert.down_proj",
|
| 587 |
+
"model.layers.9.mlp.shared_expert.gate_proj",
|
| 588 |
+
"model.layers.9.mlp.shared_expert.up_proj",
|
| 589 |
+
"model.layers.9.mlp.switch_mlp.down_proj",
|
| 590 |
+
"model.layers.9.mlp.switch_mlp.gate_proj",
|
| 591 |
+
"model.layers.9.mlp.switch_mlp.up_proj",
|
| 592 |
+
"model.layers.9.self_attn.g_proj",
|
| 593 |
+
"model.layers.9.self_attn.k_proj",
|
| 594 |
+
"model.layers.9.self_attn.o_proj",
|
| 595 |
+
"model.layers.9.self_attn.q_proj",
|
| 596 |
+
"model.layers.9.self_attn.v_proj"
|
| 597 |
+
],
|
| 598 |
+
"missing": [
|
| 599 |
+
"lm_head",
|
| 600 |
+
"model.embed_tokens"
|
| 601 |
+
],
|
| 602 |
+
"mismatched": [],
|
| 603 |
+
"zero_count_experts": 0
|
| 604 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": "〈|EOS|〉",
|
| 3 |
+
"cls_token": "〈|CLS|〉",
|
| 4 |
+
"eos_token": "〈|EOS|〉",
|
| 5 |
+
"mask_token": "〈|MASK|〉",
|
| 6 |
+
"pad_token": "〈|PAD|〉",
|
| 7 |
+
"sep_token": "〈|SEP|〉",
|
| 8 |
+
"unk_token": "〈|UNK|〉"
|
| 9 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,576 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "〈|UNK|〉",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"1": {
|
| 12 |
+
"content": "〈|CODE_START|〉",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"2": {
|
| 20 |
+
"content": "〈|EOS|〉",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"3": {
|
| 28 |
+
"content": "〈|CODE_END|〉",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"4": {
|
| 36 |
+
"content": "〈|META_START|〉",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
},
|
| 43 |
+
"5": {
|
| 44 |
+
"content": "〈|META_END|〉",
|
| 45 |
+
"lstrip": false,
|
| 46 |
+
"normalized": false,
|
| 47 |
+
"rstrip": false,
|
| 48 |
+
"single_word": false,
|
| 49 |
+
"special": true
|
| 50 |
+
},
|
| 51 |
+
"6": {
|
| 52 |
+
"content": "〈|FIM_MIDDLE|〉",
|
| 53 |
+
"lstrip": false,
|
| 54 |
+
"normalized": false,
|
| 55 |
+
"rstrip": false,
|
| 56 |
+
"single_word": false,
|
| 57 |
+
"special": true
|
| 58 |
+
},
|
| 59 |
+
"7": {
|
| 60 |
+
"content": "〈|FIM_SUFFIX|〉",
|
| 61 |
+
"lstrip": false,
|
| 62 |
+
"normalized": false,
|
| 63 |
+
"rstrip": false,
|
| 64 |
+
"single_word": false,
|
| 65 |
+
"special": true
|
| 66 |
+
},
|
| 67 |
+
"8": {
|
| 68 |
+
"content": "〈|SEP|〉",
|
| 69 |
+
"lstrip": false,
|
| 70 |
+
"normalized": false,
|
| 71 |
+
"rstrip": false,
|
| 72 |
+
"single_word": false,
|
| 73 |
+
"special": true
|
| 74 |
+
},
|
| 75 |
+
"9": {
|
| 76 |
+
"content": "〈|PAD|〉",
|
| 77 |
+
"lstrip": false,
|
| 78 |
+
"normalized": false,
|
| 79 |
+
"rstrip": false,
|
| 80 |
+
"single_word": false,
|
| 81 |
+
"special": true
|
| 82 |
+
},
|
| 83 |
+
"10": {
|
| 84 |
+
"content": "〈|CLS|〉",
|
| 85 |
+
"lstrip": false,
|
| 86 |
+
"normalized": false,
|
| 87 |
+
"rstrip": false,
|
| 88 |
+
"single_word": false,
|
| 89 |
+
"special": true
|
| 90 |
+
},
|
| 91 |
+
"11": {
|
| 92 |
+
"content": "〈|FIM_START|〉",
|
| 93 |
+
"lstrip": false,
|
| 94 |
+
"normalized": false,
|
| 95 |
+
"rstrip": false,
|
| 96 |
+
"single_word": false,
|
| 97 |
+
"special": true
|
| 98 |
+
},
|
| 99 |
+
"12": {
|
| 100 |
+
"content": "〈|MASK|〉",
|
| 101 |
+
"lstrip": false,
|
| 102 |
+
"normalized": false,
|
| 103 |
+
"rstrip": false,
|
| 104 |
+
"single_word": false,
|
| 105 |
+
"special": true
|
| 106 |
+
},
|
| 107 |
+
"13": {
|
| 108 |
+
"content": "|◊|",
|
| 109 |
+
"lstrip": false,
|
| 110 |
+
"normalized": false,
|
| 111 |
+
"rstrip": false,
|
| 112 |
+
"single_word": false,
|
| 113 |
+
"special": true
|
| 114 |
+
},
|
| 115 |
+
"14": {
|
| 116 |
+
"content": "〈|",
|
| 117 |
+
"lstrip": false,
|
| 118 |
+
"normalized": false,
|
| 119 |
+
"rstrip": false,
|
| 120 |
+
"single_word": false,
|
| 121 |
+
"special": true
|
| 122 |
+
},
|
| 123 |
+
"15": {
|
| 124 |
+
"content": "|〉",
|
| 125 |
+
"lstrip": false,
|
| 126 |
+
"normalized": false,
|
| 127 |
+
"rstrip": false,
|
| 128 |
+
"single_word": false,
|
| 129 |
+
"special": true
|
| 130 |
+
},
|
| 131 |
+
"16": {
|
| 132 |
+
"content": "〈|/",
|
| 133 |
+
"lstrip": false,
|
| 134 |
+
"normalized": false,
|
| 135 |
+
"rstrip": false,
|
| 136 |
+
"single_word": false,
|
| 137 |
+
"special": true
|
| 138 |
+
},
|
| 139 |
+
"17": {
|
| 140 |
+
"content": "/|〉",
|
| 141 |
+
"lstrip": false,
|
| 142 |
+
"normalized": false,
|
| 143 |
+
"rstrip": false,
|
| 144 |
+
"single_word": false,
|
| 145 |
+
"special": true
|
| 146 |
+
},
|
| 147 |
+
"20": {
|
| 148 |
+
"content": "〈|SPECIAL_1|〉",
|
| 149 |
+
"lstrip": false,
|
| 150 |
+
"normalized": false,
|
| 151 |
+
"rstrip": false,
|
| 152 |
+
"single_word": false,
|
| 153 |
+
"special": true
|
| 154 |
+
},
|
| 155 |
+
"21": {
|
| 156 |
+
"content": "〈|SPECIAL_2|〉",
|
| 157 |
+
"lstrip": false,
|
| 158 |
+
"normalized": false,
|
| 159 |
+
"rstrip": false,
|
| 160 |
+
"single_word": false,
|
| 161 |
+
"special": true
|
| 162 |
+
},
|
| 163 |
+
"22": {
|
| 164 |
+
"content": "〈|SPECIAL_3|〉",
|
| 165 |
+
"lstrip": false,
|
| 166 |
+
"normalized": false,
|
| 167 |
+
"rstrip": false,
|
| 168 |
+
"single_word": false,
|
| 169 |
+
"special": true
|
| 170 |
+
},
|
| 171 |
+
"27": {
|
| 172 |
+
"content": "〈|SPECIAL_8|〉",
|
| 173 |
+
"lstrip": false,
|
| 174 |
+
"normalized": false,
|
| 175 |
+
"rstrip": false,
|
| 176 |
+
"single_word": false,
|
| 177 |
+
"special": true
|
| 178 |
+
},
|
| 179 |
+
"28": {
|
| 180 |
+
"content": "〈|SPECIAL_9|〉",
|
| 181 |
+
"lstrip": false,
|
| 182 |
+
"normalized": false,
|
| 183 |
+
"rstrip": false,
|
| 184 |
+
"single_word": false,
|
| 185 |
+
"special": true
|
| 186 |
+
},
|
| 187 |
+
"29": {
|
| 188 |
+
"content": "〈|SPECIAL_10|〉",
|
| 189 |
+
"lstrip": false,
|
| 190 |
+
"normalized": false,
|
| 191 |
+
"rstrip": false,
|
| 192 |
+
"single_word": false,
|
| 193 |
+
"special": true
|
| 194 |
+
},
|
| 195 |
+
"30": {
|
| 196 |
+
"content": "〈|SPECIAL_11|〉",
|
| 197 |
+
"lstrip": false,
|
| 198 |
+
"normalized": false,
|
| 199 |
+
"rstrip": false,
|
| 200 |
+
"single_word": false,
|
| 201 |
+
"special": true
|
| 202 |
+
},
|
| 203 |
+
"31": {
|
| 204 |
+
"content": "〈|SPECIAL_12|〉",
|
| 205 |
+
"lstrip": false,
|
| 206 |
+
"normalized": false,
|
| 207 |
+
"rstrip": false,
|
| 208 |
+
"single_word": false,
|
| 209 |
+
"special": true
|
| 210 |
+
},
|
| 211 |
+
"32": {
|
| 212 |
+
"content": "〈|SPECIAL_13|〉",
|
| 213 |
+
"lstrip": false,
|
| 214 |
+
"normalized": false,
|
| 215 |
+
"rstrip": false,
|
| 216 |
+
"single_word": false,
|
| 217 |
+
"special": true
|
| 218 |
+
},
|
| 219 |
+
"33": {
|
| 220 |
+
"content": "〈|SPECIAL_14|〉",
|
| 221 |
+
"lstrip": false,
|
| 222 |
+
"normalized": false,
|
| 223 |
+
"rstrip": false,
|
| 224 |
+
"single_word": false,
|
| 225 |
+
"special": true
|
| 226 |
+
},
|
| 227 |
+
"34": {
|
| 228 |
+
"content": "〈|SPECIAL_15|〉",
|
| 229 |
+
"lstrip": false,
|
| 230 |
+
"normalized": false,
|
| 231 |
+
"rstrip": false,
|
| 232 |
+
"single_word": false,
|
| 233 |
+
"special": true
|
| 234 |
+
},
|
| 235 |
+
"35": {
|
| 236 |
+
"content": "〈|SPECIAL_16|〉",
|
| 237 |
+
"lstrip": false,
|
| 238 |
+
"normalized": false,
|
| 239 |
+
"rstrip": false,
|
| 240 |
+
"single_word": false,
|
| 241 |
+
"special": true
|
| 242 |
+
},
|
| 243 |
+
"36": {
|
| 244 |
+
"content": "〈|SPECIAL_17|〉",
|
| 245 |
+
"lstrip": false,
|
| 246 |
+
"normalized": false,
|
| 247 |
+
"rstrip": false,
|
| 248 |
+
"single_word": false,
|
| 249 |
+
"special": true
|
| 250 |
+
},
|
| 251 |
+
"37": {
|
| 252 |
+
"content": "〈|SPECIAL_18|〉",
|
| 253 |
+
"lstrip": false,
|
| 254 |
+
"normalized": false,
|
| 255 |
+
"rstrip": false,
|
| 256 |
+
"single_word": false,
|
| 257 |
+
"special": true
|
| 258 |
+
},
|
| 259 |
+
"38": {
|
| 260 |
+
"content": "〈|SPECIAL_19|〉",
|
| 261 |
+
"lstrip": false,
|
| 262 |
+
"normalized": false,
|
| 263 |
+
"rstrip": false,
|
| 264 |
+
"single_word": false,
|
| 265 |
+
"special": true
|
| 266 |
+
},
|
| 267 |
+
"39": {
|
| 268 |
+
"content": "〈|SPECIAL_20|〉",
|
| 269 |
+
"lstrip": false,
|
| 270 |
+
"normalized": false,
|
| 271 |
+
"rstrip": false,
|
| 272 |
+
"single_word": false,
|
| 273 |
+
"special": true
|
| 274 |
+
},
|
| 275 |
+
"40": {
|
| 276 |
+
"content": "〈|SPECIAL_21|〉",
|
| 277 |
+
"lstrip": false,
|
| 278 |
+
"normalized": false,
|
| 279 |
+
"rstrip": false,
|
| 280 |
+
"single_word": false,
|
| 281 |
+
"special": true
|
| 282 |
+
},
|
| 283 |
+
"41": {
|
| 284 |
+
"content": "〈|SPECIAL_22|〉",
|
| 285 |
+
"lstrip": false,
|
| 286 |
+
"normalized": false,
|
| 287 |
+
"rstrip": false,
|
| 288 |
+
"single_word": false,
|
| 289 |
+
"special": true
|
| 290 |
+
},
|
| 291 |
+
"42": {
|
| 292 |
+
"content": "〈|SPECIAL_23|〉",
|
| 293 |
+
"lstrip": false,
|
| 294 |
+
"normalized": false,
|
| 295 |
+
"rstrip": false,
|
| 296 |
+
"single_word": false,
|
| 297 |
+
"special": true
|
| 298 |
+
},
|
| 299 |
+
"43": {
|
| 300 |
+
"content": "〈|SPECIAL_24|〉",
|
| 301 |
+
"lstrip": false,
|
| 302 |
+
"normalized": false,
|
| 303 |
+
"rstrip": false,
|
| 304 |
+
"single_word": false,
|
| 305 |
+
"special": true
|
| 306 |
+
},
|
| 307 |
+
"44": {
|
| 308 |
+
"content": "〈|SPECIAL_25|〉",
|
| 309 |
+
"lstrip": false,
|
| 310 |
+
"normalized": false,
|
| 311 |
+
"rstrip": false,
|
| 312 |
+
"single_word": false,
|
| 313 |
+
"special": true
|
| 314 |
+
},
|
| 315 |
+
"45": {
|
| 316 |
+
"content": "〈|SPECIAL_26|〉",
|
| 317 |
+
"lstrip": false,
|
| 318 |
+
"normalized": false,
|
| 319 |
+
"rstrip": false,
|
| 320 |
+
"single_word": false,
|
| 321 |
+
"special": true
|
| 322 |
+
},
|
| 323 |
+
"46": {
|
| 324 |
+
"content": "〈|SPECIAL_27|〉",
|
| 325 |
+
"lstrip": false,
|
| 326 |
+
"normalized": false,
|
| 327 |
+
"rstrip": false,
|
| 328 |
+
"single_word": false,
|
| 329 |
+
"special": true
|
| 330 |
+
},
|
| 331 |
+
"47": {
|
| 332 |
+
"content": "〈|SPECIAL_28|〉",
|
| 333 |
+
"lstrip": false,
|
| 334 |
+
"normalized": false,
|
| 335 |
+
"rstrip": false,
|
| 336 |
+
"single_word": false,
|
| 337 |
+
"special": true
|
| 338 |
+
},
|
| 339 |
+
"48": {
|
| 340 |
+
"content": "〈|SPECIAL_29|〉",
|
| 341 |
+
"lstrip": false,
|
| 342 |
+
"normalized": false,
|
| 343 |
+
"rstrip": false,
|
| 344 |
+
"single_word": false,
|
| 345 |
+
"special": true
|
| 346 |
+
},
|
| 347 |
+
"49": {
|
| 348 |
+
"content": "〈|SPECIAL_30|〉",
|
| 349 |
+
"lstrip": false,
|
| 350 |
+
"normalized": false,
|
| 351 |
+
"rstrip": false,
|
| 352 |
+
"single_word": false,
|
| 353 |
+
"special": true
|
| 354 |
+
},
|
| 355 |
+
"50": {
|
| 356 |
+
"content": "〈|SPECIAL_31|〉",
|
| 357 |
+
"lstrip": false,
|
| 358 |
+
"normalized": false,
|
| 359 |
+
"rstrip": false,
|
| 360 |
+
"single_word": false,
|
| 361 |
+
"special": true
|
| 362 |
+
},
|
| 363 |
+
"51": {
|
| 364 |
+
"content": "〈|SPECIAL_32|〉",
|
| 365 |
+
"lstrip": false,
|
| 366 |
+
"normalized": false,
|
| 367 |
+
"rstrip": false,
|
| 368 |
+
"single_word": false,
|
| 369 |
+
"special": true
|
| 370 |
+
},
|
| 371 |
+
"52": {
|
| 372 |
+
"content": "〈|SPECIAL_33|〉",
|
| 373 |
+
"lstrip": false,
|
| 374 |
+
"normalized": false,
|
| 375 |
+
"rstrip": false,
|
| 376 |
+
"single_word": false,
|
| 377 |
+
"special": true
|
| 378 |
+
},
|
| 379 |
+
"53": {
|
| 380 |
+
"content": "〈|SPECIAL_34|〉",
|
| 381 |
+
"lstrip": false,
|
| 382 |
+
"normalized": false,
|
| 383 |
+
"rstrip": false,
|
| 384 |
+
"single_word": false,
|
| 385 |
+
"special": true
|
| 386 |
+
},
|
| 387 |
+
"54": {
|
| 388 |
+
"content": "〈|SPECIAL_35|〉",
|
| 389 |
+
"lstrip": false,
|
| 390 |
+
"normalized": false,
|
| 391 |
+
"rstrip": false,
|
| 392 |
+
"single_word": false,
|
| 393 |
+
"special": true
|
| 394 |
+
},
|
| 395 |
+
"55": {
|
| 396 |
+
"content": "〈|SPECIAL_36|〉",
|
| 397 |
+
"lstrip": false,
|
| 398 |
+
"normalized": false,
|
| 399 |
+
"rstrip": false,
|
| 400 |
+
"single_word": false,
|
| 401 |
+
"special": true
|
| 402 |
+
},
|
| 403 |
+
"56": {
|
| 404 |
+
"content": "〈|SPECIAL_37|〉",
|
| 405 |
+
"lstrip": false,
|
| 406 |
+
"normalized": false,
|
| 407 |
+
"rstrip": false,
|
| 408 |
+
"single_word": false,
|
| 409 |
+
"special": true
|
| 410 |
+
},
|
| 411 |
+
"57": {
|
| 412 |
+
"content": "〈|SPECIAL_38|〉",
|
| 413 |
+
"lstrip": false,
|
| 414 |
+
"normalized": false,
|
| 415 |
+
"rstrip": false,
|
| 416 |
+
"single_word": false,
|
| 417 |
+
"special": true
|
| 418 |
+
},
|
| 419 |
+
"58": {
|
| 420 |
+
"content": "〈|SPECIAL_39|〉",
|
| 421 |
+
"lstrip": false,
|
| 422 |
+
"normalized": false,
|
| 423 |
+
"rstrip": false,
|
| 424 |
+
"single_word": false,
|
| 425 |
+
"special": true
|
| 426 |
+
},
|
| 427 |
+
"59": {
|
| 428 |
+
"content": "〈|SPECIAL_40|〉",
|
| 429 |
+
"lstrip": false,
|
| 430 |
+
"normalized": false,
|
| 431 |
+
"rstrip": false,
|
| 432 |
+
"single_word": false,
|
| 433 |
+
"special": true
|
| 434 |
+
},
|
| 435 |
+
"60": {
|
| 436 |
+
"content": "〈|SPECIAL_41|〉",
|
| 437 |
+
"lstrip": false,
|
| 438 |
+
"normalized": false,
|
| 439 |
+
"rstrip": false,
|
| 440 |
+
"single_word": false,
|
| 441 |
+
"special": true
|
| 442 |
+
},
|
| 443 |
+
"61": {
|
| 444 |
+
"content": "〈|SPECIAL_42|〉",
|
| 445 |
+
"lstrip": false,
|
| 446 |
+
"normalized": false,
|
| 447 |
+
"rstrip": false,
|
| 448 |
+
"single_word": false,
|
| 449 |
+
"special": true
|
| 450 |
+
},
|
| 451 |
+
"62": {
|
| 452 |
+
"content": "〈|SPECIAL_43|〉",
|
| 453 |
+
"lstrip": false,
|
| 454 |
+
"normalized": false,
|
| 455 |
+
"rstrip": false,
|
| 456 |
+
"single_word": false,
|
| 457 |
+
"special": true
|
| 458 |
+
},
|
| 459 |
+
"63": {
|
| 460 |
+
"content": "〈|SPECIAL_44|〉",
|
| 461 |
+
"lstrip": false,
|
| 462 |
+
"normalized": false,
|
| 463 |
+
"rstrip": false,
|
| 464 |
+
"single_word": false,
|
| 465 |
+
"special": true
|
| 466 |
+
},
|
| 467 |
+
"64": {
|
| 468 |
+
"content": "〈|SPECIAL_45|〉",
|
| 469 |
+
"lstrip": false,
|
| 470 |
+
"normalized": false,
|
| 471 |
+
"rstrip": false,
|
| 472 |
+
"single_word": false,
|
| 473 |
+
"special": true
|
| 474 |
+
},
|
| 475 |
+
"65": {
|
| 476 |
+
"content": "〈|SPECIAL_46|〉",
|
| 477 |
+
"lstrip": false,
|
| 478 |
+
"normalized": false,
|
| 479 |
+
"rstrip": false,
|
| 480 |
+
"single_word": false,
|
| 481 |
+
"special": true
|
| 482 |
+
},
|
| 483 |
+
"66": {
|
| 484 |
+
"content": "〈|SPECIAL_47|〉",
|
| 485 |
+
"lstrip": false,
|
| 486 |
+
"normalized": false,
|
| 487 |
+
"rstrip": false,
|
| 488 |
+
"single_word": false,
|
| 489 |
+
"special": true
|
| 490 |
+
},
|
| 491 |
+
"67": {
|
| 492 |
+
"content": "〈|SPECIAL_48|〉",
|
| 493 |
+
"lstrip": false,
|
| 494 |
+
"normalized": false,
|
| 495 |
+
"rstrip": false,
|
| 496 |
+
"single_word": false,
|
| 497 |
+
"special": true
|
| 498 |
+
},
|
| 499 |
+
"68": {
|
| 500 |
+
"content": "〈|SPECIAL_49|〉",
|
| 501 |
+
"lstrip": false,
|
| 502 |
+
"normalized": false,
|
| 503 |
+
"rstrip": false,
|
| 504 |
+
"single_word": false,
|
| 505 |
+
"special": true
|
| 506 |
+
},
|
| 507 |
+
"69": {
|
| 508 |
+
"content": "〈|SPECIAL_50|〉",
|
| 509 |
+
"lstrip": false,
|
| 510 |
+
"normalized": false,
|
| 511 |
+
"rstrip": false,
|
| 512 |
+
"single_word": false,
|
| 513 |
+
"special": true
|
| 514 |
+
},
|
| 515 |
+
"18": {
|
| 516 |
+
"content": "<think>",
|
| 517 |
+
"single_word": false,
|
| 518 |
+
"lstrip": false,
|
| 519 |
+
"rstrip": false,
|
| 520 |
+
"normalized": false,
|
| 521 |
+
"special": false
|
| 522 |
+
},
|
| 523 |
+
"19": {
|
| 524 |
+
"content": "</think>",
|
| 525 |
+
"single_word": false,
|
| 526 |
+
"lstrip": false,
|
| 527 |
+
"rstrip": false,
|
| 528 |
+
"normalized": false,
|
| 529 |
+
"special": false
|
| 530 |
+
},
|
| 531 |
+
"23": {
|
| 532 |
+
"content": "<assistant>",
|
| 533 |
+
"single_word": false,
|
| 534 |
+
"lstrip": false,
|
| 535 |
+
"rstrip": false,
|
| 536 |
+
"normalized": false,
|
| 537 |
+
"special": false
|
| 538 |
+
},
|
| 539 |
+
"24": {
|
| 540 |
+
"content": "</assistant>",
|
| 541 |
+
"single_word": false,
|
| 542 |
+
"lstrip": false,
|
| 543 |
+
"rstrip": false,
|
| 544 |
+
"normalized": false,
|
| 545 |
+
"special": false
|
| 546 |
+
},
|
| 547 |
+
"25": {
|
| 548 |
+
"content": "<tool_call>",
|
| 549 |
+
"single_word": false,
|
| 550 |
+
"lstrip": false,
|
| 551 |
+
"rstrip": false,
|
| 552 |
+
"normalized": false,
|
| 553 |
+
"special": false
|
| 554 |
+
},
|
| 555 |
+
"26": {
|
| 556 |
+
"content": "</tool_call>",
|
| 557 |
+
"single_word": false,
|
| 558 |
+
"lstrip": false,
|
| 559 |
+
"rstrip": false,
|
| 560 |
+
"normalized": false,
|
| 561 |
+
"special": false
|
| 562 |
+
}
|
| 563 |
+
},
|
| 564 |
+
"bos_token": "〈|EOS|〉",
|
| 565 |
+
"clean_up_tokenization_spaces": false,
|
| 566 |
+
"cls_token": "〈|CLS|〉",
|
| 567 |
+
"eos_token": "〈|EOS|〉",
|
| 568 |
+
"extra_special_tokens": {},
|
| 569 |
+
"mask_token": "〈|MASK|〉",
|
| 570 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 571 |
+
"pad_token": "〈|PAD|〉",
|
| 572 |
+
"sep_token": "〈|SEP|〉",
|
| 573 |
+
"tokenizer_class": "PreTrainedTokenizerFast",
|
| 574 |
+
"unk_token": "〈|UNK|〉",
|
| 575 |
+
"chat_template": "{#- Iteration on laguna_glm_thinking_v8/chat_template.jinja -#}\n{#- No formatting instructions -#}\n{{- \"〈|EOS|〉\" -}}\n{%- set enable_thinking = enable_thinking | default(false) -%}\n{%- set add_generation_prompt = add_generation_prompt | default(false) -%}\n\n{#- ───── header (system message) ───── -#}\n{#- A caller-supplied system message with empty content opts out of the default below, producing no <system> block — used to train without a system message. -#}\n{%- set system_message = \"You are a helpful, conversationally-fluent assistant made by Poolside. You are here to be helpful to users through natural language conversations.\" -%}\n{%- if messages and messages[0].role == \"system\" -%}\n {%- set system_message = messages[0].content -%}\n {%- set messages = messages[1:] -%}\n{%- endif -%}\n\n{%- set has_sys = system_message and system_message.strip() -%}\n{%- if has_sys or tools or enable_thinking -%}\n {{- \"<system>\" -}}\n\n {%- if has_sys -%}\n {{- system_message.rstrip() -}}\n {%- if tools -%}{{- \"\\n\\n\" -}}{%- endif -%}\n {%- endif -%}\n\n {%- if tools -%}\n {{- \"### Tools\\n\\n\" -}}\n {{- \"You may call functions to assist with the user query.\\n\" -}}\n {{- \"All available function signatures are listed below:\\n\" -}}\n {{- \"<available_tools>\\n\" -}}\n {%- for tool in tools -%}\n {{- (tool | tojson) ~ \"\\n\" -}}\n {%- endfor -%}\n {{- \"</available_tools>\" -}}\n {%- endif -%}\n\n {{- \"</system>\\n\" -}}\n{%- endif -%}\n\n{#- ───── main loop ───── -#}\n{%- for message in messages -%}\n {%- set content = message.content if message.content is string else \"\" -%}\n {%- if message.role == \"user\" -%}\n {{- \"<user>\" + content + \"</user>\\n\" -}}\n {%- elif message.role == \"assistant\" -%}\n {%- generation -%}\n {{- \"<assistant>\" -}}\n {#- Extract reasoning content from message.reasoning (vLLM field name) or message.reasoning_content -#}\n {%- set reasoning_content = '' -%}\n {%- if message.reasoning is string -%}\n {%- set reasoning_content = message.reasoning -%}\n {%- elif message.reasoning_content is string -%}\n {%- set reasoning_content = message.reasoning_content -%}\n {%- endif -%}\n {#- Display reasoning content for all messages if enable_thinking -#}\n {%- if enable_thinking -%}\n {{- '<think>' + reasoning_content + '</think>' -}}\n {%- else -%}\n {{- '</think>' -}}\n {%- endif -%}\n {#- Display main content (trailing newline only when no tool_calls follow) -#}\n {%- if content -%}\n {{- content -}}\n {%- endif -%}\n {%- if message.tool_calls -%}\n {%- for tool_call in message.tool_calls -%}\n {%- set function_data = tool_call.function -%}\n {{- '<tool_call>' + function_data.name -}}\n {%- set _args = function_data.arguments -%}\n {%- for k, v in _args.items() -%}\n {{- \"<arg_key>\" ~ k ~ \"</arg_key>\" -}}\n {{- \"<arg_value>\" -}}{{- v | tojson(ensure_ascii=False) if v is not string else v -}}{{- \"</arg_value>\" -}}\n {%- endfor -%}\n {{- \"</tool_call>\" -}}\n {%- endfor -%}\n {%- endif -%}\n {{- \"</assistant>\\n\" -}}\n {%- endgeneration -%}\n {%- elif message.role == \"tool\" -%}\n {{- \"<tool_response>\" + content + \"</tool_response>\\n\" -}}\n {%- elif message.role == \"system\" -%}\n {#- Render additional system messages (the first one, if any, is handled separately in the header and was sliced off above) -#}\n {{- \"<system>\" + content + \"</system>\\n\" -}}\n {%- endif -%}\n{%- endfor -%}\n{#- ───── generation prompt ───── -#}\n{%- if add_generation_prompt -%}\n {{- \"<assistant>\" -}}\n {#- ───── Include reasoning mode directive ───── -#}\n {%- if enable_thinking -%}\n {{- '<think>' -}}\n {%- else -%}\n {{- '</think>' -}}\n {%- endif -%}\n{%- endif -%}"
|
| 576 |
+
}
|