Add files using upload-large-folder tool
Browse files- README.md +37 -0
- chat_template.jinja +81 -0
- config.json +173 -0
- configuration_longcat_ngram.py +216 -0
- generation_config.json +7 -0
- model-00001-of-00008.safetensors +3 -0
- model-00002-of-00008.safetensors +3 -0
- model-00003-of-00008.safetensors +3 -0
- model-00004-of-00008.safetensors +3 -0
- model-00005-of-00008.safetensors +3 -0
- model-00006-of-00008.safetensors +3 -0
- model-00007-of-00008.safetensors +3 -0
- model-00008-of-00008.safetensors +3 -0
- model.safetensors.index.json +1053 -0
- modeling_longcat_ngram.py +338 -0
- parse_model_response.py +236 -0
- tokenizer.json +0 -0
- tokenizer_config.json +14 -0
README.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
library_name: mlx
|
| 4 |
+
pipeline_tag: text-generation
|
| 5 |
+
tags:
|
| 6 |
+
- transformers
|
| 7 |
+
- mlx
|
| 8 |
+
base_model: meituan-longcat/LongCat-Flash-Lite
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# mlx-community/LongCat-Flash-Lite-4bit
|
| 12 |
+
|
| 13 |
+
This model [mlx-community/LongCat-Flash-Lite-4bit](https://huggingface.co/mlx-community/LongCat-Flash-Lite-4bit) was
|
| 14 |
+
converted to MLX format from [meituan-longcat/LongCat-Flash-Lite](https://huggingface.co/meituan-longcat/LongCat-Flash-Lite)
|
| 15 |
+
using mlx-lm version **0.30.5**.
|
| 16 |
+
|
| 17 |
+
## Use with mlx
|
| 18 |
+
|
| 19 |
+
```bash
|
| 20 |
+
pip install mlx-lm
|
| 21 |
+
```
|
| 22 |
+
|
| 23 |
+
```python
|
| 24 |
+
from mlx_lm import load, generate
|
| 25 |
+
|
| 26 |
+
model, tokenizer = load("mlx-community/LongCat-Flash-Lite-4bit")
|
| 27 |
+
|
| 28 |
+
prompt = "hello"
|
| 29 |
+
|
| 30 |
+
if tokenizer.chat_template is not None:
|
| 31 |
+
messages = [{"role": "user", "content": prompt}]
|
| 32 |
+
prompt = tokenizer.apply_chat_template(
|
| 33 |
+
messages, add_generation_prompt=True, return_dict=False,
|
| 34 |
+
)
|
| 35 |
+
|
| 36 |
+
response = generate(model, tokenizer, prompt=prompt, verbose=True)
|
| 37 |
+
```
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{%- set tool_choice = tool_choice | default('auto') %}
|
| 2 |
+
{%- set ns = namespace(tool_types = [], last_query_index = -1) %}
|
| 3 |
+
|
| 4 |
+
{%- if tools and tool_choice != 'none' %}
|
| 5 |
+
{{- "<longcat_tool_declare>\n"-}}
|
| 6 |
+
{{- "# Tools\n" }}
|
| 7 |
+
{{- "You have access to the following tools:\n\n" }}
|
| 8 |
+
{%- for tool in tools %}
|
| 9 |
+
{%- if tool.type not in ns.tool_types %}
|
| 10 |
+
{%- set ns.tool_types = ns.tool_types + [tool.type] %}
|
| 11 |
+
{{- "## Tool namespace: " ~ tool.type ~ "\n\n" }}
|
| 12 |
+
{%- endif %}
|
| 13 |
+
{%- if tool.type == 'code_interpreter' %}
|
| 14 |
+
{%- set tool = {"type":"code_interpreter","function":{"name":"code_interpreter_preview","description":"The code will be executed in a stateful Jupyter notebook sandbox environment, only supports local computation, data processing, and file operations.\nCode sandbox environment (network isolated) Any external network requests or online API calls are prohibited.\nIf online functionality is needed, please use other permitted tools.\nCode will respond with the output of the execution or time out after 60.0 seconds. ","parameters":{"type":"object","properties":{"language":{"type":"string","description":"The programming language of the code to be executed. Available values: python (Default), java, go, js, ts, c, c++."},"code":{"type":"string","description":"Python code to be executed must not include the following:\n- Importing network libraries such as requests, httplib, etc.\n- Any form of HTTP requests.\n- External API calls.\n- Network port operations. Example: ```python\nimport pandas as pd\npd.DataFrame({'A':[1,2]})\n```"},"timeout":{"type":"number","description":"The maximum execution time of the code, in seconds. Default is 60.0."}}},"required":["code"]}} %}
|
| 15 |
+
{%- endif %}
|
| 16 |
+
{{- "### Tool name: " + tool.function.name + "\n" }}
|
| 17 |
+
{{- "Description: " + tool.function.description + "\n\n" }}
|
| 18 |
+
{{- "InputSchema: " + tool.function.parameters | tojson(ensure_ascii=False) + "\n\n" }}
|
| 19 |
+
{%- endfor %}
|
| 20 |
+
{{- '**Note**: For each function call, output the function name and arguments within the following XML format:\n<longcat_tool_call>{function-name}\n<longcat_arg_key>{arg-key-1}</longcat_arg_key>\n<longcat_arg_value>{arg-value-1}</longcat_arg_value>\n<longcat_arg_key>{arg-key-2}</longcat_arg_key>\n<longcat_arg_value>{arg-value-2}</longcat_arg_value>\n...\n</longcat_tool_call>\n' }}
|
| 21 |
+
{{- "</longcat_tool_declare>"-}}
|
| 22 |
+
{%- for idx in range(messages|length - 1) %}
|
| 23 |
+
{%- set msg = messages[idx] %}
|
| 24 |
+
{%- if msg.role == 'assistant' and not msg.tool_calls %}
|
| 25 |
+
{%- set ns.last_query_index = idx %}
|
| 26 |
+
{%- endif %}
|
| 27 |
+
{%- endfor%}
|
| 28 |
+
{%- endif %}
|
| 29 |
+
|
| 30 |
+
{%- for msg in messages %}
|
| 31 |
+
{%- if msg.role == "system" %}
|
| 32 |
+
{{- "<longcat_system>" + msg.content }}
|
| 33 |
+
{%- elif msg.role == "user" %}
|
| 34 |
+
{{- "<longcat_user>" }}
|
| 35 |
+
{%- if msg["files"] %}
|
| 36 |
+
{{- '<longcat_files>\n' ~ msg.files | tojson(indent=2) ~ '\n</longcat_files>' }}
|
| 37 |
+
{%- endif %}
|
| 38 |
+
{{- msg.content }}
|
| 39 |
+
{%- elif msg.role == "assistant" %}
|
| 40 |
+
{{- "<longcat_assistant>" }}
|
| 41 |
+
{%- if enable_thinking == true and msg.reasoning_content and ns.tool_types != [] and loop.index0 > ns.last_query_index %}
|
| 42 |
+
{{- "\n<longcat_think>\n" ~ msg.reasoning_content ~ "\n</longcat_think>\n" }}
|
| 43 |
+
{%- endif %}
|
| 44 |
+
{%- if msg.content%}
|
| 45 |
+
{{- msg.content }}
|
| 46 |
+
{%- endif %}
|
| 47 |
+
{%- if msg.tool_calls %}
|
| 48 |
+
{%- for tool_call in msg.tool_calls -%}
|
| 49 |
+
{{- "<longcat_tool_call>" ~ tool_call.function.name ~ "\n" -}}
|
| 50 |
+
{% set _args = tool_call.function.arguments %}
|
| 51 |
+
{% for k, v in _args.items() %}
|
| 52 |
+
{{- "<longcat_arg_key>" ~ k ~ "</longcat_arg_key>\n" -}}
|
| 53 |
+
{{- "<longcat_arg_value>" ~ (v if v is string else v | tojson(ensure_ascii=False)) ~ "</longcat_arg_value>\n" -}}
|
| 54 |
+
{% endfor %}
|
| 55 |
+
{{- "</longcat_tool_call>\n" }}
|
| 56 |
+
{%- endfor %}
|
| 57 |
+
{%- endif %}
|
| 58 |
+
{{- "</longcat_s>" -}}
|
| 59 |
+
{%- elif msg.role == "tool" %}
|
| 60 |
+
{%- if messages[loop.index0 - 1].role != "tool"%}
|
| 61 |
+
{{- "<longcat_user>" -}}
|
| 62 |
+
{%- endif %}
|
| 63 |
+
{{- "<longcat_tool_response>" ~ msg.content ~ "</longcat_tool_response>"-}}
|
| 64 |
+
{%- endif %}
|
| 65 |
+
{%- endfor %}
|
| 66 |
+
{%- if add_generation_prompt %}
|
| 67 |
+
{%- if enable_thinking == true %}
|
| 68 |
+
{{- " /think_on" }}
|
| 69 |
+
{%- if thinking_budget %}
|
| 70 |
+
{%- if thinking_budget < 1024 %}
|
| 71 |
+
{%- set thinking_budget = 1024 %}
|
| 72 |
+
{%- endif%}
|
| 73 |
+
{{- "\nthinking_budget: < " ~ thinking_budget ~ "."}}
|
| 74 |
+
{%- endif %}
|
| 75 |
+
{{- " <longcat_assistant><longcat_think>\n"}}
|
| 76 |
+
{%- elif enable_thinking == false %}
|
| 77 |
+
{{- " /think_off <longcat_assistant><longcat_think>\n\n</longcat_think>\n" }}
|
| 78 |
+
{%- else %}
|
| 79 |
+
{{- "<longcat_assistant>" }}
|
| 80 |
+
{%- endif %}
|
| 81 |
+
{%- endif %}
|
config.json
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"LongcatFlashNgramForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"auto_map": {
|
| 8 |
+
"AutoConfig": "configuration_longcat_ngram.LongcatFlashNgramConfig",
|
| 9 |
+
"AutoModel": "modeling_longcat_ngram.LongcatFlashNgramModel",
|
| 10 |
+
"AutoModelForCausalLM": "modeling_longcat_ngram.LongcatFlashNgramForCausalLM"
|
| 11 |
+
},
|
| 12 |
+
"bos_token_id": 1,
|
| 13 |
+
"emb_neighbor_num": 4,
|
| 14 |
+
"emb_split_num": 4,
|
| 15 |
+
"eos_token_id": 2,
|
| 16 |
+
"expert_ffn_hidden_size": 1024,
|
| 17 |
+
"ffn_hidden_size": 6144,
|
| 18 |
+
"hidden_size": 3072,
|
| 19 |
+
"kv_lora_rank": 512,
|
| 20 |
+
"max_position_embeddings": 327680,
|
| 21 |
+
"mla_scale_kv_lora": true,
|
| 22 |
+
"mla_scale_q_lora": true,
|
| 23 |
+
"model_type": "longcat_flash_ngram",
|
| 24 |
+
"moe_topk": 12,
|
| 25 |
+
"n_routed_experts": 256,
|
| 26 |
+
"ngram_vocab_size_ratio": 78,
|
| 27 |
+
"num_attention_heads": 32,
|
| 28 |
+
"num_layers": 14,
|
| 29 |
+
"q_lora_rank": 1536,
|
| 30 |
+
"qk_nope_head_dim": 128,
|
| 31 |
+
"qk_rope_head_dim": 64,
|
| 32 |
+
"quantization": {
|
| 33 |
+
"group_size": 64,
|
| 34 |
+
"bits": 4,
|
| 35 |
+
"mode": "affine",
|
| 36 |
+
"model.layers.0.mlp.router.classifier": {
|
| 37 |
+
"group_size": 64,
|
| 38 |
+
"bits": 8
|
| 39 |
+
},
|
| 40 |
+
"model.layers.1.mlp.router.classifier": {
|
| 41 |
+
"group_size": 64,
|
| 42 |
+
"bits": 8
|
| 43 |
+
},
|
| 44 |
+
"model.layers.2.mlp.router.classifier": {
|
| 45 |
+
"group_size": 64,
|
| 46 |
+
"bits": 8
|
| 47 |
+
},
|
| 48 |
+
"model.layers.3.mlp.router.classifier": {
|
| 49 |
+
"group_size": 64,
|
| 50 |
+
"bits": 8
|
| 51 |
+
},
|
| 52 |
+
"model.layers.4.mlp.router.classifier": {
|
| 53 |
+
"group_size": 64,
|
| 54 |
+
"bits": 8
|
| 55 |
+
},
|
| 56 |
+
"model.layers.5.mlp.router.classifier": {
|
| 57 |
+
"group_size": 64,
|
| 58 |
+
"bits": 8
|
| 59 |
+
},
|
| 60 |
+
"model.layers.6.mlp.router.classifier": {
|
| 61 |
+
"group_size": 64,
|
| 62 |
+
"bits": 8
|
| 63 |
+
},
|
| 64 |
+
"model.layers.7.mlp.router.classifier": {
|
| 65 |
+
"group_size": 64,
|
| 66 |
+
"bits": 8
|
| 67 |
+
},
|
| 68 |
+
"model.layers.8.mlp.router.classifier": {
|
| 69 |
+
"group_size": 64,
|
| 70 |
+
"bits": 8
|
| 71 |
+
},
|
| 72 |
+
"model.layers.9.mlp.router.classifier": {
|
| 73 |
+
"group_size": 64,
|
| 74 |
+
"bits": 8
|
| 75 |
+
},
|
| 76 |
+
"model.layers.10.mlp.router.classifier": {
|
| 77 |
+
"group_size": 64,
|
| 78 |
+
"bits": 8
|
| 79 |
+
},
|
| 80 |
+
"model.layers.11.mlp.router.classifier": {
|
| 81 |
+
"group_size": 64,
|
| 82 |
+
"bits": 8
|
| 83 |
+
},
|
| 84 |
+
"model.layers.12.mlp.router.classifier": {
|
| 85 |
+
"group_size": 64,
|
| 86 |
+
"bits": 8
|
| 87 |
+
},
|
| 88 |
+
"model.layers.13.mlp.router.classifier": {
|
| 89 |
+
"group_size": 64,
|
| 90 |
+
"bits": 8
|
| 91 |
+
}
|
| 92 |
+
},
|
| 93 |
+
"quantization_config": {
|
| 94 |
+
"group_size": 64,
|
| 95 |
+
"bits": 4,
|
| 96 |
+
"mode": "affine",
|
| 97 |
+
"model.layers.0.mlp.router.classifier": {
|
| 98 |
+
"group_size": 64,
|
| 99 |
+
"bits": 8
|
| 100 |
+
},
|
| 101 |
+
"model.layers.1.mlp.router.classifier": {
|
| 102 |
+
"group_size": 64,
|
| 103 |
+
"bits": 8
|
| 104 |
+
},
|
| 105 |
+
"model.layers.2.mlp.router.classifier": {
|
| 106 |
+
"group_size": 64,
|
| 107 |
+
"bits": 8
|
| 108 |
+
},
|
| 109 |
+
"model.layers.3.mlp.router.classifier": {
|
| 110 |
+
"group_size": 64,
|
| 111 |
+
"bits": 8
|
| 112 |
+
},
|
| 113 |
+
"model.layers.4.mlp.router.classifier": {
|
| 114 |
+
"group_size": 64,
|
| 115 |
+
"bits": 8
|
| 116 |
+
},
|
| 117 |
+
"model.layers.5.mlp.router.classifier": {
|
| 118 |
+
"group_size": 64,
|
| 119 |
+
"bits": 8
|
| 120 |
+
},
|
| 121 |
+
"model.layers.6.mlp.router.classifier": {
|
| 122 |
+
"group_size": 64,
|
| 123 |
+
"bits": 8
|
| 124 |
+
},
|
| 125 |
+
"model.layers.7.mlp.router.classifier": {
|
| 126 |
+
"group_size": 64,
|
| 127 |
+
"bits": 8
|
| 128 |
+
},
|
| 129 |
+
"model.layers.8.mlp.router.classifier": {
|
| 130 |
+
"group_size": 64,
|
| 131 |
+
"bits": 8
|
| 132 |
+
},
|
| 133 |
+
"model.layers.9.mlp.router.classifier": {
|
| 134 |
+
"group_size": 64,
|
| 135 |
+
"bits": 8
|
| 136 |
+
},
|
| 137 |
+
"model.layers.10.mlp.router.classifier": {
|
| 138 |
+
"group_size": 64,
|
| 139 |
+
"bits": 8
|
| 140 |
+
},
|
| 141 |
+
"model.layers.11.mlp.router.classifier": {
|
| 142 |
+
"group_size": 64,
|
| 143 |
+
"bits": 8
|
| 144 |
+
},
|
| 145 |
+
"model.layers.12.mlp.router.classifier": {
|
| 146 |
+
"group_size": 64,
|
| 147 |
+
"bits": 8
|
| 148 |
+
},
|
| 149 |
+
"model.layers.13.mlp.router.classifier": {
|
| 150 |
+
"group_size": 64,
|
| 151 |
+
"bits": 8
|
| 152 |
+
}
|
| 153 |
+
},
|
| 154 |
+
"rms_norm_eps": 1e-05,
|
| 155 |
+
"rope_scaling": {
|
| 156 |
+
"original_max_position_embeddings": 32768,
|
| 157 |
+
"rope_type": "yarn",
|
| 158 |
+
"factor": 10,
|
| 159 |
+
"beta_fast": 32,
|
| 160 |
+
"beta_slow": 1,
|
| 161 |
+
"mscale": 1,
|
| 162 |
+
"mscale_all_dim": 1
|
| 163 |
+
},
|
| 164 |
+
"rope_theta": 5000000.0,
|
| 165 |
+
"routed_scaling_factor": 6.0,
|
| 166 |
+
"torch_dtype": "bfloat16",
|
| 167 |
+
"transformers_version": "4.57.6",
|
| 168 |
+
"use_cache": true,
|
| 169 |
+
"v_head_dim": 128,
|
| 170 |
+
"vocab_size": 131072,
|
| 171 |
+
"zero_expert_num": 128,
|
| 172 |
+
"zero_expert_type": "identity"
|
| 173 |
+
}
|
configuration_longcat_ngram.py
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers.models.longcat_flash import LongcatFlashConfig
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
class LongcatFlashNgramConfig(LongcatFlashConfig):
|
| 5 |
+
r"""
|
| 6 |
+
This is the configuration class to store the configuration of a [`LongcatFlashNgramModel`]. It is used to instantiate
|
| 7 |
+
a LongCat Flash model with N-gram enhanced embeddings according to the specified arguments, defining the model architecture.
|
| 8 |
+
Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
|
| 9 |
+
documentation from [`PretrainedConfig`] for more information.
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
Args:
|
| 13 |
+
vocab_size (`int`, *optional*, defaults to 131072):
|
| 14 |
+
Vocabulary size of the LongCat Flash model. Defines the number of different tokens that can be represented by the
|
| 15 |
+
`input_ids` passed when calling [`LongcatFlashNgramModel`]
|
| 16 |
+
hidden_size (`int`, *optional*, defaults to 6144):
|
| 17 |
+
Dimension of the hidden representations.
|
| 18 |
+
num_hidden_layers (`int`, *optional*, defaults to 56):
|
| 19 |
+
Number of hidden layers in the Transformer decoder.
|
| 20 |
+
num_layers (`int`, *optional*, defaults to 28):
|
| 21 |
+
Number of layers, each with 2 sublayers.
|
| 22 |
+
num_attention_heads (`int`, *optional*, defaults to 64):
|
| 23 |
+
Number of attention heads for each attention layer in the Transformer decoder.
|
| 24 |
+
num_key_value_heads (`int`, *optional*):
|
| 25 |
+
This is the number of key_value heads that should be used to implement Grouped Query Attention. If
|
| 26 |
+
`num_key_value_heads=num_attention_heads`, the model will use Multi Head Attention (MHA), if
|
| 27 |
+
`num_key_value_heads=1` the model will use Multi Query Attention (MQA) otherwise GQA is used. When
|
| 28 |
+
converting from a multi-head checkpoint to a GQA checkpoint, each group key and value head should be
|
| 29 |
+
constructed by meanpooling all the original heads within that group. For more details checkout [this
|
| 30 |
+
paper](https://arxiv.org/pdf/2305.13245.pdf). If it is not specified, will default to
|
| 31 |
+
`num_attention_heads`.
|
| 32 |
+
hidden_act (`str` or `function`, *optional*, defaults to `"silu"`):
|
| 33 |
+
The non-linear activation function (function or string) in the decoder.
|
| 34 |
+
max_position_embeddings (`int`, *optional*, defaults to 131072):
|
| 35 |
+
The maximum sequence length that this model might ever be used with. Typically set this to something large
|
| 36 |
+
just in case (e.g., 512 or 1024 or 2048).
|
| 37 |
+
initializer_range (`float`, *optional*, defaults to 0.02):
|
| 38 |
+
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
|
| 39 |
+
rms_norm_eps (`float`, *optional*, defaults to 1e-05):
|
| 40 |
+
The epsilon value used by the RMS normalization layers.
|
| 41 |
+
use_cache (`bool`, *optional*, defaults to `True`):
|
| 42 |
+
Whether or not the model should return the last key/values attentions (not used by all models). Only
|
| 43 |
+
relevant if `config.is_decoder=True`.
|
| 44 |
+
pad_token_id (`int`, *optional*):
|
| 45 |
+
Padding token id.
|
| 46 |
+
bos_token_id (`int`, *optional*, defaults to 1):
|
| 47 |
+
Beginning of stream token id.
|
| 48 |
+
eos_token_id (`int`, *optional*, defaults to 2):
|
| 49 |
+
End of stream token id.
|
| 50 |
+
tie_word_embeddings (`bool`, *optional*, defaults to `False`):
|
| 51 |
+
Whether to tie input and output embeddings.
|
| 52 |
+
rope_theta (`float`, *optional*, defaults to 10000000.0):
|
| 53 |
+
The base period of the RoPE embeddings.
|
| 54 |
+
rope_scaling (`Dict`, *optional*):
|
| 55 |
+
Dictionary containing the scaling configuration for the RoPE embeddings. Currently supports two scaling
|
| 56 |
+
strategies: linear and dynamic. Their scaling factor must be a float greater than 1. The expected format is
|
| 57 |
+
`{"type": strategy name, "factor": scaling factor}`.
|
| 58 |
+
attention_bias (`bool`, *optional*, defaults to `False`):
|
| 59 |
+
Whether to use a bias in the query, key, value and output projection layers during self-attention.
|
| 60 |
+
attention_dropout (`float`, *optional*, defaults to 0.0):
|
| 61 |
+
The dropout ratio for the attention probabilities.
|
| 62 |
+
ffn_hidden_size (`int`, *optional*, defaults to 12288):
|
| 63 |
+
Dimension of the MLP representations.
|
| 64 |
+
q_lora_rank (`int`, *optional*, defaults to 1536):
|
| 65 |
+
The rank of the query LoRA projection in MLA (Multi-head Latent Attention).
|
| 66 |
+
kv_lora_rank (`int`, *optional*, defaults to 512):
|
| 67 |
+
The rank of the key-value LoRA projection in MLA.
|
| 68 |
+
qk_nope_head_dim (`int`, *optional*, defaults to 128):
|
| 69 |
+
The dimension of the non-position encoding part of query/key heads.
|
| 70 |
+
qk_rope_head_dim (`int`, *optional*, defaults to 64):
|
| 71 |
+
The dimension of the RoPE part of query/key heads.
|
| 72 |
+
head_dim (`int`, *optional*, defaults to 64):
|
| 73 |
+
Standard dimension of qk heads, unused except for CI.
|
| 74 |
+
v_head_dim (`int`, *optional*, defaults to 128):
|
| 75 |
+
The dimension of value heads.
|
| 76 |
+
qk_head_dim (`int`, *optional*):
|
| 77 |
+
The total dimension of query/key heads. If not specified, set to `qk_nope_head_dim + qk_rope_head_dim`.
|
| 78 |
+
moe_topk (`int`, *optional*, defaults to 12):
|
| 79 |
+
Number of experts to route to for each token in the MoE layer.
|
| 80 |
+
n_routed_experts (`int`, *optional*, defaults to 512):
|
| 81 |
+
Number of routed experts in the MoE layer.
|
| 82 |
+
zero_expert_num (`int`, *optional*, defaults to 256):
|
| 83 |
+
Number of zero experts (identity function) to add to the expert pool.
|
| 84 |
+
expert_ffn_hidden_size (`int`, *optional*, defaults to 2048):
|
| 85 |
+
Hidden size of individual expert FFN layers.
|
| 86 |
+
routed_scaling_factor (`float`, *optional*, defaults to 6.0):
|
| 87 |
+
Scaling factor applied to the routing weights.
|
| 88 |
+
emb_neighbor_num (`int`, *optional*):
|
| 89 |
+
Maximum N-gram length for N-gram embeddings. This parameter determines the context window size for N-gram computation. Higher values capture
|
| 90 |
+
longer-range lexical patterns but increase memory usage.
|
| 91 |
+
emb_split_num (`int`, *optional*):
|
| 92 |
+
Number of hash functions (or splits) to use for N-gram embeddings. Multiple hash functions help improve the quality of N-gram representations.
|
| 93 |
+
ngram_vocab_size_ratio (`float`, *optional*):
|
| 94 |
+
Ratio multiplier for N-gram vocabulary size relative to the base vocabulary size. The N-gram vocabulary
|
| 95 |
+
size is calculated as `vocab_size * ngram_vocab_size_ratio`.
|
| 96 |
+
|
| 97 |
+
Example:
|
| 98 |
+
```python
|
| 99 |
+
>>> from transformers import LongcatFlashNgramModel, LongcatFlashNgramConfig
|
| 100 |
+
|
| 101 |
+
>>> # Initializing a LongCat Flash N-gram style configuration
|
| 102 |
+
>>> configuration = LongcatFlashNgramConfig(
|
| 103 |
+
... emb_neighbor_num=3,
|
| 104 |
+
... emb_split_num=4,
|
| 105 |
+
... ngram_vocab_size_ratio=1.5
|
| 106 |
+
... )
|
| 107 |
+
|
| 108 |
+
>>> # Initializing a model from the configuration
|
| 109 |
+
>>> model = LongcatFlashNgramModel(configuration)
|
| 110 |
+
|
| 111 |
+
>>> # Accessing the model configuration
|
| 112 |
+
>>> configuration = model.config
|
| 113 |
+
```"""
|
| 114 |
+
|
| 115 |
+
model_type = "longcat_flash_ngram"
|
| 116 |
+
keys_to_ignore_at_inference = ["past_key_values"]
|
| 117 |
+
base_model_tp_plan = {
|
| 118 |
+
"layers.*.self_attn.*.q_b_proj": "colwise",
|
| 119 |
+
"layers.*.self_attn.*.kv_b_proj": "colwise",
|
| 120 |
+
"layers.*.self_attn.*.o_proj": "rowwise",
|
| 121 |
+
"layers.*.mlps.*.gate_proj": "colwise",
|
| 122 |
+
"layers.*.mlps.*.up_proj": "colwise",
|
| 123 |
+
"layers.*.mlps.*.down_proj": "rowwise",
|
| 124 |
+
"layers.*.mlp.experts.*.gate_proj": "colwise",
|
| 125 |
+
"layers.*.mlp.experts.*.up_proj": "colwise",
|
| 126 |
+
"layers.*.mlp.experts.*.down_proj": "rowwise",
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
base_model_pp_plan = {
|
| 130 |
+
"embed_tokens": (["input_ids"], ["inputs_embeds"]),
|
| 131 |
+
"layers": (["hidden_states", "attention_mask"], ["hidden_states"]),
|
| 132 |
+
"norm": (["hidden_states"], ["hidden_states"]),
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
def __init__(
|
| 136 |
+
self,
|
| 137 |
+
vocab_size=131072,
|
| 138 |
+
hidden_size=6144,
|
| 139 |
+
num_hidden_layers=56,
|
| 140 |
+
num_layers=28,
|
| 141 |
+
num_attention_heads=64,
|
| 142 |
+
num_key_value_heads=None,
|
| 143 |
+
hidden_act="silu",
|
| 144 |
+
max_position_embeddings=131072,
|
| 145 |
+
initializer_range=0.02,
|
| 146 |
+
rms_norm_eps=1e-5,
|
| 147 |
+
use_cache=True,
|
| 148 |
+
pad_token_id=None,
|
| 149 |
+
bos_token_id=1,
|
| 150 |
+
eos_token_id=2,
|
| 151 |
+
tie_word_embeddings=False,
|
| 152 |
+
rope_theta=10000000.0,
|
| 153 |
+
rope_scaling=None,
|
| 154 |
+
attention_bias=False,
|
| 155 |
+
attention_dropout=0.0,
|
| 156 |
+
ffn_hidden_size=12288,
|
| 157 |
+
q_lora_rank=1536,
|
| 158 |
+
kv_lora_rank=512,
|
| 159 |
+
qk_nope_head_dim=128,
|
| 160 |
+
qk_rope_head_dim=64,
|
| 161 |
+
head_dim=64,
|
| 162 |
+
v_head_dim=128,
|
| 163 |
+
qk_head_dim=None,
|
| 164 |
+
moe_topk=12,
|
| 165 |
+
n_routed_experts=512,
|
| 166 |
+
zero_expert_num=256,
|
| 167 |
+
expert_ffn_hidden_size=2048,
|
| 168 |
+
routed_scaling_factor=6.0,
|
| 169 |
+
emb_neighbor_num=None,
|
| 170 |
+
emb_split_num=None,
|
| 171 |
+
ngram_vocab_size_ratio=None,
|
| 172 |
+
**kwargs,
|
| 173 |
+
):
|
| 174 |
+
# N-gram embedding specific parameters
|
| 175 |
+
self.emb_neighbor_num = emb_neighbor_num
|
| 176 |
+
self.emb_split_num = emb_split_num
|
| 177 |
+
self.ngram_vocab_size_ratio = ngram_vocab_size_ratio
|
| 178 |
+
|
| 179 |
+
super().__init__(
|
| 180 |
+
vocab_size=vocab_size,
|
| 181 |
+
hidden_size=hidden_size,
|
| 182 |
+
num_hidden_layers=num_hidden_layers,
|
| 183 |
+
num_layers=num_layers,
|
| 184 |
+
num_attention_heads=num_attention_heads,
|
| 185 |
+
num_key_value_heads=num_key_value_heads,
|
| 186 |
+
hidden_act=hidden_act,
|
| 187 |
+
max_position_embeddings=max_position_embeddings,
|
| 188 |
+
initializer_range=initializer_range,
|
| 189 |
+
rms_norm_eps=rms_norm_eps,
|
| 190 |
+
use_cache=use_cache,
|
| 191 |
+
pad_token_id=pad_token_id,
|
| 192 |
+
bos_token_id=bos_token_id,
|
| 193 |
+
eos_token_id=eos_token_id,
|
| 194 |
+
tie_word_embeddings=tie_word_embeddings,
|
| 195 |
+
rope_theta=rope_theta,
|
| 196 |
+
rope_scaling=rope_scaling,
|
| 197 |
+
attention_bias=attention_bias,
|
| 198 |
+
attention_dropout=attention_dropout,
|
| 199 |
+
ffn_hidden_size=ffn_hidden_size,
|
| 200 |
+
q_lora_rank=q_lora_rank,
|
| 201 |
+
kv_lora_rank=kv_lora_rank,
|
| 202 |
+
qk_nope_head_dim=qk_nope_head_dim,
|
| 203 |
+
qk_rope_head_dim=qk_rope_head_dim,
|
| 204 |
+
head_dim=head_dim,
|
| 205 |
+
v_head_dim=v_head_dim,
|
| 206 |
+
qk_head_dim=qk_head_dim,
|
| 207 |
+
moe_topk=moe_topk,
|
| 208 |
+
n_routed_experts=n_routed_experts,
|
| 209 |
+
zero_expert_num=zero_expert_num,
|
| 210 |
+
expert_ffn_hidden_size=expert_ffn_hidden_size,
|
| 211 |
+
routed_scaling_factor=routed_scaling_factor,
|
| 212 |
+
**kwargs,
|
| 213 |
+
)
|
| 214 |
+
|
| 215 |
+
|
| 216 |
+
__all__ = ["LongcatFlashNgramConfig"]
|
generation_config.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 1,
|
| 4 |
+
"eos_token_id": 2,
|
| 5 |
+
"pad_token_id": 3,
|
| 6 |
+
"transformers_version": "4.55.0"
|
| 7 |
+
}
|
model-00001-of-00008.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:712e891edf8cdb7ce4fdae86a2fb62b5da3bbb9b25914e3a2cf1379941874ef5
|
| 3 |
+
size 4643097317
|
model-00002-of-00008.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d7ca2240289eb3285d1e79759d2be511fdf7829b6712fa8795f8e411cfde7d62
|
| 3 |
+
size 4416607121
|
model-00003-of-00008.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:583d349b2c08dad77e9e9b20edf853948d3cad33ef2e6e7a5fb036c18c8913f7
|
| 3 |
+
size 4416609707
|
model-00004-of-00008.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:72d24e8271a1ed4d1fd12cd153174e9f68f0261755f2bdc334ba1cbd82536109
|
| 3 |
+
size 5327895389
|
model-00005-of-00008.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b3c14cd0aba0e1edffeafadd547ccf29fc0a07d09e2140c80c31e2ff8aa1d705
|
| 3 |
+
size 5364815506
|
model-00006-of-00008.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ccf365e928c643b1c5cd0c5c67d3b7d0ebd4200d1e9b75e220e5c1b0ecbc2d05
|
| 3 |
+
size 5362036433
|
model-00007-of-00008.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e743cb169a58afe6a44dda1dad6e8678b561ef8ed637f8fba61b3b51612fdc0a
|
| 3 |
+
size 5341306407
|
model-00008-of-00008.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e78319eab47ad7d5e59ed0adf2aec8fdca53a7515e34bd31f20b8bbb86337a2b
|
| 3 |
+
size 3702753648
|
model.safetensors.index.json
ADDED
|
@@ -0,0 +1,1053 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"metadata": {
|
| 3 |
+
"total_size": 38574996736,
|
| 4 |
+
"total_parameters": 68562459648
|
| 5 |
+
},
|
| 6 |
+
"weight_map": {
|
| 7 |
+
"lm_head.biases": "model-00008-of-00008.safetensors",
|
| 8 |
+
"lm_head.scales": "model-00008-of-00008.safetensors",
|
| 9 |
+
"lm_head.weight": "model-00008-of-00008.safetensors",
|
| 10 |
+
"model.layers.0.input_layernorm.0.weight": "model-00005-of-00008.safetensors",
|
| 11 |
+
"model.layers.0.input_layernorm.1.weight": "model-00005-of-00008.safetensors",
|
| 12 |
+
"model.layers.0.mlp.router.classifier.biases": "model-00005-of-00008.safetensors",
|
| 13 |
+
"model.layers.0.mlp.router.classifier.scales": "model-00005-of-00008.safetensors",
|
| 14 |
+
"model.layers.0.mlp.router.classifier.weight": "model-00005-of-00008.safetensors",
|
| 15 |
+
"model.layers.0.mlp.router.e_score_correction_bias": "model-00005-of-00008.safetensors",
|
| 16 |
+
"model.layers.0.mlp.switch_mlp.down_proj.biases": "model-00005-of-00008.safetensors",
|
| 17 |
+
"model.layers.0.mlp.switch_mlp.down_proj.scales": "model-00005-of-00008.safetensors",
|
| 18 |
+
"model.layers.0.mlp.switch_mlp.down_proj.weight": "model-00005-of-00008.safetensors",
|
| 19 |
+
"model.layers.0.mlp.switch_mlp.gate_proj.biases": "model-00004-of-00008.safetensors",
|
| 20 |
+
"model.layers.0.mlp.switch_mlp.gate_proj.scales": "model-00004-of-00008.safetensors",
|
| 21 |
+
"model.layers.0.mlp.switch_mlp.gate_proj.weight": "model-00004-of-00008.safetensors",
|
| 22 |
+
"model.layers.0.mlp.switch_mlp.up_proj.biases": "model-00004-of-00008.safetensors",
|
| 23 |
+
"model.layers.0.mlp.switch_mlp.up_proj.scales": "model-00004-of-00008.safetensors",
|
| 24 |
+
"model.layers.0.mlp.switch_mlp.up_proj.weight": "model-00004-of-00008.safetensors",
|
| 25 |
+
"model.layers.0.mlps.0.down_proj.biases": "model-00005-of-00008.safetensors",
|
| 26 |
+
"model.layers.0.mlps.0.down_proj.scales": "model-00005-of-00008.safetensors",
|
| 27 |
+
"model.layers.0.mlps.0.down_proj.weight": "model-00005-of-00008.safetensors",
|
| 28 |
+
"model.layers.0.mlps.0.gate_proj.biases": "model-00005-of-00008.safetensors",
|
| 29 |
+
"model.layers.0.mlps.0.gate_proj.scales": "model-00005-of-00008.safetensors",
|
| 30 |
+
"model.layers.0.mlps.0.gate_proj.weight": "model-00005-of-00008.safetensors",
|
| 31 |
+
"model.layers.0.mlps.0.up_proj.biases": "model-00005-of-00008.safetensors",
|
| 32 |
+
"model.layers.0.mlps.0.up_proj.scales": "model-00005-of-00008.safetensors",
|
| 33 |
+
"model.layers.0.mlps.0.up_proj.weight": "model-00005-of-00008.safetensors",
|
| 34 |
+
"model.layers.0.mlps.1.down_proj.biases": "model-00005-of-00008.safetensors",
|
| 35 |
+
"model.layers.0.mlps.1.down_proj.scales": "model-00005-of-00008.safetensors",
|
| 36 |
+
"model.layers.0.mlps.1.down_proj.weight": "model-00005-of-00008.safetensors",
|
| 37 |
+
"model.layers.0.mlps.1.gate_proj.biases": "model-00005-of-00008.safetensors",
|
| 38 |
+
"model.layers.0.mlps.1.gate_proj.scales": "model-00005-of-00008.safetensors",
|
| 39 |
+
"model.layers.0.mlps.1.gate_proj.weight": "model-00005-of-00008.safetensors",
|
| 40 |
+
"model.layers.0.mlps.1.up_proj.biases": "model-00005-of-00008.safetensors",
|
| 41 |
+
"model.layers.0.mlps.1.up_proj.scales": "model-00005-of-00008.safetensors",
|
| 42 |
+
"model.layers.0.mlps.1.up_proj.weight": "model-00005-of-00008.safetensors",
|
| 43 |
+
"model.layers.0.post_attention_layernorm.0.weight": "model-00005-of-00008.safetensors",
|
| 44 |
+
"model.layers.0.post_attention_layernorm.1.weight": "model-00005-of-00008.safetensors",
|
| 45 |
+
"model.layers.0.self_attn.0.kv_a_layernorm.weight": "model-00005-of-00008.safetensors",
|
| 46 |
+
"model.layers.0.self_attn.0.kv_a_proj_with_mqa.biases": "model-00005-of-00008.safetensors",
|
| 47 |
+
"model.layers.0.self_attn.0.kv_a_proj_with_mqa.scales": "model-00005-of-00008.safetensors",
|
| 48 |
+
"model.layers.0.self_attn.0.kv_a_proj_with_mqa.weight": "model-00005-of-00008.safetensors",
|
| 49 |
+
"model.layers.0.self_attn.0.kv_b_proj.biases": "model-00005-of-00008.safetensors",
|
| 50 |
+
"model.layers.0.self_attn.0.kv_b_proj.scales": "model-00005-of-00008.safetensors",
|
| 51 |
+
"model.layers.0.self_attn.0.kv_b_proj.weight": "model-00005-of-00008.safetensors",
|
| 52 |
+
"model.layers.0.self_attn.0.o_proj.biases": "model-00005-of-00008.safetensors",
|
| 53 |
+
"model.layers.0.self_attn.0.o_proj.scales": "model-00005-of-00008.safetensors",
|
| 54 |
+
"model.layers.0.self_attn.0.o_proj.weight": "model-00005-of-00008.safetensors",
|
| 55 |
+
"model.layers.0.self_attn.0.q_a_layernorm.weight": "model-00005-of-00008.safetensors",
|
| 56 |
+
"model.layers.0.self_attn.0.q_a_proj.biases": "model-00005-of-00008.safetensors",
|
| 57 |
+
"model.layers.0.self_attn.0.q_a_proj.scales": "model-00005-of-00008.safetensors",
|
| 58 |
+
"model.layers.0.self_attn.0.q_a_proj.weight": "model-00005-of-00008.safetensors",
|
| 59 |
+
"model.layers.0.self_attn.0.q_b_proj.biases": "model-00005-of-00008.safetensors",
|
| 60 |
+
"model.layers.0.self_attn.0.q_b_proj.scales": "model-00005-of-00008.safetensors",
|
| 61 |
+
"model.layers.0.self_attn.0.q_b_proj.weight": "model-00005-of-00008.safetensors",
|
| 62 |
+
"model.layers.0.self_attn.1.kv_a_layernorm.weight": "model-00005-of-00008.safetensors",
|
| 63 |
+
"model.layers.0.self_attn.1.kv_a_proj_with_mqa.biases": "model-00005-of-00008.safetensors",
|
| 64 |
+
"model.layers.0.self_attn.1.kv_a_proj_with_mqa.scales": "model-00005-of-00008.safetensors",
|
| 65 |
+
"model.layers.0.self_attn.1.kv_a_proj_with_mqa.weight": "model-00005-of-00008.safetensors",
|
| 66 |
+
"model.layers.0.self_attn.1.kv_b_proj.biases": "model-00005-of-00008.safetensors",
|
| 67 |
+
"model.layers.0.self_attn.1.kv_b_proj.scales": "model-00005-of-00008.safetensors",
|
| 68 |
+
"model.layers.0.self_attn.1.kv_b_proj.weight": "model-00005-of-00008.safetensors",
|
| 69 |
+
"model.layers.0.self_attn.1.o_proj.biases": "model-00005-of-00008.safetensors",
|
| 70 |
+
"model.layers.0.self_attn.1.o_proj.scales": "model-00005-of-00008.safetensors",
|
| 71 |
+
"model.layers.0.self_attn.1.o_proj.weight": "model-00005-of-00008.safetensors",
|
| 72 |
+
"model.layers.0.self_attn.1.q_a_layernorm.weight": "model-00005-of-00008.safetensors",
|
| 73 |
+
"model.layers.0.self_attn.1.q_a_proj.biases": "model-00005-of-00008.safetensors",
|
| 74 |
+
"model.layers.0.self_attn.1.q_a_proj.scales": "model-00005-of-00008.safetensors",
|
| 75 |
+
"model.layers.0.self_attn.1.q_a_proj.weight": "model-00005-of-00008.safetensors",
|
| 76 |
+
"model.layers.0.self_attn.1.q_b_proj.biases": "model-00005-of-00008.safetensors",
|
| 77 |
+
"model.layers.0.self_attn.1.q_b_proj.scales": "model-00005-of-00008.safetensors",
|
| 78 |
+
"model.layers.0.self_attn.1.q_b_proj.weight": "model-00005-of-00008.safetensors",
|
| 79 |
+
"model.layers.1.input_layernorm.0.weight": "model-00005-of-00008.safetensors",
|
| 80 |
+
"model.layers.1.input_layernorm.1.weight": "model-00005-of-00008.safetensors",
|
| 81 |
+
"model.layers.1.mlp.router.classifier.biases": "model-00005-of-00008.safetensors",
|
| 82 |
+
"model.layers.1.mlp.router.classifier.scales": "model-00005-of-00008.safetensors",
|
| 83 |
+
"model.layers.1.mlp.router.classifier.weight": "model-00005-of-00008.safetensors",
|
| 84 |
+
"model.layers.1.mlp.router.e_score_correction_bias": "model-00005-of-00008.safetensors",
|
| 85 |
+
"model.layers.1.mlp.switch_mlp.down_proj.biases": "model-00005-of-00008.safetensors",
|
| 86 |
+
"model.layers.1.mlp.switch_mlp.down_proj.scales": "model-00005-of-00008.safetensors",
|
| 87 |
+
"model.layers.1.mlp.switch_mlp.down_proj.weight": "model-00005-of-00008.safetensors",
|
| 88 |
+
"model.layers.1.mlp.switch_mlp.gate_proj.biases": "model-00005-of-00008.safetensors",
|
| 89 |
+
"model.layers.1.mlp.switch_mlp.gate_proj.scales": "model-00005-of-00008.safetensors",
|
| 90 |
+
"model.layers.1.mlp.switch_mlp.gate_proj.weight": "model-00005-of-00008.safetensors",
|
| 91 |
+
"model.layers.1.mlp.switch_mlp.up_proj.biases": "model-00005-of-00008.safetensors",
|
| 92 |
+
"model.layers.1.mlp.switch_mlp.up_proj.scales": "model-00005-of-00008.safetensors",
|
| 93 |
+
"model.layers.1.mlp.switch_mlp.up_proj.weight": "model-00005-of-00008.safetensors",
|
| 94 |
+
"model.layers.1.mlps.0.down_proj.biases": "model-00005-of-00008.safetensors",
|
| 95 |
+
"model.layers.1.mlps.0.down_proj.scales": "model-00005-of-00008.safetensors",
|
| 96 |
+
"model.layers.1.mlps.0.down_proj.weight": "model-00005-of-00008.safetensors",
|
| 97 |
+
"model.layers.1.mlps.0.gate_proj.biases": "model-00005-of-00008.safetensors",
|
| 98 |
+
"model.layers.1.mlps.0.gate_proj.scales": "model-00005-of-00008.safetensors",
|
| 99 |
+
"model.layers.1.mlps.0.gate_proj.weight": "model-00005-of-00008.safetensors",
|
| 100 |
+
"model.layers.1.mlps.0.up_proj.biases": "model-00005-of-00008.safetensors",
|
| 101 |
+
"model.layers.1.mlps.0.up_proj.scales": "model-00005-of-00008.safetensors",
|
| 102 |
+
"model.layers.1.mlps.0.up_proj.weight": "model-00005-of-00008.safetensors",
|
| 103 |
+
"model.layers.1.mlps.1.down_proj.biases": "model-00005-of-00008.safetensors",
|
| 104 |
+
"model.layers.1.mlps.1.down_proj.scales": "model-00005-of-00008.safetensors",
|
| 105 |
+
"model.layers.1.mlps.1.down_proj.weight": "model-00005-of-00008.safetensors",
|
| 106 |
+
"model.layers.1.mlps.1.gate_proj.biases": "model-00005-of-00008.safetensors",
|
| 107 |
+
"model.layers.1.mlps.1.gate_proj.scales": "model-00005-of-00008.safetensors",
|
| 108 |
+
"model.layers.1.mlps.1.gate_proj.weight": "model-00005-of-00008.safetensors",
|
| 109 |
+
"model.layers.1.mlps.1.up_proj.biases": "model-00005-of-00008.safetensors",
|
| 110 |
+
"model.layers.1.mlps.1.up_proj.scales": "model-00005-of-00008.safetensors",
|
| 111 |
+
"model.layers.1.mlps.1.up_proj.weight": "model-00005-of-00008.safetensors",
|
| 112 |
+
"model.layers.1.post_attention_layernorm.0.weight": "model-00005-of-00008.safetensors",
|
| 113 |
+
"model.layers.1.post_attention_layernorm.1.weight": "model-00005-of-00008.safetensors",
|
| 114 |
+
"model.layers.1.self_attn.0.kv_a_layernorm.weight": "model-00005-of-00008.safetensors",
|
| 115 |
+
"model.layers.1.self_attn.0.kv_a_proj_with_mqa.biases": "model-00005-of-00008.safetensors",
|
| 116 |
+
"model.layers.1.self_attn.0.kv_a_proj_with_mqa.scales": "model-00005-of-00008.safetensors",
|
| 117 |
+
"model.layers.1.self_attn.0.kv_a_proj_with_mqa.weight": "model-00005-of-00008.safetensors",
|
| 118 |
+
"model.layers.1.self_attn.0.kv_b_proj.biases": "model-00005-of-00008.safetensors",
|
| 119 |
+
"model.layers.1.self_attn.0.kv_b_proj.scales": "model-00005-of-00008.safetensors",
|
| 120 |
+
"model.layers.1.self_attn.0.kv_b_proj.weight": "model-00005-of-00008.safetensors",
|
| 121 |
+
"model.layers.1.self_attn.0.o_proj.biases": "model-00005-of-00008.safetensors",
|
| 122 |
+
"model.layers.1.self_attn.0.o_proj.scales": "model-00005-of-00008.safetensors",
|
| 123 |
+
"model.layers.1.self_attn.0.o_proj.weight": "model-00005-of-00008.safetensors",
|
| 124 |
+
"model.layers.1.self_attn.0.q_a_layernorm.weight": "model-00005-of-00008.safetensors",
|
| 125 |
+
"model.layers.1.self_attn.0.q_a_proj.biases": "model-00005-of-00008.safetensors",
|
| 126 |
+
"model.layers.1.self_attn.0.q_a_proj.scales": "model-00005-of-00008.safetensors",
|
| 127 |
+
"model.layers.1.self_attn.0.q_a_proj.weight": "model-00005-of-00008.safetensors",
|
| 128 |
+
"model.layers.1.self_attn.0.q_b_proj.biases": "model-00005-of-00008.safetensors",
|
| 129 |
+
"model.layers.1.self_attn.0.q_b_proj.scales": "model-00005-of-00008.safetensors",
|
| 130 |
+
"model.layers.1.self_attn.0.q_b_proj.weight": "model-00005-of-00008.safetensors",
|
| 131 |
+
"model.layers.1.self_attn.1.kv_a_layernorm.weight": "model-00005-of-00008.safetensors",
|
| 132 |
+
"model.layers.1.self_attn.1.kv_a_proj_with_mqa.biases": "model-00005-of-00008.safetensors",
|
| 133 |
+
"model.layers.1.self_attn.1.kv_a_proj_with_mqa.scales": "model-00005-of-00008.safetensors",
|
| 134 |
+
"model.layers.1.self_attn.1.kv_a_proj_with_mqa.weight": "model-00005-of-00008.safetensors",
|
| 135 |
+
"model.layers.1.self_attn.1.kv_b_proj.biases": "model-00005-of-00008.safetensors",
|
| 136 |
+
"model.layers.1.self_attn.1.kv_b_proj.scales": "model-00005-of-00008.safetensors",
|
| 137 |
+
"model.layers.1.self_attn.1.kv_b_proj.weight": "model-00005-of-00008.safetensors",
|
| 138 |
+
"model.layers.1.self_attn.1.o_proj.biases": "model-00005-of-00008.safetensors",
|
| 139 |
+
"model.layers.1.self_attn.1.o_proj.scales": "model-00005-of-00008.safetensors",
|
| 140 |
+
"model.layers.1.self_attn.1.o_proj.weight": "model-00005-of-00008.safetensors",
|
| 141 |
+
"model.layers.1.self_attn.1.q_a_layernorm.weight": "model-00005-of-00008.safetensors",
|
| 142 |
+
"model.layers.1.self_attn.1.q_a_proj.biases": "model-00005-of-00008.safetensors",
|
| 143 |
+
"model.layers.1.self_attn.1.q_a_proj.scales": "model-00005-of-00008.safetensors",
|
| 144 |
+
"model.layers.1.self_attn.1.q_a_proj.weight": "model-00005-of-00008.safetensors",
|
| 145 |
+
"model.layers.1.self_attn.1.q_b_proj.biases": "model-00005-of-00008.safetensors",
|
| 146 |
+
"model.layers.1.self_attn.1.q_b_proj.scales": "model-00005-of-00008.safetensors",
|
| 147 |
+
"model.layers.1.self_attn.1.q_b_proj.weight": "model-00005-of-00008.safetensors",
|
| 148 |
+
"model.layers.10.input_layernorm.0.weight": "model-00007-of-00008.safetensors",
|
| 149 |
+
"model.layers.10.input_layernorm.1.weight": "model-00007-of-00008.safetensors",
|
| 150 |
+
"model.layers.10.mlp.router.classifier.biases": "model-00007-of-00008.safetensors",
|
| 151 |
+
"model.layers.10.mlp.router.classifier.scales": "model-00007-of-00008.safetensors",
|
| 152 |
+
"model.layers.10.mlp.router.classifier.weight": "model-00007-of-00008.safetensors",
|
| 153 |
+
"model.layers.10.mlp.router.e_score_correction_bias": "model-00007-of-00008.safetensors",
|
| 154 |
+
"model.layers.10.mlp.switch_mlp.down_proj.biases": "model-00007-of-00008.safetensors",
|
| 155 |
+
"model.layers.10.mlp.switch_mlp.down_proj.scales": "model-00007-of-00008.safetensors",
|
| 156 |
+
"model.layers.10.mlp.switch_mlp.down_proj.weight": "model-00007-of-00008.safetensors",
|
| 157 |
+
"model.layers.10.mlp.switch_mlp.gate_proj.biases": "model-00007-of-00008.safetensors",
|
| 158 |
+
"model.layers.10.mlp.switch_mlp.gate_proj.scales": "model-00007-of-00008.safetensors",
|
| 159 |
+
"model.layers.10.mlp.switch_mlp.gate_proj.weight": "model-00007-of-00008.safetensors",
|
| 160 |
+
"model.layers.10.mlp.switch_mlp.up_proj.biases": "model-00007-of-00008.safetensors",
|
| 161 |
+
"model.layers.10.mlp.switch_mlp.up_proj.scales": "model-00007-of-00008.safetensors",
|
| 162 |
+
"model.layers.10.mlp.switch_mlp.up_proj.weight": "model-00007-of-00008.safetensors",
|
| 163 |
+
"model.layers.10.mlps.0.down_proj.biases": "model-00007-of-00008.safetensors",
|
| 164 |
+
"model.layers.10.mlps.0.down_proj.scales": "model-00007-of-00008.safetensors",
|
| 165 |
+
"model.layers.10.mlps.0.down_proj.weight": "model-00007-of-00008.safetensors",
|
| 166 |
+
"model.layers.10.mlps.0.gate_proj.biases": "model-00007-of-00008.safetensors",
|
| 167 |
+
"model.layers.10.mlps.0.gate_proj.scales": "model-00007-of-00008.safetensors",
|
| 168 |
+
"model.layers.10.mlps.0.gate_proj.weight": "model-00007-of-00008.safetensors",
|
| 169 |
+
"model.layers.10.mlps.0.up_proj.biases": "model-00007-of-00008.safetensors",
|
| 170 |
+
"model.layers.10.mlps.0.up_proj.scales": "model-00007-of-00008.safetensors",
|
| 171 |
+
"model.layers.10.mlps.0.up_proj.weight": "model-00007-of-00008.safetensors",
|
| 172 |
+
"model.layers.10.mlps.1.down_proj.biases": "model-00007-of-00008.safetensors",
|
| 173 |
+
"model.layers.10.mlps.1.down_proj.scales": "model-00007-of-00008.safetensors",
|
| 174 |
+
"model.layers.10.mlps.1.down_proj.weight": "model-00007-of-00008.safetensors",
|
| 175 |
+
"model.layers.10.mlps.1.gate_proj.biases": "model-00007-of-00008.safetensors",
|
| 176 |
+
"model.layers.10.mlps.1.gate_proj.scales": "model-00007-of-00008.safetensors",
|
| 177 |
+
"model.layers.10.mlps.1.gate_proj.weight": "model-00007-of-00008.safetensors",
|
| 178 |
+
"model.layers.10.mlps.1.up_proj.biases": "model-00007-of-00008.safetensors",
|
| 179 |
+
"model.layers.10.mlps.1.up_proj.scales": "model-00007-of-00008.safetensors",
|
| 180 |
+
"model.layers.10.mlps.1.up_proj.weight": "model-00007-of-00008.safetensors",
|
| 181 |
+
"model.layers.10.post_attention_layernorm.0.weight": "model-00007-of-00008.safetensors",
|
| 182 |
+
"model.layers.10.post_attention_layernorm.1.weight": "model-00007-of-00008.safetensors",
|
| 183 |
+
"model.layers.10.self_attn.0.kv_a_layernorm.weight": "model-00007-of-00008.safetensors",
|
| 184 |
+
"model.layers.10.self_attn.0.kv_a_proj_with_mqa.biases": "model-00007-of-00008.safetensors",
|
| 185 |
+
"model.layers.10.self_attn.0.kv_a_proj_with_mqa.scales": "model-00007-of-00008.safetensors",
|
| 186 |
+
"model.layers.10.self_attn.0.kv_a_proj_with_mqa.weight": "model-00007-of-00008.safetensors",
|
| 187 |
+
"model.layers.10.self_attn.0.kv_b_proj.biases": "model-00007-of-00008.safetensors",
|
| 188 |
+
"model.layers.10.self_attn.0.kv_b_proj.scales": "model-00007-of-00008.safetensors",
|
| 189 |
+
"model.layers.10.self_attn.0.kv_b_proj.weight": "model-00007-of-00008.safetensors",
|
| 190 |
+
"model.layers.10.self_attn.0.o_proj.biases": "model-00007-of-00008.safetensors",
|
| 191 |
+
"model.layers.10.self_attn.0.o_proj.scales": "model-00007-of-00008.safetensors",
|
| 192 |
+
"model.layers.10.self_attn.0.o_proj.weight": "model-00007-of-00008.safetensors",
|
| 193 |
+
"model.layers.10.self_attn.0.q_a_layernorm.weight": "model-00007-of-00008.safetensors",
|
| 194 |
+
"model.layers.10.self_attn.0.q_a_proj.biases": "model-00007-of-00008.safetensors",
|
| 195 |
+
"model.layers.10.self_attn.0.q_a_proj.scales": "model-00007-of-00008.safetensors",
|
| 196 |
+
"model.layers.10.self_attn.0.q_a_proj.weight": "model-00007-of-00008.safetensors",
|
| 197 |
+
"model.layers.10.self_attn.0.q_b_proj.biases": "model-00007-of-00008.safetensors",
|
| 198 |
+
"model.layers.10.self_attn.0.q_b_proj.scales": "model-00007-of-00008.safetensors",
|
| 199 |
+
"model.layers.10.self_attn.0.q_b_proj.weight": "model-00007-of-00008.safetensors",
|
| 200 |
+
"model.layers.10.self_attn.1.kv_a_layernorm.weight": "model-00007-of-00008.safetensors",
|
| 201 |
+
"model.layers.10.self_attn.1.kv_a_proj_with_mqa.biases": "model-00007-of-00008.safetensors",
|
| 202 |
+
"model.layers.10.self_attn.1.kv_a_proj_with_mqa.scales": "model-00007-of-00008.safetensors",
|
| 203 |
+
"model.layers.10.self_attn.1.kv_a_proj_with_mqa.weight": "model-00007-of-00008.safetensors",
|
| 204 |
+
"model.layers.10.self_attn.1.kv_b_proj.biases": "model-00007-of-00008.safetensors",
|
| 205 |
+
"model.layers.10.self_attn.1.kv_b_proj.scales": "model-00007-of-00008.safetensors",
|
| 206 |
+
"model.layers.10.self_attn.1.kv_b_proj.weight": "model-00007-of-00008.safetensors",
|
| 207 |
+
"model.layers.10.self_attn.1.o_proj.biases": "model-00007-of-00008.safetensors",
|
| 208 |
+
"model.layers.10.self_attn.1.o_proj.scales": "model-00007-of-00008.safetensors",
|
| 209 |
+
"model.layers.10.self_attn.1.o_proj.weight": "model-00007-of-00008.safetensors",
|
| 210 |
+
"model.layers.10.self_attn.1.q_a_layernorm.weight": "model-00007-of-00008.safetensors",
|
| 211 |
+
"model.layers.10.self_attn.1.q_a_proj.biases": "model-00007-of-00008.safetensors",
|
| 212 |
+
"model.layers.10.self_attn.1.q_a_proj.scales": "model-00007-of-00008.safetensors",
|
| 213 |
+
"model.layers.10.self_attn.1.q_a_proj.weight": "model-00007-of-00008.safetensors",
|
| 214 |
+
"model.layers.10.self_attn.1.q_b_proj.biases": "model-00007-of-00008.safetensors",
|
| 215 |
+
"model.layers.10.self_attn.1.q_b_proj.scales": "model-00007-of-00008.safetensors",
|
| 216 |
+
"model.layers.10.self_attn.1.q_b_proj.weight": "model-00007-of-00008.safetensors",
|
| 217 |
+
"model.layers.11.input_layernorm.0.weight": "model-00008-of-00008.safetensors",
|
| 218 |
+
"model.layers.11.input_layernorm.1.weight": "model-00008-of-00008.safetensors",
|
| 219 |
+
"model.layers.11.mlp.router.classifier.biases": "model-00008-of-00008.safetensors",
|
| 220 |
+
"model.layers.11.mlp.router.classifier.scales": "model-00008-of-00008.safetensors",
|
| 221 |
+
"model.layers.11.mlp.router.classifier.weight": "model-00008-of-00008.safetensors",
|
| 222 |
+
"model.layers.11.mlp.router.e_score_correction_bias": "model-00008-of-00008.safetensors",
|
| 223 |
+
"model.layers.11.mlp.switch_mlp.down_proj.biases": "model-00008-of-00008.safetensors",
|
| 224 |
+
"model.layers.11.mlp.switch_mlp.down_proj.scales": "model-00008-of-00008.safetensors",
|
| 225 |
+
"model.layers.11.mlp.switch_mlp.down_proj.weight": "model-00008-of-00008.safetensors",
|
| 226 |
+
"model.layers.11.mlp.switch_mlp.gate_proj.biases": "model-00007-of-00008.safetensors",
|
| 227 |
+
"model.layers.11.mlp.switch_mlp.gate_proj.scales": "model-00007-of-00008.safetensors",
|
| 228 |
+
"model.layers.11.mlp.switch_mlp.gate_proj.weight": "model-00007-of-00008.safetensors",
|
| 229 |
+
"model.layers.11.mlp.switch_mlp.up_proj.biases": "model-00007-of-00008.safetensors",
|
| 230 |
+
"model.layers.11.mlp.switch_mlp.up_proj.scales": "model-00007-of-00008.safetensors",
|
| 231 |
+
"model.layers.11.mlp.switch_mlp.up_proj.weight": "model-00007-of-00008.safetensors",
|
| 232 |
+
"model.layers.11.mlps.0.down_proj.biases": "model-00008-of-00008.safetensors",
|
| 233 |
+
"model.layers.11.mlps.0.down_proj.scales": "model-00008-of-00008.safetensors",
|
| 234 |
+
"model.layers.11.mlps.0.down_proj.weight": "model-00008-of-00008.safetensors",
|
| 235 |
+
"model.layers.11.mlps.0.gate_proj.biases": "model-00008-of-00008.safetensors",
|
| 236 |
+
"model.layers.11.mlps.0.gate_proj.scales": "model-00008-of-00008.safetensors",
|
| 237 |
+
"model.layers.11.mlps.0.gate_proj.weight": "model-00008-of-00008.safetensors",
|
| 238 |
+
"model.layers.11.mlps.0.up_proj.biases": "model-00008-of-00008.safetensors",
|
| 239 |
+
"model.layers.11.mlps.0.up_proj.scales": "model-00008-of-00008.safetensors",
|
| 240 |
+
"model.layers.11.mlps.0.up_proj.weight": "model-00008-of-00008.safetensors",
|
| 241 |
+
"model.layers.11.mlps.1.down_proj.biases": "model-00008-of-00008.safetensors",
|
| 242 |
+
"model.layers.11.mlps.1.down_proj.scales": "model-00008-of-00008.safetensors",
|
| 243 |
+
"model.layers.11.mlps.1.down_proj.weight": "model-00008-of-00008.safetensors",
|
| 244 |
+
"model.layers.11.mlps.1.gate_proj.biases": "model-00008-of-00008.safetensors",
|
| 245 |
+
"model.layers.11.mlps.1.gate_proj.scales": "model-00008-of-00008.safetensors",
|
| 246 |
+
"model.layers.11.mlps.1.gate_proj.weight": "model-00008-of-00008.safetensors",
|
| 247 |
+
"model.layers.11.mlps.1.up_proj.biases": "model-00008-of-00008.safetensors",
|
| 248 |
+
"model.layers.11.mlps.1.up_proj.scales": "model-00008-of-00008.safetensors",
|
| 249 |
+
"model.layers.11.mlps.1.up_proj.weight": "model-00008-of-00008.safetensors",
|
| 250 |
+
"model.layers.11.post_attention_layernorm.0.weight": "model-00008-of-00008.safetensors",
|
| 251 |
+
"model.layers.11.post_attention_layernorm.1.weight": "model-00008-of-00008.safetensors",
|
| 252 |
+
"model.layers.11.self_attn.0.kv_a_layernorm.weight": "model-00008-of-00008.safetensors",
|
| 253 |
+
"model.layers.11.self_attn.0.kv_a_proj_with_mqa.biases": "model-00008-of-00008.safetensors",
|
| 254 |
+
"model.layers.11.self_attn.0.kv_a_proj_with_mqa.scales": "model-00008-of-00008.safetensors",
|
| 255 |
+
"model.layers.11.self_attn.0.kv_a_proj_with_mqa.weight": "model-00008-of-00008.safetensors",
|
| 256 |
+
"model.layers.11.self_attn.0.kv_b_proj.biases": "model-00008-of-00008.safetensors",
|
| 257 |
+
"model.layers.11.self_attn.0.kv_b_proj.scales": "model-00008-of-00008.safetensors",
|
| 258 |
+
"model.layers.11.self_attn.0.kv_b_proj.weight": "model-00008-of-00008.safetensors",
|
| 259 |
+
"model.layers.11.self_attn.0.o_proj.biases": "model-00008-of-00008.safetensors",
|
| 260 |
+
"model.layers.11.self_attn.0.o_proj.scales": "model-00008-of-00008.safetensors",
|
| 261 |
+
"model.layers.11.self_attn.0.o_proj.weight": "model-00008-of-00008.safetensors",
|
| 262 |
+
"model.layers.11.self_attn.0.q_a_layernorm.weight": "model-00008-of-00008.safetensors",
|
| 263 |
+
"model.layers.11.self_attn.0.q_a_proj.biases": "model-00008-of-00008.safetensors",
|
| 264 |
+
"model.layers.11.self_attn.0.q_a_proj.scales": "model-00008-of-00008.safetensors",
|
| 265 |
+
"model.layers.11.self_attn.0.q_a_proj.weight": "model-00008-of-00008.safetensors",
|
| 266 |
+
"model.layers.11.self_attn.0.q_b_proj.biases": "model-00008-of-00008.safetensors",
|
| 267 |
+
"model.layers.11.self_attn.0.q_b_proj.scales": "model-00008-of-00008.safetensors",
|
| 268 |
+
"model.layers.11.self_attn.0.q_b_proj.weight": "model-00008-of-00008.safetensors",
|
| 269 |
+
"model.layers.11.self_attn.1.kv_a_layernorm.weight": "model-00008-of-00008.safetensors",
|
| 270 |
+
"model.layers.11.self_attn.1.kv_a_proj_with_mqa.biases": "model-00008-of-00008.safetensors",
|
| 271 |
+
"model.layers.11.self_attn.1.kv_a_proj_with_mqa.scales": "model-00008-of-00008.safetensors",
|
| 272 |
+
"model.layers.11.self_attn.1.kv_a_proj_with_mqa.weight": "model-00008-of-00008.safetensors",
|
| 273 |
+
"model.layers.11.self_attn.1.kv_b_proj.biases": "model-00008-of-00008.safetensors",
|
| 274 |
+
"model.layers.11.self_attn.1.kv_b_proj.scales": "model-00008-of-00008.safetensors",
|
| 275 |
+
"model.layers.11.self_attn.1.kv_b_proj.weight": "model-00008-of-00008.safetensors",
|
| 276 |
+
"model.layers.11.self_attn.1.o_proj.biases": "model-00008-of-00008.safetensors",
|
| 277 |
+
"model.layers.11.self_attn.1.o_proj.scales": "model-00008-of-00008.safetensors",
|
| 278 |
+
"model.layers.11.self_attn.1.o_proj.weight": "model-00008-of-00008.safetensors",
|
| 279 |
+
"model.layers.11.self_attn.1.q_a_layernorm.weight": "model-00008-of-00008.safetensors",
|
| 280 |
+
"model.layers.11.self_attn.1.q_a_proj.biases": "model-00008-of-00008.safetensors",
|
| 281 |
+
"model.layers.11.self_attn.1.q_a_proj.scales": "model-00008-of-00008.safetensors",
|
| 282 |
+
"model.layers.11.self_attn.1.q_a_proj.weight": "model-00008-of-00008.safetensors",
|
| 283 |
+
"model.layers.11.self_attn.1.q_b_proj.biases": "model-00008-of-00008.safetensors",
|
| 284 |
+
"model.layers.11.self_attn.1.q_b_proj.scales": "model-00008-of-00008.safetensors",
|
| 285 |
+
"model.layers.11.self_attn.1.q_b_proj.weight": "model-00008-of-00008.safetensors",
|
| 286 |
+
"model.layers.12.input_layernorm.0.weight": "model-00008-of-00008.safetensors",
|
| 287 |
+
"model.layers.12.input_layernorm.1.weight": "model-00008-of-00008.safetensors",
|
| 288 |
+
"model.layers.12.mlp.router.classifier.biases": "model-00008-of-00008.safetensors",
|
| 289 |
+
"model.layers.12.mlp.router.classifier.scales": "model-00008-of-00008.safetensors",
|
| 290 |
+
"model.layers.12.mlp.router.classifier.weight": "model-00008-of-00008.safetensors",
|
| 291 |
+
"model.layers.12.mlp.router.e_score_correction_bias": "model-00008-of-00008.safetensors",
|
| 292 |
+
"model.layers.12.mlp.switch_mlp.down_proj.biases": "model-00008-of-00008.safetensors",
|
| 293 |
+
"model.layers.12.mlp.switch_mlp.down_proj.scales": "model-00008-of-00008.safetensors",
|
| 294 |
+
"model.layers.12.mlp.switch_mlp.down_proj.weight": "model-00008-of-00008.safetensors",
|
| 295 |
+
"model.layers.12.mlp.switch_mlp.gate_proj.biases": "model-00008-of-00008.safetensors",
|
| 296 |
+
"model.layers.12.mlp.switch_mlp.gate_proj.scales": "model-00008-of-00008.safetensors",
|
| 297 |
+
"model.layers.12.mlp.switch_mlp.gate_proj.weight": "model-00008-of-00008.safetensors",
|
| 298 |
+
"model.layers.12.mlp.switch_mlp.up_proj.biases": "model-00008-of-00008.safetensors",
|
| 299 |
+
"model.layers.12.mlp.switch_mlp.up_proj.scales": "model-00008-of-00008.safetensors",
|
| 300 |
+
"model.layers.12.mlp.switch_mlp.up_proj.weight": "model-00008-of-00008.safetensors",
|
| 301 |
+
"model.layers.12.mlps.0.down_proj.biases": "model-00008-of-00008.safetensors",
|
| 302 |
+
"model.layers.12.mlps.0.down_proj.scales": "model-00008-of-00008.safetensors",
|
| 303 |
+
"model.layers.12.mlps.0.down_proj.weight": "model-00008-of-00008.safetensors",
|
| 304 |
+
"model.layers.12.mlps.0.gate_proj.biases": "model-00008-of-00008.safetensors",
|
| 305 |
+
"model.layers.12.mlps.0.gate_proj.scales": "model-00008-of-00008.safetensors",
|
| 306 |
+
"model.layers.12.mlps.0.gate_proj.weight": "model-00008-of-00008.safetensors",
|
| 307 |
+
"model.layers.12.mlps.0.up_proj.biases": "model-00008-of-00008.safetensors",
|
| 308 |
+
"model.layers.12.mlps.0.up_proj.scales": "model-00008-of-00008.safetensors",
|
| 309 |
+
"model.layers.12.mlps.0.up_proj.weight": "model-00008-of-00008.safetensors",
|
| 310 |
+
"model.layers.12.mlps.1.down_proj.biases": "model-00008-of-00008.safetensors",
|
| 311 |
+
"model.layers.12.mlps.1.down_proj.scales": "model-00008-of-00008.safetensors",
|
| 312 |
+
"model.layers.12.mlps.1.down_proj.weight": "model-00008-of-00008.safetensors",
|
| 313 |
+
"model.layers.12.mlps.1.gate_proj.biases": "model-00008-of-00008.safetensors",
|
| 314 |
+
"model.layers.12.mlps.1.gate_proj.scales": "model-00008-of-00008.safetensors",
|
| 315 |
+
"model.layers.12.mlps.1.gate_proj.weight": "model-00008-of-00008.safetensors",
|
| 316 |
+
"model.layers.12.mlps.1.up_proj.biases": "model-00008-of-00008.safetensors",
|
| 317 |
+
"model.layers.12.mlps.1.up_proj.scales": "model-00008-of-00008.safetensors",
|
| 318 |
+
"model.layers.12.mlps.1.up_proj.weight": "model-00008-of-00008.safetensors",
|
| 319 |
+
"model.layers.12.post_attention_layernorm.0.weight": "model-00008-of-00008.safetensors",
|
| 320 |
+
"model.layers.12.post_attention_layernorm.1.weight": "model-00008-of-00008.safetensors",
|
| 321 |
+
"model.layers.12.self_attn.0.kv_a_layernorm.weight": "model-00008-of-00008.safetensors",
|
| 322 |
+
"model.layers.12.self_attn.0.kv_a_proj_with_mqa.biases": "model-00008-of-00008.safetensors",
|
| 323 |
+
"model.layers.12.self_attn.0.kv_a_proj_with_mqa.scales": "model-00008-of-00008.safetensors",
|
| 324 |
+
"model.layers.12.self_attn.0.kv_a_proj_with_mqa.weight": "model-00008-of-00008.safetensors",
|
| 325 |
+
"model.layers.12.self_attn.0.kv_b_proj.biases": "model-00008-of-00008.safetensors",
|
| 326 |
+
"model.layers.12.self_attn.0.kv_b_proj.scales": "model-00008-of-00008.safetensors",
|
| 327 |
+
"model.layers.12.self_attn.0.kv_b_proj.weight": "model-00008-of-00008.safetensors",
|
| 328 |
+
"model.layers.12.self_attn.0.o_proj.biases": "model-00008-of-00008.safetensors",
|
| 329 |
+
"model.layers.12.self_attn.0.o_proj.scales": "model-00008-of-00008.safetensors",
|
| 330 |
+
"model.layers.12.self_attn.0.o_proj.weight": "model-00008-of-00008.safetensors",
|
| 331 |
+
"model.layers.12.self_attn.0.q_a_layernorm.weight": "model-00008-of-00008.safetensors",
|
| 332 |
+
"model.layers.12.self_attn.0.q_a_proj.biases": "model-00008-of-00008.safetensors",
|
| 333 |
+
"model.layers.12.self_attn.0.q_a_proj.scales": "model-00008-of-00008.safetensors",
|
| 334 |
+
"model.layers.12.self_attn.0.q_a_proj.weight": "model-00008-of-00008.safetensors",
|
| 335 |
+
"model.layers.12.self_attn.0.q_b_proj.biases": "model-00008-of-00008.safetensors",
|
| 336 |
+
"model.layers.12.self_attn.0.q_b_proj.scales": "model-00008-of-00008.safetensors",
|
| 337 |
+
"model.layers.12.self_attn.0.q_b_proj.weight": "model-00008-of-00008.safetensors",
|
| 338 |
+
"model.layers.12.self_attn.1.kv_a_layernorm.weight": "model-00008-of-00008.safetensors",
|
| 339 |
+
"model.layers.12.self_attn.1.kv_a_proj_with_mqa.biases": "model-00008-of-00008.safetensors",
|
| 340 |
+
"model.layers.12.self_attn.1.kv_a_proj_with_mqa.scales": "model-00008-of-00008.safetensors",
|
| 341 |
+
"model.layers.12.self_attn.1.kv_a_proj_with_mqa.weight": "model-00008-of-00008.safetensors",
|
| 342 |
+
"model.layers.12.self_attn.1.kv_b_proj.biases": "model-00008-of-00008.safetensors",
|
| 343 |
+
"model.layers.12.self_attn.1.kv_b_proj.scales": "model-00008-of-00008.safetensors",
|
| 344 |
+
"model.layers.12.self_attn.1.kv_b_proj.weight": "model-00008-of-00008.safetensors",
|
| 345 |
+
"model.layers.12.self_attn.1.o_proj.biases": "model-00008-of-00008.safetensors",
|
| 346 |
+
"model.layers.12.self_attn.1.o_proj.scales": "model-00008-of-00008.safetensors",
|
| 347 |
+
"model.layers.12.self_attn.1.o_proj.weight": "model-00008-of-00008.safetensors",
|
| 348 |
+
"model.layers.12.self_attn.1.q_a_layernorm.weight": "model-00008-of-00008.safetensors",
|
| 349 |
+
"model.layers.12.self_attn.1.q_a_proj.biases": "model-00008-of-00008.safetensors",
|
| 350 |
+
"model.layers.12.self_attn.1.q_a_proj.scales": "model-00008-of-00008.safetensors",
|
| 351 |
+
"model.layers.12.self_attn.1.q_a_proj.weight": "model-00008-of-00008.safetensors",
|
| 352 |
+
"model.layers.12.self_attn.1.q_b_proj.biases": "model-00008-of-00008.safetensors",
|
| 353 |
+
"model.layers.12.self_attn.1.q_b_proj.scales": "model-00008-of-00008.safetensors",
|
| 354 |
+
"model.layers.12.self_attn.1.q_b_proj.weight": "model-00008-of-00008.safetensors",
|
| 355 |
+
"model.layers.13.input_layernorm.0.weight": "model-00008-of-00008.safetensors",
|
| 356 |
+
"model.layers.13.input_layernorm.1.weight": "model-00008-of-00008.safetensors",
|
| 357 |
+
"model.layers.13.mlp.router.classifier.biases": "model-00008-of-00008.safetensors",
|
| 358 |
+
"model.layers.13.mlp.router.classifier.scales": "model-00008-of-00008.safetensors",
|
| 359 |
+
"model.layers.13.mlp.router.classifier.weight": "model-00008-of-00008.safetensors",
|
| 360 |
+
"model.layers.13.mlp.router.e_score_correction_bias": "model-00008-of-00008.safetensors",
|
| 361 |
+
"model.layers.13.mlp.switch_mlp.down_proj.biases": "model-00008-of-00008.safetensors",
|
| 362 |
+
"model.layers.13.mlp.switch_mlp.down_proj.scales": "model-00008-of-00008.safetensors",
|
| 363 |
+
"model.layers.13.mlp.switch_mlp.down_proj.weight": "model-00008-of-00008.safetensors",
|
| 364 |
+
"model.layers.13.mlp.switch_mlp.gate_proj.biases": "model-00008-of-00008.safetensors",
|
| 365 |
+
"model.layers.13.mlp.switch_mlp.gate_proj.scales": "model-00008-of-00008.safetensors",
|
| 366 |
+
"model.layers.13.mlp.switch_mlp.gate_proj.weight": "model-00008-of-00008.safetensors",
|
| 367 |
+
"model.layers.13.mlp.switch_mlp.up_proj.biases": "model-00008-of-00008.safetensors",
|
| 368 |
+
"model.layers.13.mlp.switch_mlp.up_proj.scales": "model-00008-of-00008.safetensors",
|
| 369 |
+
"model.layers.13.mlp.switch_mlp.up_proj.weight": "model-00008-of-00008.safetensors",
|
| 370 |
+
"model.layers.13.mlps.0.down_proj.biases": "model-00008-of-00008.safetensors",
|
| 371 |
+
"model.layers.13.mlps.0.down_proj.scales": "model-00008-of-00008.safetensors",
|
| 372 |
+
"model.layers.13.mlps.0.down_proj.weight": "model-00008-of-00008.safetensors",
|
| 373 |
+
"model.layers.13.mlps.0.gate_proj.biases": "model-00008-of-00008.safetensors",
|
| 374 |
+
"model.layers.13.mlps.0.gate_proj.scales": "model-00008-of-00008.safetensors",
|
| 375 |
+
"model.layers.13.mlps.0.gate_proj.weight": "model-00008-of-00008.safetensors",
|
| 376 |
+
"model.layers.13.mlps.0.up_proj.biases": "model-00008-of-00008.safetensors",
|
| 377 |
+
"model.layers.13.mlps.0.up_proj.scales": "model-00008-of-00008.safetensors",
|
| 378 |
+
"model.layers.13.mlps.0.up_proj.weight": "model-00008-of-00008.safetensors",
|
| 379 |
+
"model.layers.13.mlps.1.down_proj.biases": "model-00008-of-00008.safetensors",
|
| 380 |
+
"model.layers.13.mlps.1.down_proj.scales": "model-00008-of-00008.safetensors",
|
| 381 |
+
"model.layers.13.mlps.1.down_proj.weight": "model-00008-of-00008.safetensors",
|
| 382 |
+
"model.layers.13.mlps.1.gate_proj.biases": "model-00008-of-00008.safetensors",
|
| 383 |
+
"model.layers.13.mlps.1.gate_proj.scales": "model-00008-of-00008.safetensors",
|
| 384 |
+
"model.layers.13.mlps.1.gate_proj.weight": "model-00008-of-00008.safetensors",
|
| 385 |
+
"model.layers.13.mlps.1.up_proj.biases": "model-00008-of-00008.safetensors",
|
| 386 |
+
"model.layers.13.mlps.1.up_proj.scales": "model-00008-of-00008.safetensors",
|
| 387 |
+
"model.layers.13.mlps.1.up_proj.weight": "model-00008-of-00008.safetensors",
|
| 388 |
+
"model.layers.13.post_attention_layernorm.0.weight": "model-00008-of-00008.safetensors",
|
| 389 |
+
"model.layers.13.post_attention_layernorm.1.weight": "model-00008-of-00008.safetensors",
|
| 390 |
+
"model.layers.13.self_attn.0.kv_a_layernorm.weight": "model-00008-of-00008.safetensors",
|
| 391 |
+
"model.layers.13.self_attn.0.kv_a_proj_with_mqa.biases": "model-00008-of-00008.safetensors",
|
| 392 |
+
"model.layers.13.self_attn.0.kv_a_proj_with_mqa.scales": "model-00008-of-00008.safetensors",
|
| 393 |
+
"model.layers.13.self_attn.0.kv_a_proj_with_mqa.weight": "model-00008-of-00008.safetensors",
|
| 394 |
+
"model.layers.13.self_attn.0.kv_b_proj.biases": "model-00008-of-00008.safetensors",
|
| 395 |
+
"model.layers.13.self_attn.0.kv_b_proj.scales": "model-00008-of-00008.safetensors",
|
| 396 |
+
"model.layers.13.self_attn.0.kv_b_proj.weight": "model-00008-of-00008.safetensors",
|
| 397 |
+
"model.layers.13.self_attn.0.o_proj.biases": "model-00008-of-00008.safetensors",
|
| 398 |
+
"model.layers.13.self_attn.0.o_proj.scales": "model-00008-of-00008.safetensors",
|
| 399 |
+
"model.layers.13.self_attn.0.o_proj.weight": "model-00008-of-00008.safetensors",
|
| 400 |
+
"model.layers.13.self_attn.0.q_a_layernorm.weight": "model-00008-of-00008.safetensors",
|
| 401 |
+
"model.layers.13.self_attn.0.q_a_proj.biases": "model-00008-of-00008.safetensors",
|
| 402 |
+
"model.layers.13.self_attn.0.q_a_proj.scales": "model-00008-of-00008.safetensors",
|
| 403 |
+
"model.layers.13.self_attn.0.q_a_proj.weight": "model-00008-of-00008.safetensors",
|
| 404 |
+
"model.layers.13.self_attn.0.q_b_proj.biases": "model-00008-of-00008.safetensors",
|
| 405 |
+
"model.layers.13.self_attn.0.q_b_proj.scales": "model-00008-of-00008.safetensors",
|
| 406 |
+
"model.layers.13.self_attn.0.q_b_proj.weight": "model-00008-of-00008.safetensors",
|
| 407 |
+
"model.layers.13.self_attn.1.kv_a_layernorm.weight": "model-00008-of-00008.safetensors",
|
| 408 |
+
"model.layers.13.self_attn.1.kv_a_proj_with_mqa.biases": "model-00008-of-00008.safetensors",
|
| 409 |
+
"model.layers.13.self_attn.1.kv_a_proj_with_mqa.scales": "model-00008-of-00008.safetensors",
|
| 410 |
+
"model.layers.13.self_attn.1.kv_a_proj_with_mqa.weight": "model-00008-of-00008.safetensors",
|
| 411 |
+
"model.layers.13.self_attn.1.kv_b_proj.biases": "model-00008-of-00008.safetensors",
|
| 412 |
+
"model.layers.13.self_attn.1.kv_b_proj.scales": "model-00008-of-00008.safetensors",
|
| 413 |
+
"model.layers.13.self_attn.1.kv_b_proj.weight": "model-00008-of-00008.safetensors",
|
| 414 |
+
"model.layers.13.self_attn.1.o_proj.biases": "model-00008-of-00008.safetensors",
|
| 415 |
+
"model.layers.13.self_attn.1.o_proj.scales": "model-00008-of-00008.safetensors",
|
| 416 |
+
"model.layers.13.self_attn.1.o_proj.weight": "model-00008-of-00008.safetensors",
|
| 417 |
+
"model.layers.13.self_attn.1.q_a_layernorm.weight": "model-00008-of-00008.safetensors",
|
| 418 |
+
"model.layers.13.self_attn.1.q_a_proj.biases": "model-00008-of-00008.safetensors",
|
| 419 |
+
"model.layers.13.self_attn.1.q_a_proj.scales": "model-00008-of-00008.safetensors",
|
| 420 |
+
"model.layers.13.self_attn.1.q_a_proj.weight": "model-00008-of-00008.safetensors",
|
| 421 |
+
"model.layers.13.self_attn.1.q_b_proj.biases": "model-00008-of-00008.safetensors",
|
| 422 |
+
"model.layers.13.self_attn.1.q_b_proj.scales": "model-00008-of-00008.safetensors",
|
| 423 |
+
"model.layers.13.self_attn.1.q_b_proj.weight": "model-00008-of-00008.safetensors",
|
| 424 |
+
"model.layers.2.input_layernorm.0.weight": "model-00005-of-00008.safetensors",
|
| 425 |
+
"model.layers.2.input_layernorm.1.weight": "model-00005-of-00008.safetensors",
|
| 426 |
+
"model.layers.2.mlp.router.classifier.biases": "model-00005-of-00008.safetensors",
|
| 427 |
+
"model.layers.2.mlp.router.classifier.scales": "model-00005-of-00008.safetensors",
|
| 428 |
+
"model.layers.2.mlp.router.classifier.weight": "model-00005-of-00008.safetensors",
|
| 429 |
+
"model.layers.2.mlp.router.e_score_correction_bias": "model-00005-of-00008.safetensors",
|
| 430 |
+
"model.layers.2.mlp.switch_mlp.down_proj.biases": "model-00005-of-00008.safetensors",
|
| 431 |
+
"model.layers.2.mlp.switch_mlp.down_proj.scales": "model-00005-of-00008.safetensors",
|
| 432 |
+
"model.layers.2.mlp.switch_mlp.down_proj.weight": "model-00005-of-00008.safetensors",
|
| 433 |
+
"model.layers.2.mlp.switch_mlp.gate_proj.biases": "model-00005-of-00008.safetensors",
|
| 434 |
+
"model.layers.2.mlp.switch_mlp.gate_proj.scales": "model-00005-of-00008.safetensors",
|
| 435 |
+
"model.layers.2.mlp.switch_mlp.gate_proj.weight": "model-00005-of-00008.safetensors",
|
| 436 |
+
"model.layers.2.mlp.switch_mlp.up_proj.biases": "model-00005-of-00008.safetensors",
|
| 437 |
+
"model.layers.2.mlp.switch_mlp.up_proj.scales": "model-00005-of-00008.safetensors",
|
| 438 |
+
"model.layers.2.mlp.switch_mlp.up_proj.weight": "model-00005-of-00008.safetensors",
|
| 439 |
+
"model.layers.2.mlps.0.down_proj.biases": "model-00005-of-00008.safetensors",
|
| 440 |
+
"model.layers.2.mlps.0.down_proj.scales": "model-00005-of-00008.safetensors",
|
| 441 |
+
"model.layers.2.mlps.0.down_proj.weight": "model-00005-of-00008.safetensors",
|
| 442 |
+
"model.layers.2.mlps.0.gate_proj.biases": "model-00005-of-00008.safetensors",
|
| 443 |
+
"model.layers.2.mlps.0.gate_proj.scales": "model-00005-of-00008.safetensors",
|
| 444 |
+
"model.layers.2.mlps.0.gate_proj.weight": "model-00005-of-00008.safetensors",
|
| 445 |
+
"model.layers.2.mlps.0.up_proj.biases": "model-00005-of-00008.safetensors",
|
| 446 |
+
"model.layers.2.mlps.0.up_proj.scales": "model-00005-of-00008.safetensors",
|
| 447 |
+
"model.layers.2.mlps.0.up_proj.weight": "model-00005-of-00008.safetensors",
|
| 448 |
+
"model.layers.2.mlps.1.down_proj.biases": "model-00005-of-00008.safetensors",
|
| 449 |
+
"model.layers.2.mlps.1.down_proj.scales": "model-00005-of-00008.safetensors",
|
| 450 |
+
"model.layers.2.mlps.1.down_proj.weight": "model-00005-of-00008.safetensors",
|
| 451 |
+
"model.layers.2.mlps.1.gate_proj.biases": "model-00005-of-00008.safetensors",
|
| 452 |
+
"model.layers.2.mlps.1.gate_proj.scales": "model-00005-of-00008.safetensors",
|
| 453 |
+
"model.layers.2.mlps.1.gate_proj.weight": "model-00005-of-00008.safetensors",
|
| 454 |
+
"model.layers.2.mlps.1.up_proj.biases": "model-00005-of-00008.safetensors",
|
| 455 |
+
"model.layers.2.mlps.1.up_proj.scales": "model-00005-of-00008.safetensors",
|
| 456 |
+
"model.layers.2.mlps.1.up_proj.weight": "model-00005-of-00008.safetensors",
|
| 457 |
+
"model.layers.2.post_attention_layernorm.0.weight": "model-00005-of-00008.safetensors",
|
| 458 |
+
"model.layers.2.post_attention_layernorm.1.weight": "model-00005-of-00008.safetensors",
|
| 459 |
+
"model.layers.2.self_attn.0.kv_a_layernorm.weight": "model-00005-of-00008.safetensors",
|
| 460 |
+
"model.layers.2.self_attn.0.kv_a_proj_with_mqa.biases": "model-00005-of-00008.safetensors",
|
| 461 |
+
"model.layers.2.self_attn.0.kv_a_proj_with_mqa.scales": "model-00005-of-00008.safetensors",
|
| 462 |
+
"model.layers.2.self_attn.0.kv_a_proj_with_mqa.weight": "model-00005-of-00008.safetensors",
|
| 463 |
+
"model.layers.2.self_attn.0.kv_b_proj.biases": "model-00005-of-00008.safetensors",
|
| 464 |
+
"model.layers.2.self_attn.0.kv_b_proj.scales": "model-00005-of-00008.safetensors",
|
| 465 |
+
"model.layers.2.self_attn.0.kv_b_proj.weight": "model-00005-of-00008.safetensors",
|
| 466 |
+
"model.layers.2.self_attn.0.o_proj.biases": "model-00005-of-00008.safetensors",
|
| 467 |
+
"model.layers.2.self_attn.0.o_proj.scales": "model-00005-of-00008.safetensors",
|
| 468 |
+
"model.layers.2.self_attn.0.o_proj.weight": "model-00005-of-00008.safetensors",
|
| 469 |
+
"model.layers.2.self_attn.0.q_a_layernorm.weight": "model-00005-of-00008.safetensors",
|
| 470 |
+
"model.layers.2.self_attn.0.q_a_proj.biases": "model-00005-of-00008.safetensors",
|
| 471 |
+
"model.layers.2.self_attn.0.q_a_proj.scales": "model-00005-of-00008.safetensors",
|
| 472 |
+
"model.layers.2.self_attn.0.q_a_proj.weight": "model-00005-of-00008.safetensors",
|
| 473 |
+
"model.layers.2.self_attn.0.q_b_proj.biases": "model-00005-of-00008.safetensors",
|
| 474 |
+
"model.layers.2.self_attn.0.q_b_proj.scales": "model-00005-of-00008.safetensors",
|
| 475 |
+
"model.layers.2.self_attn.0.q_b_proj.weight": "model-00005-of-00008.safetensors",
|
| 476 |
+
"model.layers.2.self_attn.1.kv_a_layernorm.weight": "model-00005-of-00008.safetensors",
|
| 477 |
+
"model.layers.2.self_attn.1.kv_a_proj_with_mqa.biases": "model-00005-of-00008.safetensors",
|
| 478 |
+
"model.layers.2.self_attn.1.kv_a_proj_with_mqa.scales": "model-00005-of-00008.safetensors",
|
| 479 |
+
"model.layers.2.self_attn.1.kv_a_proj_with_mqa.weight": "model-00005-of-00008.safetensors",
|
| 480 |
+
"model.layers.2.self_attn.1.kv_b_proj.biases": "model-00005-of-00008.safetensors",
|
| 481 |
+
"model.layers.2.self_attn.1.kv_b_proj.scales": "model-00005-of-00008.safetensors",
|
| 482 |
+
"model.layers.2.self_attn.1.kv_b_proj.weight": "model-00005-of-00008.safetensors",
|
| 483 |
+
"model.layers.2.self_attn.1.o_proj.biases": "model-00005-of-00008.safetensors",
|
| 484 |
+
"model.layers.2.self_attn.1.o_proj.scales": "model-00005-of-00008.safetensors",
|
| 485 |
+
"model.layers.2.self_attn.1.o_proj.weight": "model-00005-of-00008.safetensors",
|
| 486 |
+
"model.layers.2.self_attn.1.q_a_layernorm.weight": "model-00005-of-00008.safetensors",
|
| 487 |
+
"model.layers.2.self_attn.1.q_a_proj.biases": "model-00005-of-00008.safetensors",
|
| 488 |
+
"model.layers.2.self_attn.1.q_a_proj.scales": "model-00005-of-00008.safetensors",
|
| 489 |
+
"model.layers.2.self_attn.1.q_a_proj.weight": "model-00005-of-00008.safetensors",
|
| 490 |
+
"model.layers.2.self_attn.1.q_b_proj.biases": "model-00005-of-00008.safetensors",
|
| 491 |
+
"model.layers.2.self_attn.1.q_b_proj.scales": "model-00005-of-00008.safetensors",
|
| 492 |
+
"model.layers.2.self_attn.1.q_b_proj.weight": "model-00005-of-00008.safetensors",
|
| 493 |
+
"model.layers.3.input_layernorm.0.weight": "model-00005-of-00008.safetensors",
|
| 494 |
+
"model.layers.3.input_layernorm.1.weight": "model-00005-of-00008.safetensors",
|
| 495 |
+
"model.layers.3.mlp.router.classifier.biases": "model-00005-of-00008.safetensors",
|
| 496 |
+
"model.layers.3.mlp.router.classifier.scales": "model-00005-of-00008.safetensors",
|
| 497 |
+
"model.layers.3.mlp.router.classifier.weight": "model-00005-of-00008.safetensors",
|
| 498 |
+
"model.layers.3.mlp.router.e_score_correction_bias": "model-00005-of-00008.safetensors",
|
| 499 |
+
"model.layers.3.mlp.switch_mlp.down_proj.biases": "model-00005-of-00008.safetensors",
|
| 500 |
+
"model.layers.3.mlp.switch_mlp.down_proj.scales": "model-00005-of-00008.safetensors",
|
| 501 |
+
"model.layers.3.mlp.switch_mlp.down_proj.weight": "model-00005-of-00008.safetensors",
|
| 502 |
+
"model.layers.3.mlp.switch_mlp.gate_proj.biases": "model-00005-of-00008.safetensors",
|
| 503 |
+
"model.layers.3.mlp.switch_mlp.gate_proj.scales": "model-00005-of-00008.safetensors",
|
| 504 |
+
"model.layers.3.mlp.switch_mlp.gate_proj.weight": "model-00005-of-00008.safetensors",
|
| 505 |
+
"model.layers.3.mlp.switch_mlp.up_proj.biases": "model-00005-of-00008.safetensors",
|
| 506 |
+
"model.layers.3.mlp.switch_mlp.up_proj.scales": "model-00005-of-00008.safetensors",
|
| 507 |
+
"model.layers.3.mlp.switch_mlp.up_proj.weight": "model-00005-of-00008.safetensors",
|
| 508 |
+
"model.layers.3.mlps.0.down_proj.biases": "model-00005-of-00008.safetensors",
|
| 509 |
+
"model.layers.3.mlps.0.down_proj.scales": "model-00005-of-00008.safetensors",
|
| 510 |
+
"model.layers.3.mlps.0.down_proj.weight": "model-00005-of-00008.safetensors",
|
| 511 |
+
"model.layers.3.mlps.0.gate_proj.biases": "model-00005-of-00008.safetensors",
|
| 512 |
+
"model.layers.3.mlps.0.gate_proj.scales": "model-00005-of-00008.safetensors",
|
| 513 |
+
"model.layers.3.mlps.0.gate_proj.weight": "model-00005-of-00008.safetensors",
|
| 514 |
+
"model.layers.3.mlps.0.up_proj.biases": "model-00005-of-00008.safetensors",
|
| 515 |
+
"model.layers.3.mlps.0.up_proj.scales": "model-00005-of-00008.safetensors",
|
| 516 |
+
"model.layers.3.mlps.0.up_proj.weight": "model-00005-of-00008.safetensors",
|
| 517 |
+
"model.layers.3.mlps.1.down_proj.biases": "model-00005-of-00008.safetensors",
|
| 518 |
+
"model.layers.3.mlps.1.down_proj.scales": "model-00005-of-00008.safetensors",
|
| 519 |
+
"model.layers.3.mlps.1.down_proj.weight": "model-00005-of-00008.safetensors",
|
| 520 |
+
"model.layers.3.mlps.1.gate_proj.biases": "model-00005-of-00008.safetensors",
|
| 521 |
+
"model.layers.3.mlps.1.gate_proj.scales": "model-00005-of-00008.safetensors",
|
| 522 |
+
"model.layers.3.mlps.1.gate_proj.weight": "model-00005-of-00008.safetensors",
|
| 523 |
+
"model.layers.3.mlps.1.up_proj.biases": "model-00005-of-00008.safetensors",
|
| 524 |
+
"model.layers.3.mlps.1.up_proj.scales": "model-00005-of-00008.safetensors",
|
| 525 |
+
"model.layers.3.mlps.1.up_proj.weight": "model-00005-of-00008.safetensors",
|
| 526 |
+
"model.layers.3.post_attention_layernorm.0.weight": "model-00005-of-00008.safetensors",
|
| 527 |
+
"model.layers.3.post_attention_layernorm.1.weight": "model-00005-of-00008.safetensors",
|
| 528 |
+
"model.layers.3.self_attn.0.kv_a_layernorm.weight": "model-00005-of-00008.safetensors",
|
| 529 |
+
"model.layers.3.self_attn.0.kv_a_proj_with_mqa.biases": "model-00005-of-00008.safetensors",
|
| 530 |
+
"model.layers.3.self_attn.0.kv_a_proj_with_mqa.scales": "model-00005-of-00008.safetensors",
|
| 531 |
+
"model.layers.3.self_attn.0.kv_a_proj_with_mqa.weight": "model-00005-of-00008.safetensors",
|
| 532 |
+
"model.layers.3.self_attn.0.kv_b_proj.biases": "model-00005-of-00008.safetensors",
|
| 533 |
+
"model.layers.3.self_attn.0.kv_b_proj.scales": "model-00005-of-00008.safetensors",
|
| 534 |
+
"model.layers.3.self_attn.0.kv_b_proj.weight": "model-00005-of-00008.safetensors",
|
| 535 |
+
"model.layers.3.self_attn.0.o_proj.biases": "model-00005-of-00008.safetensors",
|
| 536 |
+
"model.layers.3.self_attn.0.o_proj.scales": "model-00005-of-00008.safetensors",
|
| 537 |
+
"model.layers.3.self_attn.0.o_proj.weight": "model-00005-of-00008.safetensors",
|
| 538 |
+
"model.layers.3.self_attn.0.q_a_layernorm.weight": "model-00005-of-00008.safetensors",
|
| 539 |
+
"model.layers.3.self_attn.0.q_a_proj.biases": "model-00005-of-00008.safetensors",
|
| 540 |
+
"model.layers.3.self_attn.0.q_a_proj.scales": "model-00005-of-00008.safetensors",
|
| 541 |
+
"model.layers.3.self_attn.0.q_a_proj.weight": "model-00005-of-00008.safetensors",
|
| 542 |
+
"model.layers.3.self_attn.0.q_b_proj.biases": "model-00005-of-00008.safetensors",
|
| 543 |
+
"model.layers.3.self_attn.0.q_b_proj.scales": "model-00005-of-00008.safetensors",
|
| 544 |
+
"model.layers.3.self_attn.0.q_b_proj.weight": "model-00005-of-00008.safetensors",
|
| 545 |
+
"model.layers.3.self_attn.1.kv_a_layernorm.weight": "model-00005-of-00008.safetensors",
|
| 546 |
+
"model.layers.3.self_attn.1.kv_a_proj_with_mqa.biases": "model-00005-of-00008.safetensors",
|
| 547 |
+
"model.layers.3.self_attn.1.kv_a_proj_with_mqa.scales": "model-00005-of-00008.safetensors",
|
| 548 |
+
"model.layers.3.self_attn.1.kv_a_proj_with_mqa.weight": "model-00005-of-00008.safetensors",
|
| 549 |
+
"model.layers.3.self_attn.1.kv_b_proj.biases": "model-00005-of-00008.safetensors",
|
| 550 |
+
"model.layers.3.self_attn.1.kv_b_proj.scales": "model-00005-of-00008.safetensors",
|
| 551 |
+
"model.layers.3.self_attn.1.kv_b_proj.weight": "model-00005-of-00008.safetensors",
|
| 552 |
+
"model.layers.3.self_attn.1.o_proj.biases": "model-00005-of-00008.safetensors",
|
| 553 |
+
"model.layers.3.self_attn.1.o_proj.scales": "model-00005-of-00008.safetensors",
|
| 554 |
+
"model.layers.3.self_attn.1.o_proj.weight": "model-00005-of-00008.safetensors",
|
| 555 |
+
"model.layers.3.self_attn.1.q_a_layernorm.weight": "model-00005-of-00008.safetensors",
|
| 556 |
+
"model.layers.3.self_attn.1.q_a_proj.biases": "model-00005-of-00008.safetensors",
|
| 557 |
+
"model.layers.3.self_attn.1.q_a_proj.scales": "model-00005-of-00008.safetensors",
|
| 558 |
+
"model.layers.3.self_attn.1.q_a_proj.weight": "model-00005-of-00008.safetensors",
|
| 559 |
+
"model.layers.3.self_attn.1.q_b_proj.biases": "model-00005-of-00008.safetensors",
|
| 560 |
+
"model.layers.3.self_attn.1.q_b_proj.scales": "model-00005-of-00008.safetensors",
|
| 561 |
+
"model.layers.3.self_attn.1.q_b_proj.weight": "model-00005-of-00008.safetensors",
|
| 562 |
+
"model.layers.4.input_layernorm.0.weight": "model-00006-of-00008.safetensors",
|
| 563 |
+
"model.layers.4.input_layernorm.1.weight": "model-00006-of-00008.safetensors",
|
| 564 |
+
"model.layers.4.mlp.router.classifier.biases": "model-00006-of-00008.safetensors",
|
| 565 |
+
"model.layers.4.mlp.router.classifier.scales": "model-00006-of-00008.safetensors",
|
| 566 |
+
"model.layers.4.mlp.router.classifier.weight": "model-00006-of-00008.safetensors",
|
| 567 |
+
"model.layers.4.mlp.router.e_score_correction_bias": "model-00006-of-00008.safetensors",
|
| 568 |
+
"model.layers.4.mlp.switch_mlp.down_proj.biases": "model-00006-of-00008.safetensors",
|
| 569 |
+
"model.layers.4.mlp.switch_mlp.down_proj.scales": "model-00006-of-00008.safetensors",
|
| 570 |
+
"model.layers.4.mlp.switch_mlp.down_proj.weight": "model-00006-of-00008.safetensors",
|
| 571 |
+
"model.layers.4.mlp.switch_mlp.gate_proj.biases": "model-00006-of-00008.safetensors",
|
| 572 |
+
"model.layers.4.mlp.switch_mlp.gate_proj.scales": "model-00005-of-00008.safetensors",
|
| 573 |
+
"model.layers.4.mlp.switch_mlp.gate_proj.weight": "model-00005-of-00008.safetensors",
|
| 574 |
+
"model.layers.4.mlp.switch_mlp.up_proj.biases": "model-00006-of-00008.safetensors",
|
| 575 |
+
"model.layers.4.mlp.switch_mlp.up_proj.scales": "model-00006-of-00008.safetensors",
|
| 576 |
+
"model.layers.4.mlp.switch_mlp.up_proj.weight": "model-00006-of-00008.safetensors",
|
| 577 |
+
"model.layers.4.mlps.0.down_proj.biases": "model-00006-of-00008.safetensors",
|
| 578 |
+
"model.layers.4.mlps.0.down_proj.scales": "model-00006-of-00008.safetensors",
|
| 579 |
+
"model.layers.4.mlps.0.down_proj.weight": "model-00006-of-00008.safetensors",
|
| 580 |
+
"model.layers.4.mlps.0.gate_proj.biases": "model-00006-of-00008.safetensors",
|
| 581 |
+
"model.layers.4.mlps.0.gate_proj.scales": "model-00006-of-00008.safetensors",
|
| 582 |
+
"model.layers.4.mlps.0.gate_proj.weight": "model-00006-of-00008.safetensors",
|
| 583 |
+
"model.layers.4.mlps.0.up_proj.biases": "model-00006-of-00008.safetensors",
|
| 584 |
+
"model.layers.4.mlps.0.up_proj.scales": "model-00006-of-00008.safetensors",
|
| 585 |
+
"model.layers.4.mlps.0.up_proj.weight": "model-00006-of-00008.safetensors",
|
| 586 |
+
"model.layers.4.mlps.1.down_proj.biases": "model-00006-of-00008.safetensors",
|
| 587 |
+
"model.layers.4.mlps.1.down_proj.scales": "model-00006-of-00008.safetensors",
|
| 588 |
+
"model.layers.4.mlps.1.down_proj.weight": "model-00006-of-00008.safetensors",
|
| 589 |
+
"model.layers.4.mlps.1.gate_proj.biases": "model-00006-of-00008.safetensors",
|
| 590 |
+
"model.layers.4.mlps.1.gate_proj.scales": "model-00006-of-00008.safetensors",
|
| 591 |
+
"model.layers.4.mlps.1.gate_proj.weight": "model-00006-of-00008.safetensors",
|
| 592 |
+
"model.layers.4.mlps.1.up_proj.biases": "model-00006-of-00008.safetensors",
|
| 593 |
+
"model.layers.4.mlps.1.up_proj.scales": "model-00006-of-00008.safetensors",
|
| 594 |
+
"model.layers.4.mlps.1.up_proj.weight": "model-00006-of-00008.safetensors",
|
| 595 |
+
"model.layers.4.post_attention_layernorm.0.weight": "model-00006-of-00008.safetensors",
|
| 596 |
+
"model.layers.4.post_attention_layernorm.1.weight": "model-00006-of-00008.safetensors",
|
| 597 |
+
"model.layers.4.self_attn.0.kv_a_layernorm.weight": "model-00006-of-00008.safetensors",
|
| 598 |
+
"model.layers.4.self_attn.0.kv_a_proj_with_mqa.biases": "model-00006-of-00008.safetensors",
|
| 599 |
+
"model.layers.4.self_attn.0.kv_a_proj_with_mqa.scales": "model-00006-of-00008.safetensors",
|
| 600 |
+
"model.layers.4.self_attn.0.kv_a_proj_with_mqa.weight": "model-00006-of-00008.safetensors",
|
| 601 |
+
"model.layers.4.self_attn.0.kv_b_proj.biases": "model-00006-of-00008.safetensors",
|
| 602 |
+
"model.layers.4.self_attn.0.kv_b_proj.scales": "model-00006-of-00008.safetensors",
|
| 603 |
+
"model.layers.4.self_attn.0.kv_b_proj.weight": "model-00006-of-00008.safetensors",
|
| 604 |
+
"model.layers.4.self_attn.0.o_proj.biases": "model-00006-of-00008.safetensors",
|
| 605 |
+
"model.layers.4.self_attn.0.o_proj.scales": "model-00006-of-00008.safetensors",
|
| 606 |
+
"model.layers.4.self_attn.0.o_proj.weight": "model-00006-of-00008.safetensors",
|
| 607 |
+
"model.layers.4.self_attn.0.q_a_layernorm.weight": "model-00006-of-00008.safetensors",
|
| 608 |
+
"model.layers.4.self_attn.0.q_a_proj.biases": "model-00006-of-00008.safetensors",
|
| 609 |
+
"model.layers.4.self_attn.0.q_a_proj.scales": "model-00006-of-00008.safetensors",
|
| 610 |
+
"model.layers.4.self_attn.0.q_a_proj.weight": "model-00006-of-00008.safetensors",
|
| 611 |
+
"model.layers.4.self_attn.0.q_b_proj.biases": "model-00006-of-00008.safetensors",
|
| 612 |
+
"model.layers.4.self_attn.0.q_b_proj.scales": "model-00006-of-00008.safetensors",
|
| 613 |
+
"model.layers.4.self_attn.0.q_b_proj.weight": "model-00006-of-00008.safetensors",
|
| 614 |
+
"model.layers.4.self_attn.1.kv_a_layernorm.weight": "model-00006-of-00008.safetensors",
|
| 615 |
+
"model.layers.4.self_attn.1.kv_a_proj_with_mqa.biases": "model-00006-of-00008.safetensors",
|
| 616 |
+
"model.layers.4.self_attn.1.kv_a_proj_with_mqa.scales": "model-00006-of-00008.safetensors",
|
| 617 |
+
"model.layers.4.self_attn.1.kv_a_proj_with_mqa.weight": "model-00006-of-00008.safetensors",
|
| 618 |
+
"model.layers.4.self_attn.1.kv_b_proj.biases": "model-00006-of-00008.safetensors",
|
| 619 |
+
"model.layers.4.self_attn.1.kv_b_proj.scales": "model-00006-of-00008.safetensors",
|
| 620 |
+
"model.layers.4.self_attn.1.kv_b_proj.weight": "model-00006-of-00008.safetensors",
|
| 621 |
+
"model.layers.4.self_attn.1.o_proj.biases": "model-00006-of-00008.safetensors",
|
| 622 |
+
"model.layers.4.self_attn.1.o_proj.scales": "model-00006-of-00008.safetensors",
|
| 623 |
+
"model.layers.4.self_attn.1.o_proj.weight": "model-00006-of-00008.safetensors",
|
| 624 |
+
"model.layers.4.self_attn.1.q_a_layernorm.weight": "model-00006-of-00008.safetensors",
|
| 625 |
+
"model.layers.4.self_attn.1.q_a_proj.biases": "model-00006-of-00008.safetensors",
|
| 626 |
+
"model.layers.4.self_attn.1.q_a_proj.scales": "model-00006-of-00008.safetensors",
|
| 627 |
+
"model.layers.4.self_attn.1.q_a_proj.weight": "model-00006-of-00008.safetensors",
|
| 628 |
+
"model.layers.4.self_attn.1.q_b_proj.biases": "model-00006-of-00008.safetensors",
|
| 629 |
+
"model.layers.4.self_attn.1.q_b_proj.scales": "model-00006-of-00008.safetensors",
|
| 630 |
+
"model.layers.4.self_attn.1.q_b_proj.weight": "model-00006-of-00008.safetensors",
|
| 631 |
+
"model.layers.5.input_layernorm.0.weight": "model-00006-of-00008.safetensors",
|
| 632 |
+
"model.layers.5.input_layernorm.1.weight": "model-00006-of-00008.safetensors",
|
| 633 |
+
"model.layers.5.mlp.router.classifier.biases": "model-00006-of-00008.safetensors",
|
| 634 |
+
"model.layers.5.mlp.router.classifier.scales": "model-00006-of-00008.safetensors",
|
| 635 |
+
"model.layers.5.mlp.router.classifier.weight": "model-00006-of-00008.safetensors",
|
| 636 |
+
"model.layers.5.mlp.router.e_score_correction_bias": "model-00006-of-00008.safetensors",
|
| 637 |
+
"model.layers.5.mlp.switch_mlp.down_proj.biases": "model-00006-of-00008.safetensors",
|
| 638 |
+
"model.layers.5.mlp.switch_mlp.down_proj.scales": "model-00006-of-00008.safetensors",
|
| 639 |
+
"model.layers.5.mlp.switch_mlp.down_proj.weight": "model-00006-of-00008.safetensors",
|
| 640 |
+
"model.layers.5.mlp.switch_mlp.gate_proj.biases": "model-00006-of-00008.safetensors",
|
| 641 |
+
"model.layers.5.mlp.switch_mlp.gate_proj.scales": "model-00006-of-00008.safetensors",
|
| 642 |
+
"model.layers.5.mlp.switch_mlp.gate_proj.weight": "model-00006-of-00008.safetensors",
|
| 643 |
+
"model.layers.5.mlp.switch_mlp.up_proj.biases": "model-00006-of-00008.safetensors",
|
| 644 |
+
"model.layers.5.mlp.switch_mlp.up_proj.scales": "model-00006-of-00008.safetensors",
|
| 645 |
+
"model.layers.5.mlp.switch_mlp.up_proj.weight": "model-00006-of-00008.safetensors",
|
| 646 |
+
"model.layers.5.mlps.0.down_proj.biases": "model-00006-of-00008.safetensors",
|
| 647 |
+
"model.layers.5.mlps.0.down_proj.scales": "model-00006-of-00008.safetensors",
|
| 648 |
+
"model.layers.5.mlps.0.down_proj.weight": "model-00006-of-00008.safetensors",
|
| 649 |
+
"model.layers.5.mlps.0.gate_proj.biases": "model-00006-of-00008.safetensors",
|
| 650 |
+
"model.layers.5.mlps.0.gate_proj.scales": "model-00006-of-00008.safetensors",
|
| 651 |
+
"model.layers.5.mlps.0.gate_proj.weight": "model-00006-of-00008.safetensors",
|
| 652 |
+
"model.layers.5.mlps.0.up_proj.biases": "model-00006-of-00008.safetensors",
|
| 653 |
+
"model.layers.5.mlps.0.up_proj.scales": "model-00006-of-00008.safetensors",
|
| 654 |
+
"model.layers.5.mlps.0.up_proj.weight": "model-00006-of-00008.safetensors",
|
| 655 |
+
"model.layers.5.mlps.1.down_proj.biases": "model-00006-of-00008.safetensors",
|
| 656 |
+
"model.layers.5.mlps.1.down_proj.scales": "model-00006-of-00008.safetensors",
|
| 657 |
+
"model.layers.5.mlps.1.down_proj.weight": "model-00006-of-00008.safetensors",
|
| 658 |
+
"model.layers.5.mlps.1.gate_proj.biases": "model-00006-of-00008.safetensors",
|
| 659 |
+
"model.layers.5.mlps.1.gate_proj.scales": "model-00006-of-00008.safetensors",
|
| 660 |
+
"model.layers.5.mlps.1.gate_proj.weight": "model-00006-of-00008.safetensors",
|
| 661 |
+
"model.layers.5.mlps.1.up_proj.biases": "model-00006-of-00008.safetensors",
|
| 662 |
+
"model.layers.5.mlps.1.up_proj.scales": "model-00006-of-00008.safetensors",
|
| 663 |
+
"model.layers.5.mlps.1.up_proj.weight": "model-00006-of-00008.safetensors",
|
| 664 |
+
"model.layers.5.post_attention_layernorm.0.weight": "model-00006-of-00008.safetensors",
|
| 665 |
+
"model.layers.5.post_attention_layernorm.1.weight": "model-00006-of-00008.safetensors",
|
| 666 |
+
"model.layers.5.self_attn.0.kv_a_layernorm.weight": "model-00006-of-00008.safetensors",
|
| 667 |
+
"model.layers.5.self_attn.0.kv_a_proj_with_mqa.biases": "model-00006-of-00008.safetensors",
|
| 668 |
+
"model.layers.5.self_attn.0.kv_a_proj_with_mqa.scales": "model-00006-of-00008.safetensors",
|
| 669 |
+
"model.layers.5.self_attn.0.kv_a_proj_with_mqa.weight": "model-00006-of-00008.safetensors",
|
| 670 |
+
"model.layers.5.self_attn.0.kv_b_proj.biases": "model-00006-of-00008.safetensors",
|
| 671 |
+
"model.layers.5.self_attn.0.kv_b_proj.scales": "model-00006-of-00008.safetensors",
|
| 672 |
+
"model.layers.5.self_attn.0.kv_b_proj.weight": "model-00006-of-00008.safetensors",
|
| 673 |
+
"model.layers.5.self_attn.0.o_proj.biases": "model-00006-of-00008.safetensors",
|
| 674 |
+
"model.layers.5.self_attn.0.o_proj.scales": "model-00006-of-00008.safetensors",
|
| 675 |
+
"model.layers.5.self_attn.0.o_proj.weight": "model-00006-of-00008.safetensors",
|
| 676 |
+
"model.layers.5.self_attn.0.q_a_layernorm.weight": "model-00006-of-00008.safetensors",
|
| 677 |
+
"model.layers.5.self_attn.0.q_a_proj.biases": "model-00006-of-00008.safetensors",
|
| 678 |
+
"model.layers.5.self_attn.0.q_a_proj.scales": "model-00006-of-00008.safetensors",
|
| 679 |
+
"model.layers.5.self_attn.0.q_a_proj.weight": "model-00006-of-00008.safetensors",
|
| 680 |
+
"model.layers.5.self_attn.0.q_b_proj.biases": "model-00006-of-00008.safetensors",
|
| 681 |
+
"model.layers.5.self_attn.0.q_b_proj.scales": "model-00006-of-00008.safetensors",
|
| 682 |
+
"model.layers.5.self_attn.0.q_b_proj.weight": "model-00006-of-00008.safetensors",
|
| 683 |
+
"model.layers.5.self_attn.1.kv_a_layernorm.weight": "model-00006-of-00008.safetensors",
|
| 684 |
+
"model.layers.5.self_attn.1.kv_a_proj_with_mqa.biases": "model-00006-of-00008.safetensors",
|
| 685 |
+
"model.layers.5.self_attn.1.kv_a_proj_with_mqa.scales": "model-00006-of-00008.safetensors",
|
| 686 |
+
"model.layers.5.self_attn.1.kv_a_proj_with_mqa.weight": "model-00006-of-00008.safetensors",
|
| 687 |
+
"model.layers.5.self_attn.1.kv_b_proj.biases": "model-00006-of-00008.safetensors",
|
| 688 |
+
"model.layers.5.self_attn.1.kv_b_proj.scales": "model-00006-of-00008.safetensors",
|
| 689 |
+
"model.layers.5.self_attn.1.kv_b_proj.weight": "model-00006-of-00008.safetensors",
|
| 690 |
+
"model.layers.5.self_attn.1.o_proj.biases": "model-00006-of-00008.safetensors",
|
| 691 |
+
"model.layers.5.self_attn.1.o_proj.scales": "model-00006-of-00008.safetensors",
|
| 692 |
+
"model.layers.5.self_attn.1.o_proj.weight": "model-00006-of-00008.safetensors",
|
| 693 |
+
"model.layers.5.self_attn.1.q_a_layernorm.weight": "model-00006-of-00008.safetensors",
|
| 694 |
+
"model.layers.5.self_attn.1.q_a_proj.biases": "model-00006-of-00008.safetensors",
|
| 695 |
+
"model.layers.5.self_attn.1.q_a_proj.scales": "model-00006-of-00008.safetensors",
|
| 696 |
+
"model.layers.5.self_attn.1.q_a_proj.weight": "model-00006-of-00008.safetensors",
|
| 697 |
+
"model.layers.5.self_attn.1.q_b_proj.biases": "model-00006-of-00008.safetensors",
|
| 698 |
+
"model.layers.5.self_attn.1.q_b_proj.scales": "model-00006-of-00008.safetensors",
|
| 699 |
+
"model.layers.5.self_attn.1.q_b_proj.weight": "model-00006-of-00008.safetensors",
|
| 700 |
+
"model.layers.6.input_layernorm.0.weight": "model-00006-of-00008.safetensors",
|
| 701 |
+
"model.layers.6.input_layernorm.1.weight": "model-00006-of-00008.safetensors",
|
| 702 |
+
"model.layers.6.mlp.router.classifier.biases": "model-00006-of-00008.safetensors",
|
| 703 |
+
"model.layers.6.mlp.router.classifier.scales": "model-00006-of-00008.safetensors",
|
| 704 |
+
"model.layers.6.mlp.router.classifier.weight": "model-00006-of-00008.safetensors",
|
| 705 |
+
"model.layers.6.mlp.router.e_score_correction_bias": "model-00006-of-00008.safetensors",
|
| 706 |
+
"model.layers.6.mlp.switch_mlp.down_proj.biases": "model-00006-of-00008.safetensors",
|
| 707 |
+
"model.layers.6.mlp.switch_mlp.down_proj.scales": "model-00006-of-00008.safetensors",
|
| 708 |
+
"model.layers.6.mlp.switch_mlp.down_proj.weight": "model-00006-of-00008.safetensors",
|
| 709 |
+
"model.layers.6.mlp.switch_mlp.gate_proj.biases": "model-00006-of-00008.safetensors",
|
| 710 |
+
"model.layers.6.mlp.switch_mlp.gate_proj.scales": "model-00006-of-00008.safetensors",
|
| 711 |
+
"model.layers.6.mlp.switch_mlp.gate_proj.weight": "model-00006-of-00008.safetensors",
|
| 712 |
+
"model.layers.6.mlp.switch_mlp.up_proj.biases": "model-00006-of-00008.safetensors",
|
| 713 |
+
"model.layers.6.mlp.switch_mlp.up_proj.scales": "model-00006-of-00008.safetensors",
|
| 714 |
+
"model.layers.6.mlp.switch_mlp.up_proj.weight": "model-00006-of-00008.safetensors",
|
| 715 |
+
"model.layers.6.mlps.0.down_proj.biases": "model-00006-of-00008.safetensors",
|
| 716 |
+
"model.layers.6.mlps.0.down_proj.scales": "model-00006-of-00008.safetensors",
|
| 717 |
+
"model.layers.6.mlps.0.down_proj.weight": "model-00006-of-00008.safetensors",
|
| 718 |
+
"model.layers.6.mlps.0.gate_proj.biases": "model-00006-of-00008.safetensors",
|
| 719 |
+
"model.layers.6.mlps.0.gate_proj.scales": "model-00006-of-00008.safetensors",
|
| 720 |
+
"model.layers.6.mlps.0.gate_proj.weight": "model-00006-of-00008.safetensors",
|
| 721 |
+
"model.layers.6.mlps.0.up_proj.biases": "model-00006-of-00008.safetensors",
|
| 722 |
+
"model.layers.6.mlps.0.up_proj.scales": "model-00006-of-00008.safetensors",
|
| 723 |
+
"model.layers.6.mlps.0.up_proj.weight": "model-00006-of-00008.safetensors",
|
| 724 |
+
"model.layers.6.mlps.1.down_proj.biases": "model-00006-of-00008.safetensors",
|
| 725 |
+
"model.layers.6.mlps.1.down_proj.scales": "model-00006-of-00008.safetensors",
|
| 726 |
+
"model.layers.6.mlps.1.down_proj.weight": "model-00006-of-00008.safetensors",
|
| 727 |
+
"model.layers.6.mlps.1.gate_proj.biases": "model-00006-of-00008.safetensors",
|
| 728 |
+
"model.layers.6.mlps.1.gate_proj.scales": "model-00006-of-00008.safetensors",
|
| 729 |
+
"model.layers.6.mlps.1.gate_proj.weight": "model-00006-of-00008.safetensors",
|
| 730 |
+
"model.layers.6.mlps.1.up_proj.biases": "model-00006-of-00008.safetensors",
|
| 731 |
+
"model.layers.6.mlps.1.up_proj.scales": "model-00006-of-00008.safetensors",
|
| 732 |
+
"model.layers.6.mlps.1.up_proj.weight": "model-00006-of-00008.safetensors",
|
| 733 |
+
"model.layers.6.post_attention_layernorm.0.weight": "model-00006-of-00008.safetensors",
|
| 734 |
+
"model.layers.6.post_attention_layernorm.1.weight": "model-00006-of-00008.safetensors",
|
| 735 |
+
"model.layers.6.self_attn.0.kv_a_layernorm.weight": "model-00006-of-00008.safetensors",
|
| 736 |
+
"model.layers.6.self_attn.0.kv_a_proj_with_mqa.biases": "model-00006-of-00008.safetensors",
|
| 737 |
+
"model.layers.6.self_attn.0.kv_a_proj_with_mqa.scales": "model-00006-of-00008.safetensors",
|
| 738 |
+
"model.layers.6.self_attn.0.kv_a_proj_with_mqa.weight": "model-00006-of-00008.safetensors",
|
| 739 |
+
"model.layers.6.self_attn.0.kv_b_proj.biases": "model-00006-of-00008.safetensors",
|
| 740 |
+
"model.layers.6.self_attn.0.kv_b_proj.scales": "model-00006-of-00008.safetensors",
|
| 741 |
+
"model.layers.6.self_attn.0.kv_b_proj.weight": "model-00006-of-00008.safetensors",
|
| 742 |
+
"model.layers.6.self_attn.0.o_proj.biases": "model-00006-of-00008.safetensors",
|
| 743 |
+
"model.layers.6.self_attn.0.o_proj.scales": "model-00006-of-00008.safetensors",
|
| 744 |
+
"model.layers.6.self_attn.0.o_proj.weight": "model-00006-of-00008.safetensors",
|
| 745 |
+
"model.layers.6.self_attn.0.q_a_layernorm.weight": "model-00006-of-00008.safetensors",
|
| 746 |
+
"model.layers.6.self_attn.0.q_a_proj.biases": "model-00006-of-00008.safetensors",
|
| 747 |
+
"model.layers.6.self_attn.0.q_a_proj.scales": "model-00006-of-00008.safetensors",
|
| 748 |
+
"model.layers.6.self_attn.0.q_a_proj.weight": "model-00006-of-00008.safetensors",
|
| 749 |
+
"model.layers.6.self_attn.0.q_b_proj.biases": "model-00006-of-00008.safetensors",
|
| 750 |
+
"model.layers.6.self_attn.0.q_b_proj.scales": "model-00006-of-00008.safetensors",
|
| 751 |
+
"model.layers.6.self_attn.0.q_b_proj.weight": "model-00006-of-00008.safetensors",
|
| 752 |
+
"model.layers.6.self_attn.1.kv_a_layernorm.weight": "model-00006-of-00008.safetensors",
|
| 753 |
+
"model.layers.6.self_attn.1.kv_a_proj_with_mqa.biases": "model-00006-of-00008.safetensors",
|
| 754 |
+
"model.layers.6.self_attn.1.kv_a_proj_with_mqa.scales": "model-00006-of-00008.safetensors",
|
| 755 |
+
"model.layers.6.self_attn.1.kv_a_proj_with_mqa.weight": "model-00006-of-00008.safetensors",
|
| 756 |
+
"model.layers.6.self_attn.1.kv_b_proj.biases": "model-00006-of-00008.safetensors",
|
| 757 |
+
"model.layers.6.self_attn.1.kv_b_proj.scales": "model-00006-of-00008.safetensors",
|
| 758 |
+
"model.layers.6.self_attn.1.kv_b_proj.weight": "model-00006-of-00008.safetensors",
|
| 759 |
+
"model.layers.6.self_attn.1.o_proj.biases": "model-00006-of-00008.safetensors",
|
| 760 |
+
"model.layers.6.self_attn.1.o_proj.scales": "model-00006-of-00008.safetensors",
|
| 761 |
+
"model.layers.6.self_attn.1.o_proj.weight": "model-00006-of-00008.safetensors",
|
| 762 |
+
"model.layers.6.self_attn.1.q_a_layernorm.weight": "model-00006-of-00008.safetensors",
|
| 763 |
+
"model.layers.6.self_attn.1.q_a_proj.biases": "model-00006-of-00008.safetensors",
|
| 764 |
+
"model.layers.6.self_attn.1.q_a_proj.scales": "model-00006-of-00008.safetensors",
|
| 765 |
+
"model.layers.6.self_attn.1.q_a_proj.weight": "model-00006-of-00008.safetensors",
|
| 766 |
+
"model.layers.6.self_attn.1.q_b_proj.biases": "model-00006-of-00008.safetensors",
|
| 767 |
+
"model.layers.6.self_attn.1.q_b_proj.scales": "model-00006-of-00008.safetensors",
|
| 768 |
+
"model.layers.6.self_attn.1.q_b_proj.weight": "model-00006-of-00008.safetensors",
|
| 769 |
+
"model.layers.7.input_layernorm.0.weight": "model-00007-of-00008.safetensors",
|
| 770 |
+
"model.layers.7.input_layernorm.1.weight": "model-00007-of-00008.safetensors",
|
| 771 |
+
"model.layers.7.mlp.router.classifier.biases": "model-00006-of-00008.safetensors",
|
| 772 |
+
"model.layers.7.mlp.router.classifier.scales": "model-00006-of-00008.safetensors",
|
| 773 |
+
"model.layers.7.mlp.router.classifier.weight": "model-00006-of-00008.safetensors",
|
| 774 |
+
"model.layers.7.mlp.router.e_score_correction_bias": "model-00006-of-00008.safetensors",
|
| 775 |
+
"model.layers.7.mlp.switch_mlp.down_proj.biases": "model-00006-of-00008.safetensors",
|
| 776 |
+
"model.layers.7.mlp.switch_mlp.down_proj.scales": "model-00006-of-00008.safetensors",
|
| 777 |
+
"model.layers.7.mlp.switch_mlp.down_proj.weight": "model-00006-of-00008.safetensors",
|
| 778 |
+
"model.layers.7.mlp.switch_mlp.gate_proj.biases": "model-00006-of-00008.safetensors",
|
| 779 |
+
"model.layers.7.mlp.switch_mlp.gate_proj.scales": "model-00006-of-00008.safetensors",
|
| 780 |
+
"model.layers.7.mlp.switch_mlp.gate_proj.weight": "model-00006-of-00008.safetensors",
|
| 781 |
+
"model.layers.7.mlp.switch_mlp.up_proj.biases": "model-00006-of-00008.safetensors",
|
| 782 |
+
"model.layers.7.mlp.switch_mlp.up_proj.scales": "model-00006-of-00008.safetensors",
|
| 783 |
+
"model.layers.7.mlp.switch_mlp.up_proj.weight": "model-00006-of-00008.safetensors",
|
| 784 |
+
"model.layers.7.mlps.0.down_proj.biases": "model-00007-of-00008.safetensors",
|
| 785 |
+
"model.layers.7.mlps.0.down_proj.scales": "model-00007-of-00008.safetensors",
|
| 786 |
+
"model.layers.7.mlps.0.down_proj.weight": "model-00007-of-00008.safetensors",
|
| 787 |
+
"model.layers.7.mlps.0.gate_proj.biases": "model-00006-of-00008.safetensors",
|
| 788 |
+
"model.layers.7.mlps.0.gate_proj.scales": "model-00006-of-00008.safetensors",
|
| 789 |
+
"model.layers.7.mlps.0.gate_proj.weight": "model-00006-of-00008.safetensors",
|
| 790 |
+
"model.layers.7.mlps.0.up_proj.biases": "model-00007-of-00008.safetensors",
|
| 791 |
+
"model.layers.7.mlps.0.up_proj.scales": "model-00007-of-00008.safetensors",
|
| 792 |
+
"model.layers.7.mlps.0.up_proj.weight": "model-00007-of-00008.safetensors",
|
| 793 |
+
"model.layers.7.mlps.1.down_proj.biases": "model-00007-of-00008.safetensors",
|
| 794 |
+
"model.layers.7.mlps.1.down_proj.scales": "model-00007-of-00008.safetensors",
|
| 795 |
+
"model.layers.7.mlps.1.down_proj.weight": "model-00007-of-00008.safetensors",
|
| 796 |
+
"model.layers.7.mlps.1.gate_proj.biases": "model-00007-of-00008.safetensors",
|
| 797 |
+
"model.layers.7.mlps.1.gate_proj.scales": "model-00007-of-00008.safetensors",
|
| 798 |
+
"model.layers.7.mlps.1.gate_proj.weight": "model-00007-of-00008.safetensors",
|
| 799 |
+
"model.layers.7.mlps.1.up_proj.biases": "model-00007-of-00008.safetensors",
|
| 800 |
+
"model.layers.7.mlps.1.up_proj.scales": "model-00007-of-00008.safetensors",
|
| 801 |
+
"model.layers.7.mlps.1.up_proj.weight": "model-00007-of-00008.safetensors",
|
| 802 |
+
"model.layers.7.post_attention_layernorm.0.weight": "model-00007-of-00008.safetensors",
|
| 803 |
+
"model.layers.7.post_attention_layernorm.1.weight": "model-00007-of-00008.safetensors",
|
| 804 |
+
"model.layers.7.self_attn.0.kv_a_layernorm.weight": "model-00006-of-00008.safetensors",
|
| 805 |
+
"model.layers.7.self_attn.0.kv_a_proj_with_mqa.biases": "model-00006-of-00008.safetensors",
|
| 806 |
+
"model.layers.7.self_attn.0.kv_a_proj_with_mqa.scales": "model-00006-of-00008.safetensors",
|
| 807 |
+
"model.layers.7.self_attn.0.kv_a_proj_with_mqa.weight": "model-00006-of-00008.safetensors",
|
| 808 |
+
"model.layers.7.self_attn.0.kv_b_proj.biases": "model-00006-of-00008.safetensors",
|
| 809 |
+
"model.layers.7.self_attn.0.kv_b_proj.scales": "model-00006-of-00008.safetensors",
|
| 810 |
+
"model.layers.7.self_attn.0.kv_b_proj.weight": "model-00006-of-00008.safetensors",
|
| 811 |
+
"model.layers.7.self_attn.0.o_proj.biases": "model-00006-of-00008.safetensors",
|
| 812 |
+
"model.layers.7.self_attn.0.o_proj.scales": "model-00006-of-00008.safetensors",
|
| 813 |
+
"model.layers.7.self_attn.0.o_proj.weight": "model-00006-of-00008.safetensors",
|
| 814 |
+
"model.layers.7.self_attn.0.q_a_layernorm.weight": "model-00006-of-00008.safetensors",
|
| 815 |
+
"model.layers.7.self_attn.0.q_a_proj.biases": "model-00006-of-00008.safetensors",
|
| 816 |
+
"model.layers.7.self_attn.0.q_a_proj.scales": "model-00006-of-00008.safetensors",
|
| 817 |
+
"model.layers.7.self_attn.0.q_a_proj.weight": "model-00006-of-00008.safetensors",
|
| 818 |
+
"model.layers.7.self_attn.0.q_b_proj.biases": "model-00006-of-00008.safetensors",
|
| 819 |
+
"model.layers.7.self_attn.0.q_b_proj.scales": "model-00006-of-00008.safetensors",
|
| 820 |
+
"model.layers.7.self_attn.0.q_b_proj.weight": "model-00006-of-00008.safetensors",
|
| 821 |
+
"model.layers.7.self_attn.1.kv_a_layernorm.weight": "model-00006-of-00008.safetensors",
|
| 822 |
+
"model.layers.7.self_attn.1.kv_a_proj_with_mqa.biases": "model-00006-of-00008.safetensors",
|
| 823 |
+
"model.layers.7.self_attn.1.kv_a_proj_with_mqa.scales": "model-00006-of-00008.safetensors",
|
| 824 |
+
"model.layers.7.self_attn.1.kv_a_proj_with_mqa.weight": "model-00006-of-00008.safetensors",
|
| 825 |
+
"model.layers.7.self_attn.1.kv_b_proj.biases": "model-00006-of-00008.safetensors",
|
| 826 |
+
"model.layers.7.self_attn.1.kv_b_proj.scales": "model-00006-of-00008.safetensors",
|
| 827 |
+
"model.layers.7.self_attn.1.kv_b_proj.weight": "model-00006-of-00008.safetensors",
|
| 828 |
+
"model.layers.7.self_attn.1.o_proj.biases": "model-00006-of-00008.safetensors",
|
| 829 |
+
"model.layers.7.self_attn.1.o_proj.scales": "model-00006-of-00008.safetensors",
|
| 830 |
+
"model.layers.7.self_attn.1.o_proj.weight": "model-00006-of-00008.safetensors",
|
| 831 |
+
"model.layers.7.self_attn.1.q_a_layernorm.weight": "model-00006-of-00008.safetensors",
|
| 832 |
+
"model.layers.7.self_attn.1.q_a_proj.biases": "model-00006-of-00008.safetensors",
|
| 833 |
+
"model.layers.7.self_attn.1.q_a_proj.scales": "model-00006-of-00008.safetensors",
|
| 834 |
+
"model.layers.7.self_attn.1.q_a_proj.weight": "model-00006-of-00008.safetensors",
|
| 835 |
+
"model.layers.7.self_attn.1.q_b_proj.biases": "model-00006-of-00008.safetensors",
|
| 836 |
+
"model.layers.7.self_attn.1.q_b_proj.scales": "model-00006-of-00008.safetensors",
|
| 837 |
+
"model.layers.7.self_attn.1.q_b_proj.weight": "model-00006-of-00008.safetensors",
|
| 838 |
+
"model.layers.8.input_layernorm.0.weight": "model-00007-of-00008.safetensors",
|
| 839 |
+
"model.layers.8.input_layernorm.1.weight": "model-00007-of-00008.safetensors",
|
| 840 |
+
"model.layers.8.mlp.router.classifier.biases": "model-00007-of-00008.safetensors",
|
| 841 |
+
"model.layers.8.mlp.router.classifier.scales": "model-00007-of-00008.safetensors",
|
| 842 |
+
"model.layers.8.mlp.router.classifier.weight": "model-00007-of-00008.safetensors",
|
| 843 |
+
"model.layers.8.mlp.router.e_score_correction_bias": "model-00007-of-00008.safetensors",
|
| 844 |
+
"model.layers.8.mlp.switch_mlp.down_proj.biases": "model-00007-of-00008.safetensors",
|
| 845 |
+
"model.layers.8.mlp.switch_mlp.down_proj.scales": "model-00007-of-00008.safetensors",
|
| 846 |
+
"model.layers.8.mlp.switch_mlp.down_proj.weight": "model-00007-of-00008.safetensors",
|
| 847 |
+
"model.layers.8.mlp.switch_mlp.gate_proj.biases": "model-00007-of-00008.safetensors",
|
| 848 |
+
"model.layers.8.mlp.switch_mlp.gate_proj.scales": "model-00007-of-00008.safetensors",
|
| 849 |
+
"model.layers.8.mlp.switch_mlp.gate_proj.weight": "model-00007-of-00008.safetensors",
|
| 850 |
+
"model.layers.8.mlp.switch_mlp.up_proj.biases": "model-00007-of-00008.safetensors",
|
| 851 |
+
"model.layers.8.mlp.switch_mlp.up_proj.scales": "model-00007-of-00008.safetensors",
|
| 852 |
+
"model.layers.8.mlp.switch_mlp.up_proj.weight": "model-00007-of-00008.safetensors",
|
| 853 |
+
"model.layers.8.mlps.0.down_proj.biases": "model-00007-of-00008.safetensors",
|
| 854 |
+
"model.layers.8.mlps.0.down_proj.scales": "model-00007-of-00008.safetensors",
|
| 855 |
+
"model.layers.8.mlps.0.down_proj.weight": "model-00007-of-00008.safetensors",
|
| 856 |
+
"model.layers.8.mlps.0.gate_proj.biases": "model-00007-of-00008.safetensors",
|
| 857 |
+
"model.layers.8.mlps.0.gate_proj.scales": "model-00007-of-00008.safetensors",
|
| 858 |
+
"model.layers.8.mlps.0.gate_proj.weight": "model-00007-of-00008.safetensors",
|
| 859 |
+
"model.layers.8.mlps.0.up_proj.biases": "model-00007-of-00008.safetensors",
|
| 860 |
+
"model.layers.8.mlps.0.up_proj.scales": "model-00007-of-00008.safetensors",
|
| 861 |
+
"model.layers.8.mlps.0.up_proj.weight": "model-00007-of-00008.safetensors",
|
| 862 |
+
"model.layers.8.mlps.1.down_proj.biases": "model-00007-of-00008.safetensors",
|
| 863 |
+
"model.layers.8.mlps.1.down_proj.scales": "model-00007-of-00008.safetensors",
|
| 864 |
+
"model.layers.8.mlps.1.down_proj.weight": "model-00007-of-00008.safetensors",
|
| 865 |
+
"model.layers.8.mlps.1.gate_proj.biases": "model-00007-of-00008.safetensors",
|
| 866 |
+
"model.layers.8.mlps.1.gate_proj.scales": "model-00007-of-00008.safetensors",
|
| 867 |
+
"model.layers.8.mlps.1.gate_proj.weight": "model-00007-of-00008.safetensors",
|
| 868 |
+
"model.layers.8.mlps.1.up_proj.biases": "model-00007-of-00008.safetensors",
|
| 869 |
+
"model.layers.8.mlps.1.up_proj.scales": "model-00007-of-00008.safetensors",
|
| 870 |
+
"model.layers.8.mlps.1.up_proj.weight": "model-00007-of-00008.safetensors",
|
| 871 |
+
"model.layers.8.post_attention_layernorm.0.weight": "model-00007-of-00008.safetensors",
|
| 872 |
+
"model.layers.8.post_attention_layernorm.1.weight": "model-00007-of-00008.safetensors",
|
| 873 |
+
"model.layers.8.self_attn.0.kv_a_layernorm.weight": "model-00007-of-00008.safetensors",
|
| 874 |
+
"model.layers.8.self_attn.0.kv_a_proj_with_mqa.biases": "model-00007-of-00008.safetensors",
|
| 875 |
+
"model.layers.8.self_attn.0.kv_a_proj_with_mqa.scales": "model-00007-of-00008.safetensors",
|
| 876 |
+
"model.layers.8.self_attn.0.kv_a_proj_with_mqa.weight": "model-00007-of-00008.safetensors",
|
| 877 |
+
"model.layers.8.self_attn.0.kv_b_proj.biases": "model-00007-of-00008.safetensors",
|
| 878 |
+
"model.layers.8.self_attn.0.kv_b_proj.scales": "model-00007-of-00008.safetensors",
|
| 879 |
+
"model.layers.8.self_attn.0.kv_b_proj.weight": "model-00007-of-00008.safetensors",
|
| 880 |
+
"model.layers.8.self_attn.0.o_proj.biases": "model-00007-of-00008.safetensors",
|
| 881 |
+
"model.layers.8.self_attn.0.o_proj.scales": "model-00007-of-00008.safetensors",
|
| 882 |
+
"model.layers.8.self_attn.0.o_proj.weight": "model-00007-of-00008.safetensors",
|
| 883 |
+
"model.layers.8.self_attn.0.q_a_layernorm.weight": "model-00007-of-00008.safetensors",
|
| 884 |
+
"model.layers.8.self_attn.0.q_a_proj.biases": "model-00007-of-00008.safetensors",
|
| 885 |
+
"model.layers.8.self_attn.0.q_a_proj.scales": "model-00007-of-00008.safetensors",
|
| 886 |
+
"model.layers.8.self_attn.0.q_a_proj.weight": "model-00007-of-00008.safetensors",
|
| 887 |
+
"model.layers.8.self_attn.0.q_b_proj.biases": "model-00007-of-00008.safetensors",
|
| 888 |
+
"model.layers.8.self_attn.0.q_b_proj.scales": "model-00007-of-00008.safetensors",
|
| 889 |
+
"model.layers.8.self_attn.0.q_b_proj.weight": "model-00007-of-00008.safetensors",
|
| 890 |
+
"model.layers.8.self_attn.1.kv_a_layernorm.weight": "model-00007-of-00008.safetensors",
|
| 891 |
+
"model.layers.8.self_attn.1.kv_a_proj_with_mqa.biases": "model-00007-of-00008.safetensors",
|
| 892 |
+
"model.layers.8.self_attn.1.kv_a_proj_with_mqa.scales": "model-00007-of-00008.safetensors",
|
| 893 |
+
"model.layers.8.self_attn.1.kv_a_proj_with_mqa.weight": "model-00007-of-00008.safetensors",
|
| 894 |
+
"model.layers.8.self_attn.1.kv_b_proj.biases": "model-00007-of-00008.safetensors",
|
| 895 |
+
"model.layers.8.self_attn.1.kv_b_proj.scales": "model-00007-of-00008.safetensors",
|
| 896 |
+
"model.layers.8.self_attn.1.kv_b_proj.weight": "model-00007-of-00008.safetensors",
|
| 897 |
+
"model.layers.8.self_attn.1.o_proj.biases": "model-00007-of-00008.safetensors",
|
| 898 |
+
"model.layers.8.self_attn.1.o_proj.scales": "model-00007-of-00008.safetensors",
|
| 899 |
+
"model.layers.8.self_attn.1.o_proj.weight": "model-00007-of-00008.safetensors",
|
| 900 |
+
"model.layers.8.self_attn.1.q_a_layernorm.weight": "model-00007-of-00008.safetensors",
|
| 901 |
+
"model.layers.8.self_attn.1.q_a_proj.biases": "model-00007-of-00008.safetensors",
|
| 902 |
+
"model.layers.8.self_attn.1.q_a_proj.scales": "model-00007-of-00008.safetensors",
|
| 903 |
+
"model.layers.8.self_attn.1.q_a_proj.weight": "model-00007-of-00008.safetensors",
|
| 904 |
+
"model.layers.8.self_attn.1.q_b_proj.biases": "model-00007-of-00008.safetensors",
|
| 905 |
+
"model.layers.8.self_attn.1.q_b_proj.scales": "model-00007-of-00008.safetensors",
|
| 906 |
+
"model.layers.8.self_attn.1.q_b_proj.weight": "model-00007-of-00008.safetensors",
|
| 907 |
+
"model.layers.9.input_layernorm.0.weight": "model-00007-of-00008.safetensors",
|
| 908 |
+
"model.layers.9.input_layernorm.1.weight": "model-00007-of-00008.safetensors",
|
| 909 |
+
"model.layers.9.mlp.router.classifier.biases": "model-00007-of-00008.safetensors",
|
| 910 |
+
"model.layers.9.mlp.router.classifier.scales": "model-00007-of-00008.safetensors",
|
| 911 |
+
"model.layers.9.mlp.router.classifier.weight": "model-00007-of-00008.safetensors",
|
| 912 |
+
"model.layers.9.mlp.router.e_score_correction_bias": "model-00007-of-00008.safetensors",
|
| 913 |
+
"model.layers.9.mlp.switch_mlp.down_proj.biases": "model-00007-of-00008.safetensors",
|
| 914 |
+
"model.layers.9.mlp.switch_mlp.down_proj.scales": "model-00007-of-00008.safetensors",
|
| 915 |
+
"model.layers.9.mlp.switch_mlp.down_proj.weight": "model-00007-of-00008.safetensors",
|
| 916 |
+
"model.layers.9.mlp.switch_mlp.gate_proj.biases": "model-00007-of-00008.safetensors",
|
| 917 |
+
"model.layers.9.mlp.switch_mlp.gate_proj.scales": "model-00007-of-00008.safetensors",
|
| 918 |
+
"model.layers.9.mlp.switch_mlp.gate_proj.weight": "model-00007-of-00008.safetensors",
|
| 919 |
+
"model.layers.9.mlp.switch_mlp.up_proj.biases": "model-00007-of-00008.safetensors",
|
| 920 |
+
"model.layers.9.mlp.switch_mlp.up_proj.scales": "model-00007-of-00008.safetensors",
|
| 921 |
+
"model.layers.9.mlp.switch_mlp.up_proj.weight": "model-00007-of-00008.safetensors",
|
| 922 |
+
"model.layers.9.mlps.0.down_proj.biases": "model-00007-of-00008.safetensors",
|
| 923 |
+
"model.layers.9.mlps.0.down_proj.scales": "model-00007-of-00008.safetensors",
|
| 924 |
+
"model.layers.9.mlps.0.down_proj.weight": "model-00007-of-00008.safetensors",
|
| 925 |
+
"model.layers.9.mlps.0.gate_proj.biases": "model-00007-of-00008.safetensors",
|
| 926 |
+
"model.layers.9.mlps.0.gate_proj.scales": "model-00007-of-00008.safetensors",
|
| 927 |
+
"model.layers.9.mlps.0.gate_proj.weight": "model-00007-of-00008.safetensors",
|
| 928 |
+
"model.layers.9.mlps.0.up_proj.biases": "model-00007-of-00008.safetensors",
|
| 929 |
+
"model.layers.9.mlps.0.up_proj.scales": "model-00007-of-00008.safetensors",
|
| 930 |
+
"model.layers.9.mlps.0.up_proj.weight": "model-00007-of-00008.safetensors",
|
| 931 |
+
"model.layers.9.mlps.1.down_proj.biases": "model-00007-of-00008.safetensors",
|
| 932 |
+
"model.layers.9.mlps.1.down_proj.scales": "model-00007-of-00008.safetensors",
|
| 933 |
+
"model.layers.9.mlps.1.down_proj.weight": "model-00007-of-00008.safetensors",
|
| 934 |
+
"model.layers.9.mlps.1.gate_proj.biases": "model-00007-of-00008.safetensors",
|
| 935 |
+
"model.layers.9.mlps.1.gate_proj.scales": "model-00007-of-00008.safetensors",
|
| 936 |
+
"model.layers.9.mlps.1.gate_proj.weight": "model-00007-of-00008.safetensors",
|
| 937 |
+
"model.layers.9.mlps.1.up_proj.biases": "model-00007-of-00008.safetensors",
|
| 938 |
+
"model.layers.9.mlps.1.up_proj.scales": "model-00007-of-00008.safetensors",
|
| 939 |
+
"model.layers.9.mlps.1.up_proj.weight": "model-00007-of-00008.safetensors",
|
| 940 |
+
"model.layers.9.post_attention_layernorm.0.weight": "model-00007-of-00008.safetensors",
|
| 941 |
+
"model.layers.9.post_attention_layernorm.1.weight": "model-00007-of-00008.safetensors",
|
| 942 |
+
"model.layers.9.self_attn.0.kv_a_layernorm.weight": "model-00007-of-00008.safetensors",
|
| 943 |
+
"model.layers.9.self_attn.0.kv_a_proj_with_mqa.biases": "model-00007-of-00008.safetensors",
|
| 944 |
+
"model.layers.9.self_attn.0.kv_a_proj_with_mqa.scales": "model-00007-of-00008.safetensors",
|
| 945 |
+
"model.layers.9.self_attn.0.kv_a_proj_with_mqa.weight": "model-00007-of-00008.safetensors",
|
| 946 |
+
"model.layers.9.self_attn.0.kv_b_proj.biases": "model-00007-of-00008.safetensors",
|
| 947 |
+
"model.layers.9.self_attn.0.kv_b_proj.scales": "model-00007-of-00008.safetensors",
|
| 948 |
+
"model.layers.9.self_attn.0.kv_b_proj.weight": "model-00007-of-00008.safetensors",
|
| 949 |
+
"model.layers.9.self_attn.0.o_proj.biases": "model-00007-of-00008.safetensors",
|
| 950 |
+
"model.layers.9.self_attn.0.o_proj.scales": "model-00007-of-00008.safetensors",
|
| 951 |
+
"model.layers.9.self_attn.0.o_proj.weight": "model-00007-of-00008.safetensors",
|
| 952 |
+
"model.layers.9.self_attn.0.q_a_layernorm.weight": "model-00007-of-00008.safetensors",
|
| 953 |
+
"model.layers.9.self_attn.0.q_a_proj.biases": "model-00007-of-00008.safetensors",
|
| 954 |
+
"model.layers.9.self_attn.0.q_a_proj.scales": "model-00007-of-00008.safetensors",
|
| 955 |
+
"model.layers.9.self_attn.0.q_a_proj.weight": "model-00007-of-00008.safetensors",
|
| 956 |
+
"model.layers.9.self_attn.0.q_b_proj.biases": "model-00007-of-00008.safetensors",
|
| 957 |
+
"model.layers.9.self_attn.0.q_b_proj.scales": "model-00007-of-00008.safetensors",
|
| 958 |
+
"model.layers.9.self_attn.0.q_b_proj.weight": "model-00007-of-00008.safetensors",
|
| 959 |
+
"model.layers.9.self_attn.1.kv_a_layernorm.weight": "model-00007-of-00008.safetensors",
|
| 960 |
+
"model.layers.9.self_attn.1.kv_a_proj_with_mqa.biases": "model-00007-of-00008.safetensors",
|
| 961 |
+
"model.layers.9.self_attn.1.kv_a_proj_with_mqa.scales": "model-00007-of-00008.safetensors",
|
| 962 |
+
"model.layers.9.self_attn.1.kv_a_proj_with_mqa.weight": "model-00007-of-00008.safetensors",
|
| 963 |
+
"model.layers.9.self_attn.1.kv_b_proj.biases": "model-00007-of-00008.safetensors",
|
| 964 |
+
"model.layers.9.self_attn.1.kv_b_proj.scales": "model-00007-of-00008.safetensors",
|
| 965 |
+
"model.layers.9.self_attn.1.kv_b_proj.weight": "model-00007-of-00008.safetensors",
|
| 966 |
+
"model.layers.9.self_attn.1.o_proj.biases": "model-00007-of-00008.safetensors",
|
| 967 |
+
"model.layers.9.self_attn.1.o_proj.scales": "model-00007-of-00008.safetensors",
|
| 968 |
+
"model.layers.9.self_attn.1.o_proj.weight": "model-00007-of-00008.safetensors",
|
| 969 |
+
"model.layers.9.self_attn.1.q_a_layernorm.weight": "model-00007-of-00008.safetensors",
|
| 970 |
+
"model.layers.9.self_attn.1.q_a_proj.biases": "model-00007-of-00008.safetensors",
|
| 971 |
+
"model.layers.9.self_attn.1.q_a_proj.scales": "model-00007-of-00008.safetensors",
|
| 972 |
+
"model.layers.9.self_attn.1.q_a_proj.weight": "model-00007-of-00008.safetensors",
|
| 973 |
+
"model.layers.9.self_attn.1.q_b_proj.biases": "model-00007-of-00008.safetensors",
|
| 974 |
+
"model.layers.9.self_attn.1.q_b_proj.scales": "model-00007-of-00008.safetensors",
|
| 975 |
+
"model.layers.9.self_attn.1.q_b_proj.weight": "model-00007-of-00008.safetensors",
|
| 976 |
+
"model.ngram_embeddings.embedders.0.biases": "model-00001-of-00008.safetensors",
|
| 977 |
+
"model.ngram_embeddings.embedders.0.scales": "model-00001-of-00008.safetensors",
|
| 978 |
+
"model.ngram_embeddings.embedders.0.weight": "model-00001-of-00008.safetensors",
|
| 979 |
+
"model.ngram_embeddings.embedders.1.biases": "model-00001-of-00008.safetensors",
|
| 980 |
+
"model.ngram_embeddings.embedders.1.scales": "model-00001-of-00008.safetensors",
|
| 981 |
+
"model.ngram_embeddings.embedders.1.weight": "model-00001-of-00008.safetensors",
|
| 982 |
+
"model.ngram_embeddings.embedders.10.biases": "model-00004-of-00008.safetensors",
|
| 983 |
+
"model.ngram_embeddings.embedders.10.scales": "model-00004-of-00008.safetensors",
|
| 984 |
+
"model.ngram_embeddings.embedders.10.weight": "model-00004-of-00008.safetensors",
|
| 985 |
+
"model.ngram_embeddings.embedders.11.biases": "model-00004-of-00008.safetensors",
|
| 986 |
+
"model.ngram_embeddings.embedders.11.scales": "model-00004-of-00008.safetensors",
|
| 987 |
+
"model.ngram_embeddings.embedders.11.weight": "model-00004-of-00008.safetensors",
|
| 988 |
+
"model.ngram_embeddings.embedders.2.biases": "model-00001-of-00008.safetensors",
|
| 989 |
+
"model.ngram_embeddings.embedders.2.scales": "model-00001-of-00008.safetensors",
|
| 990 |
+
"model.ngram_embeddings.embedders.2.weight": "model-00001-of-00008.safetensors",
|
| 991 |
+
"model.ngram_embeddings.embedders.3.biases": "model-00002-of-00008.safetensors",
|
| 992 |
+
"model.ngram_embeddings.embedders.3.scales": "model-00002-of-00008.safetensors",
|
| 993 |
+
"model.ngram_embeddings.embedders.3.weight": "model-00002-of-00008.safetensors",
|
| 994 |
+
"model.ngram_embeddings.embedders.4.biases": "model-00002-of-00008.safetensors",
|
| 995 |
+
"model.ngram_embeddings.embedders.4.scales": "model-00002-of-00008.safetensors",
|
| 996 |
+
"model.ngram_embeddings.embedders.4.weight": "model-00002-of-00008.safetensors",
|
| 997 |
+
"model.ngram_embeddings.embedders.5.biases": "model-00002-of-00008.safetensors",
|
| 998 |
+
"model.ngram_embeddings.embedders.5.scales": "model-00002-of-00008.safetensors",
|
| 999 |
+
"model.ngram_embeddings.embedders.5.weight": "model-00002-of-00008.safetensors",
|
| 1000 |
+
"model.ngram_embeddings.embedders.6.biases": "model-00003-of-00008.safetensors",
|
| 1001 |
+
"model.ngram_embeddings.embedders.6.scales": "model-00003-of-00008.safetensors",
|
| 1002 |
+
"model.ngram_embeddings.embedders.6.weight": "model-00003-of-00008.safetensors",
|
| 1003 |
+
"model.ngram_embeddings.embedders.7.biases": "model-00003-of-00008.safetensors",
|
| 1004 |
+
"model.ngram_embeddings.embedders.7.scales": "model-00003-of-00008.safetensors",
|
| 1005 |
+
"model.ngram_embeddings.embedders.7.weight": "model-00003-of-00008.safetensors",
|
| 1006 |
+
"model.ngram_embeddings.embedders.8.biases": "model-00003-of-00008.safetensors",
|
| 1007 |
+
"model.ngram_embeddings.embedders.8.scales": "model-00003-of-00008.safetensors",
|
| 1008 |
+
"model.ngram_embeddings.embedders.8.weight": "model-00003-of-00008.safetensors",
|
| 1009 |
+
"model.ngram_embeddings.embedders.9.biases": "model-00004-of-00008.safetensors",
|
| 1010 |
+
"model.ngram_embeddings.embedders.9.scales": "model-00004-of-00008.safetensors",
|
| 1011 |
+
"model.ngram_embeddings.embedders.9.weight": "model-00004-of-00008.safetensors",
|
| 1012 |
+
"model.ngram_embeddings.post_projs.0.biases": "model-00004-of-00008.safetensors",
|
| 1013 |
+
"model.ngram_embeddings.post_projs.0.scales": "model-00004-of-00008.safetensors",
|
| 1014 |
+
"model.ngram_embeddings.post_projs.0.weight": "model-00004-of-00008.safetensors",
|
| 1015 |
+
"model.ngram_embeddings.post_projs.1.biases": "model-00004-of-00008.safetensors",
|
| 1016 |
+
"model.ngram_embeddings.post_projs.1.scales": "model-00004-of-00008.safetensors",
|
| 1017 |
+
"model.ngram_embeddings.post_projs.1.weight": "model-00004-of-00008.safetensors",
|
| 1018 |
+
"model.ngram_embeddings.post_projs.10.biases": "model-00004-of-00008.safetensors",
|
| 1019 |
+
"model.ngram_embeddings.post_projs.10.scales": "model-00004-of-00008.safetensors",
|
| 1020 |
+
"model.ngram_embeddings.post_projs.10.weight": "model-00004-of-00008.safetensors",
|
| 1021 |
+
"model.ngram_embeddings.post_projs.11.biases": "model-00004-of-00008.safetensors",
|
| 1022 |
+
"model.ngram_embeddings.post_projs.11.scales": "model-00004-of-00008.safetensors",
|
| 1023 |
+
"model.ngram_embeddings.post_projs.11.weight": "model-00004-of-00008.safetensors",
|
| 1024 |
+
"model.ngram_embeddings.post_projs.2.biases": "model-00004-of-00008.safetensors",
|
| 1025 |
+
"model.ngram_embeddings.post_projs.2.scales": "model-00004-of-00008.safetensors",
|
| 1026 |
+
"model.ngram_embeddings.post_projs.2.weight": "model-00004-of-00008.safetensors",
|
| 1027 |
+
"model.ngram_embeddings.post_projs.3.biases": "model-00004-of-00008.safetensors",
|
| 1028 |
+
"model.ngram_embeddings.post_projs.3.scales": "model-00004-of-00008.safetensors",
|
| 1029 |
+
"model.ngram_embeddings.post_projs.3.weight": "model-00004-of-00008.safetensors",
|
| 1030 |
+
"model.ngram_embeddings.post_projs.4.biases": "model-00004-of-00008.safetensors",
|
| 1031 |
+
"model.ngram_embeddings.post_projs.4.scales": "model-00004-of-00008.safetensors",
|
| 1032 |
+
"model.ngram_embeddings.post_projs.4.weight": "model-00004-of-00008.safetensors",
|
| 1033 |
+
"model.ngram_embeddings.post_projs.5.biases": "model-00004-of-00008.safetensors",
|
| 1034 |
+
"model.ngram_embeddings.post_projs.5.scales": "model-00004-of-00008.safetensors",
|
| 1035 |
+
"model.ngram_embeddings.post_projs.5.weight": "model-00004-of-00008.safetensors",
|
| 1036 |
+
"model.ngram_embeddings.post_projs.6.biases": "model-00004-of-00008.safetensors",
|
| 1037 |
+
"model.ngram_embeddings.post_projs.6.scales": "model-00004-of-00008.safetensors",
|
| 1038 |
+
"model.ngram_embeddings.post_projs.6.weight": "model-00004-of-00008.safetensors",
|
| 1039 |
+
"model.ngram_embeddings.post_projs.7.biases": "model-00004-of-00008.safetensors",
|
| 1040 |
+
"model.ngram_embeddings.post_projs.7.scales": "model-00004-of-00008.safetensors",
|
| 1041 |
+
"model.ngram_embeddings.post_projs.7.weight": "model-00004-of-00008.safetensors",
|
| 1042 |
+
"model.ngram_embeddings.post_projs.8.biases": "model-00004-of-00008.safetensors",
|
| 1043 |
+
"model.ngram_embeddings.post_projs.8.scales": "model-00004-of-00008.safetensors",
|
| 1044 |
+
"model.ngram_embeddings.post_projs.8.weight": "model-00004-of-00008.safetensors",
|
| 1045 |
+
"model.ngram_embeddings.post_projs.9.biases": "model-00004-of-00008.safetensors",
|
| 1046 |
+
"model.ngram_embeddings.post_projs.9.scales": "model-00004-of-00008.safetensors",
|
| 1047 |
+
"model.ngram_embeddings.post_projs.9.weight": "model-00004-of-00008.safetensors",
|
| 1048 |
+
"model.ngram_embeddings.word_embeddings.biases": "model-00001-of-00008.safetensors",
|
| 1049 |
+
"model.ngram_embeddings.word_embeddings.scales": "model-00001-of-00008.safetensors",
|
| 1050 |
+
"model.ngram_embeddings.word_embeddings.weight": "model-00001-of-00008.safetensors",
|
| 1051 |
+
"model.norm.weight": "model-00008-of-00008.safetensors"
|
| 1052 |
+
}
|
| 1053 |
+
}
|
modeling_longcat_ngram.py
ADDED
|
@@ -0,0 +1,338 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
# Copyright (c) 2025 Meituan
|
| 3 |
+
# This code is licensed under the MIT License, for details, see the ./LICENSE file.
|
| 4 |
+
|
| 5 |
+
from typing import Optional, Tuple, Dict, List
|
| 6 |
+
|
| 7 |
+
import torch
|
| 8 |
+
from torch import nn
|
| 9 |
+
|
| 10 |
+
from transformers.cache_utils import Cache, DynamicCache
|
| 11 |
+
from transformers.masking_utils import create_causal_mask
|
| 12 |
+
from transformers.modeling_outputs import BaseModelOutputWithPast
|
| 13 |
+
from transformers.processing_utils import Unpack
|
| 14 |
+
from transformers.utils import auto_docstring, logging
|
| 15 |
+
from transformers.models.longcat_flash.modeling_longcat_flash import (
|
| 16 |
+
LongcatFlashForCausalLM,
|
| 17 |
+
LongcatFlashModel,
|
| 18 |
+
LongcatFlashRMSNorm,
|
| 19 |
+
LongcatFlashRotaryEmbedding,
|
| 20 |
+
LongcatFlashDecoderLayer,
|
| 21 |
+
LongcatFlashPreTrainedModel,
|
| 22 |
+
)
|
| 23 |
+
from .configuration_longcat_ngram import LongcatFlashNgramConfig
|
| 24 |
+
|
| 25 |
+
logger = logging.get_logger(__name__)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
@auto_docstring
|
| 29 |
+
class LongcatFlashNgramPreTrainedModel(LongcatFlashPreTrainedModel):
|
| 30 |
+
pass
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
class NgramCache(DynamicCache):
|
| 34 |
+
"""
|
| 35 |
+
Extended DynamicCache for storing N-gram context alongside KV cache.
|
| 36 |
+
"""
|
| 37 |
+
def __init__(self, config=None):
|
| 38 |
+
super().__init__()
|
| 39 |
+
self.ngram_context = None
|
| 40 |
+
# Keep only n-1 tokens (minimum needed for N-gram computation)
|
| 41 |
+
self.max_context_len = config.emb_neighbor_num - 1
|
| 42 |
+
|
| 43 |
+
def update_ngram_context(self, new_tokens: torch.Tensor) -> None:
|
| 44 |
+
"""
|
| 45 |
+
Update N-gram context with window management.
|
| 46 |
+
|
| 47 |
+
Args:
|
| 48 |
+
new_tokens: New tokens to append, shape (batch_size, seq_len)
|
| 49 |
+
"""
|
| 50 |
+
if self.ngram_context is None:
|
| 51 |
+
self.ngram_context = new_tokens.clone()
|
| 52 |
+
else:
|
| 53 |
+
self.ngram_context = torch.cat([self.ngram_context, new_tokens], dim=-1)
|
| 54 |
+
|
| 55 |
+
# Truncate to maintain constant memory footprint
|
| 56 |
+
if self.ngram_context.size(-1) > self.max_context_len:
|
| 57 |
+
self.ngram_context = self.ngram_context[..., -self.max_context_len:]
|
| 58 |
+
|
| 59 |
+
def reorder_cache(self, beam_idx: torch.LongTensor) -> "Cache":
|
| 60 |
+
"""Reorder cache for beam search."""
|
| 61 |
+
# Reorder parent's KV cache
|
| 62 |
+
super().reorder_cache(beam_idx)
|
| 63 |
+
|
| 64 |
+
# Reorder N-gram context
|
| 65 |
+
if self.ngram_context is not None:
|
| 66 |
+
self.ngram_context = self.ngram_context.index_select(0, beam_idx.to(self.ngram_context.device))
|
| 67 |
+
|
| 68 |
+
return self
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
class NgramEmbedding(nn.Module):
|
| 72 |
+
"""
|
| 73 |
+
Computes embeddings enriched with N-gram features without maintaining internal state.
|
| 74 |
+
"""
|
| 75 |
+
def __init__(self, config, base_embeddings):
|
| 76 |
+
super().__init__()
|
| 77 |
+
self.config = config
|
| 78 |
+
self.word_embeddings = base_embeddings
|
| 79 |
+
|
| 80 |
+
self.m = config.ngram_vocab_size_ratio * config.vocab_size
|
| 81 |
+
self.k = config.emb_split_num
|
| 82 |
+
self.n = config.emb_neighbor_num
|
| 83 |
+
|
| 84 |
+
self._init_ngram_embeddings()
|
| 85 |
+
self._vocab_mods_cache = None
|
| 86 |
+
|
| 87 |
+
def _init_ngram_embeddings(self) -> None:
|
| 88 |
+
"""Initialize N-gram embedding and projection layers."""
|
| 89 |
+
num_embedders = self.k * (self.n - 1)
|
| 90 |
+
emb_dim = self.config.hidden_size // num_embedders
|
| 91 |
+
|
| 92 |
+
embedders = []
|
| 93 |
+
post_projs = []
|
| 94 |
+
|
| 95 |
+
for i in range(num_embedders):
|
| 96 |
+
vocab_size = int(self.m + i * 2 + 1)
|
| 97 |
+
emb = nn.Embedding(vocab_size, emb_dim, padding_idx=self.config.pad_token_id)
|
| 98 |
+
proj = nn.Linear(emb_dim, self.config.hidden_size, bias=False)
|
| 99 |
+
embedders.append(emb)
|
| 100 |
+
post_projs.append(proj)
|
| 101 |
+
|
| 102 |
+
self.embedders = nn.ModuleList(embedders)
|
| 103 |
+
self.post_projs = nn.ModuleList(post_projs)
|
| 104 |
+
|
| 105 |
+
def _shift_right_ignore_eos(self, tensor: torch.Tensor, n: int, eos_token_id: int = 2) -> torch.Tensor:
|
| 106 |
+
"""Shift tensor right by n positions, resetting at EOS tokens."""
|
| 107 |
+
batch_size, seq_len = tensor.shape
|
| 108 |
+
result = torch.zeros_like(tensor)
|
| 109 |
+
eos_mask = (tensor == eos_token_id)
|
| 110 |
+
|
| 111 |
+
for i in range(batch_size):
|
| 112 |
+
eos_positions = eos_mask[i].nonzero(as_tuple=True)[0]
|
| 113 |
+
prev_idx = 0
|
| 114 |
+
|
| 115 |
+
for eos_idx in eos_positions:
|
| 116 |
+
end_idx = eos_idx.item() + 1
|
| 117 |
+
if end_idx - prev_idx > n:
|
| 118 |
+
result[i, prev_idx+n:end_idx] = tensor[i, prev_idx:end_idx-n]
|
| 119 |
+
prev_idx = end_idx
|
| 120 |
+
|
| 121 |
+
if prev_idx < seq_len and seq_len - prev_idx > n:
|
| 122 |
+
result[i, prev_idx+n:seq_len] = tensor[i, prev_idx:seq_len-n]
|
| 123 |
+
|
| 124 |
+
return result
|
| 125 |
+
|
| 126 |
+
def _precompute_vocab_mods(self) -> Dict[Tuple[int, int], List[int]]:
|
| 127 |
+
"""Precompute modular arithmetic values for vocabulary."""
|
| 128 |
+
if self._vocab_mods_cache is not None:
|
| 129 |
+
return self._vocab_mods_cache
|
| 130 |
+
|
| 131 |
+
vocab_mods = {}
|
| 132 |
+
vocab_size = self.config.vocab_size
|
| 133 |
+
|
| 134 |
+
for i in range(2, self.n + 1):
|
| 135 |
+
for j in range(self.k):
|
| 136 |
+
index = (i - 2) * self.k + j
|
| 137 |
+
emb_vocab_dim = int(self.m + index * 2 + 1)
|
| 138 |
+
|
| 139 |
+
mods = []
|
| 140 |
+
power_mod = 1
|
| 141 |
+
for _ in range(i - 1):
|
| 142 |
+
power_mod = (power_mod * vocab_size) % emb_vocab_dim
|
| 143 |
+
mods.append(power_mod)
|
| 144 |
+
|
| 145 |
+
vocab_mods[(i, j)] = mods
|
| 146 |
+
|
| 147 |
+
self._vocab_mods_cache = vocab_mods
|
| 148 |
+
return vocab_mods
|
| 149 |
+
|
| 150 |
+
def _get_ngram_ids(
|
| 151 |
+
self,
|
| 152 |
+
input_ids: torch.Tensor,
|
| 153 |
+
shifted_ids: Dict[int, torch.Tensor],
|
| 154 |
+
vocab_mods: List[int],
|
| 155 |
+
ngram: int
|
| 156 |
+
) -> torch.Tensor:
|
| 157 |
+
"""Compute N-gram hash IDs using polynomial rolling hash."""
|
| 158 |
+
ngram_ids = input_ids.clone()
|
| 159 |
+
for k in range(2, ngram + 1):
|
| 160 |
+
ngram_ids = ngram_ids + shifted_ids[k] * vocab_mods[k - 2]
|
| 161 |
+
return ngram_ids
|
| 162 |
+
|
| 163 |
+
def forward(
|
| 164 |
+
self,
|
| 165 |
+
input_ids: torch.Tensor,
|
| 166 |
+
ngram_context: Optional[torch.Tensor] = None
|
| 167 |
+
) -> torch.Tensor:
|
| 168 |
+
"""
|
| 169 |
+
Stateless forward pass.
|
| 170 |
+
|
| 171 |
+
Args:
|
| 172 |
+
input_ids: Current input token IDs of shape (batch_size, seq_len)
|
| 173 |
+
ngram_context: Optional historical context of shape (batch_size, context_len)
|
| 174 |
+
|
| 175 |
+
Returns:
|
| 176 |
+
Embedding tensor of shape (batch_size, seq_len, hidden_size)
|
| 177 |
+
"""
|
| 178 |
+
seq_len = input_ids.size(-1)
|
| 179 |
+
|
| 180 |
+
# Determine complete context
|
| 181 |
+
if ngram_context is not None:
|
| 182 |
+
context = torch.cat([ngram_context[..., -(self.n-1):], input_ids], dim=-1)
|
| 183 |
+
else:
|
| 184 |
+
context = input_ids
|
| 185 |
+
|
| 186 |
+
# Base word embeddings
|
| 187 |
+
device = self.word_embeddings.weight.device
|
| 188 |
+
x = self.word_embeddings(input_ids.to(device)).clone()
|
| 189 |
+
|
| 190 |
+
# Precompute modular values
|
| 191 |
+
vocab_mods = self._precompute_vocab_mods()
|
| 192 |
+
|
| 193 |
+
# Compute shifted IDs
|
| 194 |
+
shifted_ids = {}
|
| 195 |
+
for i in range(2, self.n + 1):
|
| 196 |
+
shifted_ids[i] = self._shift_right_ignore_eos(
|
| 197 |
+
context, i - 1, eos_token_id=self.config.eos_token_id
|
| 198 |
+
)
|
| 199 |
+
|
| 200 |
+
# Add N-gram embeddings
|
| 201 |
+
for i in range(2, self.n + 1):
|
| 202 |
+
for j in range(self.k):
|
| 203 |
+
index = (i - 2) * self.k + j
|
| 204 |
+
emb_vocab_dim = int(self.m + index * 2 + 1)
|
| 205 |
+
|
| 206 |
+
ngram_ids = self._get_ngram_ids(context, shifted_ids, vocab_mods[(i, j)], ngram=i)
|
| 207 |
+
new_ids = (ngram_ids % emb_vocab_dim)[..., -seq_len:]
|
| 208 |
+
|
| 209 |
+
embedder_device = self.embedders[index].weight.device
|
| 210 |
+
x_ngram = self.embedders[index](new_ids.to(embedder_device))
|
| 211 |
+
|
| 212 |
+
proj_device = self.post_projs[index].weight.device
|
| 213 |
+
x_proj = self.post_projs[index](x_ngram.to(proj_device))
|
| 214 |
+
x = x + x_proj.to(x.device)
|
| 215 |
+
|
| 216 |
+
# Normalize
|
| 217 |
+
x = x / (1 + self.k * (self.n - 1))
|
| 218 |
+
|
| 219 |
+
return x
|
| 220 |
+
|
| 221 |
+
|
| 222 |
+
class LongcatFlashNgramModel(LongcatFlashModel):
|
| 223 |
+
"""LongcatFlash model with N-gram enhanced embeddings."""
|
| 224 |
+
_keys_to_ignore_on_load_unexpected = [r"model\.mtp.*"]
|
| 225 |
+
config_class = LongcatFlashNgramConfig
|
| 226 |
+
|
| 227 |
+
def __init__(self, config):
|
| 228 |
+
super().__init__(config)
|
| 229 |
+
|
| 230 |
+
self.embed_tokens = nn.Embedding(config.vocab_size, config.hidden_size, self.padding_idx)
|
| 231 |
+
self.ngram_embeddings = NgramEmbedding(config, self.embed_tokens)
|
| 232 |
+
|
| 233 |
+
self.layers = nn.ModuleList(
|
| 234 |
+
[LongcatFlashDecoderLayer(config, layer_idx) for layer_idx in range(config.num_layers)]
|
| 235 |
+
)
|
| 236 |
+
|
| 237 |
+
self.head_dim = config.head_dim
|
| 238 |
+
self.config.num_hidden_layers = 2 * config.num_layers
|
| 239 |
+
self.norm = LongcatFlashRMSNorm(config.hidden_size, eps=config.rms_norm_eps)
|
| 240 |
+
self.rotary_emb = LongcatFlashRotaryEmbedding(config=config)
|
| 241 |
+
self.gradient_checkpointing = False
|
| 242 |
+
|
| 243 |
+
self.post_init()
|
| 244 |
+
|
| 245 |
+
def forward(
|
| 246 |
+
self,
|
| 247 |
+
input_ids: Optional[torch.LongTensor] = None,
|
| 248 |
+
attention_mask: Optional[torch.Tensor] = None,
|
| 249 |
+
position_ids: Optional[torch.LongTensor] = None,
|
| 250 |
+
past_key_values: Optional[Cache] = None,
|
| 251 |
+
inputs_embeds: Optional[torch.FloatTensor] = None,
|
| 252 |
+
cache_position: Optional[torch.LongTensor] = None,
|
| 253 |
+
use_cache: Optional[bool] = None,
|
| 254 |
+
**kwargs
|
| 255 |
+
) -> BaseModelOutputWithPast:
|
| 256 |
+
if (input_ids is None) ^ (inputs_embeds is not None):
|
| 257 |
+
raise ValueError("You must specify exactly one of input_ids or inputs_embeds")
|
| 258 |
+
|
| 259 |
+
# Extract N-gram context if available
|
| 260 |
+
ngram_context = None
|
| 261 |
+
if isinstance(past_key_values, NgramCache) and past_key_values.ngram_context is not None:
|
| 262 |
+
ngram_context = past_key_values.ngram_context
|
| 263 |
+
|
| 264 |
+
if inputs_embeds is None:
|
| 265 |
+
inputs_embeds = self.ngram_embeddings(input_ids, ngram_context=ngram_context)
|
| 266 |
+
|
| 267 |
+
# Initialize NgramCache if needed
|
| 268 |
+
if use_cache and past_key_values is None:
|
| 269 |
+
past_key_values = NgramCache(config=self.config)
|
| 270 |
+
|
| 271 |
+
# Update N-gram context
|
| 272 |
+
if use_cache and isinstance(past_key_values, NgramCache):
|
| 273 |
+
past_key_values.update_ngram_context(input_ids)
|
| 274 |
+
|
| 275 |
+
# Prepare cache position
|
| 276 |
+
if cache_position is None:
|
| 277 |
+
past_seen_tokens = past_key_values.get_seq_length() if past_key_values is not None else 0
|
| 278 |
+
cache_position = torch.arange(
|
| 279 |
+
inputs_embeds.shape[1], device=inputs_embeds.device
|
| 280 |
+
) + past_seen_tokens
|
| 281 |
+
|
| 282 |
+
if position_ids is None:
|
| 283 |
+
position_ids = cache_position.unsqueeze(0)
|
| 284 |
+
|
| 285 |
+
# Create causal mask
|
| 286 |
+
causal_mask = create_causal_mask(
|
| 287 |
+
config=self.config,
|
| 288 |
+
input_embeds=inputs_embeds,
|
| 289 |
+
attention_mask=attention_mask,
|
| 290 |
+
cache_position=cache_position,
|
| 291 |
+
past_key_values=past_key_values,
|
| 292 |
+
position_ids=position_ids,
|
| 293 |
+
)
|
| 294 |
+
|
| 295 |
+
# Forward through decoder layers
|
| 296 |
+
hidden_states = inputs_embeds
|
| 297 |
+
position_embeddings = self.rotary_emb(hidden_states, position_ids)
|
| 298 |
+
|
| 299 |
+
for decoder_layer in self.layers[: self.config.num_layers]:
|
| 300 |
+
hidden_states = decoder_layer(
|
| 301 |
+
hidden_states,
|
| 302 |
+
attention_mask=causal_mask,
|
| 303 |
+
position_ids=position_ids,
|
| 304 |
+
past_key_values=past_key_values,
|
| 305 |
+
cache_position=cache_position,
|
| 306 |
+
position_embeddings=position_embeddings,
|
| 307 |
+
**kwargs,
|
| 308 |
+
)
|
| 309 |
+
|
| 310 |
+
hidden_states = self.norm(hidden_states)
|
| 311 |
+
|
| 312 |
+
return BaseModelOutputWithPast(
|
| 313 |
+
last_hidden_state=hidden_states,
|
| 314 |
+
past_key_values=past_key_values,
|
| 315 |
+
hidden_states=None,
|
| 316 |
+
attentions=None,
|
| 317 |
+
)
|
| 318 |
+
|
| 319 |
+
|
| 320 |
+
class LongcatFlashNgramForCausalLM(LongcatFlashForCausalLM):
|
| 321 |
+
"""LongcatFlash model for causal language modeling with N-gram embeddings."""
|
| 322 |
+
_keys_to_ignore_on_load_unexpected = [r"model\.mtp.*"]
|
| 323 |
+
config_class = LongcatFlashNgramConfig
|
| 324 |
+
|
| 325 |
+
def __init__(self, config):
|
| 326 |
+
super().__init__(config)
|
| 327 |
+
self.model = LongcatFlashNgramModel(config)
|
| 328 |
+
|
| 329 |
+
@torch.no_grad()
|
| 330 |
+
def generate(self, inputs=None, generation_config=None, **kwargs):
|
| 331 |
+
"""Override to ensure NgramCache is used."""
|
| 332 |
+
|
| 333 |
+
if "past_key_values" not in kwargs or kwargs["past_key_values"] is None:
|
| 334 |
+
kwargs["past_key_values"] = NgramCache(config=self.config)
|
| 335 |
+
|
| 336 |
+
return super().generate(inputs=inputs, generation_config=generation_config, **kwargs)
|
| 337 |
+
|
| 338 |
+
__all__ = ["LongcatFlashNgramPreTrainedModel", "LongcatFlashNgramModel", "LongcatFlashNgramForCausalLM"]
|
parse_model_response.py
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import re
|
| 2 |
+
import json
|
| 3 |
+
import uuid
|
| 4 |
+
|
| 5 |
+
def parse_arguments(json_value):
|
| 6 |
+
"""
|
| 7 |
+
Attempt to parse a string as JSON
|
| 8 |
+
|
| 9 |
+
Args:
|
| 10 |
+
json_value: String to parse
|
| 11 |
+
|
| 12 |
+
Returns:
|
| 13 |
+
tuple: (parsed_value, is_valid_json)
|
| 14 |
+
"""
|
| 15 |
+
try:
|
| 16 |
+
parsed_value = json.loads(json_value)
|
| 17 |
+
return parsed_value, True
|
| 18 |
+
except:
|
| 19 |
+
return json_value, False
|
| 20 |
+
|
| 21 |
+
def get_argument_type(func_name: str, arg_key: str, defined_tools: list):
|
| 22 |
+
"""
|
| 23 |
+
Get the type definition of a tool parameter
|
| 24 |
+
|
| 25 |
+
Args:
|
| 26 |
+
func_name: Name of the function/tool
|
| 27 |
+
arg_key: Parameter key name
|
| 28 |
+
defined_tools: List of tool definitions
|
| 29 |
+
|
| 30 |
+
Returns:
|
| 31 |
+
str or None: Type of the parameter ('string', 'object', 'array', 'integer', 'number', 'boolean')
|
| 32 |
+
"""
|
| 33 |
+
name2tool = {tool["name"]: tool for tool in defined_tools}
|
| 34 |
+
if func_name not in name2tool:
|
| 35 |
+
return None
|
| 36 |
+
tool = name2tool[func_name]
|
| 37 |
+
if "parameters" not in tool or "properties" not in tool["parameters"]:
|
| 38 |
+
return None
|
| 39 |
+
if arg_key not in tool["parameters"]["properties"]:
|
| 40 |
+
return None
|
| 41 |
+
return tool["parameters"]["properties"][arg_key].get("type")
|
| 42 |
+
|
| 43 |
+
def parse_model_response(response: str, defined_tools: list=[]):
|
| 44 |
+
"""
|
| 45 |
+
Parse model response to extract reasoning_content, content, and tool_calls
|
| 46 |
+
|
| 47 |
+
Args:
|
| 48 |
+
response: Raw response text from the model
|
| 49 |
+
defined_tools: List of tool definitions
|
| 50 |
+
|
| 51 |
+
Returns:
|
| 52 |
+
dict: Message containing role, reasoning_content (optional), content (optional),
|
| 53 |
+
and tool_calls (optional)
|
| 54 |
+
"""
|
| 55 |
+
text = response
|
| 56 |
+
reasoning_content = None
|
| 57 |
+
content = None
|
| 58 |
+
tool_calls = []
|
| 59 |
+
|
| 60 |
+
formatted_tools = []
|
| 61 |
+
for tool in defined_tools:
|
| 62 |
+
if "function" in tool:
|
| 63 |
+
formatted_tools.append(tool['function'])
|
| 64 |
+
else:
|
| 65 |
+
formatted_tools.append(tool)
|
| 66 |
+
|
| 67 |
+
if '</longcat_think>' in text:
|
| 68 |
+
text = text.replace('<longcat_think>', '')
|
| 69 |
+
thinking_end = text.find('</longcat_think>')
|
| 70 |
+
reasoning_content = text[: thinking_end].strip()
|
| 71 |
+
text = text[thinking_end + len('</longcat_think>'):].lstrip()
|
| 72 |
+
|
| 73 |
+
assert '<longcat_think>' not in text, "Unclosed <longcat_think> tag found in remaining text"
|
| 74 |
+
assert '</longcat_think>' not in text, "Unexpected </longcat_think> tag found without opening tag"
|
| 75 |
+
|
| 76 |
+
if '<longcat_tool_call>' in text:
|
| 77 |
+
index = text.find('<longcat_tool_call>')
|
| 78 |
+
content = text[:index]
|
| 79 |
+
text = text[index:].strip()
|
| 80 |
+
else:
|
| 81 |
+
content = text
|
| 82 |
+
text = ""
|
| 83 |
+
|
| 84 |
+
open_tags = text.count('<longcat_tool_call>')
|
| 85 |
+
close_tags = text.count('</longcat_tool_call>')
|
| 86 |
+
assert open_tags == close_tags, \
|
| 87 |
+
f"Mismatched tool_call tags: {open_tags} opening tags, {close_tags} closing tags"
|
| 88 |
+
|
| 89 |
+
tool_call_strs = re.findall(
|
| 90 |
+
r'<longcat_tool_call>(.*?)</longcat_tool_call>',
|
| 91 |
+
text,
|
| 92 |
+
re.DOTALL
|
| 93 |
+
)
|
| 94 |
+
|
| 95 |
+
for call in tool_call_strs:
|
| 96 |
+
func_name_match = re.match(r'([^\n<]+)', call.strip())
|
| 97 |
+
assert func_name_match, f"Missing function name in tool call: {call[:100]}"
|
| 98 |
+
|
| 99 |
+
func_name = func_name_match.group(1).strip()
|
| 100 |
+
assert func_name, "Empty function name in tool call"
|
| 101 |
+
|
| 102 |
+
# Verify argument tags are properly paired
|
| 103 |
+
arg_key_count = call.count('<longcat_arg_key>')
|
| 104 |
+
arg_key_close_count = call.count('</longcat_arg_key>')
|
| 105 |
+
arg_value_count = call.count('<longcat_arg_value>')
|
| 106 |
+
arg_value_close_count = call.count('</longcat_arg_value>')
|
| 107 |
+
|
| 108 |
+
assert arg_key_count == arg_key_close_count, \
|
| 109 |
+
f"Mismatched arg_key tags in function {func_name}: {arg_key_count} opening, {arg_key_close_count} closing"
|
| 110 |
+
assert arg_value_count == arg_value_close_count, \
|
| 111 |
+
f"Mismatched arg_value tags in function {func_name}: {arg_value_count} opening, {arg_value_close_count} closing"
|
| 112 |
+
assert arg_key_count == arg_value_count, \
|
| 113 |
+
f"Mismatched arg_key and arg_value count in function {func_name}: {arg_key_count} keys, {arg_value_count} values"
|
| 114 |
+
|
| 115 |
+
pairs = re.findall(
|
| 116 |
+
r'<longcat_arg_key>(.*?)</longcat_arg_key>\s*<longcat_arg_value>(.*?)</longcat_arg_value>',
|
| 117 |
+
call,
|
| 118 |
+
re.DOTALL
|
| 119 |
+
)
|
| 120 |
+
|
| 121 |
+
assert len(pairs) == arg_key_count, \
|
| 122 |
+
f"Failed to parse all arguments in function {func_name}: expected {arg_key_count}, got {len(pairs)}"
|
| 123 |
+
|
| 124 |
+
arguments = {}
|
| 125 |
+
for arg_key, arg_value in pairs:
|
| 126 |
+
arg_key = arg_key.strip()
|
| 127 |
+
arg_value = arg_value.strip()
|
| 128 |
+
|
| 129 |
+
assert arg_key, f"Empty argument key in function {func_name}"
|
| 130 |
+
assert arg_key not in arguments, \
|
| 131 |
+
f"Duplicate argument key '{arg_key}' in function {func_name}"
|
| 132 |
+
|
| 133 |
+
arg_type = get_argument_type(func_name, arg_key, formatted_tools)
|
| 134 |
+
|
| 135 |
+
if arg_type and arg_type != 'string':
|
| 136 |
+
parsed_value, is_good_json = parse_arguments(arg_value)
|
| 137 |
+
arg_value = parsed_value
|
| 138 |
+
|
| 139 |
+
arguments[arg_key] = arg_value
|
| 140 |
+
|
| 141 |
+
tool_calls.append({
|
| 142 |
+
'id': "tool-call-" + str(uuid.uuid4()),
|
| 143 |
+
'type': "function",
|
| 144 |
+
'function': {
|
| 145 |
+
'name': func_name,
|
| 146 |
+
'arguments': arguments
|
| 147 |
+
}
|
| 148 |
+
})
|
| 149 |
+
|
| 150 |
+
message = {'role': 'assistant'}
|
| 151 |
+
|
| 152 |
+
if reasoning_content:
|
| 153 |
+
message['reasoning_content'] = reasoning_content
|
| 154 |
+
message['content'] = content
|
| 155 |
+
if tool_calls:
|
| 156 |
+
message['tool_calls'] = tool_calls
|
| 157 |
+
|
| 158 |
+
return message
|
| 159 |
+
|
| 160 |
+
if __name__=="__main__":
|
| 161 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 162 |
+
from parse_model_response import parse_model_response
|
| 163 |
+
|
| 164 |
+
model_name = "meituan-longcat/LongCat-Flash-Lite"
|
| 165 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 166 |
+
model_name,
|
| 167 |
+
torch_dtype="auto",
|
| 168 |
+
device_map="auto",
|
| 169 |
+
trust_remote_code=True
|
| 170 |
+
)
|
| 171 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
|
| 172 |
+
|
| 173 |
+
messages = [
|
| 174 |
+
{"role": "system", "content": "You are a helpful assistant."},
|
| 175 |
+
{"role": "user", "content": "Give me a brief introduction to large language models."}
|
| 176 |
+
]
|
| 177 |
+
input_ids = tokenizer.apply_chat_template(
|
| 178 |
+
messages,
|
| 179 |
+
add_generation_prompt=True,
|
| 180 |
+
return_tensors="pt"
|
| 181 |
+
).to(model.device)
|
| 182 |
+
generated_ids = model.generate(inputs=input_ids, max_new_tokens=256)
|
| 183 |
+
output_ids = generated_ids[0][len(input_ids[0]):].tolist()
|
| 184 |
+
response = tokenizer.decode(output_ids, skip_special_tokens=True).strip("\n")
|
| 185 |
+
print("Example 1: sample response.")
|
| 186 |
+
print("\nRaw response:")
|
| 187 |
+
print(response)
|
| 188 |
+
print("\nParsed result:")
|
| 189 |
+
|
| 190 |
+
response = tokenizer.decode(output_ids, skip_special_tokens=True).strip("\n")
|
| 191 |
+
parsed_message = parse_model_response(response)
|
| 192 |
+
print(json.dumps(parsed_message, indent=2, ensure_ascii=False))
|
| 193 |
+
|
| 194 |
+
tools = [
|
| 195 |
+
{
|
| 196 |
+
"type": "function",
|
| 197 |
+
"function": {
|
| 198 |
+
"name": "func_add",
|
| 199 |
+
"description": "Calculate the sum of two numbers",
|
| 200 |
+
"parameters": {
|
| 201 |
+
"type": "object",
|
| 202 |
+
"properties": {
|
| 203 |
+
"x1": {"type": "number", "description": "The first addend"},
|
| 204 |
+
"x2": {"type": "number", "description": "The second addend"}
|
| 205 |
+
},
|
| 206 |
+
"required": ["x1", "x2"]
|
| 207 |
+
}
|
| 208 |
+
}
|
| 209 |
+
}
|
| 210 |
+
]
|
| 211 |
+
messages = [
|
| 212 |
+
{"role": "system", "content": "You are a helpful assistant."},
|
| 213 |
+
{"role": "user", "content": "Please tell me what is $$125679 + 234519$$?"},
|
| 214 |
+
# {
|
| 215 |
+
# "role": "assistant",
|
| 216 |
+
# "content": "I'll calculate the sum of 125679 and 234519 for you.",
|
| 217 |
+
# "tool_calls": [{"type": "function", "function": {"name": "func_add", "arguments": {"x1": 125679, "x2": 234519}}}]
|
| 218 |
+
# },
|
| 219 |
+
# {"role": "tool", "name": "func_add", "content": '{"ans": 360198}'}
|
| 220 |
+
]
|
| 221 |
+
|
| 222 |
+
input_ids = tokenizer.apply_chat_template(
|
| 223 |
+
messages,
|
| 224 |
+
tools=tools,
|
| 225 |
+
add_generation_prompt=True,
|
| 226 |
+
return_tensors="pt"
|
| 227 |
+
).to(model.device)
|
| 228 |
+
generated_ids = model.generate(inputs=input_ids, max_new_tokens=256)
|
| 229 |
+
output_ids = generated_ids[0][len(input_ids[0]):].tolist()
|
| 230 |
+
response = tokenizer.decode(output_ids, skip_special_tokens=True).strip("\n")
|
| 231 |
+
print("Example 2: tool call response.")
|
| 232 |
+
print("\nRaw response:")
|
| 233 |
+
print(response)
|
| 234 |
+
print("\nParsed result:")
|
| 235 |
+
parsed_message = parse_model_response(response, tools)
|
| 236 |
+
print(json.dumps(parsed_message, indent=2, ensure_ascii=False))
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": "<longcat_s>",
|
| 5 |
+
"clean_up_tokenization_spaces": false,
|
| 6 |
+
"eos_token": "</longcat_s>",
|
| 7 |
+
"is_local": true,
|
| 8 |
+
"model_max_length": 131072,
|
| 9 |
+
"pad_token": "<longcat_pad>",
|
| 10 |
+
"sp_model_kwargs": {},
|
| 11 |
+
"tokenizer_class": "TokenizersBackend",
|
| 12 |
+
"tool_parser_type": "longcat",
|
| 13 |
+
"unk_token": "<longcat_unk>"
|
| 14 |
+
}
|