jeffreygao
commited on
Commit
•
7cae0ce
1
Parent(s):
9e7d616
first version
Browse files- MODEL_LICENSE +43 -0
- README.md +67 -0
- added_tokens.json +6 -0
- config.json +49 -0
- configuration_bluelm.py +164 -0
- generation_config.json +7 -0
- model-00001-of-00003.safetensors +3 -0
- model-00002-of-00003.safetensors +3 -0
- model-00003-of-00003.safetensors +3 -0
- model.safetensors.index.json +1196 -0
- modeling_bluelm.py +1000 -0
- quantize_config.json +13 -0
- special_tokens_map.json +36 -0
- tokenization_bluelm.py +252 -0
- tokenizer.model +3 -0
- tokenizer_config.json +90 -0
MODEL_LICENSE
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
模型许可协议/Model License Agreement
|
2 |
+
|
3 |
+
1. 定义
|
4 |
+
本协议项下的模型,是指vivo公司(维沃移动通信有限公司)为开发者学习和非商业用途之目的,公开发布的免费模型。如需商业使用,不适用本协议,请另外联系vivo公司以获取授权。
|
5 |
+
|
6 |
+
2. 许可授予
|
7 |
+
根据本许可的条款和条件,特此授予您非排他性、全球性、不可转让、不可再许可、可撤销、免费的版权许可。
|
8 |
+
上述版权声明和本许可声明应包含在本模型的所有副本或重要部分中。
|
9 |
+
|
10 |
+
3.限制
|
11 |
+
您不得出于任何非法目的复制、修改、使用、发布本模型的全部或部分衍生作品。
|
12 |
+
未经您所在国家或地区(如必要的审查或备案)的流程性许可,您不得将本模型用于任何需要许可的场合。
|
13 |
+
|
14 |
+
4.免责声明
|
15 |
+
本模型“按原样”提供,基于技术的原因,我们不提供任何明示或暗示的保证,包括但不限于对安全性、稳定性、适销性、特定用途的适用性和非侵权性的保证,我们也不对本模型及依据本模型输出、生成的内容承担任何形式的责任。
|
16 |
+
我们也可能在没有通知和提前的情况下,基于各种原因,随时修改、下架本模型。您不应依赖本模型实施相关行为。
|
17 |
+
|
18 |
+
5. 投诉反馈
|
19 |
+
如您发现本模型存在违法或者不妥当处,请联系我们,我们将尽快处理。
|
20 |
+
|
21 |
+
6.争议解决
|
22 |
+
本协议的订立、效力、解释、履行、修改和终止,使用本模型以及争议的解决均适用中华人民共和国大陆地区(仅为本协议之目的,不包括香港、澳门和台湾)法律,并排除冲突法的适用。如产生诉讼纠纷,由中国广东省东莞市第二人民法院管辖。
|
23 |
+
|
24 |
+
1. Definitions
|
25 |
+
The model under this Agreement refers to the free model released publicly by vivo (vivo Mobile Communication Co., Ltd.) for the purpose of developer learning and non-commercial use. For commercial use, this agreement is not applicable. You are adviced to contact vivo for separate authorization.
|
26 |
+
|
27 |
+
2 Grant of license
|
28 |
+
Subject to the terms and conditions of this license, you are hereby granted a non-exclusive, worldwide, non-transferable, non-sublicensable, revocable, and free copyright license.
|
29 |
+
The above copyright statement and this permission statement shall be included in all copies or important parts of this model.
|
30 |
+
|
31 |
+
3. Restrictions
|
32 |
+
You shall not copy, modify, use, or publish part of or all derivative works of this model for any illegal purpose.
|
33 |
+
You shall not use this model in any situation that requires permission without obtaining procedural permission from your country or region (such as necessary review or filing).
|
34 |
+
|
35 |
+
4. Disclaimer
|
36 |
+
This model is provided "as is". For technical reasons, we do not provide any express or implied warranties, including but not limited to the warranties of security, stability, merchantability, fitness for a particular purpose and non-infringement. We also do not assume any form of responsibility for this model and the content output and generated based on this model.
|
37 |
+
We may also modify or remove this model at any time for various reasons without advanced notice. You should not rely on this model to implement related behaviors.
|
38 |
+
|
39 |
+
5. Complaints and feedback
|
40 |
+
If you find that this model is illegal or inappropriate, please contact us and we will deal with it as soon as possible.
|
41 |
+
|
42 |
+
6. Dispute settlement
|
43 |
+
The formation, validity, interpretation, performance, modification and termination of this Agreement, the use of this model and the settlement of disputes shall be governed by the laws of the Chinese Mainland (excluding Hong Kong, Macao and Taiwan, for the purpose of this Agreement only), excluding application of conflict of laws. Any litigation or dispute shall be under the jurisdiction of the Dongguan No. 2 People's Court in Guangdong, China.
|
README.md
CHANGED
@@ -1,3 +1,70 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
+
language:
|
4 |
+
- zh
|
5 |
+
- en
|
6 |
---
|
7 |
+
# BlueLM
|
8 |
+
|
9 |
+
<p align="center">
|
10 |
+
🖥 <a href="https://github.com/vivo-ai-lab/BlueLM" target="_blank">github</a> • 📜 <a href="https://huggingface.co/vivo-ai/BlueLM-7B-Chat-32K-GPTQ/blob/main/MODEL_LICENSE" target="_blank">LICENSE</a> • 🎯 <a href="https://developers.vivo.com/product/ai/bluelm" target="_blank">vivo Developers</a> • 🗨 <a href="https://github.com/vivo-ai-lab/BlueLM/blob/main/resources/wechat.png" target="_blank">WeChat</a>
|
11 |
+
</p>
|
12 |
+
|
13 |
+
## 模型介绍/Introduction
|
14 |
+
|
15 |
+
BlueLM 是由 vivo AI 全球研究院自主研发的大规模预训练语言模型,本次发布包含 7B 基础模型和 7B 对话模型,同时我们开源了支持 **32K** 的长文本基础模型和对话模型。
|
16 |
+
|
17 |
+
- **更大量的优质数据**:高质量语料库进行训练,规模达到了 **2.6 万亿** 的 token 数,该语料库包含中文、英文以及少量日韩数据。
|
18 |
+
- **更优的效果**:其中 BlueLM-7B-Chat 在 **C-Eval** 和 **CMMLU** 上均取得领先结果,对比同尺寸开源模型中具有较强的竞争力。
|
19 |
+
- **长文本支持**:BlueLM-7B-Base-32K 和 BlueLM-7B-Chat-32K 均支持 **32K** 长文本,在保持基础能力相当情况下,能够支持更长上下文理解。
|
20 |
+
- **协议说明**:BlueLM 系列欢迎开发者进行学术研究和商业应用。
|
21 |
+
|
22 |
+
BlueLM is a large-scale open-source language model independently developed by the vivo AI Lab. This release includes 2K and 32K context length versions for both Base and Chat models.
|
23 |
+
|
24 |
+
- **High-quality Data**: BlueLM is trained on a high-quality data with 2.6 trillion tokens. Our train corpus mainly consists of Chinese and English data, with a small amount of Japanese and Korean data.
|
25 |
+
- **Stronger Performance**: BlueLM-7B-Chat achieves a strong competitive performance in C-Eval and CMMLU benchmarks of the same size.
|
26 |
+
- **Longer Context**: We have extended the context length of both BlueLM-7B-Base-32K and BlueLM-7B-Chat-32K models from 2K to 32K. The models can support longer context understanding while maintaining the same basic capabilities.
|
27 |
+
- **Model License**: BlueLM weights are open for academic research and commercial use.
|
28 |
+
|
29 |
+
本次发布基座模型下载链接见:
|
30 |
+
|
31 |
+
The release versions and hugging face download links are listed in the table below:
|
32 |
+
|
33 |
+
| | Base Model | Chat Model | 4bits Quantized Chat Model |
|
34 |
+
|:---:|:--------------------:|:--------------------:|:--------------------------:|
|
35 |
+
| 7B-2k | [BlueLM-7B-Base](https://huggingface.co/vivo-ai/BlueLM-7B-Base) | [BlueLM-7B-Chat](https://huggingface.co/vivo-ai/BlueLM-7B-Chat) | [BlueLM-7B-Chat-4bits](https://huggingface.co/vivo-ai/BlueLM-7B-Chat-4bits) |
|
36 |
+
| 7B-32K | [BlueLM-7B-Base-32K](https://huggingface.co/vivo-ai/BlueLM-7B-Base-32K) | [BlueLM-7B-Chat-32K](https://huggingface.co/vivo-ai/BlueLM-7B-Chat-32K) | - |
|
37 |
+
|
38 |
+
## 评测结果/Benchmark Results
|
39 |
+
|
40 |
+
我们在 LongBench 评测集上对我们的 BlueLM-7B-Chat-32K 模型进行了测试,具体结果如下表所示:
|
41 |
+
|
42 |
+
We tested our BlueLM-7B-Chat-32K on the LongBench dataset and the results are shown in the table below:
|
43 |
+
|
44 |
+
| Model | Average | Summary | Single-Doc QA | Multi-Doc QA | Code | Few-shot | Synthetic |
|
45 |
+
|:----------------------|:-----|:---------|:--------------|:--------------|:------|:---------|:----------|
|
46 |
+
| BlueLM-7B-Chat-32K | 41.2 | 18.8 | 35.6 | 36.2 | 54.2 | 56.9 | 45.5 |
|
47 |
+
|
48 |
+
## 推理部署/Inference and Deployment
|
49 |
+
|
50 |
+
```python
|
51 |
+
>>> import torch
|
52 |
+
>>> from transformers import AutoModelForCausalLM, AutoTokenizer
|
53 |
+
>>> tokenizer = AutoTokenizer.from_pretrained("vivo-ai/BlueLM-7B-Chat-32K-GPTQ", trust_remote_code=True, use_fast=False)
|
54 |
+
>>> model = AutoModelForCausalLM.from_pretrained("vivo-ai/BlueLM-7B-Chat-32K-GPTQ", device_map="cuda:0", torch_dtype=torch.float16, trust_remote_code=True, low_cpu_mem_usage=True, use_cache=False)
|
55 |
+
>>> model = model.eval()
|
56 |
+
>>> inputs = tokenizer("[|Human|]:写一篇关于刘慈欣《三体》小说的读后感,1000字左右[|AI|]:", return_tensors="pt")
|
57 |
+
>>> inputs = inputs.to("cuda:0")
|
58 |
+
>>> pred = model.generate(**inputs, max_new_tokens=2048, repetition_penalty=1.1)
|
59 |
+
>>> print(tokenizer.decode(pred.cpu()[0], skip_special_tokens=True))
|
60 |
+
```
|
61 |
+
|
62 |
+
更多使用说明,请参考我们的 [Github 仓库](https://github.com/vivo-ai-lab/BlueLM)。
|
63 |
+
|
64 |
+
For more instructions, please refer to our [Github Repo](https://github.com/vivo-ai-lab/BlueLM).
|
65 |
+
|
66 |
+
## 协议/License
|
67 |
+
|
68 |
+
社区使用代码依照 [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) 协议开源,且使用 BlueLM 模型权重需要遵循 [vivo_BlueLM模型许可协议](https://huggingface.co/vivo-ai/BlueLM-7B-Chat-32K-GPTQ/blob/main/MODEL_LICENSE)。
|
69 |
+
|
70 |
+
Our code is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) and [Community License for BlueLM Model](https://huggingface.co/vivo-ai/BlueLM-7B-Chat-32K-GPTQ/blob/main/MODEL_LICENSE).
|
added_tokens.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"[SEA]": 100003,
|
3 |
+
"[SEH]": 100002,
|
4 |
+
"[|AI|]:": 100001,
|
5 |
+
"[|Human|]:": 100000
|
6 |
+
}
|
config.json
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "/data/juicefs_sharing_data/public_data/yyf_11164103/llm_models/bluelm-7b/BlueLM-7B-Chat-32K-Function/",
|
3 |
+
"architectures": [
|
4 |
+
"BlueLMForCausalLM"
|
5 |
+
],
|
6 |
+
"auto_map": {
|
7 |
+
"AutoConfig": "configuration_bluelm.BlueLMConfig",
|
8 |
+
"AutoModelForCausalLM": "modeling_bluelm.BlueLMForCausalLM"
|
9 |
+
},
|
10 |
+
"bos_token_id": 1,
|
11 |
+
"eos_token_id": 2,
|
12 |
+
"hidden_act": "silu",
|
13 |
+
"hidden_size": 4096,
|
14 |
+
"initializer_range": 0.02,
|
15 |
+
"intermediate_size": 11008,
|
16 |
+
"max_position_embeddings": 2048,
|
17 |
+
"model_type": "BlueLM",
|
18 |
+
"num_attention_heads": 32,
|
19 |
+
"num_hidden_layers": 32,
|
20 |
+
"num_key_value_heads": 32,
|
21 |
+
"pad_token_id": 3,
|
22 |
+
"pretraining_tp": 1,
|
23 |
+
"quantization_config": {
|
24 |
+
"bits": 4,
|
25 |
+
"damp_percent": 0.01,
|
26 |
+
"desc_act": false,
|
27 |
+
"group_size": 128,
|
28 |
+
"is_marlin_format": false,
|
29 |
+
"model_file_base_name": null,
|
30 |
+
"model_name_or_path": null,
|
31 |
+
"quant_method": "gptq",
|
32 |
+
"static_groups": false,
|
33 |
+
"sym": true,
|
34 |
+
"true_sequential": true
|
35 |
+
},
|
36 |
+
"rms_norm_eps": 1e-06,
|
37 |
+
"rope_scaling": {
|
38 |
+
"factor": 16.0,
|
39 |
+
"power": 0.3,
|
40 |
+
"type": "ntkmixed"
|
41 |
+
},
|
42 |
+
"rope_theta": 10000.0,
|
43 |
+
"tie_word_embeddings": false,
|
44 |
+
"torch_dtype": "float16",
|
45 |
+
"transformers_version": "4.38.2",
|
46 |
+
"use_cache": true,
|
47 |
+
"use_stable_embedding": true,
|
48 |
+
"vocab_size": 100096
|
49 |
+
}
|
configuration_bluelm.py
ADDED
@@ -0,0 +1,164 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright 2023 vivo.
|
2 |
+
#
|
3 |
+
# Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved.
|
4 |
+
#
|
5 |
+
# This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX
|
6 |
+
# and OPT implementations in this library. It has been modified from its
|
7 |
+
# original forms to accommodate minor architectural differences compared
|
8 |
+
# to GPT-NeoX and OPT used by the Meta AI team that trained the model.
|
9 |
+
#
|
10 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
11 |
+
# you may not use this file except in compliance with the License.
|
12 |
+
# You may obtain a copy of the License at
|
13 |
+
#
|
14 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
15 |
+
#
|
16 |
+
# Unless required by applicable law or agreed to in writing, software
|
17 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
18 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19 |
+
# See the License for the specific language governing permissions and
|
20 |
+
# limitations under the License.
|
21 |
+
|
22 |
+
""" BlueLM model configuration"""
|
23 |
+
|
24 |
+
from transformers.configuration_utils import PretrainedConfig
|
25 |
+
|
26 |
+
BlueLM_PRETRAINED_CONFIG_ARCHIVE_MAP = {}
|
27 |
+
|
28 |
+
|
29 |
+
class BlueLMConfig(PretrainedConfig):
|
30 |
+
r"""
|
31 |
+
This is the configuration class to store the configuration of a [`BlueLMModel`]. It is used to instantiate an BlueLM
|
32 |
+
model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
|
33 |
+
defaults will yield a similar configuration to that of the BlueLM-7B.
|
34 |
+
|
35 |
+
Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
|
36 |
+
documentation from [`PretrainedConfig`] for more information.
|
37 |
+
|
38 |
+
|
39 |
+
Args:
|
40 |
+
vocab_size (`int`, *optional*, defaults to 32000):
|
41 |
+
Vocabulary size of the BlueLM model. Defines the number of different tokens that can be represented by the
|
42 |
+
`inputs_ids` passed when calling [`BlueLMModel`]
|
43 |
+
hidden_size (`int`, *optional*, defaults to 4096):
|
44 |
+
Dimension of the hidden representations.
|
45 |
+
intermediate_size (`int`, *optional*, defaults to 11008):
|
46 |
+
Dimension of the MLP representations.
|
47 |
+
num_hidden_layers (`int`, *optional*, defaults to 32):
|
48 |
+
Number of hidden layers in the Transformer encoder.
|
49 |
+
num_attention_heads (`int`, *optional*, defaults to 32):
|
50 |
+
Number of attention heads for each attention layer in the Transformer encoder.
|
51 |
+
num_key_value_heads (`int`, *optional*):
|
52 |
+
This is the number of key_value heads that should be used to implement Grouped Query Attention. If
|
53 |
+
`num_key_value_heads=num_attention_heads`, the model will use Multi Head Attention (MHA), if
|
54 |
+
`num_key_value_heads=1 the model will use Multi Query Attention (MQA) otherwise GQA is used. When
|
55 |
+
converting a multi-head checkpoint to a GQA checkpoint, each group key and value head should be constructed
|
56 |
+
by meanpooling all the original heads within that group. For more details checkout [this
|
57 |
+
paper](https://arxiv.org/pdf/2305.13245.pdf). If it is not specified, will default to
|
58 |
+
`num_attention_heads`.
|
59 |
+
pretraining_tp (`int`, *optional*, defaults to `1`):
|
60 |
+
Experimental feature. Tensor parallelism rank used during pretraining. Please refer to [this
|
61 |
+
document](https://huggingface.co/docs/transformers/parallelism) to understand more about it. This value is
|
62 |
+
necessary to ensure exact reproducibility of the pretraining results. Please refer to [this
|
63 |
+
issue](https://github.com/pytorch/pytorch/issues/76232).
|
64 |
+
hidden_act (`str` or `function`, *optional*, defaults to `"silu"`):
|
65 |
+
The non-linear activation function (function or string) in the decoder.
|
66 |
+
max_position_embeddings (`int`, *optional*, defaults to 2048):
|
67 |
+
The maximum sequence length that this model might ever be used with.
|
68 |
+
initializer_range (`float`, *optional*, defaults to 0.02):
|
69 |
+
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
|
70 |
+
rms_norm_eps (`float`, *optional*, defaults to 1e-12):
|
71 |
+
The epsilon used by the rms normalization layers.
|
72 |
+
use_cache (`bool`, *optional*, defaults to `True`):
|
73 |
+
Whether or not the model should return the last key/values attentions (not used by all models). Only
|
74 |
+
relevant if `config.is_decoder=True`.
|
75 |
+
tie_word_embeddings(`bool`, *optional*, defaults to `False`):
|
76 |
+
Whether to tie weight embeddings
|
77 |
+
rope_theta (`float`, *optional*, defaults to 10000.0):
|
78 |
+
The base period of the RoPE embeddings.
|
79 |
+
rope_scaling (`Dict`, *optional*):
|
80 |
+
Dictionary containing the scaling configuration for the RoPE embeddings. Currently supports two scaling
|
81 |
+
strategies: linear and dynamic. Their scaling factor must be an float greater than 1. The expected format
|
82 |
+
is `{"type": strategy name, "factor": scaling factor}`. When using this flag, don't update
|
83 |
+
`max_position_embeddings` to the expected new maximum. See the following thread for more information on how
|
84 |
+
these scaling strategies behave:
|
85 |
+
https://www.reddit.com/r/LocalLLaMA/comments/14mrgpr/dynamically_scaled_rope_further_increases/. This is an
|
86 |
+
experimental feature, subject to breaking API changes in future versions.
|
87 |
+
|
88 |
+
"""
|
89 |
+
|
90 |
+
model_type = "BlueLM"
|
91 |
+
keys_to_ignore_at_inference = ["past_key_values"]
|
92 |
+
|
93 |
+
def __init__(
|
94 |
+
self,
|
95 |
+
vocab_size=100096,
|
96 |
+
hidden_size=4096,
|
97 |
+
intermediate_size=11008,
|
98 |
+
num_hidden_layers=32,
|
99 |
+
num_attention_heads=32,
|
100 |
+
num_key_value_heads=None,
|
101 |
+
hidden_act="silu",
|
102 |
+
max_position_embeddings=2048,
|
103 |
+
initializer_range=0.02,
|
104 |
+
rms_norm_eps=1e-6,
|
105 |
+
use_cache=True,
|
106 |
+
pad_token_id=None,
|
107 |
+
bos_token_id=1,
|
108 |
+
eos_token_id=2,
|
109 |
+
pretraining_tp=1,
|
110 |
+
tie_word_embeddings=False,
|
111 |
+
rope_theta=10000.0,
|
112 |
+
rope_scaling=None,
|
113 |
+
use_stable_embedding=True,
|
114 |
+
**kwargs,
|
115 |
+
):
|
116 |
+
self.vocab_size = vocab_size
|
117 |
+
self.max_position_embeddings = max_position_embeddings
|
118 |
+
self.hidden_size = hidden_size
|
119 |
+
self.intermediate_size = intermediate_size
|
120 |
+
self.num_hidden_layers = num_hidden_layers
|
121 |
+
self.num_attention_heads = num_attention_heads
|
122 |
+
self.use_stable_embedding = use_stable_embedding
|
123 |
+
# for backward compatibility
|
124 |
+
if num_key_value_heads is None:
|
125 |
+
num_key_value_heads = num_attention_heads
|
126 |
+
|
127 |
+
self.num_key_value_heads = num_key_value_heads
|
128 |
+
self.hidden_act = hidden_act
|
129 |
+
self.initializer_range = initializer_range
|
130 |
+
self.rms_norm_eps = rms_norm_eps
|
131 |
+
self.pretraining_tp = pretraining_tp
|
132 |
+
self.use_cache = use_cache
|
133 |
+
self.rope_theta = rope_theta
|
134 |
+
self.rope_scaling = rope_scaling
|
135 |
+
self._rope_scaling_validation()
|
136 |
+
|
137 |
+
super().__init__(
|
138 |
+
pad_token_id=pad_token_id,
|
139 |
+
bos_token_id=bos_token_id,
|
140 |
+
eos_token_id=eos_token_id,
|
141 |
+
tie_word_embeddings=tie_word_embeddings,
|
142 |
+
**kwargs,
|
143 |
+
)
|
144 |
+
|
145 |
+
def _rope_scaling_validation(self):
|
146 |
+
"""
|
147 |
+
Validate the `rope_scaling` configuration.
|
148 |
+
"""
|
149 |
+
if self.rope_scaling is None:
|
150 |
+
return
|
151 |
+
|
152 |
+
if not isinstance(self.rope_scaling, dict) or len(self.rope_scaling) != 3:
|
153 |
+
raise ValueError(
|
154 |
+
"`rope_scaling` must be a dictionary with with three fields, `type` , `factor` , `power`, "
|
155 |
+
f"got {self.rope_scaling}"
|
156 |
+
)
|
157 |
+
rope_scaling_type = self.rope_scaling.get("type", None)
|
158 |
+
rope_scaling_factor = self.rope_scaling.get("factor", None)
|
159 |
+
if rope_scaling_type is None or rope_scaling_type not in ["linear", "dynamic","ntkmixed"]:
|
160 |
+
raise ValueError(
|
161 |
+
f"`rope_scaling`'s type field must be one of ['linear', 'dynamic'], got {rope_scaling_type}"
|
162 |
+
)
|
163 |
+
if rope_scaling_factor is None or not isinstance(rope_scaling_factor, float) or rope_scaling_factor <= 1.0:
|
164 |
+
raise ValueError(f"`rope_scaling`'s factor field must be an float > 1, got {rope_scaling_factor}")
|
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.30.1"
|
7 |
+
}
|
model-00001-of-00003.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ac7407911d8caa955f2316054f65905a46311a8bfc32f1d32df294b9f14f6b13
|
3 |
+
size 1996754200
|
model-00002-of-00003.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c872512c6ea76701011ae5afe96f009968651fc4aab2c2c39a710a389b14a3cb
|
3 |
+
size 1993631888
|
model-00003-of-00003.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a993db07762fb66099a4e9c6587dcc363333860443c1db55ba45ad5860fd0363
|
3 |
+
size 1022029472
|
model.safetensors.index.json
ADDED
@@ -0,0 +1,1196 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"metadata": {
|
3 |
+
"total_size": 5012283392
|
4 |
+
},
|
5 |
+
"weight_map": {
|
6 |
+
"lm_head.weight": "model-00003-of-00003.safetensors",
|
7 |
+
"model.embed_layer_norm.bias": "model-00001-of-00003.safetensors",
|
8 |
+
"model.embed_layer_norm.weight": "model-00001-of-00003.safetensors",
|
9 |
+
"model.embed_tokens.weight": "model-00001-of-00003.safetensors",
|
10 |
+
"model.layers.0.input_layernorm.weight": "model-00001-of-00003.safetensors",
|
11 |
+
"model.layers.0.mlp.down_proj.bias": "model-00001-of-00003.safetensors",
|
12 |
+
"model.layers.0.mlp.down_proj.g_idx": "model-00001-of-00003.safetensors",
|
13 |
+
"model.layers.0.mlp.down_proj.qweight": "model-00001-of-00003.safetensors",
|
14 |
+
"model.layers.0.mlp.down_proj.qzeros": "model-00001-of-00003.safetensors",
|
15 |
+
"model.layers.0.mlp.down_proj.scales": "model-00001-of-00003.safetensors",
|
16 |
+
"model.layers.0.mlp.gate_proj.bias": "model-00001-of-00003.safetensors",
|
17 |
+
"model.layers.0.mlp.gate_proj.g_idx": "model-00001-of-00003.safetensors",
|
18 |
+
"model.layers.0.mlp.gate_proj.qweight": "model-00001-of-00003.safetensors",
|
19 |
+
"model.layers.0.mlp.gate_proj.qzeros": "model-00001-of-00003.safetensors",
|
20 |
+
"model.layers.0.mlp.gate_proj.scales": "model-00001-of-00003.safetensors",
|
21 |
+
"model.layers.0.mlp.up_proj.bias": "model-00001-of-00003.safetensors",
|
22 |
+
"model.layers.0.mlp.up_proj.g_idx": "model-00001-of-00003.safetensors",
|
23 |
+
"model.layers.0.mlp.up_proj.qweight": "model-00001-of-00003.safetensors",
|
24 |
+
"model.layers.0.mlp.up_proj.qzeros": "model-00001-of-00003.safetensors",
|
25 |
+
"model.layers.0.mlp.up_proj.scales": "model-00001-of-00003.safetensors",
|
26 |
+
"model.layers.0.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
|
27 |
+
"model.layers.0.self_attn.k_proj.bias": "model-00001-of-00003.safetensors",
|
28 |
+
"model.layers.0.self_attn.k_proj.g_idx": "model-00001-of-00003.safetensors",
|
29 |
+
"model.layers.0.self_attn.k_proj.qweight": "model-00001-of-00003.safetensors",
|
30 |
+
"model.layers.0.self_attn.k_proj.qzeros": "model-00001-of-00003.safetensors",
|
31 |
+
"model.layers.0.self_attn.k_proj.scales": "model-00001-of-00003.safetensors",
|
32 |
+
"model.layers.0.self_attn.o_proj.bias": "model-00001-of-00003.safetensors",
|
33 |
+
"model.layers.0.self_attn.o_proj.g_idx": "model-00001-of-00003.safetensors",
|
34 |
+
"model.layers.0.self_attn.o_proj.qweight": "model-00001-of-00003.safetensors",
|
35 |
+
"model.layers.0.self_attn.o_proj.qzeros": "model-00001-of-00003.safetensors",
|
36 |
+
"model.layers.0.self_attn.o_proj.scales": "model-00001-of-00003.safetensors",
|
37 |
+
"model.layers.0.self_attn.q_proj.bias": "model-00001-of-00003.safetensors",
|
38 |
+
"model.layers.0.self_attn.q_proj.g_idx": "model-00001-of-00003.safetensors",
|
39 |
+
"model.layers.0.self_attn.q_proj.qweight": "model-00001-of-00003.safetensors",
|
40 |
+
"model.layers.0.self_attn.q_proj.qzeros": "model-00001-of-00003.safetensors",
|
41 |
+
"model.layers.0.self_attn.q_proj.scales": "model-00001-of-00003.safetensors",
|
42 |
+
"model.layers.0.self_attn.v_proj.bias": "model-00001-of-00003.safetensors",
|
43 |
+
"model.layers.0.self_attn.v_proj.g_idx": "model-00001-of-00003.safetensors",
|
44 |
+
"model.layers.0.self_attn.v_proj.qweight": "model-00001-of-00003.safetensors",
|
45 |
+
"model.layers.0.self_attn.v_proj.qzeros": "model-00001-of-00003.safetensors",
|
46 |
+
"model.layers.0.self_attn.v_proj.scales": "model-00001-of-00003.safetensors",
|
47 |
+
"model.layers.1.input_layernorm.weight": "model-00001-of-00003.safetensors",
|
48 |
+
"model.layers.1.mlp.down_proj.bias": "model-00001-of-00003.safetensors",
|
49 |
+
"model.layers.1.mlp.down_proj.g_idx": "model-00001-of-00003.safetensors",
|
50 |
+
"model.layers.1.mlp.down_proj.qweight": "model-00001-of-00003.safetensors",
|
51 |
+
"model.layers.1.mlp.down_proj.qzeros": "model-00001-of-00003.safetensors",
|
52 |
+
"model.layers.1.mlp.down_proj.scales": "model-00001-of-00003.safetensors",
|
53 |
+
"model.layers.1.mlp.gate_proj.bias": "model-00001-of-00003.safetensors",
|
54 |
+
"model.layers.1.mlp.gate_proj.g_idx": "model-00001-of-00003.safetensors",
|
55 |
+
"model.layers.1.mlp.gate_proj.qweight": "model-00001-of-00003.safetensors",
|
56 |
+
"model.layers.1.mlp.gate_proj.qzeros": "model-00001-of-00003.safetensors",
|
57 |
+
"model.layers.1.mlp.gate_proj.scales": "model-00001-of-00003.safetensors",
|
58 |
+
"model.layers.1.mlp.up_proj.bias": "model-00001-of-00003.safetensors",
|
59 |
+
"model.layers.1.mlp.up_proj.g_idx": "model-00001-of-00003.safetensors",
|
60 |
+
"model.layers.1.mlp.up_proj.qweight": "model-00001-of-00003.safetensors",
|
61 |
+
"model.layers.1.mlp.up_proj.qzeros": "model-00001-of-00003.safetensors",
|
62 |
+
"model.layers.1.mlp.up_proj.scales": "model-00001-of-00003.safetensors",
|
63 |
+
"model.layers.1.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
|
64 |
+
"model.layers.1.self_attn.k_proj.bias": "model-00001-of-00003.safetensors",
|
65 |
+
"model.layers.1.self_attn.k_proj.g_idx": "model-00001-of-00003.safetensors",
|
66 |
+
"model.layers.1.self_attn.k_proj.qweight": "model-00001-of-00003.safetensors",
|
67 |
+
"model.layers.1.self_attn.k_proj.qzeros": "model-00001-of-00003.safetensors",
|
68 |
+
"model.layers.1.self_attn.k_proj.scales": "model-00001-of-00003.safetensors",
|
69 |
+
"model.layers.1.self_attn.o_proj.bias": "model-00001-of-00003.safetensors",
|
70 |
+
"model.layers.1.self_attn.o_proj.g_idx": "model-00001-of-00003.safetensors",
|
71 |
+
"model.layers.1.self_attn.o_proj.qweight": "model-00001-of-00003.safetensors",
|
72 |
+
"model.layers.1.self_attn.o_proj.qzeros": "model-00001-of-00003.safetensors",
|
73 |
+
"model.layers.1.self_attn.o_proj.scales": "model-00001-of-00003.safetensors",
|
74 |
+
"model.layers.1.self_attn.q_proj.bias": "model-00001-of-00003.safetensors",
|
75 |
+
"model.layers.1.self_attn.q_proj.g_idx": "model-00001-of-00003.safetensors",
|
76 |
+
"model.layers.1.self_attn.q_proj.qweight": "model-00001-of-00003.safetensors",
|
77 |
+
"model.layers.1.self_attn.q_proj.qzeros": "model-00001-of-00003.safetensors",
|
78 |
+
"model.layers.1.self_attn.q_proj.scales": "model-00001-of-00003.safetensors",
|
79 |
+
"model.layers.1.self_attn.v_proj.bias": "model-00001-of-00003.safetensors",
|
80 |
+
"model.layers.1.self_attn.v_proj.g_idx": "model-00001-of-00003.safetensors",
|
81 |
+
"model.layers.1.self_attn.v_proj.qweight": "model-00001-of-00003.safetensors",
|
82 |
+
"model.layers.1.self_attn.v_proj.qzeros": "model-00001-of-00003.safetensors",
|
83 |
+
"model.layers.1.self_attn.v_proj.scales": "model-00001-of-00003.safetensors",
|
84 |
+
"model.layers.10.input_layernorm.weight": "model-00001-of-00003.safetensors",
|
85 |
+
"model.layers.10.mlp.down_proj.bias": "model-00001-of-00003.safetensors",
|
86 |
+
"model.layers.10.mlp.down_proj.g_idx": "model-00001-of-00003.safetensors",
|
87 |
+
"model.layers.10.mlp.down_proj.qweight": "model-00001-of-00003.safetensors",
|
88 |
+
"model.layers.10.mlp.down_proj.qzeros": "model-00001-of-00003.safetensors",
|
89 |
+
"model.layers.10.mlp.down_proj.scales": "model-00001-of-00003.safetensors",
|
90 |
+
"model.layers.10.mlp.gate_proj.bias": "model-00001-of-00003.safetensors",
|
91 |
+
"model.layers.10.mlp.gate_proj.g_idx": "model-00001-of-00003.safetensors",
|
92 |
+
"model.layers.10.mlp.gate_proj.qweight": "model-00001-of-00003.safetensors",
|
93 |
+
"model.layers.10.mlp.gate_proj.qzeros": "model-00001-of-00003.safetensors",
|
94 |
+
"model.layers.10.mlp.gate_proj.scales": "model-00001-of-00003.safetensors",
|
95 |
+
"model.layers.10.mlp.up_proj.bias": "model-00001-of-00003.safetensors",
|
96 |
+
"model.layers.10.mlp.up_proj.g_idx": "model-00001-of-00003.safetensors",
|
97 |
+
"model.layers.10.mlp.up_proj.qweight": "model-00001-of-00003.safetensors",
|
98 |
+
"model.layers.10.mlp.up_proj.qzeros": "model-00001-of-00003.safetensors",
|
99 |
+
"model.layers.10.mlp.up_proj.scales": "model-00001-of-00003.safetensors",
|
100 |
+
"model.layers.10.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
|
101 |
+
"model.layers.10.self_attn.k_proj.bias": "model-00001-of-00003.safetensors",
|
102 |
+
"model.layers.10.self_attn.k_proj.g_idx": "model-00001-of-00003.safetensors",
|
103 |
+
"model.layers.10.self_attn.k_proj.qweight": "model-00001-of-00003.safetensors",
|
104 |
+
"model.layers.10.self_attn.k_proj.qzeros": "model-00001-of-00003.safetensors",
|
105 |
+
"model.layers.10.self_attn.k_proj.scales": "model-00001-of-00003.safetensors",
|
106 |
+
"model.layers.10.self_attn.o_proj.bias": "model-00001-of-00003.safetensors",
|
107 |
+
"model.layers.10.self_attn.o_proj.g_idx": "model-00001-of-00003.safetensors",
|
108 |
+
"model.layers.10.self_attn.o_proj.qweight": "model-00001-of-00003.safetensors",
|
109 |
+
"model.layers.10.self_attn.o_proj.qzeros": "model-00001-of-00003.safetensors",
|
110 |
+
"model.layers.10.self_attn.o_proj.scales": "model-00001-of-00003.safetensors",
|
111 |
+
"model.layers.10.self_attn.q_proj.bias": "model-00001-of-00003.safetensors",
|
112 |
+
"model.layers.10.self_attn.q_proj.g_idx": "model-00001-of-00003.safetensors",
|
113 |
+
"model.layers.10.self_attn.q_proj.qweight": "model-00001-of-00003.safetensors",
|
114 |
+
"model.layers.10.self_attn.q_proj.qzeros": "model-00001-of-00003.safetensors",
|
115 |
+
"model.layers.10.self_attn.q_proj.scales": "model-00001-of-00003.safetensors",
|
116 |
+
"model.layers.10.self_attn.v_proj.bias": "model-00001-of-00003.safetensors",
|
117 |
+
"model.layers.10.self_attn.v_proj.g_idx": "model-00001-of-00003.safetensors",
|
118 |
+
"model.layers.10.self_attn.v_proj.qweight": "model-00001-of-00003.safetensors",
|
119 |
+
"model.layers.10.self_attn.v_proj.qzeros": "model-00001-of-00003.safetensors",
|
120 |
+
"model.layers.10.self_attn.v_proj.scales": "model-00001-of-00003.safetensors",
|
121 |
+
"model.layers.11.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
122 |
+
"model.layers.11.mlp.down_proj.bias": "model-00002-of-00003.safetensors",
|
123 |
+
"model.layers.11.mlp.down_proj.g_idx": "model-00002-of-00003.safetensors",
|
124 |
+
"model.layers.11.mlp.down_proj.qweight": "model-00002-of-00003.safetensors",
|
125 |
+
"model.layers.11.mlp.down_proj.qzeros": "model-00002-of-00003.safetensors",
|
126 |
+
"model.layers.11.mlp.down_proj.scales": "model-00002-of-00003.safetensors",
|
127 |
+
"model.layers.11.mlp.gate_proj.bias": "model-00002-of-00003.safetensors",
|
128 |
+
"model.layers.11.mlp.gate_proj.g_idx": "model-00002-of-00003.safetensors",
|
129 |
+
"model.layers.11.mlp.gate_proj.qweight": "model-00002-of-00003.safetensors",
|
130 |
+
"model.layers.11.mlp.gate_proj.qzeros": "model-00002-of-00003.safetensors",
|
131 |
+
"model.layers.11.mlp.gate_proj.scales": "model-00002-of-00003.safetensors",
|
132 |
+
"model.layers.11.mlp.up_proj.bias": "model-00002-of-00003.safetensors",
|
133 |
+
"model.layers.11.mlp.up_proj.g_idx": "model-00002-of-00003.safetensors",
|
134 |
+
"model.layers.11.mlp.up_proj.qweight": "model-00002-of-00003.safetensors",
|
135 |
+
"model.layers.11.mlp.up_proj.qzeros": "model-00002-of-00003.safetensors",
|
136 |
+
"model.layers.11.mlp.up_proj.scales": "model-00002-of-00003.safetensors",
|
137 |
+
"model.layers.11.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
138 |
+
"model.layers.11.self_attn.k_proj.bias": "model-00001-of-00003.safetensors",
|
139 |
+
"model.layers.11.self_attn.k_proj.g_idx": "model-00001-of-00003.safetensors",
|
140 |
+
"model.layers.11.self_attn.k_proj.qweight": "model-00001-of-00003.safetensors",
|
141 |
+
"model.layers.11.self_attn.k_proj.qzeros": "model-00001-of-00003.safetensors",
|
142 |
+
"model.layers.11.self_attn.k_proj.scales": "model-00001-of-00003.safetensors",
|
143 |
+
"model.layers.11.self_attn.o_proj.bias": "model-00001-of-00003.safetensors",
|
144 |
+
"model.layers.11.self_attn.o_proj.g_idx": "model-00001-of-00003.safetensors",
|
145 |
+
"model.layers.11.self_attn.o_proj.qweight": "model-00001-of-00003.safetensors",
|
146 |
+
"model.layers.11.self_attn.o_proj.qzeros": "model-00001-of-00003.safetensors",
|
147 |
+
"model.layers.11.self_attn.o_proj.scales": "model-00001-of-00003.safetensors",
|
148 |
+
"model.layers.11.self_attn.q_proj.bias": "model-00002-of-00003.safetensors",
|
149 |
+
"model.layers.11.self_attn.q_proj.g_idx": "model-00002-of-00003.safetensors",
|
150 |
+
"model.layers.11.self_attn.q_proj.qweight": "model-00002-of-00003.safetensors",
|
151 |
+
"model.layers.11.self_attn.q_proj.qzeros": "model-00002-of-00003.safetensors",
|
152 |
+
"model.layers.11.self_attn.q_proj.scales": "model-00002-of-00003.safetensors",
|
153 |
+
"model.layers.11.self_attn.v_proj.bias": "model-00002-of-00003.safetensors",
|
154 |
+
"model.layers.11.self_attn.v_proj.g_idx": "model-00002-of-00003.safetensors",
|
155 |
+
"model.layers.11.self_attn.v_proj.qweight": "model-00002-of-00003.safetensors",
|
156 |
+
"model.layers.11.self_attn.v_proj.qzeros": "model-00002-of-00003.safetensors",
|
157 |
+
"model.layers.11.self_attn.v_proj.scales": "model-00002-of-00003.safetensors",
|
158 |
+
"model.layers.12.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
159 |
+
"model.layers.12.mlp.down_proj.bias": "model-00002-of-00003.safetensors",
|
160 |
+
"model.layers.12.mlp.down_proj.g_idx": "model-00002-of-00003.safetensors",
|
161 |
+
"model.layers.12.mlp.down_proj.qweight": "model-00002-of-00003.safetensors",
|
162 |
+
"model.layers.12.mlp.down_proj.qzeros": "model-00002-of-00003.safetensors",
|
163 |
+
"model.layers.12.mlp.down_proj.scales": "model-00002-of-00003.safetensors",
|
164 |
+
"model.layers.12.mlp.gate_proj.bias": "model-00002-of-00003.safetensors",
|
165 |
+
"model.layers.12.mlp.gate_proj.g_idx": "model-00002-of-00003.safetensors",
|
166 |
+
"model.layers.12.mlp.gate_proj.qweight": "model-00002-of-00003.safetensors",
|
167 |
+
"model.layers.12.mlp.gate_proj.qzeros": "model-00002-of-00003.safetensors",
|
168 |
+
"model.layers.12.mlp.gate_proj.scales": "model-00002-of-00003.safetensors",
|
169 |
+
"model.layers.12.mlp.up_proj.bias": "model-00002-of-00003.safetensors",
|
170 |
+
"model.layers.12.mlp.up_proj.g_idx": "model-00002-of-00003.safetensors",
|
171 |
+
"model.layers.12.mlp.up_proj.qweight": "model-00002-of-00003.safetensors",
|
172 |
+
"model.layers.12.mlp.up_proj.qzeros": "model-00002-of-00003.safetensors",
|
173 |
+
"model.layers.12.mlp.up_proj.scales": "model-00002-of-00003.safetensors",
|
174 |
+
"model.layers.12.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
175 |
+
"model.layers.12.self_attn.k_proj.bias": "model-00002-of-00003.safetensors",
|
176 |
+
"model.layers.12.self_attn.k_proj.g_idx": "model-00002-of-00003.safetensors",
|
177 |
+
"model.layers.12.self_attn.k_proj.qweight": "model-00002-of-00003.safetensors",
|
178 |
+
"model.layers.12.self_attn.k_proj.qzeros": "model-00002-of-00003.safetensors",
|
179 |
+
"model.layers.12.self_attn.k_proj.scales": "model-00002-of-00003.safetensors",
|
180 |
+
"model.layers.12.self_attn.o_proj.bias": "model-00002-of-00003.safetensors",
|
181 |
+
"model.layers.12.self_attn.o_proj.g_idx": "model-00002-of-00003.safetensors",
|
182 |
+
"model.layers.12.self_attn.o_proj.qweight": "model-00002-of-00003.safetensors",
|
183 |
+
"model.layers.12.self_attn.o_proj.qzeros": "model-00002-of-00003.safetensors",
|
184 |
+
"model.layers.12.self_attn.o_proj.scales": "model-00002-of-00003.safetensors",
|
185 |
+
"model.layers.12.self_attn.q_proj.bias": "model-00002-of-00003.safetensors",
|
186 |
+
"model.layers.12.self_attn.q_proj.g_idx": "model-00002-of-00003.safetensors",
|
187 |
+
"model.layers.12.self_attn.q_proj.qweight": "model-00002-of-00003.safetensors",
|
188 |
+
"model.layers.12.self_attn.q_proj.qzeros": "model-00002-of-00003.safetensors",
|
189 |
+
"model.layers.12.self_attn.q_proj.scales": "model-00002-of-00003.safetensors",
|
190 |
+
"model.layers.12.self_attn.v_proj.bias": "model-00002-of-00003.safetensors",
|
191 |
+
"model.layers.12.self_attn.v_proj.g_idx": "model-00002-of-00003.safetensors",
|
192 |
+
"model.layers.12.self_attn.v_proj.qweight": "model-00002-of-00003.safetensors",
|
193 |
+
"model.layers.12.self_attn.v_proj.qzeros": "model-00002-of-00003.safetensors",
|
194 |
+
"model.layers.12.self_attn.v_proj.scales": "model-00002-of-00003.safetensors",
|
195 |
+
"model.layers.13.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
196 |
+
"model.layers.13.mlp.down_proj.bias": "model-00002-of-00003.safetensors",
|
197 |
+
"model.layers.13.mlp.down_proj.g_idx": "model-00002-of-00003.safetensors",
|
198 |
+
"model.layers.13.mlp.down_proj.qweight": "model-00002-of-00003.safetensors",
|
199 |
+
"model.layers.13.mlp.down_proj.qzeros": "model-00002-of-00003.safetensors",
|
200 |
+
"model.layers.13.mlp.down_proj.scales": "model-00002-of-00003.safetensors",
|
201 |
+
"model.layers.13.mlp.gate_proj.bias": "model-00002-of-00003.safetensors",
|
202 |
+
"model.layers.13.mlp.gate_proj.g_idx": "model-00002-of-00003.safetensors",
|
203 |
+
"model.layers.13.mlp.gate_proj.qweight": "model-00002-of-00003.safetensors",
|
204 |
+
"model.layers.13.mlp.gate_proj.qzeros": "model-00002-of-00003.safetensors",
|
205 |
+
"model.layers.13.mlp.gate_proj.scales": "model-00002-of-00003.safetensors",
|
206 |
+
"model.layers.13.mlp.up_proj.bias": "model-00002-of-00003.safetensors",
|
207 |
+
"model.layers.13.mlp.up_proj.g_idx": "model-00002-of-00003.safetensors",
|
208 |
+
"model.layers.13.mlp.up_proj.qweight": "model-00002-of-00003.safetensors",
|
209 |
+
"model.layers.13.mlp.up_proj.qzeros": "model-00002-of-00003.safetensors",
|
210 |
+
"model.layers.13.mlp.up_proj.scales": "model-00002-of-00003.safetensors",
|
211 |
+
"model.layers.13.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
212 |
+
"model.layers.13.self_attn.k_proj.bias": "model-00002-of-00003.safetensors",
|
213 |
+
"model.layers.13.self_attn.k_proj.g_idx": "model-00002-of-00003.safetensors",
|
214 |
+
"model.layers.13.self_attn.k_proj.qweight": "model-00002-of-00003.safetensors",
|
215 |
+
"model.layers.13.self_attn.k_proj.qzeros": "model-00002-of-00003.safetensors",
|
216 |
+
"model.layers.13.self_attn.k_proj.scales": "model-00002-of-00003.safetensors",
|
217 |
+
"model.layers.13.self_attn.o_proj.bias": "model-00002-of-00003.safetensors",
|
218 |
+
"model.layers.13.self_attn.o_proj.g_idx": "model-00002-of-00003.safetensors",
|
219 |
+
"model.layers.13.self_attn.o_proj.qweight": "model-00002-of-00003.safetensors",
|
220 |
+
"model.layers.13.self_attn.o_proj.qzeros": "model-00002-of-00003.safetensors",
|
221 |
+
"model.layers.13.self_attn.o_proj.scales": "model-00002-of-00003.safetensors",
|
222 |
+
"model.layers.13.self_attn.q_proj.bias": "model-00002-of-00003.safetensors",
|
223 |
+
"model.layers.13.self_attn.q_proj.g_idx": "model-00002-of-00003.safetensors",
|
224 |
+
"model.layers.13.self_attn.q_proj.qweight": "model-00002-of-00003.safetensors",
|
225 |
+
"model.layers.13.self_attn.q_proj.qzeros": "model-00002-of-00003.safetensors",
|
226 |
+
"model.layers.13.self_attn.q_proj.scales": "model-00002-of-00003.safetensors",
|
227 |
+
"model.layers.13.self_attn.v_proj.bias": "model-00002-of-00003.safetensors",
|
228 |
+
"model.layers.13.self_attn.v_proj.g_idx": "model-00002-of-00003.safetensors",
|
229 |
+
"model.layers.13.self_attn.v_proj.qweight": "model-00002-of-00003.safetensors",
|
230 |
+
"model.layers.13.self_attn.v_proj.qzeros": "model-00002-of-00003.safetensors",
|
231 |
+
"model.layers.13.self_attn.v_proj.scales": "model-00002-of-00003.safetensors",
|
232 |
+
"model.layers.14.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
233 |
+
"model.layers.14.mlp.down_proj.bias": "model-00002-of-00003.safetensors",
|
234 |
+
"model.layers.14.mlp.down_proj.g_idx": "model-00002-of-00003.safetensors",
|
235 |
+
"model.layers.14.mlp.down_proj.qweight": "model-00002-of-00003.safetensors",
|
236 |
+
"model.layers.14.mlp.down_proj.qzeros": "model-00002-of-00003.safetensors",
|
237 |
+
"model.layers.14.mlp.down_proj.scales": "model-00002-of-00003.safetensors",
|
238 |
+
"model.layers.14.mlp.gate_proj.bias": "model-00002-of-00003.safetensors",
|
239 |
+
"model.layers.14.mlp.gate_proj.g_idx": "model-00002-of-00003.safetensors",
|
240 |
+
"model.layers.14.mlp.gate_proj.qweight": "model-00002-of-00003.safetensors",
|
241 |
+
"model.layers.14.mlp.gate_proj.qzeros": "model-00002-of-00003.safetensors",
|
242 |
+
"model.layers.14.mlp.gate_proj.scales": "model-00002-of-00003.safetensors",
|
243 |
+
"model.layers.14.mlp.up_proj.bias": "model-00002-of-00003.safetensors",
|
244 |
+
"model.layers.14.mlp.up_proj.g_idx": "model-00002-of-00003.safetensors",
|
245 |
+
"model.layers.14.mlp.up_proj.qweight": "model-00002-of-00003.safetensors",
|
246 |
+
"model.layers.14.mlp.up_proj.qzeros": "model-00002-of-00003.safetensors",
|
247 |
+
"model.layers.14.mlp.up_proj.scales": "model-00002-of-00003.safetensors",
|
248 |
+
"model.layers.14.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
249 |
+
"model.layers.14.self_attn.k_proj.bias": "model-00002-of-00003.safetensors",
|
250 |
+
"model.layers.14.self_attn.k_proj.g_idx": "model-00002-of-00003.safetensors",
|
251 |
+
"model.layers.14.self_attn.k_proj.qweight": "model-00002-of-00003.safetensors",
|
252 |
+
"model.layers.14.self_attn.k_proj.qzeros": "model-00002-of-00003.safetensors",
|
253 |
+
"model.layers.14.self_attn.k_proj.scales": "model-00002-of-00003.safetensors",
|
254 |
+
"model.layers.14.self_attn.o_proj.bias": "model-00002-of-00003.safetensors",
|
255 |
+
"model.layers.14.self_attn.o_proj.g_idx": "model-00002-of-00003.safetensors",
|
256 |
+
"model.layers.14.self_attn.o_proj.qweight": "model-00002-of-00003.safetensors",
|
257 |
+
"model.layers.14.self_attn.o_proj.qzeros": "model-00002-of-00003.safetensors",
|
258 |
+
"model.layers.14.self_attn.o_proj.scales": "model-00002-of-00003.safetensors",
|
259 |
+
"model.layers.14.self_attn.q_proj.bias": "model-00002-of-00003.safetensors",
|
260 |
+
"model.layers.14.self_attn.q_proj.g_idx": "model-00002-of-00003.safetensors",
|
261 |
+
"model.layers.14.self_attn.q_proj.qweight": "model-00002-of-00003.safetensors",
|
262 |
+
"model.layers.14.self_attn.q_proj.qzeros": "model-00002-of-00003.safetensors",
|
263 |
+
"model.layers.14.self_attn.q_proj.scales": "model-00002-of-00003.safetensors",
|
264 |
+
"model.layers.14.self_attn.v_proj.bias": "model-00002-of-00003.safetensors",
|
265 |
+
"model.layers.14.self_attn.v_proj.g_idx": "model-00002-of-00003.safetensors",
|
266 |
+
"model.layers.14.self_attn.v_proj.qweight": "model-00002-of-00003.safetensors",
|
267 |
+
"model.layers.14.self_attn.v_proj.qzeros": "model-00002-of-00003.safetensors",
|
268 |
+
"model.layers.14.self_attn.v_proj.scales": "model-00002-of-00003.safetensors",
|
269 |
+
"model.layers.15.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
270 |
+
"model.layers.15.mlp.down_proj.bias": "model-00002-of-00003.safetensors",
|
271 |
+
"model.layers.15.mlp.down_proj.g_idx": "model-00002-of-00003.safetensors",
|
272 |
+
"model.layers.15.mlp.down_proj.qweight": "model-00002-of-00003.safetensors",
|
273 |
+
"model.layers.15.mlp.down_proj.qzeros": "model-00002-of-00003.safetensors",
|
274 |
+
"model.layers.15.mlp.down_proj.scales": "model-00002-of-00003.safetensors",
|
275 |
+
"model.layers.15.mlp.gate_proj.bias": "model-00002-of-00003.safetensors",
|
276 |
+
"model.layers.15.mlp.gate_proj.g_idx": "model-00002-of-00003.safetensors",
|
277 |
+
"model.layers.15.mlp.gate_proj.qweight": "model-00002-of-00003.safetensors",
|
278 |
+
"model.layers.15.mlp.gate_proj.qzeros": "model-00002-of-00003.safetensors",
|
279 |
+
"model.layers.15.mlp.gate_proj.scales": "model-00002-of-00003.safetensors",
|
280 |
+
"model.layers.15.mlp.up_proj.bias": "model-00002-of-00003.safetensors",
|
281 |
+
"model.layers.15.mlp.up_proj.g_idx": "model-00002-of-00003.safetensors",
|
282 |
+
"model.layers.15.mlp.up_proj.qweight": "model-00002-of-00003.safetensors",
|
283 |
+
"model.layers.15.mlp.up_proj.qzeros": "model-00002-of-00003.safetensors",
|
284 |
+
"model.layers.15.mlp.up_proj.scales": "model-00002-of-00003.safetensors",
|
285 |
+
"model.layers.15.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
286 |
+
"model.layers.15.self_attn.k_proj.bias": "model-00002-of-00003.safetensors",
|
287 |
+
"model.layers.15.self_attn.k_proj.g_idx": "model-00002-of-00003.safetensors",
|
288 |
+
"model.layers.15.self_attn.k_proj.qweight": "model-00002-of-00003.safetensors",
|
289 |
+
"model.layers.15.self_attn.k_proj.qzeros": "model-00002-of-00003.safetensors",
|
290 |
+
"model.layers.15.self_attn.k_proj.scales": "model-00002-of-00003.safetensors",
|
291 |
+
"model.layers.15.self_attn.o_proj.bias": "model-00002-of-00003.safetensors",
|
292 |
+
"model.layers.15.self_attn.o_proj.g_idx": "model-00002-of-00003.safetensors",
|
293 |
+
"model.layers.15.self_attn.o_proj.qweight": "model-00002-of-00003.safetensors",
|
294 |
+
"model.layers.15.self_attn.o_proj.qzeros": "model-00002-of-00003.safetensors",
|
295 |
+
"model.layers.15.self_attn.o_proj.scales": "model-00002-of-00003.safetensors",
|
296 |
+
"model.layers.15.self_attn.q_proj.bias": "model-00002-of-00003.safetensors",
|
297 |
+
"model.layers.15.self_attn.q_proj.g_idx": "model-00002-of-00003.safetensors",
|
298 |
+
"model.layers.15.self_attn.q_proj.qweight": "model-00002-of-00003.safetensors",
|
299 |
+
"model.layers.15.self_attn.q_proj.qzeros": "model-00002-of-00003.safetensors",
|
300 |
+
"model.layers.15.self_attn.q_proj.scales": "model-00002-of-00003.safetensors",
|
301 |
+
"model.layers.15.self_attn.v_proj.bias": "model-00002-of-00003.safetensors",
|
302 |
+
"model.layers.15.self_attn.v_proj.g_idx": "model-00002-of-00003.safetensors",
|
303 |
+
"model.layers.15.self_attn.v_proj.qweight": "model-00002-of-00003.safetensors",
|
304 |
+
"model.layers.15.self_attn.v_proj.qzeros": "model-00002-of-00003.safetensors",
|
305 |
+
"model.layers.15.self_attn.v_proj.scales": "model-00002-of-00003.safetensors",
|
306 |
+
"model.layers.16.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
307 |
+
"model.layers.16.mlp.down_proj.bias": "model-00002-of-00003.safetensors",
|
308 |
+
"model.layers.16.mlp.down_proj.g_idx": "model-00002-of-00003.safetensors",
|
309 |
+
"model.layers.16.mlp.down_proj.qweight": "model-00002-of-00003.safetensors",
|
310 |
+
"model.layers.16.mlp.down_proj.qzeros": "model-00002-of-00003.safetensors",
|
311 |
+
"model.layers.16.mlp.down_proj.scales": "model-00002-of-00003.safetensors",
|
312 |
+
"model.layers.16.mlp.gate_proj.bias": "model-00002-of-00003.safetensors",
|
313 |
+
"model.layers.16.mlp.gate_proj.g_idx": "model-00002-of-00003.safetensors",
|
314 |
+
"model.layers.16.mlp.gate_proj.qweight": "model-00002-of-00003.safetensors",
|
315 |
+
"model.layers.16.mlp.gate_proj.qzeros": "model-00002-of-00003.safetensors",
|
316 |
+
"model.layers.16.mlp.gate_proj.scales": "model-00002-of-00003.safetensors",
|
317 |
+
"model.layers.16.mlp.up_proj.bias": "model-00002-of-00003.safetensors",
|
318 |
+
"model.layers.16.mlp.up_proj.g_idx": "model-00002-of-00003.safetensors",
|
319 |
+
"model.layers.16.mlp.up_proj.qweight": "model-00002-of-00003.safetensors",
|
320 |
+
"model.layers.16.mlp.up_proj.qzeros": "model-00002-of-00003.safetensors",
|
321 |
+
"model.layers.16.mlp.up_proj.scales": "model-00002-of-00003.safetensors",
|
322 |
+
"model.layers.16.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
323 |
+
"model.layers.16.self_attn.k_proj.bias": "model-00002-of-00003.safetensors",
|
324 |
+
"model.layers.16.self_attn.k_proj.g_idx": "model-00002-of-00003.safetensors",
|
325 |
+
"model.layers.16.self_attn.k_proj.qweight": "model-00002-of-00003.safetensors",
|
326 |
+
"model.layers.16.self_attn.k_proj.qzeros": "model-00002-of-00003.safetensors",
|
327 |
+
"model.layers.16.self_attn.k_proj.scales": "model-00002-of-00003.safetensors",
|
328 |
+
"model.layers.16.self_attn.o_proj.bias": "model-00002-of-00003.safetensors",
|
329 |
+
"model.layers.16.self_attn.o_proj.g_idx": "model-00002-of-00003.safetensors",
|
330 |
+
"model.layers.16.self_attn.o_proj.qweight": "model-00002-of-00003.safetensors",
|
331 |
+
"model.layers.16.self_attn.o_proj.qzeros": "model-00002-of-00003.safetensors",
|
332 |
+
"model.layers.16.self_attn.o_proj.scales": "model-00002-of-00003.safetensors",
|
333 |
+
"model.layers.16.self_attn.q_proj.bias": "model-00002-of-00003.safetensors",
|
334 |
+
"model.layers.16.self_attn.q_proj.g_idx": "model-00002-of-00003.safetensors",
|
335 |
+
"model.layers.16.self_attn.q_proj.qweight": "model-00002-of-00003.safetensors",
|
336 |
+
"model.layers.16.self_attn.q_proj.qzeros": "model-00002-of-00003.safetensors",
|
337 |
+
"model.layers.16.self_attn.q_proj.scales": "model-00002-of-00003.safetensors",
|
338 |
+
"model.layers.16.self_attn.v_proj.bias": "model-00002-of-00003.safetensors",
|
339 |
+
"model.layers.16.self_attn.v_proj.g_idx": "model-00002-of-00003.safetensors",
|
340 |
+
"model.layers.16.self_attn.v_proj.qweight": "model-00002-of-00003.safetensors",
|
341 |
+
"model.layers.16.self_attn.v_proj.qzeros": "model-00002-of-00003.safetensors",
|
342 |
+
"model.layers.16.self_attn.v_proj.scales": "model-00002-of-00003.safetensors",
|
343 |
+
"model.layers.17.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
344 |
+
"model.layers.17.mlp.down_proj.bias": "model-00002-of-00003.safetensors",
|
345 |
+
"model.layers.17.mlp.down_proj.g_idx": "model-00002-of-00003.safetensors",
|
346 |
+
"model.layers.17.mlp.down_proj.qweight": "model-00002-of-00003.safetensors",
|
347 |
+
"model.layers.17.mlp.down_proj.qzeros": "model-00002-of-00003.safetensors",
|
348 |
+
"model.layers.17.mlp.down_proj.scales": "model-00002-of-00003.safetensors",
|
349 |
+
"model.layers.17.mlp.gate_proj.bias": "model-00002-of-00003.safetensors",
|
350 |
+
"model.layers.17.mlp.gate_proj.g_idx": "model-00002-of-00003.safetensors",
|
351 |
+
"model.layers.17.mlp.gate_proj.qweight": "model-00002-of-00003.safetensors",
|
352 |
+
"model.layers.17.mlp.gate_proj.qzeros": "model-00002-of-00003.safetensors",
|
353 |
+
"model.layers.17.mlp.gate_proj.scales": "model-00002-of-00003.safetensors",
|
354 |
+
"model.layers.17.mlp.up_proj.bias": "model-00002-of-00003.safetensors",
|
355 |
+
"model.layers.17.mlp.up_proj.g_idx": "model-00002-of-00003.safetensors",
|
356 |
+
"model.layers.17.mlp.up_proj.qweight": "model-00002-of-00003.safetensors",
|
357 |
+
"model.layers.17.mlp.up_proj.qzeros": "model-00002-of-00003.safetensors",
|
358 |
+
"model.layers.17.mlp.up_proj.scales": "model-00002-of-00003.safetensors",
|
359 |
+
"model.layers.17.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
360 |
+
"model.layers.17.self_attn.k_proj.bias": "model-00002-of-00003.safetensors",
|
361 |
+
"model.layers.17.self_attn.k_proj.g_idx": "model-00002-of-00003.safetensors",
|
362 |
+
"model.layers.17.self_attn.k_proj.qweight": "model-00002-of-00003.safetensors",
|
363 |
+
"model.layers.17.self_attn.k_proj.qzeros": "model-00002-of-00003.safetensors",
|
364 |
+
"model.layers.17.self_attn.k_proj.scales": "model-00002-of-00003.safetensors",
|
365 |
+
"model.layers.17.self_attn.o_proj.bias": "model-00002-of-00003.safetensors",
|
366 |
+
"model.layers.17.self_attn.o_proj.g_idx": "model-00002-of-00003.safetensors",
|
367 |
+
"model.layers.17.self_attn.o_proj.qweight": "model-00002-of-00003.safetensors",
|
368 |
+
"model.layers.17.self_attn.o_proj.qzeros": "model-00002-of-00003.safetensors",
|
369 |
+
"model.layers.17.self_attn.o_proj.scales": "model-00002-of-00003.safetensors",
|
370 |
+
"model.layers.17.self_attn.q_proj.bias": "model-00002-of-00003.safetensors",
|
371 |
+
"model.layers.17.self_attn.q_proj.g_idx": "model-00002-of-00003.safetensors",
|
372 |
+
"model.layers.17.self_attn.q_proj.qweight": "model-00002-of-00003.safetensors",
|
373 |
+
"model.layers.17.self_attn.q_proj.qzeros": "model-00002-of-00003.safetensors",
|
374 |
+
"model.layers.17.self_attn.q_proj.scales": "model-00002-of-00003.safetensors",
|
375 |
+
"model.layers.17.self_attn.v_proj.bias": "model-00002-of-00003.safetensors",
|
376 |
+
"model.layers.17.self_attn.v_proj.g_idx": "model-00002-of-00003.safetensors",
|
377 |
+
"model.layers.17.self_attn.v_proj.qweight": "model-00002-of-00003.safetensors",
|
378 |
+
"model.layers.17.self_attn.v_proj.qzeros": "model-00002-of-00003.safetensors",
|
379 |
+
"model.layers.17.self_attn.v_proj.scales": "model-00002-of-00003.safetensors",
|
380 |
+
"model.layers.18.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
381 |
+
"model.layers.18.mlp.down_proj.bias": "model-00002-of-00003.safetensors",
|
382 |
+
"model.layers.18.mlp.down_proj.g_idx": "model-00002-of-00003.safetensors",
|
383 |
+
"model.layers.18.mlp.down_proj.qweight": "model-00002-of-00003.safetensors",
|
384 |
+
"model.layers.18.mlp.down_proj.qzeros": "model-00002-of-00003.safetensors",
|
385 |
+
"model.layers.18.mlp.down_proj.scales": "model-00002-of-00003.safetensors",
|
386 |
+
"model.layers.18.mlp.gate_proj.bias": "model-00002-of-00003.safetensors",
|
387 |
+
"model.layers.18.mlp.gate_proj.g_idx": "model-00002-of-00003.safetensors",
|
388 |
+
"model.layers.18.mlp.gate_proj.qweight": "model-00002-of-00003.safetensors",
|
389 |
+
"model.layers.18.mlp.gate_proj.qzeros": "model-00002-of-00003.safetensors",
|
390 |
+
"model.layers.18.mlp.gate_proj.scales": "model-00002-of-00003.safetensors",
|
391 |
+
"model.layers.18.mlp.up_proj.bias": "model-00002-of-00003.safetensors",
|
392 |
+
"model.layers.18.mlp.up_proj.g_idx": "model-00002-of-00003.safetensors",
|
393 |
+
"model.layers.18.mlp.up_proj.qweight": "model-00002-of-00003.safetensors",
|
394 |
+
"model.layers.18.mlp.up_proj.qzeros": "model-00002-of-00003.safetensors",
|
395 |
+
"model.layers.18.mlp.up_proj.scales": "model-00002-of-00003.safetensors",
|
396 |
+
"model.layers.18.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
397 |
+
"model.layers.18.self_attn.k_proj.bias": "model-00002-of-00003.safetensors",
|
398 |
+
"model.layers.18.self_attn.k_proj.g_idx": "model-00002-of-00003.safetensors",
|
399 |
+
"model.layers.18.self_attn.k_proj.qweight": "model-00002-of-00003.safetensors",
|
400 |
+
"model.layers.18.self_attn.k_proj.qzeros": "model-00002-of-00003.safetensors",
|
401 |
+
"model.layers.18.self_attn.k_proj.scales": "model-00002-of-00003.safetensors",
|
402 |
+
"model.layers.18.self_attn.o_proj.bias": "model-00002-of-00003.safetensors",
|
403 |
+
"model.layers.18.self_attn.o_proj.g_idx": "model-00002-of-00003.safetensors",
|
404 |
+
"model.layers.18.self_attn.o_proj.qweight": "model-00002-of-00003.safetensors",
|
405 |
+
"model.layers.18.self_attn.o_proj.qzeros": "model-00002-of-00003.safetensors",
|
406 |
+
"model.layers.18.self_attn.o_proj.scales": "model-00002-of-00003.safetensors",
|
407 |
+
"model.layers.18.self_attn.q_proj.bias": "model-00002-of-00003.safetensors",
|
408 |
+
"model.layers.18.self_attn.q_proj.g_idx": "model-00002-of-00003.safetensors",
|
409 |
+
"model.layers.18.self_attn.q_proj.qweight": "model-00002-of-00003.safetensors",
|
410 |
+
"model.layers.18.self_attn.q_proj.qzeros": "model-00002-of-00003.safetensors",
|
411 |
+
"model.layers.18.self_attn.q_proj.scales": "model-00002-of-00003.safetensors",
|
412 |
+
"model.layers.18.self_attn.v_proj.bias": "model-00002-of-00003.safetensors",
|
413 |
+
"model.layers.18.self_attn.v_proj.g_idx": "model-00002-of-00003.safetensors",
|
414 |
+
"model.layers.18.self_attn.v_proj.qweight": "model-00002-of-00003.safetensors",
|
415 |
+
"model.layers.18.self_attn.v_proj.qzeros": "model-00002-of-00003.safetensors",
|
416 |
+
"model.layers.18.self_attn.v_proj.scales": "model-00002-of-00003.safetensors",
|
417 |
+
"model.layers.19.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
418 |
+
"model.layers.19.mlp.down_proj.bias": "model-00002-of-00003.safetensors",
|
419 |
+
"model.layers.19.mlp.down_proj.g_idx": "model-00002-of-00003.safetensors",
|
420 |
+
"model.layers.19.mlp.down_proj.qweight": "model-00002-of-00003.safetensors",
|
421 |
+
"model.layers.19.mlp.down_proj.qzeros": "model-00002-of-00003.safetensors",
|
422 |
+
"model.layers.19.mlp.down_proj.scales": "model-00002-of-00003.safetensors",
|
423 |
+
"model.layers.19.mlp.gate_proj.bias": "model-00002-of-00003.safetensors",
|
424 |
+
"model.layers.19.mlp.gate_proj.g_idx": "model-00002-of-00003.safetensors",
|
425 |
+
"model.layers.19.mlp.gate_proj.qweight": "model-00002-of-00003.safetensors",
|
426 |
+
"model.layers.19.mlp.gate_proj.qzeros": "model-00002-of-00003.safetensors",
|
427 |
+
"model.layers.19.mlp.gate_proj.scales": "model-00002-of-00003.safetensors",
|
428 |
+
"model.layers.19.mlp.up_proj.bias": "model-00002-of-00003.safetensors",
|
429 |
+
"model.layers.19.mlp.up_proj.g_idx": "model-00002-of-00003.safetensors",
|
430 |
+
"model.layers.19.mlp.up_proj.qweight": "model-00002-of-00003.safetensors",
|
431 |
+
"model.layers.19.mlp.up_proj.qzeros": "model-00002-of-00003.safetensors",
|
432 |
+
"model.layers.19.mlp.up_proj.scales": "model-00002-of-00003.safetensors",
|
433 |
+
"model.layers.19.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
434 |
+
"model.layers.19.self_attn.k_proj.bias": "model-00002-of-00003.safetensors",
|
435 |
+
"model.layers.19.self_attn.k_proj.g_idx": "model-00002-of-00003.safetensors",
|
436 |
+
"model.layers.19.self_attn.k_proj.qweight": "model-00002-of-00003.safetensors",
|
437 |
+
"model.layers.19.self_attn.k_proj.qzeros": "model-00002-of-00003.safetensors",
|
438 |
+
"model.layers.19.self_attn.k_proj.scales": "model-00002-of-00003.safetensors",
|
439 |
+
"model.layers.19.self_attn.o_proj.bias": "model-00002-of-00003.safetensors",
|
440 |
+
"model.layers.19.self_attn.o_proj.g_idx": "model-00002-of-00003.safetensors",
|
441 |
+
"model.layers.19.self_attn.o_proj.qweight": "model-00002-of-00003.safetensors",
|
442 |
+
"model.layers.19.self_attn.o_proj.qzeros": "model-00002-of-00003.safetensors",
|
443 |
+
"model.layers.19.self_attn.o_proj.scales": "model-00002-of-00003.safetensors",
|
444 |
+
"model.layers.19.self_attn.q_proj.bias": "model-00002-of-00003.safetensors",
|
445 |
+
"model.layers.19.self_attn.q_proj.g_idx": "model-00002-of-00003.safetensors",
|
446 |
+
"model.layers.19.self_attn.q_proj.qweight": "model-00002-of-00003.safetensors",
|
447 |
+
"model.layers.19.self_attn.q_proj.qzeros": "model-00002-of-00003.safetensors",
|
448 |
+
"model.layers.19.self_attn.q_proj.scales": "model-00002-of-00003.safetensors",
|
449 |
+
"model.layers.19.self_attn.v_proj.bias": "model-00002-of-00003.safetensors",
|
450 |
+
"model.layers.19.self_attn.v_proj.g_idx": "model-00002-of-00003.safetensors",
|
451 |
+
"model.layers.19.self_attn.v_proj.qweight": "model-00002-of-00003.safetensors",
|
452 |
+
"model.layers.19.self_attn.v_proj.qzeros": "model-00002-of-00003.safetensors",
|
453 |
+
"model.layers.19.self_attn.v_proj.scales": "model-00002-of-00003.safetensors",
|
454 |
+
"model.layers.2.input_layernorm.weight": "model-00001-of-00003.safetensors",
|
455 |
+
"model.layers.2.mlp.down_proj.bias": "model-00001-of-00003.safetensors",
|
456 |
+
"model.layers.2.mlp.down_proj.g_idx": "model-00001-of-00003.safetensors",
|
457 |
+
"model.layers.2.mlp.down_proj.qweight": "model-00001-of-00003.safetensors",
|
458 |
+
"model.layers.2.mlp.down_proj.qzeros": "model-00001-of-00003.safetensors",
|
459 |
+
"model.layers.2.mlp.down_proj.scales": "model-00001-of-00003.safetensors",
|
460 |
+
"model.layers.2.mlp.gate_proj.bias": "model-00001-of-00003.safetensors",
|
461 |
+
"model.layers.2.mlp.gate_proj.g_idx": "model-00001-of-00003.safetensors",
|
462 |
+
"model.layers.2.mlp.gate_proj.qweight": "model-00001-of-00003.safetensors",
|
463 |
+
"model.layers.2.mlp.gate_proj.qzeros": "model-00001-of-00003.safetensors",
|
464 |
+
"model.layers.2.mlp.gate_proj.scales": "model-00001-of-00003.safetensors",
|
465 |
+
"model.layers.2.mlp.up_proj.bias": "model-00001-of-00003.safetensors",
|
466 |
+
"model.layers.2.mlp.up_proj.g_idx": "model-00001-of-00003.safetensors",
|
467 |
+
"model.layers.2.mlp.up_proj.qweight": "model-00001-of-00003.safetensors",
|
468 |
+
"model.layers.2.mlp.up_proj.qzeros": "model-00001-of-00003.safetensors",
|
469 |
+
"model.layers.2.mlp.up_proj.scales": "model-00001-of-00003.safetensors",
|
470 |
+
"model.layers.2.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
|
471 |
+
"model.layers.2.self_attn.k_proj.bias": "model-00001-of-00003.safetensors",
|
472 |
+
"model.layers.2.self_attn.k_proj.g_idx": "model-00001-of-00003.safetensors",
|
473 |
+
"model.layers.2.self_attn.k_proj.qweight": "model-00001-of-00003.safetensors",
|
474 |
+
"model.layers.2.self_attn.k_proj.qzeros": "model-00001-of-00003.safetensors",
|
475 |
+
"model.layers.2.self_attn.k_proj.scales": "model-00001-of-00003.safetensors",
|
476 |
+
"model.layers.2.self_attn.o_proj.bias": "model-00001-of-00003.safetensors",
|
477 |
+
"model.layers.2.self_attn.o_proj.g_idx": "model-00001-of-00003.safetensors",
|
478 |
+
"model.layers.2.self_attn.o_proj.qweight": "model-00001-of-00003.safetensors",
|
479 |
+
"model.layers.2.self_attn.o_proj.qzeros": "model-00001-of-00003.safetensors",
|
480 |
+
"model.layers.2.self_attn.o_proj.scales": "model-00001-of-00003.safetensors",
|
481 |
+
"model.layers.2.self_attn.q_proj.bias": "model-00001-of-00003.safetensors",
|
482 |
+
"model.layers.2.self_attn.q_proj.g_idx": "model-00001-of-00003.safetensors",
|
483 |
+
"model.layers.2.self_attn.q_proj.qweight": "model-00001-of-00003.safetensors",
|
484 |
+
"model.layers.2.self_attn.q_proj.qzeros": "model-00001-of-00003.safetensors",
|
485 |
+
"model.layers.2.self_attn.q_proj.scales": "model-00001-of-00003.safetensors",
|
486 |
+
"model.layers.2.self_attn.v_proj.bias": "model-00001-of-00003.safetensors",
|
487 |
+
"model.layers.2.self_attn.v_proj.g_idx": "model-00001-of-00003.safetensors",
|
488 |
+
"model.layers.2.self_attn.v_proj.qweight": "model-00001-of-00003.safetensors",
|
489 |
+
"model.layers.2.self_attn.v_proj.qzeros": "model-00001-of-00003.safetensors",
|
490 |
+
"model.layers.2.self_attn.v_proj.scales": "model-00001-of-00003.safetensors",
|
491 |
+
"model.layers.20.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
492 |
+
"model.layers.20.mlp.down_proj.bias": "model-00002-of-00003.safetensors",
|
493 |
+
"model.layers.20.mlp.down_proj.g_idx": "model-00002-of-00003.safetensors",
|
494 |
+
"model.layers.20.mlp.down_proj.qweight": "model-00002-of-00003.safetensors",
|
495 |
+
"model.layers.20.mlp.down_proj.qzeros": "model-00002-of-00003.safetensors",
|
496 |
+
"model.layers.20.mlp.down_proj.scales": "model-00002-of-00003.safetensors",
|
497 |
+
"model.layers.20.mlp.gate_proj.bias": "model-00002-of-00003.safetensors",
|
498 |
+
"model.layers.20.mlp.gate_proj.g_idx": "model-00002-of-00003.safetensors",
|
499 |
+
"model.layers.20.mlp.gate_proj.qweight": "model-00002-of-00003.safetensors",
|
500 |
+
"model.layers.20.mlp.gate_proj.qzeros": "model-00002-of-00003.safetensors",
|
501 |
+
"model.layers.20.mlp.gate_proj.scales": "model-00002-of-00003.safetensors",
|
502 |
+
"model.layers.20.mlp.up_proj.bias": "model-00002-of-00003.safetensors",
|
503 |
+
"model.layers.20.mlp.up_proj.g_idx": "model-00002-of-00003.safetensors",
|
504 |
+
"model.layers.20.mlp.up_proj.qweight": "model-00002-of-00003.safetensors",
|
505 |
+
"model.layers.20.mlp.up_proj.qzeros": "model-00002-of-00003.safetensors",
|
506 |
+
"model.layers.20.mlp.up_proj.scales": "model-00002-of-00003.safetensors",
|
507 |
+
"model.layers.20.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
508 |
+
"model.layers.20.self_attn.k_proj.bias": "model-00002-of-00003.safetensors",
|
509 |
+
"model.layers.20.self_attn.k_proj.g_idx": "model-00002-of-00003.safetensors",
|
510 |
+
"model.layers.20.self_attn.k_proj.qweight": "model-00002-of-00003.safetensors",
|
511 |
+
"model.layers.20.self_attn.k_proj.qzeros": "model-00002-of-00003.safetensors",
|
512 |
+
"model.layers.20.self_attn.k_proj.scales": "model-00002-of-00003.safetensors",
|
513 |
+
"model.layers.20.self_attn.o_proj.bias": "model-00002-of-00003.safetensors",
|
514 |
+
"model.layers.20.self_attn.o_proj.g_idx": "model-00002-of-00003.safetensors",
|
515 |
+
"model.layers.20.self_attn.o_proj.qweight": "model-00002-of-00003.safetensors",
|
516 |
+
"model.layers.20.self_attn.o_proj.qzeros": "model-00002-of-00003.safetensors",
|
517 |
+
"model.layers.20.self_attn.o_proj.scales": "model-00002-of-00003.safetensors",
|
518 |
+
"model.layers.20.self_attn.q_proj.bias": "model-00002-of-00003.safetensors",
|
519 |
+
"model.layers.20.self_attn.q_proj.g_idx": "model-00002-of-00003.safetensors",
|
520 |
+
"model.layers.20.self_attn.q_proj.qweight": "model-00002-of-00003.safetensors",
|
521 |
+
"model.layers.20.self_attn.q_proj.qzeros": "model-00002-of-00003.safetensors",
|
522 |
+
"model.layers.20.self_attn.q_proj.scales": "model-00002-of-00003.safetensors",
|
523 |
+
"model.layers.20.self_attn.v_proj.bias": "model-00002-of-00003.safetensors",
|
524 |
+
"model.layers.20.self_attn.v_proj.g_idx": "model-00002-of-00003.safetensors",
|
525 |
+
"model.layers.20.self_attn.v_proj.qweight": "model-00002-of-00003.safetensors",
|
526 |
+
"model.layers.20.self_attn.v_proj.qzeros": "model-00002-of-00003.safetensors",
|
527 |
+
"model.layers.20.self_attn.v_proj.scales": "model-00002-of-00003.safetensors",
|
528 |
+
"model.layers.21.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
529 |
+
"model.layers.21.mlp.down_proj.bias": "model-00002-of-00003.safetensors",
|
530 |
+
"model.layers.21.mlp.down_proj.g_idx": "model-00002-of-00003.safetensors",
|
531 |
+
"model.layers.21.mlp.down_proj.qweight": "model-00002-of-00003.safetensors",
|
532 |
+
"model.layers.21.mlp.down_proj.qzeros": "model-00002-of-00003.safetensors",
|
533 |
+
"model.layers.21.mlp.down_proj.scales": "model-00002-of-00003.safetensors",
|
534 |
+
"model.layers.21.mlp.gate_proj.bias": "model-00002-of-00003.safetensors",
|
535 |
+
"model.layers.21.mlp.gate_proj.g_idx": "model-00002-of-00003.safetensors",
|
536 |
+
"model.layers.21.mlp.gate_proj.qweight": "model-00002-of-00003.safetensors",
|
537 |
+
"model.layers.21.mlp.gate_proj.qzeros": "model-00002-of-00003.safetensors",
|
538 |
+
"model.layers.21.mlp.gate_proj.scales": "model-00002-of-00003.safetensors",
|
539 |
+
"model.layers.21.mlp.up_proj.bias": "model-00002-of-00003.safetensors",
|
540 |
+
"model.layers.21.mlp.up_proj.g_idx": "model-00002-of-00003.safetensors",
|
541 |
+
"model.layers.21.mlp.up_proj.qweight": "model-00002-of-00003.safetensors",
|
542 |
+
"model.layers.21.mlp.up_proj.qzeros": "model-00002-of-00003.safetensors",
|
543 |
+
"model.layers.21.mlp.up_proj.scales": "model-00002-of-00003.safetensors",
|
544 |
+
"model.layers.21.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
545 |
+
"model.layers.21.self_attn.k_proj.bias": "model-00002-of-00003.safetensors",
|
546 |
+
"model.layers.21.self_attn.k_proj.g_idx": "model-00002-of-00003.safetensors",
|
547 |
+
"model.layers.21.self_attn.k_proj.qweight": "model-00002-of-00003.safetensors",
|
548 |
+
"model.layers.21.self_attn.k_proj.qzeros": "model-00002-of-00003.safetensors",
|
549 |
+
"model.layers.21.self_attn.k_proj.scales": "model-00002-of-00003.safetensors",
|
550 |
+
"model.layers.21.self_attn.o_proj.bias": "model-00002-of-00003.safetensors",
|
551 |
+
"model.layers.21.self_attn.o_proj.g_idx": "model-00002-of-00003.safetensors",
|
552 |
+
"model.layers.21.self_attn.o_proj.qweight": "model-00002-of-00003.safetensors",
|
553 |
+
"model.layers.21.self_attn.o_proj.qzeros": "model-00002-of-00003.safetensors",
|
554 |
+
"model.layers.21.self_attn.o_proj.scales": "model-00002-of-00003.safetensors",
|
555 |
+
"model.layers.21.self_attn.q_proj.bias": "model-00002-of-00003.safetensors",
|
556 |
+
"model.layers.21.self_attn.q_proj.g_idx": "model-00002-of-00003.safetensors",
|
557 |
+
"model.layers.21.self_attn.q_proj.qweight": "model-00002-of-00003.safetensors",
|
558 |
+
"model.layers.21.self_attn.q_proj.qzeros": "model-00002-of-00003.safetensors",
|
559 |
+
"model.layers.21.self_attn.q_proj.scales": "model-00002-of-00003.safetensors",
|
560 |
+
"model.layers.21.self_attn.v_proj.bias": "model-00002-of-00003.safetensors",
|
561 |
+
"model.layers.21.self_attn.v_proj.g_idx": "model-00002-of-00003.safetensors",
|
562 |
+
"model.layers.21.self_attn.v_proj.qweight": "model-00002-of-00003.safetensors",
|
563 |
+
"model.layers.21.self_attn.v_proj.qzeros": "model-00002-of-00003.safetensors",
|
564 |
+
"model.layers.21.self_attn.v_proj.scales": "model-00002-of-00003.safetensors",
|
565 |
+
"model.layers.22.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
566 |
+
"model.layers.22.mlp.down_proj.bias": "model-00002-of-00003.safetensors",
|
567 |
+
"model.layers.22.mlp.down_proj.g_idx": "model-00002-of-00003.safetensors",
|
568 |
+
"model.layers.22.mlp.down_proj.qweight": "model-00002-of-00003.safetensors",
|
569 |
+
"model.layers.22.mlp.down_proj.qzeros": "model-00002-of-00003.safetensors",
|
570 |
+
"model.layers.22.mlp.down_proj.scales": "model-00002-of-00003.safetensors",
|
571 |
+
"model.layers.22.mlp.gate_proj.bias": "model-00002-of-00003.safetensors",
|
572 |
+
"model.layers.22.mlp.gate_proj.g_idx": "model-00002-of-00003.safetensors",
|
573 |
+
"model.layers.22.mlp.gate_proj.qweight": "model-00002-of-00003.safetensors",
|
574 |
+
"model.layers.22.mlp.gate_proj.qzeros": "model-00002-of-00003.safetensors",
|
575 |
+
"model.layers.22.mlp.gate_proj.scales": "model-00002-of-00003.safetensors",
|
576 |
+
"model.layers.22.mlp.up_proj.bias": "model-00002-of-00003.safetensors",
|
577 |
+
"model.layers.22.mlp.up_proj.g_idx": "model-00002-of-00003.safetensors",
|
578 |
+
"model.layers.22.mlp.up_proj.qweight": "model-00002-of-00003.safetensors",
|
579 |
+
"model.layers.22.mlp.up_proj.qzeros": "model-00002-of-00003.safetensors",
|
580 |
+
"model.layers.22.mlp.up_proj.scales": "model-00002-of-00003.safetensors",
|
581 |
+
"model.layers.22.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
582 |
+
"model.layers.22.self_attn.k_proj.bias": "model-00002-of-00003.safetensors",
|
583 |
+
"model.layers.22.self_attn.k_proj.g_idx": "model-00002-of-00003.safetensors",
|
584 |
+
"model.layers.22.self_attn.k_proj.qweight": "model-00002-of-00003.safetensors",
|
585 |
+
"model.layers.22.self_attn.k_proj.qzeros": "model-00002-of-00003.safetensors",
|
586 |
+
"model.layers.22.self_attn.k_proj.scales": "model-00002-of-00003.safetensors",
|
587 |
+
"model.layers.22.self_attn.o_proj.bias": "model-00002-of-00003.safetensors",
|
588 |
+
"model.layers.22.self_attn.o_proj.g_idx": "model-00002-of-00003.safetensors",
|
589 |
+
"model.layers.22.self_attn.o_proj.qweight": "model-00002-of-00003.safetensors",
|
590 |
+
"model.layers.22.self_attn.o_proj.qzeros": "model-00002-of-00003.safetensors",
|
591 |
+
"model.layers.22.self_attn.o_proj.scales": "model-00002-of-00003.safetensors",
|
592 |
+
"model.layers.22.self_attn.q_proj.bias": "model-00002-of-00003.safetensors",
|
593 |
+
"model.layers.22.self_attn.q_proj.g_idx": "model-00002-of-00003.safetensors",
|
594 |
+
"model.layers.22.self_attn.q_proj.qweight": "model-00002-of-00003.safetensors",
|
595 |
+
"model.layers.22.self_attn.q_proj.qzeros": "model-00002-of-00003.safetensors",
|
596 |
+
"model.layers.22.self_attn.q_proj.scales": "model-00002-of-00003.safetensors",
|
597 |
+
"model.layers.22.self_attn.v_proj.bias": "model-00002-of-00003.safetensors",
|
598 |
+
"model.layers.22.self_attn.v_proj.g_idx": "model-00002-of-00003.safetensors",
|
599 |
+
"model.layers.22.self_attn.v_proj.qweight": "model-00002-of-00003.safetensors",
|
600 |
+
"model.layers.22.self_attn.v_proj.qzeros": "model-00002-of-00003.safetensors",
|
601 |
+
"model.layers.22.self_attn.v_proj.scales": "model-00002-of-00003.safetensors",
|
602 |
+
"model.layers.23.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
603 |
+
"model.layers.23.mlp.down_proj.bias": "model-00002-of-00003.safetensors",
|
604 |
+
"model.layers.23.mlp.down_proj.g_idx": "model-00002-of-00003.safetensors",
|
605 |
+
"model.layers.23.mlp.down_proj.qweight": "model-00002-of-00003.safetensors",
|
606 |
+
"model.layers.23.mlp.down_proj.qzeros": "model-00002-of-00003.safetensors",
|
607 |
+
"model.layers.23.mlp.down_proj.scales": "model-00002-of-00003.safetensors",
|
608 |
+
"model.layers.23.mlp.gate_proj.bias": "model-00002-of-00003.safetensors",
|
609 |
+
"model.layers.23.mlp.gate_proj.g_idx": "model-00002-of-00003.safetensors",
|
610 |
+
"model.layers.23.mlp.gate_proj.qweight": "model-00002-of-00003.safetensors",
|
611 |
+
"model.layers.23.mlp.gate_proj.qzeros": "model-00002-of-00003.safetensors",
|
612 |
+
"model.layers.23.mlp.gate_proj.scales": "model-00002-of-00003.safetensors",
|
613 |
+
"model.layers.23.mlp.up_proj.bias": "model-00002-of-00003.safetensors",
|
614 |
+
"model.layers.23.mlp.up_proj.g_idx": "model-00002-of-00003.safetensors",
|
615 |
+
"model.layers.23.mlp.up_proj.qweight": "model-00002-of-00003.safetensors",
|
616 |
+
"model.layers.23.mlp.up_proj.qzeros": "model-00002-of-00003.safetensors",
|
617 |
+
"model.layers.23.mlp.up_proj.scales": "model-00002-of-00003.safetensors",
|
618 |
+
"model.layers.23.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
619 |
+
"model.layers.23.self_attn.k_proj.bias": "model-00002-of-00003.safetensors",
|
620 |
+
"model.layers.23.self_attn.k_proj.g_idx": "model-00002-of-00003.safetensors",
|
621 |
+
"model.layers.23.self_attn.k_proj.qweight": "model-00002-of-00003.safetensors",
|
622 |
+
"model.layers.23.self_attn.k_proj.qzeros": "model-00002-of-00003.safetensors",
|
623 |
+
"model.layers.23.self_attn.k_proj.scales": "model-00002-of-00003.safetensors",
|
624 |
+
"model.layers.23.self_attn.o_proj.bias": "model-00002-of-00003.safetensors",
|
625 |
+
"model.layers.23.self_attn.o_proj.g_idx": "model-00002-of-00003.safetensors",
|
626 |
+
"model.layers.23.self_attn.o_proj.qweight": "model-00002-of-00003.safetensors",
|
627 |
+
"model.layers.23.self_attn.o_proj.qzeros": "model-00002-of-00003.safetensors",
|
628 |
+
"model.layers.23.self_attn.o_proj.scales": "model-00002-of-00003.safetensors",
|
629 |
+
"model.layers.23.self_attn.q_proj.bias": "model-00002-of-00003.safetensors",
|
630 |
+
"model.layers.23.self_attn.q_proj.g_idx": "model-00002-of-00003.safetensors",
|
631 |
+
"model.layers.23.self_attn.q_proj.qweight": "model-00002-of-00003.safetensors",
|
632 |
+
"model.layers.23.self_attn.q_proj.qzeros": "model-00002-of-00003.safetensors",
|
633 |
+
"model.layers.23.self_attn.q_proj.scales": "model-00002-of-00003.safetensors",
|
634 |
+
"model.layers.23.self_attn.v_proj.bias": "model-00002-of-00003.safetensors",
|
635 |
+
"model.layers.23.self_attn.v_proj.g_idx": "model-00002-of-00003.safetensors",
|
636 |
+
"model.layers.23.self_attn.v_proj.qweight": "model-00002-of-00003.safetensors",
|
637 |
+
"model.layers.23.self_attn.v_proj.qzeros": "model-00002-of-00003.safetensors",
|
638 |
+
"model.layers.23.self_attn.v_proj.scales": "model-00002-of-00003.safetensors",
|
639 |
+
"model.layers.24.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
640 |
+
"model.layers.24.mlp.down_proj.bias": "model-00002-of-00003.safetensors",
|
641 |
+
"model.layers.24.mlp.down_proj.g_idx": "model-00002-of-00003.safetensors",
|
642 |
+
"model.layers.24.mlp.down_proj.qweight": "model-00002-of-00003.safetensors",
|
643 |
+
"model.layers.24.mlp.down_proj.qzeros": "model-00002-of-00003.safetensors",
|
644 |
+
"model.layers.24.mlp.down_proj.scales": "model-00002-of-00003.safetensors",
|
645 |
+
"model.layers.24.mlp.gate_proj.bias": "model-00002-of-00003.safetensors",
|
646 |
+
"model.layers.24.mlp.gate_proj.g_idx": "model-00002-of-00003.safetensors",
|
647 |
+
"model.layers.24.mlp.gate_proj.qweight": "model-00002-of-00003.safetensors",
|
648 |
+
"model.layers.24.mlp.gate_proj.qzeros": "model-00002-of-00003.safetensors",
|
649 |
+
"model.layers.24.mlp.gate_proj.scales": "model-00002-of-00003.safetensors",
|
650 |
+
"model.layers.24.mlp.up_proj.bias": "model-00002-of-00003.safetensors",
|
651 |
+
"model.layers.24.mlp.up_proj.g_idx": "model-00002-of-00003.safetensors",
|
652 |
+
"model.layers.24.mlp.up_proj.qweight": "model-00002-of-00003.safetensors",
|
653 |
+
"model.layers.24.mlp.up_proj.qzeros": "model-00002-of-00003.safetensors",
|
654 |
+
"model.layers.24.mlp.up_proj.scales": "model-00002-of-00003.safetensors",
|
655 |
+
"model.layers.24.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
656 |
+
"model.layers.24.self_attn.k_proj.bias": "model-00002-of-00003.safetensors",
|
657 |
+
"model.layers.24.self_attn.k_proj.g_idx": "model-00002-of-00003.safetensors",
|
658 |
+
"model.layers.24.self_attn.k_proj.qweight": "model-00002-of-00003.safetensors",
|
659 |
+
"model.layers.24.self_attn.k_proj.qzeros": "model-00002-of-00003.safetensors",
|
660 |
+
"model.layers.24.self_attn.k_proj.scales": "model-00002-of-00003.safetensors",
|
661 |
+
"model.layers.24.self_attn.o_proj.bias": "model-00002-of-00003.safetensors",
|
662 |
+
"model.layers.24.self_attn.o_proj.g_idx": "model-00002-of-00003.safetensors",
|
663 |
+
"model.layers.24.self_attn.o_proj.qweight": "model-00002-of-00003.safetensors",
|
664 |
+
"model.layers.24.self_attn.o_proj.qzeros": "model-00002-of-00003.safetensors",
|
665 |
+
"model.layers.24.self_attn.o_proj.scales": "model-00002-of-00003.safetensors",
|
666 |
+
"model.layers.24.self_attn.q_proj.bias": "model-00002-of-00003.safetensors",
|
667 |
+
"model.layers.24.self_attn.q_proj.g_idx": "model-00002-of-00003.safetensors",
|
668 |
+
"model.layers.24.self_attn.q_proj.qweight": "model-00002-of-00003.safetensors",
|
669 |
+
"model.layers.24.self_attn.q_proj.qzeros": "model-00002-of-00003.safetensors",
|
670 |
+
"model.layers.24.self_attn.q_proj.scales": "model-00002-of-00003.safetensors",
|
671 |
+
"model.layers.24.self_attn.v_proj.bias": "model-00002-of-00003.safetensors",
|
672 |
+
"model.layers.24.self_attn.v_proj.g_idx": "model-00002-of-00003.safetensors",
|
673 |
+
"model.layers.24.self_attn.v_proj.qweight": "model-00002-of-00003.safetensors",
|
674 |
+
"model.layers.24.self_attn.v_proj.qzeros": "model-00002-of-00003.safetensors",
|
675 |
+
"model.layers.24.self_attn.v_proj.scales": "model-00002-of-00003.safetensors",
|
676 |
+
"model.layers.25.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
677 |
+
"model.layers.25.mlp.down_proj.bias": "model-00002-of-00003.safetensors",
|
678 |
+
"model.layers.25.mlp.down_proj.g_idx": "model-00002-of-00003.safetensors",
|
679 |
+
"model.layers.25.mlp.down_proj.qweight": "model-00002-of-00003.safetensors",
|
680 |
+
"model.layers.25.mlp.down_proj.qzeros": "model-00002-of-00003.safetensors",
|
681 |
+
"model.layers.25.mlp.down_proj.scales": "model-00002-of-00003.safetensors",
|
682 |
+
"model.layers.25.mlp.gate_proj.bias": "model-00002-of-00003.safetensors",
|
683 |
+
"model.layers.25.mlp.gate_proj.g_idx": "model-00002-of-00003.safetensors",
|
684 |
+
"model.layers.25.mlp.gate_proj.qweight": "model-00002-of-00003.safetensors",
|
685 |
+
"model.layers.25.mlp.gate_proj.qzeros": "model-00002-of-00003.safetensors",
|
686 |
+
"model.layers.25.mlp.gate_proj.scales": "model-00002-of-00003.safetensors",
|
687 |
+
"model.layers.25.mlp.up_proj.bias": "model-00002-of-00003.safetensors",
|
688 |
+
"model.layers.25.mlp.up_proj.g_idx": "model-00002-of-00003.safetensors",
|
689 |
+
"model.layers.25.mlp.up_proj.qweight": "model-00002-of-00003.safetensors",
|
690 |
+
"model.layers.25.mlp.up_proj.qzeros": "model-00002-of-00003.safetensors",
|
691 |
+
"model.layers.25.mlp.up_proj.scales": "model-00002-of-00003.safetensors",
|
692 |
+
"model.layers.25.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
693 |
+
"model.layers.25.self_attn.k_proj.bias": "model-00002-of-00003.safetensors",
|
694 |
+
"model.layers.25.self_attn.k_proj.g_idx": "model-00002-of-00003.safetensors",
|
695 |
+
"model.layers.25.self_attn.k_proj.qweight": "model-00002-of-00003.safetensors",
|
696 |
+
"model.layers.25.self_attn.k_proj.qzeros": "model-00002-of-00003.safetensors",
|
697 |
+
"model.layers.25.self_attn.k_proj.scales": "model-00002-of-00003.safetensors",
|
698 |
+
"model.layers.25.self_attn.o_proj.bias": "model-00002-of-00003.safetensors",
|
699 |
+
"model.layers.25.self_attn.o_proj.g_idx": "model-00002-of-00003.safetensors",
|
700 |
+
"model.layers.25.self_attn.o_proj.qweight": "model-00002-of-00003.safetensors",
|
701 |
+
"model.layers.25.self_attn.o_proj.qzeros": "model-00002-of-00003.safetensors",
|
702 |
+
"model.layers.25.self_attn.o_proj.scales": "model-00002-of-00003.safetensors",
|
703 |
+
"model.layers.25.self_attn.q_proj.bias": "model-00002-of-00003.safetensors",
|
704 |
+
"model.layers.25.self_attn.q_proj.g_idx": "model-00002-of-00003.safetensors",
|
705 |
+
"model.layers.25.self_attn.q_proj.qweight": "model-00002-of-00003.safetensors",
|
706 |
+
"model.layers.25.self_attn.q_proj.qzeros": "model-00002-of-00003.safetensors",
|
707 |
+
"model.layers.25.self_attn.q_proj.scales": "model-00002-of-00003.safetensors",
|
708 |
+
"model.layers.25.self_attn.v_proj.bias": "model-00002-of-00003.safetensors",
|
709 |
+
"model.layers.25.self_attn.v_proj.g_idx": "model-00002-of-00003.safetensors",
|
710 |
+
"model.layers.25.self_attn.v_proj.qweight": "model-00002-of-00003.safetensors",
|
711 |
+
"model.layers.25.self_attn.v_proj.qzeros": "model-00002-of-00003.safetensors",
|
712 |
+
"model.layers.25.self_attn.v_proj.scales": "model-00002-of-00003.safetensors",
|
713 |
+
"model.layers.26.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
714 |
+
"model.layers.26.mlp.down_proj.bias": "model-00002-of-00003.safetensors",
|
715 |
+
"model.layers.26.mlp.down_proj.g_idx": "model-00002-of-00003.safetensors",
|
716 |
+
"model.layers.26.mlp.down_proj.qweight": "model-00002-of-00003.safetensors",
|
717 |
+
"model.layers.26.mlp.down_proj.qzeros": "model-00002-of-00003.safetensors",
|
718 |
+
"model.layers.26.mlp.down_proj.scales": "model-00002-of-00003.safetensors",
|
719 |
+
"model.layers.26.mlp.gate_proj.bias": "model-00002-of-00003.safetensors",
|
720 |
+
"model.layers.26.mlp.gate_proj.g_idx": "model-00002-of-00003.safetensors",
|
721 |
+
"model.layers.26.mlp.gate_proj.qweight": "model-00002-of-00003.safetensors",
|
722 |
+
"model.layers.26.mlp.gate_proj.qzeros": "model-00002-of-00003.safetensors",
|
723 |
+
"model.layers.26.mlp.gate_proj.scales": "model-00002-of-00003.safetensors",
|
724 |
+
"model.layers.26.mlp.up_proj.bias": "model-00002-of-00003.safetensors",
|
725 |
+
"model.layers.26.mlp.up_proj.g_idx": "model-00002-of-00003.safetensors",
|
726 |
+
"model.layers.26.mlp.up_proj.qweight": "model-00002-of-00003.safetensors",
|
727 |
+
"model.layers.26.mlp.up_proj.qzeros": "model-00002-of-00003.safetensors",
|
728 |
+
"model.layers.26.mlp.up_proj.scales": "model-00002-of-00003.safetensors",
|
729 |
+
"model.layers.26.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
730 |
+
"model.layers.26.self_attn.k_proj.bias": "model-00002-of-00003.safetensors",
|
731 |
+
"model.layers.26.self_attn.k_proj.g_idx": "model-00002-of-00003.safetensors",
|
732 |
+
"model.layers.26.self_attn.k_proj.qweight": "model-00002-of-00003.safetensors",
|
733 |
+
"model.layers.26.self_attn.k_proj.qzeros": "model-00002-of-00003.safetensors",
|
734 |
+
"model.layers.26.self_attn.k_proj.scales": "model-00002-of-00003.safetensors",
|
735 |
+
"model.layers.26.self_attn.o_proj.bias": "model-00002-of-00003.safetensors",
|
736 |
+
"model.layers.26.self_attn.o_proj.g_idx": "model-00002-of-00003.safetensors",
|
737 |
+
"model.layers.26.self_attn.o_proj.qweight": "model-00002-of-00003.safetensors",
|
738 |
+
"model.layers.26.self_attn.o_proj.qzeros": "model-00002-of-00003.safetensors",
|
739 |
+
"model.layers.26.self_attn.o_proj.scales": "model-00002-of-00003.safetensors",
|
740 |
+
"model.layers.26.self_attn.q_proj.bias": "model-00002-of-00003.safetensors",
|
741 |
+
"model.layers.26.self_attn.q_proj.g_idx": "model-00002-of-00003.safetensors",
|
742 |
+
"model.layers.26.self_attn.q_proj.qweight": "model-00002-of-00003.safetensors",
|
743 |
+
"model.layers.26.self_attn.q_proj.qzeros": "model-00002-of-00003.safetensors",
|
744 |
+
"model.layers.26.self_attn.q_proj.scales": "model-00002-of-00003.safetensors",
|
745 |
+
"model.layers.26.self_attn.v_proj.bias": "model-00002-of-00003.safetensors",
|
746 |
+
"model.layers.26.self_attn.v_proj.g_idx": "model-00002-of-00003.safetensors",
|
747 |
+
"model.layers.26.self_attn.v_proj.qweight": "model-00002-of-00003.safetensors",
|
748 |
+
"model.layers.26.self_attn.v_proj.qzeros": "model-00002-of-00003.safetensors",
|
749 |
+
"model.layers.26.self_attn.v_proj.scales": "model-00002-of-00003.safetensors",
|
750 |
+
"model.layers.27.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
751 |
+
"model.layers.27.mlp.down_proj.bias": "model-00002-of-00003.safetensors",
|
752 |
+
"model.layers.27.mlp.down_proj.g_idx": "model-00002-of-00003.safetensors",
|
753 |
+
"model.layers.27.mlp.down_proj.qweight": "model-00002-of-00003.safetensors",
|
754 |
+
"model.layers.27.mlp.down_proj.qzeros": "model-00002-of-00003.safetensors",
|
755 |
+
"model.layers.27.mlp.down_proj.scales": "model-00002-of-00003.safetensors",
|
756 |
+
"model.layers.27.mlp.gate_proj.bias": "model-00002-of-00003.safetensors",
|
757 |
+
"model.layers.27.mlp.gate_proj.g_idx": "model-00002-of-00003.safetensors",
|
758 |
+
"model.layers.27.mlp.gate_proj.qweight": "model-00002-of-00003.safetensors",
|
759 |
+
"model.layers.27.mlp.gate_proj.qzeros": "model-00002-of-00003.safetensors",
|
760 |
+
"model.layers.27.mlp.gate_proj.scales": "model-00002-of-00003.safetensors",
|
761 |
+
"model.layers.27.mlp.up_proj.bias": "model-00002-of-00003.safetensors",
|
762 |
+
"model.layers.27.mlp.up_proj.g_idx": "model-00002-of-00003.safetensors",
|
763 |
+
"model.layers.27.mlp.up_proj.qweight": "model-00002-of-00003.safetensors",
|
764 |
+
"model.layers.27.mlp.up_proj.qzeros": "model-00002-of-00003.safetensors",
|
765 |
+
"model.layers.27.mlp.up_proj.scales": "model-00002-of-00003.safetensors",
|
766 |
+
"model.layers.27.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
767 |
+
"model.layers.27.self_attn.k_proj.bias": "model-00002-of-00003.safetensors",
|
768 |
+
"model.layers.27.self_attn.k_proj.g_idx": "model-00002-of-00003.safetensors",
|
769 |
+
"model.layers.27.self_attn.k_proj.qweight": "model-00002-of-00003.safetensors",
|
770 |
+
"model.layers.27.self_attn.k_proj.qzeros": "model-00002-of-00003.safetensors",
|
771 |
+
"model.layers.27.self_attn.k_proj.scales": "model-00002-of-00003.safetensors",
|
772 |
+
"model.layers.27.self_attn.o_proj.bias": "model-00002-of-00003.safetensors",
|
773 |
+
"model.layers.27.self_attn.o_proj.g_idx": "model-00002-of-00003.safetensors",
|
774 |
+
"model.layers.27.self_attn.o_proj.qweight": "model-00002-of-00003.safetensors",
|
775 |
+
"model.layers.27.self_attn.o_proj.qzeros": "model-00002-of-00003.safetensors",
|
776 |
+
"model.layers.27.self_attn.o_proj.scales": "model-00002-of-00003.safetensors",
|
777 |
+
"model.layers.27.self_attn.q_proj.bias": "model-00002-of-00003.safetensors",
|
778 |
+
"model.layers.27.self_attn.q_proj.g_idx": "model-00002-of-00003.safetensors",
|
779 |
+
"model.layers.27.self_attn.q_proj.qweight": "model-00002-of-00003.safetensors",
|
780 |
+
"model.layers.27.self_attn.q_proj.qzeros": "model-00002-of-00003.safetensors",
|
781 |
+
"model.layers.27.self_attn.q_proj.scales": "model-00002-of-00003.safetensors",
|
782 |
+
"model.layers.27.self_attn.v_proj.bias": "model-00002-of-00003.safetensors",
|
783 |
+
"model.layers.27.self_attn.v_proj.g_idx": "model-00002-of-00003.safetensors",
|
784 |
+
"model.layers.27.self_attn.v_proj.qweight": "model-00002-of-00003.safetensors",
|
785 |
+
"model.layers.27.self_attn.v_proj.qzeros": "model-00002-of-00003.safetensors",
|
786 |
+
"model.layers.27.self_attn.v_proj.scales": "model-00002-of-00003.safetensors",
|
787 |
+
"model.layers.28.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
788 |
+
"model.layers.28.mlp.down_proj.bias": "model-00002-of-00003.safetensors",
|
789 |
+
"model.layers.28.mlp.down_proj.g_idx": "model-00002-of-00003.safetensors",
|
790 |
+
"model.layers.28.mlp.down_proj.qweight": "model-00002-of-00003.safetensors",
|
791 |
+
"model.layers.28.mlp.down_proj.qzeros": "model-00002-of-00003.safetensors",
|
792 |
+
"model.layers.28.mlp.down_proj.scales": "model-00002-of-00003.safetensors",
|
793 |
+
"model.layers.28.mlp.gate_proj.bias": "model-00002-of-00003.safetensors",
|
794 |
+
"model.layers.28.mlp.gate_proj.g_idx": "model-00002-of-00003.safetensors",
|
795 |
+
"model.layers.28.mlp.gate_proj.qweight": "model-00002-of-00003.safetensors",
|
796 |
+
"model.layers.28.mlp.gate_proj.qzeros": "model-00002-of-00003.safetensors",
|
797 |
+
"model.layers.28.mlp.gate_proj.scales": "model-00002-of-00003.safetensors",
|
798 |
+
"model.layers.28.mlp.up_proj.bias": "model-00002-of-00003.safetensors",
|
799 |
+
"model.layers.28.mlp.up_proj.g_idx": "model-00002-of-00003.safetensors",
|
800 |
+
"model.layers.28.mlp.up_proj.qweight": "model-00002-of-00003.safetensors",
|
801 |
+
"model.layers.28.mlp.up_proj.qzeros": "model-00002-of-00003.safetensors",
|
802 |
+
"model.layers.28.mlp.up_proj.scales": "model-00002-of-00003.safetensors",
|
803 |
+
"model.layers.28.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
804 |
+
"model.layers.28.self_attn.k_proj.bias": "model-00002-of-00003.safetensors",
|
805 |
+
"model.layers.28.self_attn.k_proj.g_idx": "model-00002-of-00003.safetensors",
|
806 |
+
"model.layers.28.self_attn.k_proj.qweight": "model-00002-of-00003.safetensors",
|
807 |
+
"model.layers.28.self_attn.k_proj.qzeros": "model-00002-of-00003.safetensors",
|
808 |
+
"model.layers.28.self_attn.k_proj.scales": "model-00002-of-00003.safetensors",
|
809 |
+
"model.layers.28.self_attn.o_proj.bias": "model-00002-of-00003.safetensors",
|
810 |
+
"model.layers.28.self_attn.o_proj.g_idx": "model-00002-of-00003.safetensors",
|
811 |
+
"model.layers.28.self_attn.o_proj.qweight": "model-00002-of-00003.safetensors",
|
812 |
+
"model.layers.28.self_attn.o_proj.qzeros": "model-00002-of-00003.safetensors",
|
813 |
+
"model.layers.28.self_attn.o_proj.scales": "model-00002-of-00003.safetensors",
|
814 |
+
"model.layers.28.self_attn.q_proj.bias": "model-00002-of-00003.safetensors",
|
815 |
+
"model.layers.28.self_attn.q_proj.g_idx": "model-00002-of-00003.safetensors",
|
816 |
+
"model.layers.28.self_attn.q_proj.qweight": "model-00002-of-00003.safetensors",
|
817 |
+
"model.layers.28.self_attn.q_proj.qzeros": "model-00002-of-00003.safetensors",
|
818 |
+
"model.layers.28.self_attn.q_proj.scales": "model-00002-of-00003.safetensors",
|
819 |
+
"model.layers.28.self_attn.v_proj.bias": "model-00002-of-00003.safetensors",
|
820 |
+
"model.layers.28.self_attn.v_proj.g_idx": "model-00002-of-00003.safetensors",
|
821 |
+
"model.layers.28.self_attn.v_proj.qweight": "model-00002-of-00003.safetensors",
|
822 |
+
"model.layers.28.self_attn.v_proj.qzeros": "model-00002-of-00003.safetensors",
|
823 |
+
"model.layers.28.self_attn.v_proj.scales": "model-00002-of-00003.safetensors",
|
824 |
+
"model.layers.29.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
825 |
+
"model.layers.29.mlp.down_proj.bias": "model-00002-of-00003.safetensors",
|
826 |
+
"model.layers.29.mlp.down_proj.g_idx": "model-00002-of-00003.safetensors",
|
827 |
+
"model.layers.29.mlp.down_proj.qweight": "model-00002-of-00003.safetensors",
|
828 |
+
"model.layers.29.mlp.down_proj.qzeros": "model-00002-of-00003.safetensors",
|
829 |
+
"model.layers.29.mlp.down_proj.scales": "model-00002-of-00003.safetensors",
|
830 |
+
"model.layers.29.mlp.gate_proj.bias": "model-00002-of-00003.safetensors",
|
831 |
+
"model.layers.29.mlp.gate_proj.g_idx": "model-00002-of-00003.safetensors",
|
832 |
+
"model.layers.29.mlp.gate_proj.qweight": "model-00002-of-00003.safetensors",
|
833 |
+
"model.layers.29.mlp.gate_proj.qzeros": "model-00002-of-00003.safetensors",
|
834 |
+
"model.layers.29.mlp.gate_proj.scales": "model-00002-of-00003.safetensors",
|
835 |
+
"model.layers.29.mlp.up_proj.bias": "model-00002-of-00003.safetensors",
|
836 |
+
"model.layers.29.mlp.up_proj.g_idx": "model-00002-of-00003.safetensors",
|
837 |
+
"model.layers.29.mlp.up_proj.qweight": "model-00002-of-00003.safetensors",
|
838 |
+
"model.layers.29.mlp.up_proj.qzeros": "model-00002-of-00003.safetensors",
|
839 |
+
"model.layers.29.mlp.up_proj.scales": "model-00002-of-00003.safetensors",
|
840 |
+
"model.layers.29.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
841 |
+
"model.layers.29.self_attn.k_proj.bias": "model-00002-of-00003.safetensors",
|
842 |
+
"model.layers.29.self_attn.k_proj.g_idx": "model-00002-of-00003.safetensors",
|
843 |
+
"model.layers.29.self_attn.k_proj.qweight": "model-00002-of-00003.safetensors",
|
844 |
+
"model.layers.29.self_attn.k_proj.qzeros": "model-00002-of-00003.safetensors",
|
845 |
+
"model.layers.29.self_attn.k_proj.scales": "model-00002-of-00003.safetensors",
|
846 |
+
"model.layers.29.self_attn.o_proj.bias": "model-00002-of-00003.safetensors",
|
847 |
+
"model.layers.29.self_attn.o_proj.g_idx": "model-00002-of-00003.safetensors",
|
848 |
+
"model.layers.29.self_attn.o_proj.qweight": "model-00002-of-00003.safetensors",
|
849 |
+
"model.layers.29.self_attn.o_proj.qzeros": "model-00002-of-00003.safetensors",
|
850 |
+
"model.layers.29.self_attn.o_proj.scales": "model-00002-of-00003.safetensors",
|
851 |
+
"model.layers.29.self_attn.q_proj.bias": "model-00002-of-00003.safetensors",
|
852 |
+
"model.layers.29.self_attn.q_proj.g_idx": "model-00002-of-00003.safetensors",
|
853 |
+
"model.layers.29.self_attn.q_proj.qweight": "model-00002-of-00003.safetensors",
|
854 |
+
"model.layers.29.self_attn.q_proj.qzeros": "model-00002-of-00003.safetensors",
|
855 |
+
"model.layers.29.self_attn.q_proj.scales": "model-00002-of-00003.safetensors",
|
856 |
+
"model.layers.29.self_attn.v_proj.bias": "model-00002-of-00003.safetensors",
|
857 |
+
"model.layers.29.self_attn.v_proj.g_idx": "model-00002-of-00003.safetensors",
|
858 |
+
"model.layers.29.self_attn.v_proj.qweight": "model-00002-of-00003.safetensors",
|
859 |
+
"model.layers.29.self_attn.v_proj.qzeros": "model-00002-of-00003.safetensors",
|
860 |
+
"model.layers.29.self_attn.v_proj.scales": "model-00002-of-00003.safetensors",
|
861 |
+
"model.layers.3.input_layernorm.weight": "model-00001-of-00003.safetensors",
|
862 |
+
"model.layers.3.mlp.down_proj.bias": "model-00001-of-00003.safetensors",
|
863 |
+
"model.layers.3.mlp.down_proj.g_idx": "model-00001-of-00003.safetensors",
|
864 |
+
"model.layers.3.mlp.down_proj.qweight": "model-00001-of-00003.safetensors",
|
865 |
+
"model.layers.3.mlp.down_proj.qzeros": "model-00001-of-00003.safetensors",
|
866 |
+
"model.layers.3.mlp.down_proj.scales": "model-00001-of-00003.safetensors",
|
867 |
+
"model.layers.3.mlp.gate_proj.bias": "model-00001-of-00003.safetensors",
|
868 |
+
"model.layers.3.mlp.gate_proj.g_idx": "model-00001-of-00003.safetensors",
|
869 |
+
"model.layers.3.mlp.gate_proj.qweight": "model-00001-of-00003.safetensors",
|
870 |
+
"model.layers.3.mlp.gate_proj.qzeros": "model-00001-of-00003.safetensors",
|
871 |
+
"model.layers.3.mlp.gate_proj.scales": "model-00001-of-00003.safetensors",
|
872 |
+
"model.layers.3.mlp.up_proj.bias": "model-00001-of-00003.safetensors",
|
873 |
+
"model.layers.3.mlp.up_proj.g_idx": "model-00001-of-00003.safetensors",
|
874 |
+
"model.layers.3.mlp.up_proj.qweight": "model-00001-of-00003.safetensors",
|
875 |
+
"model.layers.3.mlp.up_proj.qzeros": "model-00001-of-00003.safetensors",
|
876 |
+
"model.layers.3.mlp.up_proj.scales": "model-00001-of-00003.safetensors",
|
877 |
+
"model.layers.3.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
|
878 |
+
"model.layers.3.self_attn.k_proj.bias": "model-00001-of-00003.safetensors",
|
879 |
+
"model.layers.3.self_attn.k_proj.g_idx": "model-00001-of-00003.safetensors",
|
880 |
+
"model.layers.3.self_attn.k_proj.qweight": "model-00001-of-00003.safetensors",
|
881 |
+
"model.layers.3.self_attn.k_proj.qzeros": "model-00001-of-00003.safetensors",
|
882 |
+
"model.layers.3.self_attn.k_proj.scales": "model-00001-of-00003.safetensors",
|
883 |
+
"model.layers.3.self_attn.o_proj.bias": "model-00001-of-00003.safetensors",
|
884 |
+
"model.layers.3.self_attn.o_proj.g_idx": "model-00001-of-00003.safetensors",
|
885 |
+
"model.layers.3.self_attn.o_proj.qweight": "model-00001-of-00003.safetensors",
|
886 |
+
"model.layers.3.self_attn.o_proj.qzeros": "model-00001-of-00003.safetensors",
|
887 |
+
"model.layers.3.self_attn.o_proj.scales": "model-00001-of-00003.safetensors",
|
888 |
+
"model.layers.3.self_attn.q_proj.bias": "model-00001-of-00003.safetensors",
|
889 |
+
"model.layers.3.self_attn.q_proj.g_idx": "model-00001-of-00003.safetensors",
|
890 |
+
"model.layers.3.self_attn.q_proj.qweight": "model-00001-of-00003.safetensors",
|
891 |
+
"model.layers.3.self_attn.q_proj.qzeros": "model-00001-of-00003.safetensors",
|
892 |
+
"model.layers.3.self_attn.q_proj.scales": "model-00001-of-00003.safetensors",
|
893 |
+
"model.layers.3.self_attn.v_proj.bias": "model-00001-of-00003.safetensors",
|
894 |
+
"model.layers.3.self_attn.v_proj.g_idx": "model-00001-of-00003.safetensors",
|
895 |
+
"model.layers.3.self_attn.v_proj.qweight": "model-00001-of-00003.safetensors",
|
896 |
+
"model.layers.3.self_attn.v_proj.qzeros": "model-00001-of-00003.safetensors",
|
897 |
+
"model.layers.3.self_attn.v_proj.scales": "model-00001-of-00003.safetensors",
|
898 |
+
"model.layers.30.input_layernorm.weight": "model-00003-of-00003.safetensors",
|
899 |
+
"model.layers.30.mlp.down_proj.bias": "model-00003-of-00003.safetensors",
|
900 |
+
"model.layers.30.mlp.down_proj.g_idx": "model-00003-of-00003.safetensors",
|
901 |
+
"model.layers.30.mlp.down_proj.qweight": "model-00003-of-00003.safetensors",
|
902 |
+
"model.layers.30.mlp.down_proj.qzeros": "model-00003-of-00003.safetensors",
|
903 |
+
"model.layers.30.mlp.down_proj.scales": "model-00003-of-00003.safetensors",
|
904 |
+
"model.layers.30.mlp.gate_proj.bias": "model-00003-of-00003.safetensors",
|
905 |
+
"model.layers.30.mlp.gate_proj.g_idx": "model-00003-of-00003.safetensors",
|
906 |
+
"model.layers.30.mlp.gate_proj.qweight": "model-00003-of-00003.safetensors",
|
907 |
+
"model.layers.30.mlp.gate_proj.qzeros": "model-00003-of-00003.safetensors",
|
908 |
+
"model.layers.30.mlp.gate_proj.scales": "model-00003-of-00003.safetensors",
|
909 |
+
"model.layers.30.mlp.up_proj.bias": "model-00003-of-00003.safetensors",
|
910 |
+
"model.layers.30.mlp.up_proj.g_idx": "model-00003-of-00003.safetensors",
|
911 |
+
"model.layers.30.mlp.up_proj.qweight": "model-00003-of-00003.safetensors",
|
912 |
+
"model.layers.30.mlp.up_proj.qzeros": "model-00003-of-00003.safetensors",
|
913 |
+
"model.layers.30.mlp.up_proj.scales": "model-00003-of-00003.safetensors",
|
914 |
+
"model.layers.30.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
|
915 |
+
"model.layers.30.self_attn.k_proj.bias": "model-00002-of-00003.safetensors",
|
916 |
+
"model.layers.30.self_attn.k_proj.g_idx": "model-00002-of-00003.safetensors",
|
917 |
+
"model.layers.30.self_attn.k_proj.qweight": "model-00002-of-00003.safetensors",
|
918 |
+
"model.layers.30.self_attn.k_proj.qzeros": "model-00002-of-00003.safetensors",
|
919 |
+
"model.layers.30.self_attn.k_proj.scales": "model-00002-of-00003.safetensors",
|
920 |
+
"model.layers.30.self_attn.o_proj.bias": "model-00003-of-00003.safetensors",
|
921 |
+
"model.layers.30.self_attn.o_proj.g_idx": "model-00003-of-00003.safetensors",
|
922 |
+
"model.layers.30.self_attn.o_proj.qweight": "model-00003-of-00003.safetensors",
|
923 |
+
"model.layers.30.self_attn.o_proj.qzeros": "model-00003-of-00003.safetensors",
|
924 |
+
"model.layers.30.self_attn.o_proj.scales": "model-00003-of-00003.safetensors",
|
925 |
+
"model.layers.30.self_attn.q_proj.bias": "model-00003-of-00003.safetensors",
|
926 |
+
"model.layers.30.self_attn.q_proj.g_idx": "model-00003-of-00003.safetensors",
|
927 |
+
"model.layers.30.self_attn.q_proj.qweight": "model-00003-of-00003.safetensors",
|
928 |
+
"model.layers.30.self_attn.q_proj.qzeros": "model-00003-of-00003.safetensors",
|
929 |
+
"model.layers.30.self_attn.q_proj.scales": "model-00003-of-00003.safetensors",
|
930 |
+
"model.layers.30.self_attn.v_proj.bias": "model-00003-of-00003.safetensors",
|
931 |
+
"model.layers.30.self_attn.v_proj.g_idx": "model-00003-of-00003.safetensors",
|
932 |
+
"model.layers.30.self_attn.v_proj.qweight": "model-00003-of-00003.safetensors",
|
933 |
+
"model.layers.30.self_attn.v_proj.qzeros": "model-00003-of-00003.safetensors",
|
934 |
+
"model.layers.30.self_attn.v_proj.scales": "model-00003-of-00003.safetensors",
|
935 |
+
"model.layers.31.input_layernorm.weight": "model-00003-of-00003.safetensors",
|
936 |
+
"model.layers.31.mlp.down_proj.bias": "model-00003-of-00003.safetensors",
|
937 |
+
"model.layers.31.mlp.down_proj.g_idx": "model-00003-of-00003.safetensors",
|
938 |
+
"model.layers.31.mlp.down_proj.qweight": "model-00003-of-00003.safetensors",
|
939 |
+
"model.layers.31.mlp.down_proj.qzeros": "model-00003-of-00003.safetensors",
|
940 |
+
"model.layers.31.mlp.down_proj.scales": "model-00003-of-00003.safetensors",
|
941 |
+
"model.layers.31.mlp.gate_proj.bias": "model-00003-of-00003.safetensors",
|
942 |
+
"model.layers.31.mlp.gate_proj.g_idx": "model-00003-of-00003.safetensors",
|
943 |
+
"model.layers.31.mlp.gate_proj.qweight": "model-00003-of-00003.safetensors",
|
944 |
+
"model.layers.31.mlp.gate_proj.qzeros": "model-00003-of-00003.safetensors",
|
945 |
+
"model.layers.31.mlp.gate_proj.scales": "model-00003-of-00003.safetensors",
|
946 |
+
"model.layers.31.mlp.up_proj.bias": "model-00003-of-00003.safetensors",
|
947 |
+
"model.layers.31.mlp.up_proj.g_idx": "model-00003-of-00003.safetensors",
|
948 |
+
"model.layers.31.mlp.up_proj.qweight": "model-00003-of-00003.safetensors",
|
949 |
+
"model.layers.31.mlp.up_proj.qzeros": "model-00003-of-00003.safetensors",
|
950 |
+
"model.layers.31.mlp.up_proj.scales": "model-00003-of-00003.safetensors",
|
951 |
+
"model.layers.31.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
|
952 |
+
"model.layers.31.self_attn.k_proj.bias": "model-00003-of-00003.safetensors",
|
953 |
+
"model.layers.31.self_attn.k_proj.g_idx": "model-00003-of-00003.safetensors",
|
954 |
+
"model.layers.31.self_attn.k_proj.qweight": "model-00003-of-00003.safetensors",
|
955 |
+
"model.layers.31.self_attn.k_proj.qzeros": "model-00003-of-00003.safetensors",
|
956 |
+
"model.layers.31.self_attn.k_proj.scales": "model-00003-of-00003.safetensors",
|
957 |
+
"model.layers.31.self_attn.o_proj.bias": "model-00003-of-00003.safetensors",
|
958 |
+
"model.layers.31.self_attn.o_proj.g_idx": "model-00003-of-00003.safetensors",
|
959 |
+
"model.layers.31.self_attn.o_proj.qweight": "model-00003-of-00003.safetensors",
|
960 |
+
"model.layers.31.self_attn.o_proj.qzeros": "model-00003-of-00003.safetensors",
|
961 |
+
"model.layers.31.self_attn.o_proj.scales": "model-00003-of-00003.safetensors",
|
962 |
+
"model.layers.31.self_attn.q_proj.bias": "model-00003-of-00003.safetensors",
|
963 |
+
"model.layers.31.self_attn.q_proj.g_idx": "model-00003-of-00003.safetensors",
|
964 |
+
"model.layers.31.self_attn.q_proj.qweight": "model-00003-of-00003.safetensors",
|
965 |
+
"model.layers.31.self_attn.q_proj.qzeros": "model-00003-of-00003.safetensors",
|
966 |
+
"model.layers.31.self_attn.q_proj.scales": "model-00003-of-00003.safetensors",
|
967 |
+
"model.layers.31.self_attn.v_proj.bias": "model-00003-of-00003.safetensors",
|
968 |
+
"model.layers.31.self_attn.v_proj.g_idx": "model-00003-of-00003.safetensors",
|
969 |
+
"model.layers.31.self_attn.v_proj.qweight": "model-00003-of-00003.safetensors",
|
970 |
+
"model.layers.31.self_attn.v_proj.qzeros": "model-00003-of-00003.safetensors",
|
971 |
+
"model.layers.31.self_attn.v_proj.scales": "model-00003-of-00003.safetensors",
|
972 |
+
"model.layers.4.input_layernorm.weight": "model-00001-of-00003.safetensors",
|
973 |
+
"model.layers.4.mlp.down_proj.bias": "model-00001-of-00003.safetensors",
|
974 |
+
"model.layers.4.mlp.down_proj.g_idx": "model-00001-of-00003.safetensors",
|
975 |
+
"model.layers.4.mlp.down_proj.qweight": "model-00001-of-00003.safetensors",
|
976 |
+
"model.layers.4.mlp.down_proj.qzeros": "model-00001-of-00003.safetensors",
|
977 |
+
"model.layers.4.mlp.down_proj.scales": "model-00001-of-00003.safetensors",
|
978 |
+
"model.layers.4.mlp.gate_proj.bias": "model-00001-of-00003.safetensors",
|
979 |
+
"model.layers.4.mlp.gate_proj.g_idx": "model-00001-of-00003.safetensors",
|
980 |
+
"model.layers.4.mlp.gate_proj.qweight": "model-00001-of-00003.safetensors",
|
981 |
+
"model.layers.4.mlp.gate_proj.qzeros": "model-00001-of-00003.safetensors",
|
982 |
+
"model.layers.4.mlp.gate_proj.scales": "model-00001-of-00003.safetensors",
|
983 |
+
"model.layers.4.mlp.up_proj.bias": "model-00001-of-00003.safetensors",
|
984 |
+
"model.layers.4.mlp.up_proj.g_idx": "model-00001-of-00003.safetensors",
|
985 |
+
"model.layers.4.mlp.up_proj.qweight": "model-00001-of-00003.safetensors",
|
986 |
+
"model.layers.4.mlp.up_proj.qzeros": "model-00001-of-00003.safetensors",
|
987 |
+
"model.layers.4.mlp.up_proj.scales": "model-00001-of-00003.safetensors",
|
988 |
+
"model.layers.4.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
|
989 |
+
"model.layers.4.self_attn.k_proj.bias": "model-00001-of-00003.safetensors",
|
990 |
+
"model.layers.4.self_attn.k_proj.g_idx": "model-00001-of-00003.safetensors",
|
991 |
+
"model.layers.4.self_attn.k_proj.qweight": "model-00001-of-00003.safetensors",
|
992 |
+
"model.layers.4.self_attn.k_proj.qzeros": "model-00001-of-00003.safetensors",
|
993 |
+
"model.layers.4.self_attn.k_proj.scales": "model-00001-of-00003.safetensors",
|
994 |
+
"model.layers.4.self_attn.o_proj.bias": "model-00001-of-00003.safetensors",
|
995 |
+
"model.layers.4.self_attn.o_proj.g_idx": "model-00001-of-00003.safetensors",
|
996 |
+
"model.layers.4.self_attn.o_proj.qweight": "model-00001-of-00003.safetensors",
|
997 |
+
"model.layers.4.self_attn.o_proj.qzeros": "model-00001-of-00003.safetensors",
|
998 |
+
"model.layers.4.self_attn.o_proj.scales": "model-00001-of-00003.safetensors",
|
999 |
+
"model.layers.4.self_attn.q_proj.bias": "model-00001-of-00003.safetensors",
|
1000 |
+
"model.layers.4.self_attn.q_proj.g_idx": "model-00001-of-00003.safetensors",
|
1001 |
+
"model.layers.4.self_attn.q_proj.qweight": "model-00001-of-00003.safetensors",
|
1002 |
+
"model.layers.4.self_attn.q_proj.qzeros": "model-00001-of-00003.safetensors",
|
1003 |
+
"model.layers.4.self_attn.q_proj.scales": "model-00001-of-00003.safetensors",
|
1004 |
+
"model.layers.4.self_attn.v_proj.bias": "model-00001-of-00003.safetensors",
|
1005 |
+
"model.layers.4.self_attn.v_proj.g_idx": "model-00001-of-00003.safetensors",
|
1006 |
+
"model.layers.4.self_attn.v_proj.qweight": "model-00001-of-00003.safetensors",
|
1007 |
+
"model.layers.4.self_attn.v_proj.qzeros": "model-00001-of-00003.safetensors",
|
1008 |
+
"model.layers.4.self_attn.v_proj.scales": "model-00001-of-00003.safetensors",
|
1009 |
+
"model.layers.5.input_layernorm.weight": "model-00001-of-00003.safetensors",
|
1010 |
+
"model.layers.5.mlp.down_proj.bias": "model-00001-of-00003.safetensors",
|
1011 |
+
"model.layers.5.mlp.down_proj.g_idx": "model-00001-of-00003.safetensors",
|
1012 |
+
"model.layers.5.mlp.down_proj.qweight": "model-00001-of-00003.safetensors",
|
1013 |
+
"model.layers.5.mlp.down_proj.qzeros": "model-00001-of-00003.safetensors",
|
1014 |
+
"model.layers.5.mlp.down_proj.scales": "model-00001-of-00003.safetensors",
|
1015 |
+
"model.layers.5.mlp.gate_proj.bias": "model-00001-of-00003.safetensors",
|
1016 |
+
"model.layers.5.mlp.gate_proj.g_idx": "model-00001-of-00003.safetensors",
|
1017 |
+
"model.layers.5.mlp.gate_proj.qweight": "model-00001-of-00003.safetensors",
|
1018 |
+
"model.layers.5.mlp.gate_proj.qzeros": "model-00001-of-00003.safetensors",
|
1019 |
+
"model.layers.5.mlp.gate_proj.scales": "model-00001-of-00003.safetensors",
|
1020 |
+
"model.layers.5.mlp.up_proj.bias": "model-00001-of-00003.safetensors",
|
1021 |
+
"model.layers.5.mlp.up_proj.g_idx": "model-00001-of-00003.safetensors",
|
1022 |
+
"model.layers.5.mlp.up_proj.qweight": "model-00001-of-00003.safetensors",
|
1023 |
+
"model.layers.5.mlp.up_proj.qzeros": "model-00001-of-00003.safetensors",
|
1024 |
+
"model.layers.5.mlp.up_proj.scales": "model-00001-of-00003.safetensors",
|
1025 |
+
"model.layers.5.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
|
1026 |
+
"model.layers.5.self_attn.k_proj.bias": "model-00001-of-00003.safetensors",
|
1027 |
+
"model.layers.5.self_attn.k_proj.g_idx": "model-00001-of-00003.safetensors",
|
1028 |
+
"model.layers.5.self_attn.k_proj.qweight": "model-00001-of-00003.safetensors",
|
1029 |
+
"model.layers.5.self_attn.k_proj.qzeros": "model-00001-of-00003.safetensors",
|
1030 |
+
"model.layers.5.self_attn.k_proj.scales": "model-00001-of-00003.safetensors",
|
1031 |
+
"model.layers.5.self_attn.o_proj.bias": "model-00001-of-00003.safetensors",
|
1032 |
+
"model.layers.5.self_attn.o_proj.g_idx": "model-00001-of-00003.safetensors",
|
1033 |
+
"model.layers.5.self_attn.o_proj.qweight": "model-00001-of-00003.safetensors",
|
1034 |
+
"model.layers.5.self_attn.o_proj.qzeros": "model-00001-of-00003.safetensors",
|
1035 |
+
"model.layers.5.self_attn.o_proj.scales": "model-00001-of-00003.safetensors",
|
1036 |
+
"model.layers.5.self_attn.q_proj.bias": "model-00001-of-00003.safetensors",
|
1037 |
+
"model.layers.5.self_attn.q_proj.g_idx": "model-00001-of-00003.safetensors",
|
1038 |
+
"model.layers.5.self_attn.q_proj.qweight": "model-00001-of-00003.safetensors",
|
1039 |
+
"model.layers.5.self_attn.q_proj.qzeros": "model-00001-of-00003.safetensors",
|
1040 |
+
"model.layers.5.self_attn.q_proj.scales": "model-00001-of-00003.safetensors",
|
1041 |
+
"model.layers.5.self_attn.v_proj.bias": "model-00001-of-00003.safetensors",
|
1042 |
+
"model.layers.5.self_attn.v_proj.g_idx": "model-00001-of-00003.safetensors",
|
1043 |
+
"model.layers.5.self_attn.v_proj.qweight": "model-00001-of-00003.safetensors",
|
1044 |
+
"model.layers.5.self_attn.v_proj.qzeros": "model-00001-of-00003.safetensors",
|
1045 |
+
"model.layers.5.self_attn.v_proj.scales": "model-00001-of-00003.safetensors",
|
1046 |
+
"model.layers.6.input_layernorm.weight": "model-00001-of-00003.safetensors",
|
1047 |
+
"model.layers.6.mlp.down_proj.bias": "model-00001-of-00003.safetensors",
|
1048 |
+
"model.layers.6.mlp.down_proj.g_idx": "model-00001-of-00003.safetensors",
|
1049 |
+
"model.layers.6.mlp.down_proj.qweight": "model-00001-of-00003.safetensors",
|
1050 |
+
"model.layers.6.mlp.down_proj.qzeros": "model-00001-of-00003.safetensors",
|
1051 |
+
"model.layers.6.mlp.down_proj.scales": "model-00001-of-00003.safetensors",
|
1052 |
+
"model.layers.6.mlp.gate_proj.bias": "model-00001-of-00003.safetensors",
|
1053 |
+
"model.layers.6.mlp.gate_proj.g_idx": "model-00001-of-00003.safetensors",
|
1054 |
+
"model.layers.6.mlp.gate_proj.qweight": "model-00001-of-00003.safetensors",
|
1055 |
+
"model.layers.6.mlp.gate_proj.qzeros": "model-00001-of-00003.safetensors",
|
1056 |
+
"model.layers.6.mlp.gate_proj.scales": "model-00001-of-00003.safetensors",
|
1057 |
+
"model.layers.6.mlp.up_proj.bias": "model-00001-of-00003.safetensors",
|
1058 |
+
"model.layers.6.mlp.up_proj.g_idx": "model-00001-of-00003.safetensors",
|
1059 |
+
"model.layers.6.mlp.up_proj.qweight": "model-00001-of-00003.safetensors",
|
1060 |
+
"model.layers.6.mlp.up_proj.qzeros": "model-00001-of-00003.safetensors",
|
1061 |
+
"model.layers.6.mlp.up_proj.scales": "model-00001-of-00003.safetensors",
|
1062 |
+
"model.layers.6.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
|
1063 |
+
"model.layers.6.self_attn.k_proj.bias": "model-00001-of-00003.safetensors",
|
1064 |
+
"model.layers.6.self_attn.k_proj.g_idx": "model-00001-of-00003.safetensors",
|
1065 |
+
"model.layers.6.self_attn.k_proj.qweight": "model-00001-of-00003.safetensors",
|
1066 |
+
"model.layers.6.self_attn.k_proj.qzeros": "model-00001-of-00003.safetensors",
|
1067 |
+
"model.layers.6.self_attn.k_proj.scales": "model-00001-of-00003.safetensors",
|
1068 |
+
"model.layers.6.self_attn.o_proj.bias": "model-00001-of-00003.safetensors",
|
1069 |
+
"model.layers.6.self_attn.o_proj.g_idx": "model-00001-of-00003.safetensors",
|
1070 |
+
"model.layers.6.self_attn.o_proj.qweight": "model-00001-of-00003.safetensors",
|
1071 |
+
"model.layers.6.self_attn.o_proj.qzeros": "model-00001-of-00003.safetensors",
|
1072 |
+
"model.layers.6.self_attn.o_proj.scales": "model-00001-of-00003.safetensors",
|
1073 |
+
"model.layers.6.self_attn.q_proj.bias": "model-00001-of-00003.safetensors",
|
1074 |
+
"model.layers.6.self_attn.q_proj.g_idx": "model-00001-of-00003.safetensors",
|
1075 |
+
"model.layers.6.self_attn.q_proj.qweight": "model-00001-of-00003.safetensors",
|
1076 |
+
"model.layers.6.self_attn.q_proj.qzeros": "model-00001-of-00003.safetensors",
|
1077 |
+
"model.layers.6.self_attn.q_proj.scales": "model-00001-of-00003.safetensors",
|
1078 |
+
"model.layers.6.self_attn.v_proj.bias": "model-00001-of-00003.safetensors",
|
1079 |
+
"model.layers.6.self_attn.v_proj.g_idx": "model-00001-of-00003.safetensors",
|
1080 |
+
"model.layers.6.self_attn.v_proj.qweight": "model-00001-of-00003.safetensors",
|
1081 |
+
"model.layers.6.self_attn.v_proj.qzeros": "model-00001-of-00003.safetensors",
|
1082 |
+
"model.layers.6.self_attn.v_proj.scales": "model-00001-of-00003.safetensors",
|
1083 |
+
"model.layers.7.input_layernorm.weight": "model-00001-of-00003.safetensors",
|
1084 |
+
"model.layers.7.mlp.down_proj.bias": "model-00001-of-00003.safetensors",
|
1085 |
+
"model.layers.7.mlp.down_proj.g_idx": "model-00001-of-00003.safetensors",
|
1086 |
+
"model.layers.7.mlp.down_proj.qweight": "model-00001-of-00003.safetensors",
|
1087 |
+
"model.layers.7.mlp.down_proj.qzeros": "model-00001-of-00003.safetensors",
|
1088 |
+
"model.layers.7.mlp.down_proj.scales": "model-00001-of-00003.safetensors",
|
1089 |
+
"model.layers.7.mlp.gate_proj.bias": "model-00001-of-00003.safetensors",
|
1090 |
+
"model.layers.7.mlp.gate_proj.g_idx": "model-00001-of-00003.safetensors",
|
1091 |
+
"model.layers.7.mlp.gate_proj.qweight": "model-00001-of-00003.safetensors",
|
1092 |
+
"model.layers.7.mlp.gate_proj.qzeros": "model-00001-of-00003.safetensors",
|
1093 |
+
"model.layers.7.mlp.gate_proj.scales": "model-00001-of-00003.safetensors",
|
1094 |
+
"model.layers.7.mlp.up_proj.bias": "model-00001-of-00003.safetensors",
|
1095 |
+
"model.layers.7.mlp.up_proj.g_idx": "model-00001-of-00003.safetensors",
|
1096 |
+
"model.layers.7.mlp.up_proj.qweight": "model-00001-of-00003.safetensors",
|
1097 |
+
"model.layers.7.mlp.up_proj.qzeros": "model-00001-of-00003.safetensors",
|
1098 |
+
"model.layers.7.mlp.up_proj.scales": "model-00001-of-00003.safetensors",
|
1099 |
+
"model.layers.7.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
|
1100 |
+
"model.layers.7.self_attn.k_proj.bias": "model-00001-of-00003.safetensors",
|
1101 |
+
"model.layers.7.self_attn.k_proj.g_idx": "model-00001-of-00003.safetensors",
|
1102 |
+
"model.layers.7.self_attn.k_proj.qweight": "model-00001-of-00003.safetensors",
|
1103 |
+
"model.layers.7.self_attn.k_proj.qzeros": "model-00001-of-00003.safetensors",
|
1104 |
+
"model.layers.7.self_attn.k_proj.scales": "model-00001-of-00003.safetensors",
|
1105 |
+
"model.layers.7.self_attn.o_proj.bias": "model-00001-of-00003.safetensors",
|
1106 |
+
"model.layers.7.self_attn.o_proj.g_idx": "model-00001-of-00003.safetensors",
|
1107 |
+
"model.layers.7.self_attn.o_proj.qweight": "model-00001-of-00003.safetensors",
|
1108 |
+
"model.layers.7.self_attn.o_proj.qzeros": "model-00001-of-00003.safetensors",
|
1109 |
+
"model.layers.7.self_attn.o_proj.scales": "model-00001-of-00003.safetensors",
|
1110 |
+
"model.layers.7.self_attn.q_proj.bias": "model-00001-of-00003.safetensors",
|
1111 |
+
"model.layers.7.self_attn.q_proj.g_idx": "model-00001-of-00003.safetensors",
|
1112 |
+
"model.layers.7.self_attn.q_proj.qweight": "model-00001-of-00003.safetensors",
|
1113 |
+
"model.layers.7.self_attn.q_proj.qzeros": "model-00001-of-00003.safetensors",
|
1114 |
+
"model.layers.7.self_attn.q_proj.scales": "model-00001-of-00003.safetensors",
|
1115 |
+
"model.layers.7.self_attn.v_proj.bias": "model-00001-of-00003.safetensors",
|
1116 |
+
"model.layers.7.self_attn.v_proj.g_idx": "model-00001-of-00003.safetensors",
|
1117 |
+
"model.layers.7.self_attn.v_proj.qweight": "model-00001-of-00003.safetensors",
|
1118 |
+
"model.layers.7.self_attn.v_proj.qzeros": "model-00001-of-00003.safetensors",
|
1119 |
+
"model.layers.7.self_attn.v_proj.scales": "model-00001-of-00003.safetensors",
|
1120 |
+
"model.layers.8.input_layernorm.weight": "model-00001-of-00003.safetensors",
|
1121 |
+
"model.layers.8.mlp.down_proj.bias": "model-00001-of-00003.safetensors",
|
1122 |
+
"model.layers.8.mlp.down_proj.g_idx": "model-00001-of-00003.safetensors",
|
1123 |
+
"model.layers.8.mlp.down_proj.qweight": "model-00001-of-00003.safetensors",
|
1124 |
+
"model.layers.8.mlp.down_proj.qzeros": "model-00001-of-00003.safetensors",
|
1125 |
+
"model.layers.8.mlp.down_proj.scales": "model-00001-of-00003.safetensors",
|
1126 |
+
"model.layers.8.mlp.gate_proj.bias": "model-00001-of-00003.safetensors",
|
1127 |
+
"model.layers.8.mlp.gate_proj.g_idx": "model-00001-of-00003.safetensors",
|
1128 |
+
"model.layers.8.mlp.gate_proj.qweight": "model-00001-of-00003.safetensors",
|
1129 |
+
"model.layers.8.mlp.gate_proj.qzeros": "model-00001-of-00003.safetensors",
|
1130 |
+
"model.layers.8.mlp.gate_proj.scales": "model-00001-of-00003.safetensors",
|
1131 |
+
"model.layers.8.mlp.up_proj.bias": "model-00001-of-00003.safetensors",
|
1132 |
+
"model.layers.8.mlp.up_proj.g_idx": "model-00001-of-00003.safetensors",
|
1133 |
+
"model.layers.8.mlp.up_proj.qweight": "model-00001-of-00003.safetensors",
|
1134 |
+
"model.layers.8.mlp.up_proj.qzeros": "model-00001-of-00003.safetensors",
|
1135 |
+
"model.layers.8.mlp.up_proj.scales": "model-00001-of-00003.safetensors",
|
1136 |
+
"model.layers.8.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
|
1137 |
+
"model.layers.8.self_attn.k_proj.bias": "model-00001-of-00003.safetensors",
|
1138 |
+
"model.layers.8.self_attn.k_proj.g_idx": "model-00001-of-00003.safetensors",
|
1139 |
+
"model.layers.8.self_attn.k_proj.qweight": "model-00001-of-00003.safetensors",
|
1140 |
+
"model.layers.8.self_attn.k_proj.qzeros": "model-00001-of-00003.safetensors",
|
1141 |
+
"model.layers.8.self_attn.k_proj.scales": "model-00001-of-00003.safetensors",
|
1142 |
+
"model.layers.8.self_attn.o_proj.bias": "model-00001-of-00003.safetensors",
|
1143 |
+
"model.layers.8.self_attn.o_proj.g_idx": "model-00001-of-00003.safetensors",
|
1144 |
+
"model.layers.8.self_attn.o_proj.qweight": "model-00001-of-00003.safetensors",
|
1145 |
+
"model.layers.8.self_attn.o_proj.qzeros": "model-00001-of-00003.safetensors",
|
1146 |
+
"model.layers.8.self_attn.o_proj.scales": "model-00001-of-00003.safetensors",
|
1147 |
+
"model.layers.8.self_attn.q_proj.bias": "model-00001-of-00003.safetensors",
|
1148 |
+
"model.layers.8.self_attn.q_proj.g_idx": "model-00001-of-00003.safetensors",
|
1149 |
+
"model.layers.8.self_attn.q_proj.qweight": "model-00001-of-00003.safetensors",
|
1150 |
+
"model.layers.8.self_attn.q_proj.qzeros": "model-00001-of-00003.safetensors",
|
1151 |
+
"model.layers.8.self_attn.q_proj.scales": "model-00001-of-00003.safetensors",
|
1152 |
+
"model.layers.8.self_attn.v_proj.bias": "model-00001-of-00003.safetensors",
|
1153 |
+
"model.layers.8.self_attn.v_proj.g_idx": "model-00001-of-00003.safetensors",
|
1154 |
+
"model.layers.8.self_attn.v_proj.qweight": "model-00001-of-00003.safetensors",
|
1155 |
+
"model.layers.8.self_attn.v_proj.qzeros": "model-00001-of-00003.safetensors",
|
1156 |
+
"model.layers.8.self_attn.v_proj.scales": "model-00001-of-00003.safetensors",
|
1157 |
+
"model.layers.9.input_layernorm.weight": "model-00001-of-00003.safetensors",
|
1158 |
+
"model.layers.9.mlp.down_proj.bias": "model-00001-of-00003.safetensors",
|
1159 |
+
"model.layers.9.mlp.down_proj.g_idx": "model-00001-of-00003.safetensors",
|
1160 |
+
"model.layers.9.mlp.down_proj.qweight": "model-00001-of-00003.safetensors",
|
1161 |
+
"model.layers.9.mlp.down_proj.qzeros": "model-00001-of-00003.safetensors",
|
1162 |
+
"model.layers.9.mlp.down_proj.scales": "model-00001-of-00003.safetensors",
|
1163 |
+
"model.layers.9.mlp.gate_proj.bias": "model-00001-of-00003.safetensors",
|
1164 |
+
"model.layers.9.mlp.gate_proj.g_idx": "model-00001-of-00003.safetensors",
|
1165 |
+
"model.layers.9.mlp.gate_proj.qweight": "model-00001-of-00003.safetensors",
|
1166 |
+
"model.layers.9.mlp.gate_proj.qzeros": "model-00001-of-00003.safetensors",
|
1167 |
+
"model.layers.9.mlp.gate_proj.scales": "model-00001-of-00003.safetensors",
|
1168 |
+
"model.layers.9.mlp.up_proj.bias": "model-00001-of-00003.safetensors",
|
1169 |
+
"model.layers.9.mlp.up_proj.g_idx": "model-00001-of-00003.safetensors",
|
1170 |
+
"model.layers.9.mlp.up_proj.qweight": "model-00001-of-00003.safetensors",
|
1171 |
+
"model.layers.9.mlp.up_proj.qzeros": "model-00001-of-00003.safetensors",
|
1172 |
+
"model.layers.9.mlp.up_proj.scales": "model-00001-of-00003.safetensors",
|
1173 |
+
"model.layers.9.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
|
1174 |
+
"model.layers.9.self_attn.k_proj.bias": "model-00001-of-00003.safetensors",
|
1175 |
+
"model.layers.9.self_attn.k_proj.g_idx": "model-00001-of-00003.safetensors",
|
1176 |
+
"model.layers.9.self_attn.k_proj.qweight": "model-00001-of-00003.safetensors",
|
1177 |
+
"model.layers.9.self_attn.k_proj.qzeros": "model-00001-of-00003.safetensors",
|
1178 |
+
"model.layers.9.self_attn.k_proj.scales": "model-00001-of-00003.safetensors",
|
1179 |
+
"model.layers.9.self_attn.o_proj.bias": "model-00001-of-00003.safetensors",
|
1180 |
+
"model.layers.9.self_attn.o_proj.g_idx": "model-00001-of-00003.safetensors",
|
1181 |
+
"model.layers.9.self_attn.o_proj.qweight": "model-00001-of-00003.safetensors",
|
1182 |
+
"model.layers.9.self_attn.o_proj.qzeros": "model-00001-of-00003.safetensors",
|
1183 |
+
"model.layers.9.self_attn.o_proj.scales": "model-00001-of-00003.safetensors",
|
1184 |
+
"model.layers.9.self_attn.q_proj.bias": "model-00001-of-00003.safetensors",
|
1185 |
+
"model.layers.9.self_attn.q_proj.g_idx": "model-00001-of-00003.safetensors",
|
1186 |
+
"model.layers.9.self_attn.q_proj.qweight": "model-00001-of-00003.safetensors",
|
1187 |
+
"model.layers.9.self_attn.q_proj.qzeros": "model-00001-of-00003.safetensors",
|
1188 |
+
"model.layers.9.self_attn.q_proj.scales": "model-00001-of-00003.safetensors",
|
1189 |
+
"model.layers.9.self_attn.v_proj.bias": "model-00001-of-00003.safetensors",
|
1190 |
+
"model.layers.9.self_attn.v_proj.g_idx": "model-00001-of-00003.safetensors",
|
1191 |
+
"model.layers.9.self_attn.v_proj.qweight": "model-00001-of-00003.safetensors",
|
1192 |
+
"model.layers.9.self_attn.v_proj.qzeros": "model-00001-of-00003.safetensors",
|
1193 |
+
"model.layers.9.self_attn.v_proj.scales": "model-00001-of-00003.safetensors",
|
1194 |
+
"model.norm.weight": "model-00003-of-00003.safetensors"
|
1195 |
+
}
|
1196 |
+
}
|
modeling_bluelm.py
ADDED
@@ -0,0 +1,1000 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# coding=utf-8
|
2 |
+
# Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved.
|
3 |
+
#
|
4 |
+
# This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX
|
5 |
+
# and OPT implementations in this library. It has been modified from its
|
6 |
+
# original forms to accommodate minor architectural differences compared
|
7 |
+
# to GPT-NeoX and OPT used by the Meta AI team that trained the model.
|
8 |
+
#
|
9 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
10 |
+
# you may not use this file except in compliance with the License.
|
11 |
+
# You may obtain a copy of the License at
|
12 |
+
#
|
13 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
14 |
+
#
|
15 |
+
# Unless required by applicable law or agreed to in writing, software
|
16 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
17 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
18 |
+
# See the License for the specific language governing permissions and
|
19 |
+
# limitations under the License.
|
20 |
+
""" PyTorch BlueLM model."""
|
21 |
+
import math
|
22 |
+
from typing import List, Optional, Tuple, Union
|
23 |
+
|
24 |
+
import torch
|
25 |
+
import torch.utils.checkpoint
|
26 |
+
from torch import nn
|
27 |
+
from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
|
28 |
+
|
29 |
+
from transformers.activations import ACT2FN
|
30 |
+
from transformers.modeling_outputs import BaseModelOutputWithPast, CausalLMOutputWithPast, SequenceClassifierOutputWithPast
|
31 |
+
from transformers.modeling_utils import PreTrainedModel
|
32 |
+
from transformers.utils import add_start_docstrings, add_start_docstrings_to_model_forward, logging, replace_return_docstrings
|
33 |
+
from .configuration_bluelm import BlueLMConfig
|
34 |
+
from flash_attn.flash_attn_interface import (
|
35 |
+
flash_attn_func,
|
36 |
+
flash_attn_kvpacked_func,
|
37 |
+
flash_attn_qkvpacked_func,
|
38 |
+
flash_attn_varlen_kvpacked_func,
|
39 |
+
)
|
40 |
+
|
41 |
+
try:
|
42 |
+
from xformers import ops as xops
|
43 |
+
except ImportError:
|
44 |
+
xops = None
|
45 |
+
# print("xformers is not installed correctly.")
|
46 |
+
|
47 |
+
try:
|
48 |
+
from apex.normalization import MixedFusedRMSNorm
|
49 |
+
except ImportError:
|
50 |
+
MixedFusedRMSNorm = None
|
51 |
+
# print("Please install nvidia apex from source (https://github.com/NVIDIA/apex#linux) or use ngc container.")
|
52 |
+
|
53 |
+
|
54 |
+
logger = logging.get_logger(__name__)
|
55 |
+
|
56 |
+
_CONFIG_FOR_DOC = "BlueLmConfig"
|
57 |
+
|
58 |
+
|
59 |
+
def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, past_key_values_length: int = 0):
|
60 |
+
"""
|
61 |
+
Make causal mask used for bi-directional self-attention.
|
62 |
+
"""
|
63 |
+
bsz, tgt_len = input_ids_shape
|
64 |
+
mask = torch.full((tgt_len, tgt_len), torch.tensor(torch.finfo(dtype).min))
|
65 |
+
mask_cond = torch.arange(mask.size(-1))
|
66 |
+
mask.masked_fill_(mask_cond < (mask_cond + 1).view(mask.size(-1), 1), 0)
|
67 |
+
mask = mask.to(dtype)
|
68 |
+
|
69 |
+
if past_key_values_length > 0:
|
70 |
+
mask = torch.cat([torch.zeros(tgt_len, past_key_values_length, dtype=dtype), mask], dim=-1)
|
71 |
+
return mask[None, None, :, :].expand(bsz, 1, tgt_len, tgt_len + past_key_values_length)
|
72 |
+
|
73 |
+
|
74 |
+
def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Optional[int] = None):
|
75 |
+
"""
|
76 |
+
Expands attention_mask from `[bsz, seq_len]` to `[bsz, 1, tgt_seq_len, src_seq_len]`.
|
77 |
+
"""
|
78 |
+
bsz, src_len = mask.size()
|
79 |
+
tgt_len = tgt_len if tgt_len is not None else src_len
|
80 |
+
|
81 |
+
expanded_mask = mask[:, None, None, :].expand(bsz, 1, tgt_len, src_len).to(dtype)
|
82 |
+
|
83 |
+
inverted_mask = 1.0 - expanded_mask
|
84 |
+
|
85 |
+
return inverted_mask.masked_fill(inverted_mask.to(torch.bool), torch.finfo(dtype).min)
|
86 |
+
|
87 |
+
|
88 |
+
class BlueLMRMSNorm(nn.Module):
|
89 |
+
def __init__(self, hidden_size, eps=1e-6):
|
90 |
+
"""
|
91 |
+
BlueLMRMSNorm is equivalent to T5LayerNorm
|
92 |
+
"""
|
93 |
+
super().__init__()
|
94 |
+
self.weight = nn.Parameter(torch.ones(hidden_size))
|
95 |
+
self.variance_epsilon = eps
|
96 |
+
|
97 |
+
def forward(self, hidden_states):
|
98 |
+
variance = hidden_states.to(torch.float32).pow(2).mean(-1, keepdim=True)
|
99 |
+
hidden_states = hidden_states * torch.rsqrt(variance + self.variance_epsilon)
|
100 |
+
|
101 |
+
# convert into half-precision if necessary
|
102 |
+
if self.weight.dtype in [torch.float16, torch.bfloat16]:
|
103 |
+
hidden_states = hidden_states.to(self.weight.dtype)
|
104 |
+
|
105 |
+
return self.weight * hidden_states
|
106 |
+
|
107 |
+
|
108 |
+
class BlueLMRotaryEmbedding(torch.nn.Module):
|
109 |
+
def __init__(self, dim, max_position_embeddings=2048, base=10000, device=None, k=16, b=0.3):
|
110 |
+
super().__init__()
|
111 |
+
# hard code bluedLM-long support 32k window size only
|
112 |
+
max_position_embeddings = 2048 * k
|
113 |
+
a = math.log(k) / ((dim / 2) ** b)
|
114 |
+
inv_freq = 1.0 / (base ** (torch.arange(0, dim, 2).float().to(device) / dim)) \
|
115 |
+
/ torch.exp(a * torch.arange(1, dim / 2 + 1).float() ** b)
|
116 |
+
|
117 |
+
self.register_buffer("inv_freq", inv_freq, persistent=False)
|
118 |
+
assert self.inv_freq.dtype == torch.float32 # inv_freq must be float32 for ensuring numeric precision
|
119 |
+
|
120 |
+
# Build here to make `torch.jit.trace` work.
|
121 |
+
self.max_seq_len_cached = max_position_embeddings
|
122 |
+
t = torch.arange(self.max_seq_len_cached, device=self.inv_freq.device, dtype=self.inv_freq.dtype)
|
123 |
+
freqs = torch.einsum("i,j->ij", t, self.inv_freq)
|
124 |
+
# Different from paper, but it uses a different permutation in order to obtain the same calculation
|
125 |
+
emb = torch.cat((freqs, freqs), dim=-1)
|
126 |
+
self.register_buffer("cos_cached", emb.cos()[None, :, None, :], persistent=False)
|
127 |
+
self.register_buffer("sin_cached", emb.sin()[None, :, None, :], persistent=False)
|
128 |
+
|
129 |
+
def forward(self, x, seq_len=None):
|
130 |
+
# x: [bs, num_attention_heads, seq_len, head_size]
|
131 |
+
# This `if` block is unlikely to be run after we build sin/cos in `__init__`. Keep the logic here just in case.
|
132 |
+
if seq_len > self.max_seq_len_cached:
|
133 |
+
self.max_seq_len_cached = seq_len
|
134 |
+
t = torch.arange(self.max_seq_len_cached, device=x.device, dtype=self.inv_freq.dtype)
|
135 |
+
freqs = torch.einsum("i,j->ij", t, self.inv_freq)
|
136 |
+
# Different from paper, but it uses a different permutation in order to obtain the same calculation
|
137 |
+
emb = torch.cat((freqs, freqs), dim=-1).to(x.device)
|
138 |
+
self.register_buffer("cos_cached", emb.cos()[None, :, None, :], persistent=False)
|
139 |
+
self.register_buffer("sin_cached", emb.sin()[None, :, None, :], persistent=False)
|
140 |
+
return (
|
141 |
+
self.cos_cached[:, :seq_len, ...].to(dtype=x.dtype),
|
142 |
+
self.sin_cached[:, :seq_len, ...].to(dtype=x.dtype),
|
143 |
+
)
|
144 |
+
|
145 |
+
|
146 |
+
def rotate_half(x):
|
147 |
+
"""Rotates half the hidden dims of the input."""
|
148 |
+
x1 = x[..., : x.shape[-1] // 2]
|
149 |
+
x2 = x[..., x.shape[-1] // 2 :]
|
150 |
+
return torch.cat((-x2, x1), dim=-1)
|
151 |
+
|
152 |
+
|
153 |
+
def apply_rotary_pos_emb(q, k, cos, sin, offset: int = 0):
|
154 |
+
cos = cos[:, offset : q.shape[1] + offset, ...]
|
155 |
+
sin = sin[:, offset : q.shape[1] + offset, ...]
|
156 |
+
q_embed = (q * cos) + (rotate_half(q) * sin)
|
157 |
+
k_embed = (k * cos) + (rotate_half(k) * sin)
|
158 |
+
return q_embed, k_embed
|
159 |
+
|
160 |
+
|
161 |
+
class BlueLMMLP(nn.Module):
|
162 |
+
def __init__(
|
163 |
+
self,
|
164 |
+
hidden_size: int,
|
165 |
+
intermediate_size: int,
|
166 |
+
hidden_act: str,
|
167 |
+
dropout_prob: float,
|
168 |
+
):
|
169 |
+
super().__init__()
|
170 |
+
self.gate_proj = nn.Linear(hidden_size, intermediate_size, bias=False)
|
171 |
+
self.down_proj = nn.Linear(intermediate_size, hidden_size, bias=False)
|
172 |
+
self.up_proj = nn.Linear(hidden_size, intermediate_size, bias=False)
|
173 |
+
self.act_fn = ACT2FN[hidden_act]
|
174 |
+
self.dropout = nn.Dropout(dropout_prob)
|
175 |
+
|
176 |
+
def forward(self, x):
|
177 |
+
return self.dropout(self.down_proj(self.act_fn(self.gate_proj(x)) * self.up_proj(x)))
|
178 |
+
|
179 |
+
|
180 |
+
class BlueLMAttention(nn.Module):
|
181 |
+
"""Multi-headed attention from 'Attention Is All You Need' paper"""
|
182 |
+
|
183 |
+
def __init__(
|
184 |
+
self,
|
185 |
+
hidden_size: int,
|
186 |
+
num_heads: int,
|
187 |
+
dropout_prob: float,
|
188 |
+
):
|
189 |
+
super().__init__()
|
190 |
+
self.hidden_size = hidden_size
|
191 |
+
self.num_heads = num_heads
|
192 |
+
self.head_dim = hidden_size // num_heads
|
193 |
+
self.dropout_prob = dropout_prob
|
194 |
+
|
195 |
+
if (self.head_dim * num_heads) != self.hidden_size:
|
196 |
+
raise ValueError(
|
197 |
+
f"hidden_size must be divisible by num_heads (got `hidden_size`: {self.hidden_size}"
|
198 |
+
f" and `num_heads`: {num_heads})."
|
199 |
+
)
|
200 |
+
self.q_proj = nn.Linear(
|
201 |
+
hidden_size,
|
202 |
+
num_heads * self.head_dim,
|
203 |
+
bias=False,
|
204 |
+
)
|
205 |
+
self.k_proj = nn.Linear(
|
206 |
+
hidden_size,
|
207 |
+
num_heads * self.head_dim,
|
208 |
+
bias=False,
|
209 |
+
)
|
210 |
+
self.v_proj = nn.Linear(
|
211 |
+
hidden_size,
|
212 |
+
num_heads * self.head_dim,
|
213 |
+
bias=False,
|
214 |
+
)
|
215 |
+
self.o_proj = nn.Linear(
|
216 |
+
num_heads * self.head_dim,
|
217 |
+
hidden_size,
|
218 |
+
bias=False,
|
219 |
+
)
|
220 |
+
self.register_buffer(
|
221 |
+
"norm_factor",
|
222 |
+
torch.sqrt(torch.tensor(self.head_dim, dtype=torch.float32)).to(torch.get_default_dtype()),
|
223 |
+
persistent=False,
|
224 |
+
)
|
225 |
+
self.rotary_emb = BlueLMRotaryEmbedding(self.head_dim)
|
226 |
+
if xops is not None:
|
227 |
+
self.causal_mask = xops.LowerTriangularMask()
|
228 |
+
|
229 |
+
def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int):
|
230 |
+
return tensor.view(bsz, seq_len, self.num_heads, self.head_dim).contiguous()
|
231 |
+
|
232 |
+
def forward(
|
233 |
+
self,
|
234 |
+
hidden_states: torch.Tensor,
|
235 |
+
past_key_value: Optional[Tuple[torch.Tensor]] = None,
|
236 |
+
attention_mask: Optional[torch.Tensor] = None,
|
237 |
+
output_attentions: bool = False,
|
238 |
+
use_cache: bool = False,
|
239 |
+
) -> Tuple[torch.Tensor, Optional[torch.Tensor], Optional[Tuple[torch.Tensor]]]:
|
240 |
+
"""Input shape: Batch x Time x Channel"""
|
241 |
+
|
242 |
+
bsz, q_len, h_size = hidden_states.size()
|
243 |
+
has_layer_past = past_key_value is not None
|
244 |
+
|
245 |
+
query_states = self.q_proj(hidden_states).view(bsz, q_len, self.num_heads, self.head_dim)
|
246 |
+
key_states = self.k_proj(hidden_states).view(bsz, q_len, self.num_heads, self.head_dim)
|
247 |
+
value_states = self.v_proj(hidden_states).view(bsz, q_len, self.num_heads, self.head_dim)
|
248 |
+
|
249 |
+
kv_seq_len = key_states.shape[1]
|
250 |
+
offset = 0
|
251 |
+
if past_key_value is not None:
|
252 |
+
offset = past_key_value[0].shape[1]
|
253 |
+
kv_seq_len += offset
|
254 |
+
cos, sin = self.rotary_emb(value_states, seq_len=kv_seq_len)
|
255 |
+
query_states, key_states = apply_rotary_pos_emb(query_states, key_states, cos, sin, offset=offset)
|
256 |
+
# [bsz, t, nh, hd]
|
257 |
+
|
258 |
+
if has_layer_past:
|
259 |
+
# reuse k, v, self_attention
|
260 |
+
key_states = torch.cat([past_key_value[0], key_states], dim=1)
|
261 |
+
value_states = torch.cat([past_key_value[1], value_states], dim=1)
|
262 |
+
|
263 |
+
past_key_value = (key_states, value_states) if use_cache else None
|
264 |
+
|
265 |
+
if xops is not None and self.training:
|
266 |
+
attn_weights = None
|
267 |
+
attn_output = xops.memory_efficient_attention(
|
268 |
+
query_states, key_states, value_states, attn_bias=self.causal_mask, p=self.dropout_prob,
|
269 |
+
op=xops.fmha.MemoryEfficientAttentionFlashAttentionOp
|
270 |
+
)
|
271 |
+
else:
|
272 |
+
# [bsz, t, nh, hd]
|
273 |
+
kv = torch.stack([key_states, value_states], 2)
|
274 |
+
attn_outputs = flash_attn_kvpacked_func(
|
275 |
+
query_states, kv, dropout_p=0.0, softmax_scale=1.0/self.norm_factor, causal=(not has_layer_past), return_attn_probs=output_attentions)
|
276 |
+
attn_output = attn_outputs[0] if output_attentions else attn_outputs
|
277 |
+
attn_weights = attn_outputs[2] if output_attentions else None
|
278 |
+
|
279 |
+
|
280 |
+
if attn_output.size() != (bsz, q_len, self.num_heads, self.head_dim):
|
281 |
+
raise ValueError(
|
282 |
+
f"`attn_output` should be of size {(bsz, q_len, self.num_heads, self.head_dim)}, but is"
|
283 |
+
f" {attn_output.size()}"
|
284 |
+
)
|
285 |
+
|
286 |
+
attn_output = attn_output.reshape(bsz, q_len, self.hidden_size)
|
287 |
+
|
288 |
+
attn_output = self.o_proj(attn_output)
|
289 |
+
|
290 |
+
if not output_attentions:
|
291 |
+
attn_weights = None
|
292 |
+
|
293 |
+
return attn_output, attn_weights, past_key_value
|
294 |
+
|
295 |
+
|
296 |
+
class BlueLMDecoderLayer(nn.Module):
|
297 |
+
def __init__(self, config: BlueLMConfig):
|
298 |
+
super().__init__()
|
299 |
+
self.hidden_size = config.hidden_size
|
300 |
+
self.self_attn = BlueLMAttention(
|
301 |
+
hidden_size=self.hidden_size,
|
302 |
+
num_heads=config.num_attention_heads,
|
303 |
+
dropout_prob=0,
|
304 |
+
)
|
305 |
+
self.mlp = BlueLMMLP(
|
306 |
+
hidden_size=self.hidden_size,
|
307 |
+
intermediate_size=config.intermediate_size,
|
308 |
+
hidden_act=config.hidden_act,
|
309 |
+
dropout_prob=0,
|
310 |
+
)
|
311 |
+
if MixedFusedRMSNorm is None:
|
312 |
+
self.input_layernorm = BlueLMRMSNorm(config.hidden_size, eps=config.rms_norm_eps)
|
313 |
+
self.post_attention_layernorm = BlueLMRMSNorm(config.hidden_size, eps=config.rms_norm_eps)
|
314 |
+
else:
|
315 |
+
self.input_layernorm = MixedFusedRMSNorm(config.hidden_size, eps=config.rms_norm_eps)
|
316 |
+
self.post_attention_layernorm = MixedFusedRMSNorm(config.hidden_size, eps=config.rms_norm_eps)
|
317 |
+
|
318 |
+
def forward(
|
319 |
+
self,
|
320 |
+
hidden_states: torch.Tensor,
|
321 |
+
attention_mask: Optional[torch.Tensor] = None,
|
322 |
+
output_attentions: Optional[bool] = False,
|
323 |
+
use_cache: Optional[bool] = False,
|
324 |
+
past_key_value: Optional[Tuple[torch.Tensor]] = None,
|
325 |
+
) -> Tuple[torch.FloatTensor, Optional[Tuple[torch.FloatTensor, torch.FloatTensor]]]:
|
326 |
+
"""
|
327 |
+
Args:
|
328 |
+
hidden_states (`torch.FloatTensor`): input to the layer of shape `(batch, seq_len, embed_dim)`
|
329 |
+
attention_mask (`torch.FloatTensor`, *optional*): attention mask of size
|
330 |
+
`(batch, 1, tgt_len, src_len)` where padding elements are indicated by very large negative values.
|
331 |
+
output_attentions (`bool`, *optional*):
|
332 |
+
Whether or not to return the attentions tensors of all attention layers. See `attentions` under
|
333 |
+
returned tensors for more detail.
|
334 |
+
use_cache (`bool`, *optional*):
|
335 |
+
If set to `True`, `past_key_values` key value states are returned and can be used to speed up decoding
|
336 |
+
(see `past_key_values`).
|
337 |
+
past_key_value (`Tuple(torch.FloatTensor)`, *optional*): cached past key and value projection states
|
338 |
+
"""
|
339 |
+
|
340 |
+
residual = hidden_states
|
341 |
+
|
342 |
+
hidden_states = self.input_layernorm(hidden_states)
|
343 |
+
|
344 |
+
# Self Attention
|
345 |
+
hidden_states, self_attn_weights, present_key_value = self.self_attn(
|
346 |
+
hidden_states=hidden_states,
|
347 |
+
past_key_value=past_key_value,
|
348 |
+
attention_mask=attention_mask,
|
349 |
+
output_attentions=output_attentions,
|
350 |
+
use_cache=use_cache,
|
351 |
+
)
|
352 |
+
hidden_states = residual + hidden_states
|
353 |
+
|
354 |
+
# Fully Connected
|
355 |
+
residual = hidden_states
|
356 |
+
hidden_states = self.post_attention_layernorm(hidden_states)
|
357 |
+
hidden_states = self.mlp(hidden_states)
|
358 |
+
hidden_states = residual + hidden_states
|
359 |
+
|
360 |
+
outputs = (hidden_states,)
|
361 |
+
|
362 |
+
if output_attentions:
|
363 |
+
outputs += (self_attn_weights,)
|
364 |
+
|
365 |
+
if use_cache:
|
366 |
+
outputs += (present_key_value,)
|
367 |
+
|
368 |
+
return outputs
|
369 |
+
|
370 |
+
|
371 |
+
BlueLM_START_DOCSTRING = r"""
|
372 |
+
This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the
|
373 |
+
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
|
374 |
+
etc.)
|
375 |
+
|
376 |
+
This model is also a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) subclass.
|
377 |
+
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
|
378 |
+
and behavior.
|
379 |
+
|
380 |
+
Parameters:
|
381 |
+
config ([`BlueLMConfig`]):
|
382 |
+
Model configuration class with all the parameters of the model. Initializing with a config file does not
|
383 |
+
load the weights associated with the model, only the configuration. Check out the
|
384 |
+
[`~PreTrainedModel.from_pretrained`] method to load the model weights.
|
385 |
+
"""
|
386 |
+
|
387 |
+
|
388 |
+
@add_start_docstrings(
|
389 |
+
"The bare BlueLM Model outputting raw hidden-states without any specific head on top.",
|
390 |
+
BlueLM_START_DOCSTRING,
|
391 |
+
)
|
392 |
+
class BlueLMPreTrainedModel(PreTrainedModel):
|
393 |
+
config_class = BlueLMConfig
|
394 |
+
base_model_prefix = "model"
|
395 |
+
supports_gradient_checkpointing = True
|
396 |
+
_no_split_modules = ["BlueLMDecoderLayer"]
|
397 |
+
_keys_to_ignore_on_load_unexpected = [r"decoder\.version"]
|
398 |
+
|
399 |
+
def _init_weights(self, module):
|
400 |
+
std = self.config.initializer_range
|
401 |
+
if isinstance(module, nn.Linear):
|
402 |
+
# module.weight.data.normal_(mean=0.0, std=std)
|
403 |
+
torch.nn.init.xavier_normal_(module.weight.data)
|
404 |
+
if module.bias is not None:
|
405 |
+
module.bias.data.zero_()
|
406 |
+
elif isinstance(module, nn.Embedding):
|
407 |
+
if self.config.use_stable_embedding:
|
408 |
+
torch.nn.init.xavier_normal_(module.weight.data)
|
409 |
+
else:
|
410 |
+
module.weight.data.normal_(mean=0.0, std=std)
|
411 |
+
if module.padding_idx is not None:
|
412 |
+
module.weight.data[module.padding_idx].zero_()
|
413 |
+
|
414 |
+
def _set_gradient_checkpointing(self, module, value=False):
|
415 |
+
if isinstance(module, BlueLMModel):
|
416 |
+
module.gradient_checkpointing = value
|
417 |
+
|
418 |
+
|
419 |
+
BlueLM_INPUTS_DOCSTRING = r"""
|
420 |
+
Args:
|
421 |
+
input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`):
|
422 |
+
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
|
423 |
+
it.
|
424 |
+
|
425 |
+
Indices can be obtained using [`AutoTokenizer`]. See [`PreTrainedTokenizer.encode`] and
|
426 |
+
[`PreTrainedTokenizer.__call__`] for details.
|
427 |
+
|
428 |
+
[What are input IDs?](../glossary#input-ids)
|
429 |
+
attention_mask (`torch.Tensor` of shape `(batch_size, sequence_length)`, *optional*):
|
430 |
+
Mask to avoid performing attention on padding token indices. Mask values selected in `[0, 1]`:
|
431 |
+
|
432 |
+
- 1 for tokens that are **not masked**,
|
433 |
+
- 0 for tokens that are **masked**.
|
434 |
+
|
435 |
+
[What are attention masks?](../glossary#attention-mask)
|
436 |
+
|
437 |
+
Indices can be obtained using [`AutoTokenizer`]. See [`PreTrainedTokenizer.encode`] and
|
438 |
+
[`PreTrainedTokenizer.__call__`] for details.
|
439 |
+
|
440 |
+
If `past_key_values` is used, optionally only the last `decoder_input_ids` have to be input (see
|
441 |
+
`past_key_values`).
|
442 |
+
|
443 |
+
If you want to change padding behavior, you should read [`modeling_opt._prepare_decoder_attention_mask`]
|
444 |
+
and modify to your needs. See diagram 1 in [the paper](https://arxiv.org/abs/1910.13461) for more
|
445 |
+
information on the default strategy.
|
446 |
+
|
447 |
+
- 1 indicates the head is **not masked**,
|
448 |
+
- 0 indicates the head is **masked**.
|
449 |
+
|
450 |
+
past_key_values (`tuple(tuple(torch.FloatTensor))`, *optional*, returned when `use_cache=True` is passed or when `config.use_cache=True`):
|
451 |
+
Tuple of `tuple(torch.FloatTensor)` of length `config.n_layers`, with each tuple having 2 tensors of shape
|
452 |
+
`(batch_size, num_heads, sequence_length, embed_size_per_head)`) and 2 additional tensors of shape
|
453 |
+
`(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)`.
|
454 |
+
|
455 |
+
Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
|
456 |
+
blocks) that can be used (see `past_key_values` input) to speed up sequential decoding.
|
457 |
+
|
458 |
+
If `past_key_values` are used, the user can optionally input only the last `decoder_input_ids` (those that
|
459 |
+
don't have their past key value states given to this model) of shape `(batch_size, 1)` instead of all
|
460 |
+
`decoder_input_ids` of shape `(batch_size, sequence_length)`.
|
461 |
+
inputs_embeds (`torch.FloatTensor` of shape `(batch_size, sequence_length, hidden_size)`, *optional*):
|
462 |
+
Optionally, instead of passing `input_ids` you can choose to directly pass an embedded representation. This
|
463 |
+
is useful if you want more control over how to convert `input_ids` indices into associated vectors than the
|
464 |
+
model's internal embedding lookup matrix.
|
465 |
+
use_cache (`bool`, *optional*):
|
466 |
+
If set to `True`, `past_key_values` key value states are returned and can be used to speed up decoding (see
|
467 |
+
`past_key_values`).
|
468 |
+
output_attentions (`bool`, *optional*):
|
469 |
+
Whether or not to return the attentions tensors of all attention layers. See `attentions` under returned
|
470 |
+
tensors for more detail.
|
471 |
+
output_hidden_states (`bool`, *optional*):
|
472 |
+
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
|
473 |
+
more detail.
|
474 |
+
return_dict (`bool`, *optional*):
|
475 |
+
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
|
476 |
+
"""
|
477 |
+
|
478 |
+
|
479 |
+
@add_start_docstrings(
|
480 |
+
"The bare BlueLM Model outputting raw hidden-states without any specific head on top.",
|
481 |
+
BlueLM_START_DOCSTRING,
|
482 |
+
)
|
483 |
+
class BlueLMModel(BlueLMPreTrainedModel):
|
484 |
+
"""
|
485 |
+
Transformer decoder consisting of *config.num_hidden_layers* layers. Each layer is a [`BlueLMDecoderLayer`]
|
486 |
+
|
487 |
+
Args:
|
488 |
+
config: BlueLMConfig
|
489 |
+
"""
|
490 |
+
|
491 |
+
def __init__(self, config: BlueLMConfig):
|
492 |
+
super().__init__(config)
|
493 |
+
self.padding_idx = config.pad_token_id
|
494 |
+
self.vocab_size = config.vocab_size
|
495 |
+
|
496 |
+
self.embed_tokens = nn.Embedding(config.vocab_size, config.hidden_size, self.padding_idx)
|
497 |
+
if config.use_stable_embedding:
|
498 |
+
self.embed_layer_norm = nn.LayerNorm(config.hidden_size,eps=1e-06)
|
499 |
+
else:
|
500 |
+
self.embed_layer_norm = None
|
501 |
+
self.layers = nn.ModuleList([BlueLMDecoderLayer(config) for _ in range(config.num_hidden_layers)])
|
502 |
+
if MixedFusedRMSNorm is None:
|
503 |
+
self.norm = BlueLMRMSNorm(config.hidden_size, eps=config.rms_norm_eps)
|
504 |
+
else:
|
505 |
+
self.norm = MixedFusedRMSNorm(config.hidden_size, eps=config.rms_norm_eps)
|
506 |
+
|
507 |
+
self.gradient_checkpointing = False
|
508 |
+
# Initialize weights and apply final processing
|
509 |
+
self.post_init()
|
510 |
+
|
511 |
+
def get_input_embeddings(self):
|
512 |
+
return self.embed_tokens
|
513 |
+
|
514 |
+
def set_input_embeddings(self, value):
|
515 |
+
self.embed_tokens = value
|
516 |
+
|
517 |
+
# Copied from transformers.models.bart.modeling_bart.BartDecoder._prepare_decoder_attention_mask
|
518 |
+
def _prepare_decoder_attention_mask(self, attention_mask, input_shape, inputs_embeds, past_key_values_length):
|
519 |
+
# create causal mask
|
520 |
+
# [bsz, seq_len] -> [bsz, 1, tgt_seq_len, src_seq_len]
|
521 |
+
combined_attention_mask = None
|
522 |
+
if input_shape[-1] > 1:
|
523 |
+
combined_attention_mask = _make_causal_mask(
|
524 |
+
input_shape, inputs_embeds.dtype, past_key_values_length=past_key_values_length
|
525 |
+
).to(inputs_embeds.device)
|
526 |
+
|
527 |
+
if attention_mask is not None:
|
528 |
+
# [bsz, seq_len] -> [bsz, 1, tgt_seq_len, src_seq_len]
|
529 |
+
expanded_attn_mask = _expand_mask(attention_mask, inputs_embeds.dtype, tgt_len=input_shape[-1]).to(
|
530 |
+
inputs_embeds.device
|
531 |
+
)
|
532 |
+
combined_attention_mask = (
|
533 |
+
expanded_attn_mask if combined_attention_mask is None else expanded_attn_mask + combined_attention_mask
|
534 |
+
)
|
535 |
+
|
536 |
+
return combined_attention_mask
|
537 |
+
|
538 |
+
def forward(
|
539 |
+
self,
|
540 |
+
input_ids: torch.LongTensor = None,
|
541 |
+
attention_mask: Optional[torch.Tensor] = None,
|
542 |
+
past_key_values: Optional[List[torch.FloatTensor]] = None,
|
543 |
+
inputs_embeds: Optional[torch.FloatTensor] = None,
|
544 |
+
use_cache: Optional[bool] = None,
|
545 |
+
output_attentions: Optional[bool] = None,
|
546 |
+
output_hidden_states: Optional[bool] = None,
|
547 |
+
return_dict: Optional[bool] = None,
|
548 |
+
) -> Union[Tuple, BaseModelOutputWithPast]:
|
549 |
+
r"""
|
550 |
+
Args:
|
551 |
+
input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`):
|
552 |
+
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you
|
553 |
+
provide it.
|
554 |
+
|
555 |
+
Indices can be obtained using [`AutoTokenizer`]. See [`PreTrainedTokenizer.encode`] and
|
556 |
+
[`PreTrainedTokenizer.__call__`] for details.
|
557 |
+
|
558 |
+
[What are input IDs?](../glossary#input-ids)
|
559 |
+
attention_mask (`torch.Tensor` of shape `(batch_size, sequence_length)`, *optional*):
|
560 |
+
Mask to avoid performing attention on padding token indices. Mask values selected in `[0, 1]`:
|
561 |
+
|
562 |
+
- 1 for tokens that are **not masked**,
|
563 |
+
- 0 for tokens that are **masked**.
|
564 |
+
|
565 |
+
[What are attention masks?](../glossary#attention-mask)
|
566 |
+
past_key_values (`tuple(tuple(torch.FloatTensor))`, *optional*, returned when `use_cache=True` is passed or when `config.use_cache=True`):
|
567 |
+
Tuple of `tuple(torch.FloatTensor)` of length `config.n_layers`, with each tuple having 2 tensors of
|
568 |
+
shape `(batch_size, num_heads, sequence_length, embed_size_per_head)`) and 2 additional tensors of
|
569 |
+
|
570 |
+
Contains pre-computed hidden-states (key and values in the self-attention blocks and in the
|
571 |
+
cross-attention blocks) that can be used (see `past_key_values` input) to speed up sequential decoding.
|
572 |
+
|
573 |
+
If `past_key_values` are used, the user can optionally input only the last `decoder_input_ids` (those
|
574 |
+
that don't have their past key value states given to this model) of shape `(batch_size, 1)` instead of
|
575 |
+
all `decoder_input_ids` of shape `(batch_size, sequence_length)`.
|
576 |
+
use_cache (`bool`, *optional*):
|
577 |
+
If set to `True`, `past_key_values` key value states are returned and can be used to speed up decoding
|
578 |
+
(see `past_key_values`).
|
579 |
+
inputs_embeds (`torch.FloatTensor` of shape `(batch_size, sequence_length, hidden_size)`, *optional*):
|
580 |
+
Optionally, instead of passing `input_ids` you can choose to directly pass an embedded representation.
|
581 |
+
This is useful if you want more control over how to convert `input_ids` indices into associated vectors
|
582 |
+
than the model's internal embedding lookup matrix.
|
583 |
+
output_attentions (`bool`, *optional*):
|
584 |
+
Whether or not to return the attentions tensors of all attention layers. See `attentions` under
|
585 |
+
returned tensors for more detail.
|
586 |
+
output_hidden_states (`bool`, *optional*):
|
587 |
+
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors
|
588 |
+
for more detail.
|
589 |
+
return_dict (`bool`, *optional*):
|
590 |
+
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
|
591 |
+
"""
|
592 |
+
output_attentions = output_attentions if output_attentions is not None else self.config.output_attentions
|
593 |
+
output_hidden_states = (
|
594 |
+
output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
|
595 |
+
)
|
596 |
+
use_cache = use_cache if use_cache is not None else self.config.use_cache
|
597 |
+
|
598 |
+
return_dict = return_dict if return_dict is not None else self.config.use_return_dict
|
599 |
+
|
600 |
+
# retrieve input_ids and inputs_embeds
|
601 |
+
if input_ids is not None and inputs_embeds is not None:
|
602 |
+
raise ValueError("You cannot specify both decoder_input_ids and decoder_inputs_embeds at the same time")
|
603 |
+
elif input_ids is not None:
|
604 |
+
batch_size, seq_length = input_ids.shape
|
605 |
+
elif inputs_embeds is not None:
|
606 |
+
batch_size, seq_length, _ = inputs_embeds.shape
|
607 |
+
else:
|
608 |
+
raise ValueError("You have to specify either decoder_input_ids or decoder_inputs_embeds")
|
609 |
+
seq_length_with_past = seq_length
|
610 |
+
past_key_values_length = 0
|
611 |
+
if past_key_values is not None:
|
612 |
+
past_key_values_length = past_key_values[0][0].shape[2]
|
613 |
+
seq_length_with_past = seq_length_with_past + past_key_values_length
|
614 |
+
if inputs_embeds is None:
|
615 |
+
inputs_embeds = self.embed_tokens(input_ids)
|
616 |
+
if self.embed_layer_norm:
|
617 |
+
inputs_embeds = self.embed_layer_norm(inputs_embeds)
|
618 |
+
# embed positions
|
619 |
+
if xops is not None and self.training:
|
620 |
+
attention_mask = None
|
621 |
+
else:
|
622 |
+
if attention_mask is None:
|
623 |
+
attention_mask = torch.ones(
|
624 |
+
(batch_size, seq_length_with_past), dtype=torch.bool, device=inputs_embeds.device
|
625 |
+
)
|
626 |
+
attention_mask = self._prepare_decoder_attention_mask(
|
627 |
+
attention_mask, (batch_size, seq_length), inputs_embeds, past_key_values_length
|
628 |
+
)
|
629 |
+
|
630 |
+
hidden_states = inputs_embeds
|
631 |
+
|
632 |
+
if self.gradient_checkpointing and self.training:
|
633 |
+
if use_cache:
|
634 |
+
logger.warning_once(
|
635 |
+
"`use_cache=True` is incompatible with gradient checkpointing. Setting `use_cache=False`..."
|
636 |
+
)
|
637 |
+
use_cache = False
|
638 |
+
|
639 |
+
# decoder layers
|
640 |
+
all_hidden_states = () if output_hidden_states else None
|
641 |
+
all_self_attns = () if output_attentions else None
|
642 |
+
next_decoder_cache = () if use_cache else None
|
643 |
+
|
644 |
+
for idx, decoder_layer in enumerate(self.layers):
|
645 |
+
if output_hidden_states:
|
646 |
+
all_hidden_states += (hidden_states,)
|
647 |
+
|
648 |
+
past_key_value = past_key_values[idx] if past_key_values is not None else None
|
649 |
+
|
650 |
+
if self.gradient_checkpointing and self.training:
|
651 |
+
|
652 |
+
def create_custom_forward(module):
|
653 |
+
def custom_forward(*inputs):
|
654 |
+
# None for past_key_value
|
655 |
+
return module(*inputs, output_attentions, None)
|
656 |
+
|
657 |
+
return custom_forward
|
658 |
+
|
659 |
+
layer_outputs = torch.utils.checkpoint.checkpoint(
|
660 |
+
create_custom_forward(decoder_layer),
|
661 |
+
hidden_states,
|
662 |
+
attention_mask,
|
663 |
+
None,
|
664 |
+
)
|
665 |
+
else:
|
666 |
+
layer_outputs = decoder_layer(
|
667 |
+
hidden_states,
|
668 |
+
attention_mask=attention_mask,
|
669 |
+
past_key_value=past_key_value,
|
670 |
+
output_attentions=output_attentions,
|
671 |
+
use_cache=use_cache,
|
672 |
+
)
|
673 |
+
|
674 |
+
hidden_states = layer_outputs[0]
|
675 |
+
|
676 |
+
if use_cache:
|
677 |
+
next_decoder_cache += (layer_outputs[2 if output_attentions else 1],)
|
678 |
+
|
679 |
+
if output_attentions:
|
680 |
+
all_self_attns += (layer_outputs[1],)
|
681 |
+
|
682 |
+
hidden_states = self.norm(hidden_states)
|
683 |
+
|
684 |
+
# add hidden states from the last decoder layer
|
685 |
+
if output_hidden_states:
|
686 |
+
all_hidden_states += (hidden_states,)
|
687 |
+
|
688 |
+
next_cache = next_decoder_cache if use_cache else None
|
689 |
+
if not return_dict:
|
690 |
+
return tuple(v for v in [hidden_states, next_cache, all_hidden_states, all_self_attns] if v is not None)
|
691 |
+
return BaseModelOutputWithPast(
|
692 |
+
last_hidden_state=hidden_states,
|
693 |
+
past_key_values=next_cache,
|
694 |
+
hidden_states=all_hidden_states,
|
695 |
+
attentions=all_self_attns,
|
696 |
+
)
|
697 |
+
|
698 |
+
|
699 |
+
class BlueLMForCausalLM(BlueLMPreTrainedModel):
|
700 |
+
_keys_to_ignore_on_load_missing = [r"lm_head.weight"]
|
701 |
+
|
702 |
+
def __init__(self, config):
|
703 |
+
super().__init__(config)
|
704 |
+
self.model = BlueLMModel(config)
|
705 |
+
self.lm_head = nn.Linear(config.hidden_size, config.vocab_size, bias=False)
|
706 |
+
|
707 |
+
# Initialize weights and apply final processing
|
708 |
+
self.post_init()
|
709 |
+
|
710 |
+
def get_input_embeddings(self):
|
711 |
+
return self.model.embed_tokens
|
712 |
+
|
713 |
+
def set_input_embeddings(self, value):
|
714 |
+
self.model.embed_tokens = value
|
715 |
+
|
716 |
+
def get_output_embeddings(self):
|
717 |
+
return self.lm_head
|
718 |
+
|
719 |
+
def set_output_embeddings(self, new_embeddings):
|
720 |
+
self.lm_head = new_embeddings
|
721 |
+
|
722 |
+
def set_decoder(self, decoder):
|
723 |
+
self.model = decoder
|
724 |
+
|
725 |
+
def get_decoder(self):
|
726 |
+
return self.model
|
727 |
+
|
728 |
+
@replace_return_docstrings(output_type=CausalLMOutputWithPast, config_class=_CONFIG_FOR_DOC)
|
729 |
+
def forward(
|
730 |
+
self,
|
731 |
+
input_ids: torch.LongTensor = None,
|
732 |
+
attention_mask: Optional[torch.Tensor] = None,
|
733 |
+
past_key_values: Optional[List[torch.FloatTensor]] = None,
|
734 |
+
inputs_embeds: Optional[torch.FloatTensor] = None,
|
735 |
+
labels: Optional[torch.LongTensor] = None,
|
736 |
+
use_cache: Optional[bool] = None,
|
737 |
+
output_attentions: Optional[bool] = None,
|
738 |
+
output_hidden_states: Optional[bool] = None,
|
739 |
+
return_dict: Optional[bool] = None,
|
740 |
+
) -> Union[Tuple, CausalLMOutputWithPast]:
|
741 |
+
r"""
|
742 |
+
Args:
|
743 |
+
input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`):
|
744 |
+
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you
|
745 |
+
provide it.
|
746 |
+
|
747 |
+
Indices can be obtained using [`AutoTokenizer`]. See [`PreTrainedTokenizer.encode`] and
|
748 |
+
[`PreTrainedTokenizer.__call__`] for details.
|
749 |
+
|
750 |
+
[What are input IDs?](../glossary#input-ids)
|
751 |
+
attention_mask (`torch.Tensor` of shape `(batch_size, sequence_length)`, *optional*):
|
752 |
+
Mask to avoid performing attention on padding token indices. Mask values selected in `[0, 1]`:
|
753 |
+
|
754 |
+
- 1 for tokens that are **not masked**,
|
755 |
+
- 0 for tokens that are **masked**.
|
756 |
+
|
757 |
+
[What are attention masks?](../glossary#attention-mask)
|
758 |
+
past_key_values (`tuple(tuple(torch.FloatTensor))`, *optional*, returned when `use_cache=True` is passed or when `config.use_cache=True`):
|
759 |
+
Tuple of `tuple(torch.FloatTensor)` of length `config.n_layers`, with each tuple having 2 tensors of
|
760 |
+
shape `(batch_size, num_heads, sequence_length, embed_size_per_head)`) and 2 additional tensors of
|
761 |
+
shape `(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)`. The two additional
|
762 |
+
tensors are only required when the model is used as a decoder in a Sequence to Sequence model.
|
763 |
+
|
764 |
+
Contains pre-computed hidden-states (key and values in the self-attention blocks and in the
|
765 |
+
cross-attention blocks) that can be used (see `past_key_values` input) to speed up sequential decoding.
|
766 |
+
|
767 |
+
If `past_key_values` are used, the user can optionally input only the last `decoder_input_ids` (those
|
768 |
+
that don't have their past key value states given to this model) of shape `(batch_size, 1)` instead of
|
769 |
+
all `decoder_input_ids` of shape `(batch_size, sequence_length)`.
|
770 |
+
inputs_embeds (`torch.FloatTensor` of shape `(batch_size, sequence_length, hidden_size)`, *optional*):
|
771 |
+
Optionally, instead of passing `input_ids` you can choose to directly pass an embedded representation.
|
772 |
+
This is useful if you want more control over how to convert `input_ids` indices into associated vectors
|
773 |
+
than the model's internal embedding lookup matrix.
|
774 |
+
labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
|
775 |
+
Labels for computing the masked language modeling loss. Indices should either be in `[0, ...,
|
776 |
+
config.vocab_size]` or -100 (see `input_ids` docstring). Tokens with indices set to `-100` are ignored
|
777 |
+
(masked), the loss is only computed for the tokens with labels in `[0, ..., config.vocab_size]`.
|
778 |
+
use_cache (`bool`, *optional*):
|
779 |
+
If set to `True`, `past_key_values` key value states are returned and can be used to speed up decoding
|
780 |
+
(see `past_key_values`).
|
781 |
+
output_attentions (`bool`, *optional*):
|
782 |
+
Whether or not to return the attentions tensors of all attention layers. See `attentions` under
|
783 |
+
returned tensors for more detail.
|
784 |
+
output_hidden_states (`bool`, *optional*):
|
785 |
+
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors
|
786 |
+
for more detail.
|
787 |
+
return_dict (`bool`, *optional*):
|
788 |
+
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
|
789 |
+
|
790 |
+
Returns:
|
791 |
+
|
792 |
+
Example:
|
793 |
+
|
794 |
+
```python
|
795 |
+
>>> from transformers import AutoTokenizer, BlueLMForCausalLM
|
796 |
+
|
797 |
+
>>> model = BlueLMForCausalLM.from_pretrained(PATH_TO_CONVERTED_WEIGHTS)
|
798 |
+
>>> tokenizer = AutoTokenizer.from_pretrained(PATH_TO_CONVERTED_TOKENIZER)
|
799 |
+
|
800 |
+
>>> prompt = "Hey, are you consciours? Can you talk to me?"
|
801 |
+
>>> inputs = tokenizer(prompt, return_tensors="pt")
|
802 |
+
|
803 |
+
>>> # Generate
|
804 |
+
>>> generate_ids = model.generate(inputs.input_ids, max_length=30)
|
805 |
+
>>> tokenizer.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
|
806 |
+
"Hey, are you consciours? Can you talk to me?\nI'm not consciours, but I can talk to you."
|
807 |
+
```"""
|
808 |
+
|
809 |
+
output_attentions = output_attentions if output_attentions is not None else self.config.output_attentions
|
810 |
+
output_hidden_states = (
|
811 |
+
output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
|
812 |
+
)
|
813 |
+
return_dict = return_dict if return_dict is not None else self.config.use_return_dict
|
814 |
+
|
815 |
+
# decoder outputs consists of (dec_features, layer_state, dec_hidden, dec_attn)
|
816 |
+
outputs = self.model(
|
817 |
+
input_ids=input_ids,
|
818 |
+
attention_mask=attention_mask,
|
819 |
+
past_key_values=past_key_values,
|
820 |
+
inputs_embeds=inputs_embeds,
|
821 |
+
use_cache=use_cache,
|
822 |
+
output_attentions=output_attentions,
|
823 |
+
output_hidden_states=output_hidden_states,
|
824 |
+
return_dict=return_dict,
|
825 |
+
)
|
826 |
+
|
827 |
+
hidden_states = outputs[0]
|
828 |
+
logits = self.lm_head(hidden_states)
|
829 |
+
|
830 |
+
loss = None
|
831 |
+
if labels is not None:
|
832 |
+
# Shift so that tokens < n predict n
|
833 |
+
shift_logits = logits[..., :-1, :].contiguous()
|
834 |
+
shift_labels = labels[..., 1:].contiguous()
|
835 |
+
# Flatten the tokens
|
836 |
+
loss_fct = CrossEntropyLoss()
|
837 |
+
shift_logits = shift_logits.view(-1, self.config.vocab_size)
|
838 |
+
shift_labels = shift_labels.view(-1)
|
839 |
+
# Enable model/pipeline parallelism
|
840 |
+
shift_labels = shift_labels.to(shift_logits.device)
|
841 |
+
loss = loss_fct(shift_logits, shift_labels)
|
842 |
+
|
843 |
+
if not return_dict:
|
844 |
+
output = (logits,) + outputs[1:]
|
845 |
+
return (loss,) + output if loss is not None else output
|
846 |
+
|
847 |
+
return CausalLMOutputWithPast(
|
848 |
+
loss=loss,
|
849 |
+
logits=logits,
|
850 |
+
past_key_values=outputs.past_key_values,
|
851 |
+
hidden_states=outputs.hidden_states,
|
852 |
+
attentions=outputs.attentions,
|
853 |
+
)
|
854 |
+
|
855 |
+
def prepare_inputs_for_generation(
|
856 |
+
self, input_ids, past_key_values=None, attention_mask=None, inputs_embeds=None, **kwargs
|
857 |
+
):
|
858 |
+
if past_key_values:
|
859 |
+
input_ids = input_ids[:, -1:]
|
860 |
+
|
861 |
+
# if `inputs_embeds` are passed, we only want to use them in the 1st generation step
|
862 |
+
if inputs_embeds is not None and past_key_values is None:
|
863 |
+
model_inputs = {"inputs_embeds": inputs_embeds}
|
864 |
+
else:
|
865 |
+
model_inputs = {"input_ids": input_ids}
|
866 |
+
|
867 |
+
model_inputs.update(
|
868 |
+
{
|
869 |
+
"past_key_values": past_key_values,
|
870 |
+
"use_cache": kwargs.get("use_cache"),
|
871 |
+
"attention_mask": attention_mask,
|
872 |
+
}
|
873 |
+
)
|
874 |
+
return model_inputs
|
875 |
+
|
876 |
+
@staticmethod
|
877 |
+
def _reorder_cache(past_key_values, beam_idx):
|
878 |
+
reordered_past = ()
|
879 |
+
for layer_past in past_key_values:
|
880 |
+
reordered_past += (tuple(past_state.index_select(0, beam_idx) for past_state in layer_past),)
|
881 |
+
return reordered_past
|
882 |
+
|
883 |
+
|
884 |
+
@add_start_docstrings(
|
885 |
+
"""
|
886 |
+
The BlueLM Model transformer with a sequence classification head on top (linear layer).
|
887 |
+
|
888 |
+
[`BlueLMForSequenceClassification`] uses the last token in order to do the classification, as other causal models
|
889 |
+
(e.g. GPT-2) do.
|
890 |
+
|
891 |
+
Since it does classification on the last token, it requires to know the position of the last token. If a
|
892 |
+
`pad_token_id` is defined in the configuration, it finds the last token that is not a padding token in each row. If
|
893 |
+
no `pad_token_id` is defined, it simply takes the last value in each row of the batch. Since it cannot guess the
|
894 |
+
padding tokens when `inputs_embeds` are passed instead of `input_ids`, it does the same (take the last value in
|
895 |
+
each row of the batch).
|
896 |
+
""",
|
897 |
+
BlueLM_START_DOCSTRING,
|
898 |
+
)
|
899 |
+
class BlueLMForSequenceClassification(BlueLMPreTrainedModel):
|
900 |
+
_keys_to_ignore_on_load_missing = [r"lm_head.weight"]
|
901 |
+
|
902 |
+
def __init__(self, config):
|
903 |
+
super().__init__(config)
|
904 |
+
self.num_labels = config.num_labels
|
905 |
+
self.model = BlueLMModel(config)
|
906 |
+
self.score = nn.Linear(config.hidden_size, self.num_labels, bias=False)
|
907 |
+
|
908 |
+
# Initialize weights and apply final processing
|
909 |
+
self.post_init()
|
910 |
+
|
911 |
+
def get_input_embeddings(self):
|
912 |
+
return self.model.embed_tokens
|
913 |
+
|
914 |
+
def set_input_embeddings(self, value):
|
915 |
+
self.model.embed_tokens = value
|
916 |
+
|
917 |
+
@add_start_docstrings_to_model_forward(BlueLM_INPUTS_DOCSTRING)
|
918 |
+
def forward(
|
919 |
+
self,
|
920 |
+
input_ids: torch.LongTensor = None,
|
921 |
+
attention_mask: Optional[torch.Tensor] = None,
|
922 |
+
past_key_values: Optional[List[torch.FloatTensor]] = None,
|
923 |
+
inputs_embeds: Optional[torch.FloatTensor] = None,
|
924 |
+
labels: Optional[torch.LongTensor] = None,
|
925 |
+
use_cache: Optional[bool] = None,
|
926 |
+
output_attentions: Optional[bool] = None,
|
927 |
+
output_hidden_states: Optional[bool] = None,
|
928 |
+
return_dict: Optional[bool] = None,
|
929 |
+
) -> Union[Tuple, SequenceClassifierOutputWithPast]:
|
930 |
+
r"""
|
931 |
+
labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*):
|
932 |
+
Labels for computing the sequence classification/regression loss. Indices should be in `[0, ...,
|
933 |
+
config.num_labels - 1]`. If `config.num_labels == 1` a regression loss is computed (Mean-Square loss), If
|
934 |
+
`config.num_labels > 1` a classification loss is computed (Cross-Entropy).
|
935 |
+
"""
|
936 |
+
return_dict = return_dict if return_dict is not None else self.config.use_return_dict
|
937 |
+
|
938 |
+
transformer_outputs = self.model(
|
939 |
+
input_ids,
|
940 |
+
past_key_values=past_key_values,
|
941 |
+
attention_mask=attention_mask,
|
942 |
+
inputs_embeds=inputs_embeds,
|
943 |
+
use_cache=use_cache,
|
944 |
+
output_attentions=output_attentions,
|
945 |
+
output_hidden_states=output_hidden_states,
|
946 |
+
return_dict=return_dict,
|
947 |
+
)
|
948 |
+
hidden_states = transformer_outputs[0]
|
949 |
+
logits = self.score(hidden_states)
|
950 |
+
|
951 |
+
if input_ids is not None:
|
952 |
+
batch_size = input_ids.shape[0]
|
953 |
+
else:
|
954 |
+
batch_size = inputs_embeds.shape[0]
|
955 |
+
|
956 |
+
if self.config.pad_token_id is None and batch_size != 1:
|
957 |
+
raise ValueError("Cannot handle batch sizes > 1 if no padding token is defined.")
|
958 |
+
if self.config.pad_token_id is None:
|
959 |
+
sequence_lengths = -1
|
960 |
+
else:
|
961 |
+
if input_ids is not None:
|
962 |
+
sequence_lengths = (torch.ne(input_ids, self.config.pad_token_id).sum(-1) - 1).to(logits.device)
|
963 |
+
else:
|
964 |
+
sequence_lengths = -1
|
965 |
+
|
966 |
+
pooled_logits = logits[torch.arange(batch_size, device=logits.device), sequence_lengths]
|
967 |
+
|
968 |
+
loss = None
|
969 |
+
if labels is not None:
|
970 |
+
if self.config.problem_type is None:
|
971 |
+
if self.num_labels == 1:
|
972 |
+
self.config.problem_type = "regression"
|
973 |
+
elif self.num_labels > 1 and (labels.dtype == torch.long or labels.dtype == torch.int):
|
974 |
+
self.config.problem_type = "single_label_classification"
|
975 |
+
else:
|
976 |
+
self.config.problem_type = "multi_label_classification"
|
977 |
+
|
978 |
+
if self.config.problem_type == "regression":
|
979 |
+
loss_fct = MSELoss()
|
980 |
+
if self.num_labels == 1:
|
981 |
+
loss = loss_fct(pooled_logits.squeeze(), labels.squeeze())
|
982 |
+
else:
|
983 |
+
loss = loss_fct(pooled_logits, labels)
|
984 |
+
elif self.config.problem_type == "single_label_classification":
|
985 |
+
loss_fct = CrossEntropyLoss()
|
986 |
+
loss = loss_fct(pooled_logits.view(-1, self.num_labels), labels.view(-1))
|
987 |
+
elif self.config.problem_type == "multi_label_classification":
|
988 |
+
loss_fct = BCEWithLogitsLoss()
|
989 |
+
loss = loss_fct(pooled_logits, labels)
|
990 |
+
if not return_dict:
|
991 |
+
output = (pooled_logits,) + transformer_outputs[1:]
|
992 |
+
return ((loss,) + output) if loss is not None else output
|
993 |
+
|
994 |
+
return SequenceClassifierOutputWithPast(
|
995 |
+
loss=loss,
|
996 |
+
logits=pooled_logits,
|
997 |
+
past_key_values=transformer_outputs.past_key_values,
|
998 |
+
hidden_states=transformer_outputs.hidden_states,
|
999 |
+
attentions=transformer_outputs.attentions,
|
1000 |
+
)
|
quantize_config.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bits": 4,
|
3 |
+
"group_size": 128,
|
4 |
+
"damp_percent": 0.01,
|
5 |
+
"desc_act": false,
|
6 |
+
"static_groups": false,
|
7 |
+
"sym": true,
|
8 |
+
"true_sequential": true,
|
9 |
+
"model_name_or_path": null,
|
10 |
+
"model_file_base_name": null,
|
11 |
+
"is_marlin_format": false,
|
12 |
+
"quant_method": "gptq"
|
13 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": [
|
3 |
+
"[|Human|]:",
|
4 |
+
"[|AI|]:",
|
5 |
+
"[SEH]",
|
6 |
+
"[SEA]"
|
7 |
+
],
|
8 |
+
"bos_token": {
|
9 |
+
"content": "<s>",
|
10 |
+
"lstrip": false,
|
11 |
+
"normalized": true,
|
12 |
+
"rstrip": false,
|
13 |
+
"single_word": false
|
14 |
+
},
|
15 |
+
"eos_token": {
|
16 |
+
"content": "</s>",
|
17 |
+
"lstrip": false,
|
18 |
+
"normalized": true,
|
19 |
+
"rstrip": false,
|
20 |
+
"single_word": false
|
21 |
+
},
|
22 |
+
"pad_token": {
|
23 |
+
"content": "<pad>",
|
24 |
+
"lstrip": false,
|
25 |
+
"normalized": true,
|
26 |
+
"rstrip": false,
|
27 |
+
"single_word": false
|
28 |
+
},
|
29 |
+
"unk_token": {
|
30 |
+
"content": "<unk>",
|
31 |
+
"lstrip": false,
|
32 |
+
"normalized": true,
|
33 |
+
"rstrip": false,
|
34 |
+
"single_word": false
|
35 |
+
}
|
36 |
+
}
|
tokenization_bluelm.py
ADDED
@@ -0,0 +1,252 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright 2023 vivo.
|
2 |
+
#
|
3 |
+
# Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved.
|
4 |
+
#
|
5 |
+
# This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX
|
6 |
+
# and OPT implementations in this library. It has been modified from its
|
7 |
+
# original forms to accommodate minor architectural differences compared
|
8 |
+
# to GPT-NeoX and OPT used by the Meta AI team that trained the model.
|
9 |
+
#
|
10 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
11 |
+
# you may not use this file except in compliance with the License.
|
12 |
+
# You may obtain a copy of the License at
|
13 |
+
#
|
14 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
15 |
+
#
|
16 |
+
# Unless required by applicable law or agreed to in writing, software
|
17 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
18 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19 |
+
# See the License for the specific language governing permissions and
|
20 |
+
# limitations under the License.
|
21 |
+
|
22 |
+
"""Tokenization classes for BlueLM."""
|
23 |
+
import os
|
24 |
+
from shutil import copyfile
|
25 |
+
from typing import Any, Dict, List, Optional, Tuple
|
26 |
+
|
27 |
+
import sentencepiece as spm
|
28 |
+
|
29 |
+
from transformers.tokenization_utils import AddedToken, PreTrainedTokenizer
|
30 |
+
from transformers.utils import logging
|
31 |
+
|
32 |
+
|
33 |
+
logger = logging.get_logger(__name__)
|
34 |
+
|
35 |
+
VOCAB_FILES_NAMES = {"vocab_file": "tokenizer.model"}
|
36 |
+
|
37 |
+
PRETRAINED_VOCAB_FILES_MAP = {
|
38 |
+
"vocab_file": {},
|
39 |
+
"tokenizer_file": {},
|
40 |
+
}
|
41 |
+
PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES = {}
|
42 |
+
|
43 |
+
|
44 |
+
class BlueLMTokenizer(PreTrainedTokenizer):
|
45 |
+
"""
|
46 |
+
Construct a BlueLM tokenizer. Based on byte-level Byte-Pair-Encoding.
|
47 |
+
|
48 |
+
Args:
|
49 |
+
vocab_file (`str`):
|
50 |
+
Path to the vocabulary file.
|
51 |
+
"""
|
52 |
+
|
53 |
+
vocab_files_names = VOCAB_FILES_NAMES
|
54 |
+
pretrained_vocab_files_map = PRETRAINED_VOCAB_FILES_MAP
|
55 |
+
max_model_input_sizes = PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
|
56 |
+
model_input_names = ["input_ids", "attention_mask"]
|
57 |
+
|
58 |
+
def __init__(
|
59 |
+
self,
|
60 |
+
vocab_file,
|
61 |
+
unk_token="<unk>",
|
62 |
+
bos_token="<s>",
|
63 |
+
eos_token="</s>",
|
64 |
+
pad_token=None,
|
65 |
+
sp_model_kwargs: Optional[Dict[str, Any]] = None,
|
66 |
+
add_bos_token=True,
|
67 |
+
add_eos_token=False,
|
68 |
+
clean_up_tokenization_spaces=False,
|
69 |
+
**kwargs,
|
70 |
+
):
|
71 |
+
self.sp_model_kwargs = {} if sp_model_kwargs is None else sp_model_kwargs
|
72 |
+
bos_token = AddedToken(bos_token, lstrip=False, rstrip=False) if isinstance(bos_token, str) else bos_token
|
73 |
+
eos_token = AddedToken(eos_token, lstrip=False, rstrip=False) if isinstance(eos_token, str) else eos_token
|
74 |
+
unk_token = AddedToken(unk_token, lstrip=False, rstrip=False) if isinstance(unk_token, str) else unk_token
|
75 |
+
pad_token = AddedToken(pad_token, lstrip=False, rstrip=False) if isinstance(pad_token, str) else pad_token
|
76 |
+
self.vocab_file = vocab_file
|
77 |
+
self.add_bos_token = add_bos_token
|
78 |
+
self.add_eos_token = add_eos_token
|
79 |
+
self.sp_model = spm.SentencePieceProcessor(**self.sp_model_kwargs)
|
80 |
+
self.sp_model.Load(vocab_file)
|
81 |
+
super().__init__(
|
82 |
+
bos_token=bos_token,
|
83 |
+
eos_token=eos_token,
|
84 |
+
unk_token=unk_token,
|
85 |
+
pad_token=pad_token,
|
86 |
+
add_bos_token=add_bos_token,
|
87 |
+
add_eos_token=add_eos_token,
|
88 |
+
sp_model_kwargs=self.sp_model_kwargs,
|
89 |
+
clean_up_tokenization_spaces=clean_up_tokenization_spaces,
|
90 |
+
**kwargs,
|
91 |
+
)
|
92 |
+
|
93 |
+
def __getstate__(self):
|
94 |
+
state = self.__dict__.copy()
|
95 |
+
state["sp_model"] = None
|
96 |
+
return state
|
97 |
+
|
98 |
+
def __setstate__(self, d):
|
99 |
+
self.__dict__ = d
|
100 |
+
self.sp_model = spm.SentencePieceProcessor(**self.sp_model_kwargs)
|
101 |
+
self.sp_model.Load(self.vocab_file)
|
102 |
+
|
103 |
+
@property
|
104 |
+
def vocab_size(self):
|
105 |
+
"""Returns vocab size"""
|
106 |
+
return self.sp_model.get_piece_size()
|
107 |
+
|
108 |
+
def get_vocab(self):
|
109 |
+
"""Returns vocab as a dict"""
|
110 |
+
vocab = {self.convert_ids_to_tokens(i): i for i in range(self.vocab_size)}
|
111 |
+
vocab.update(self.added_tokens_encoder)
|
112 |
+
return vocab
|
113 |
+
|
114 |
+
def _tokenize(self, text):
|
115 |
+
"""Returns a tokenized string."""
|
116 |
+
return self.sp_model.encode(text, out_type=str)
|
117 |
+
|
118 |
+
def _convert_token_to_id(self, token):
|
119 |
+
"""Converts a token (str) in an id using the vocab."""
|
120 |
+
return self.sp_model.piece_to_id(token)
|
121 |
+
|
122 |
+
def _convert_id_to_token(self, index):
|
123 |
+
"""Converts an index (integer) in a token (str) using the vocab."""
|
124 |
+
token = self.sp_model.IdToPiece(index)
|
125 |
+
return token
|
126 |
+
|
127 |
+
def convert_tokens_to_string(self, tokens):
|
128 |
+
"""Converts a sequence of tokens (string) in a single string."""
|
129 |
+
current_sub_tokens = []
|
130 |
+
out_string = ""
|
131 |
+
prev_is_special = False
|
132 |
+
for i, token in enumerate(tokens):
|
133 |
+
# make sure that special tokens are not decoded using sentencepiece model
|
134 |
+
if token in self.all_special_tokens:
|
135 |
+
if not prev_is_special and i != 0:
|
136 |
+
out_string += " "
|
137 |
+
out_string += self.sp_model.decode(current_sub_tokens) + token
|
138 |
+
prev_is_special = True
|
139 |
+
current_sub_tokens = []
|
140 |
+
else:
|
141 |
+
current_sub_tokens.append(token)
|
142 |
+
prev_is_special = False
|
143 |
+
out_string += self.sp_model.decode(current_sub_tokens)
|
144 |
+
return out_string
|
145 |
+
|
146 |
+
def save_vocabulary(self, save_directory, filename_prefix: Optional[str] = None) -> Tuple[str]:
|
147 |
+
"""
|
148 |
+
Save the vocabulary and special tokens file to a directory.
|
149 |
+
|
150 |
+
Args:
|
151 |
+
save_directory (`str`):
|
152 |
+
The directory in which to save the vocabulary.
|
153 |
+
|
154 |
+
Returns:
|
155 |
+
`Tuple(str)`: Paths to the files saved.
|
156 |
+
"""
|
157 |
+
if not os.path.isdir(save_directory):
|
158 |
+
logger.error(f"Vocabulary path ({save_directory}) should be a directory")
|
159 |
+
return
|
160 |
+
out_vocab_file = os.path.join(
|
161 |
+
save_directory, (filename_prefix + "-" if filename_prefix else "") + VOCAB_FILES_NAMES["vocab_file"]
|
162 |
+
)
|
163 |
+
|
164 |
+
if os.path.abspath(self.vocab_file) != os.path.abspath(out_vocab_file) and os.path.isfile(self.vocab_file):
|
165 |
+
copyfile(self.vocab_file, out_vocab_file)
|
166 |
+
elif not os.path.isfile(self.vocab_file):
|
167 |
+
with open(out_vocab_file, "wb") as fi:
|
168 |
+
content_spiece_model = self.sp_model.serialized_model_proto()
|
169 |
+
fi.write(content_spiece_model)
|
170 |
+
|
171 |
+
return (out_vocab_file,)
|
172 |
+
|
173 |
+
def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=None):
|
174 |
+
bos_token_id = [self.bos_token_id] if self.add_bos_token else []
|
175 |
+
eos_token_id = [self.eos_token_id] if self.add_eos_token else []
|
176 |
+
|
177 |
+
output = bos_token_id + token_ids_0 + eos_token_id
|
178 |
+
|
179 |
+
if token_ids_1 is not None:
|
180 |
+
output = output + bos_token_id + token_ids_1 + eos_token_id
|
181 |
+
|
182 |
+
return output
|
183 |
+
|
184 |
+
def get_special_tokens_mask(
|
185 |
+
self, token_ids_0: List[int], token_ids_1: Optional[List[int]] = None, already_has_special_tokens: bool = False
|
186 |
+
) -> List[int]:
|
187 |
+
"""
|
188 |
+
Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
|
189 |
+
special tokens using the tokenizer `prepare_for_model` method.
|
190 |
+
|
191 |
+
Args:
|
192 |
+
token_ids_0 (`List[int]`):
|
193 |
+
List of IDs.
|
194 |
+
token_ids_1 (`List[int]`, *optional*):
|
195 |
+
Optional second list of IDs for sequence pairs.
|
196 |
+
already_has_special_tokens (`bool`, *optional*, defaults to `False`):
|
197 |
+
Whether or not the token list is already formatted with special tokens for the model.
|
198 |
+
|
199 |
+
Returns:
|
200 |
+
`List[int]`: A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.
|
201 |
+
"""
|
202 |
+
if already_has_special_tokens:
|
203 |
+
return super().get_special_tokens_mask(
|
204 |
+
token_ids_0=token_ids_0, token_ids_1=token_ids_1, already_has_special_tokens=True
|
205 |
+
)
|
206 |
+
|
207 |
+
bos_token_id = [1] if self.add_bos_token else []
|
208 |
+
eos_token_id = [1] if self.add_eos_token else []
|
209 |
+
|
210 |
+
if token_ids_1 is None:
|
211 |
+
return bos_token_id + ([0] * len(token_ids_0)) + eos_token_id
|
212 |
+
return (
|
213 |
+
bos_token_id
|
214 |
+
+ ([0] * len(token_ids_0))
|
215 |
+
+ eos_token_id
|
216 |
+
+ bos_token_id
|
217 |
+
+ ([0] * len(token_ids_1))
|
218 |
+
+ eos_token_id
|
219 |
+
)
|
220 |
+
|
221 |
+
def create_token_type_ids_from_sequences(
|
222 |
+
self, token_ids_0: List[int], token_ids_1: Optional[List[int]] = None
|
223 |
+
) -> List[int]:
|
224 |
+
"""
|
225 |
+
Creates a mask from the two sequences passed to be used in a sequence-pair classification task. An ALBERT
|
226 |
+
sequence pair mask has the following format:
|
227 |
+
|
228 |
+
```
|
229 |
+
0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1
|
230 |
+
| first sequence | second sequence |
|
231 |
+
```
|
232 |
+
|
233 |
+
if token_ids_1 is None, only returns the first portion of the mask (0s).
|
234 |
+
|
235 |
+
Args:
|
236 |
+
token_ids_0 (`List[int]`):
|
237 |
+
List of ids.
|
238 |
+
token_ids_1 (`List[int]`, *optional*):
|
239 |
+
Optional second list of IDs for sequence pairs.
|
240 |
+
|
241 |
+
Returns:
|
242 |
+
`List[int]`: List of [token type IDs](../glossary#token-type-ids) according to the given sequence(s).
|
243 |
+
"""
|
244 |
+
bos_token_id = [self.bos_token_id] if self.add_bos_token else []
|
245 |
+
eos_token_id = [self.eos_token_id] if self.add_eos_token else []
|
246 |
+
|
247 |
+
output = [0] * len(bos_token_id + token_ids_0 + eos_token_id)
|
248 |
+
|
249 |
+
if token_ids_1 is not None:
|
250 |
+
output += [1] * len(bos_token_id + token_ids_1 + eos_token_id)
|
251 |
+
|
252 |
+
return output
|
tokenizer.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f5ed07a4a6a74d6a69f56478892da8a06fbaa29dc27ff4d957fda6237643150b
|
3 |
+
size 1609668
|
tokenizer_config.json
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_bos_token": true,
|
3 |
+
"add_eos_token": false,
|
4 |
+
"added_tokens_decoder": {
|
5 |
+
"0": {
|
6 |
+
"content": "<unk>",
|
7 |
+
"lstrip": false,
|
8 |
+
"normalized": true,
|
9 |
+
"rstrip": false,
|
10 |
+
"single_word": false,
|
11 |
+
"special": true
|
12 |
+
},
|
13 |
+
"1": {
|
14 |
+
"content": "<s>",
|
15 |
+
"lstrip": false,
|
16 |
+
"normalized": true,
|
17 |
+
"rstrip": false,
|
18 |
+
"single_word": false,
|
19 |
+
"special": true
|
20 |
+
},
|
21 |
+
"2": {
|
22 |
+
"content": "</s>",
|
23 |
+
"lstrip": false,
|
24 |
+
"normalized": true,
|
25 |
+
"rstrip": false,
|
26 |
+
"single_word": false,
|
27 |
+
"special": true
|
28 |
+
},
|
29 |
+
"3": {
|
30 |
+
"content": "<pad>",
|
31 |
+
"lstrip": false,
|
32 |
+
"normalized": true,
|
33 |
+
"rstrip": false,
|
34 |
+
"single_word": false,
|
35 |
+
"special": true
|
36 |
+
},
|
37 |
+
"100000": {
|
38 |
+
"content": "[|Human|]:",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": false,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false,
|
43 |
+
"special": true
|
44 |
+
},
|
45 |
+
"100001": {
|
46 |
+
"content": "[|AI|]:",
|
47 |
+
"lstrip": false,
|
48 |
+
"normalized": false,
|
49 |
+
"rstrip": false,
|
50 |
+
"single_word": false,
|
51 |
+
"special": true
|
52 |
+
},
|
53 |
+
"100002": {
|
54 |
+
"content": "[SEH]",
|
55 |
+
"lstrip": false,
|
56 |
+
"normalized": false,
|
57 |
+
"rstrip": false,
|
58 |
+
"single_word": false,
|
59 |
+
"special": true
|
60 |
+
},
|
61 |
+
"100003": {
|
62 |
+
"content": "[SEA]",
|
63 |
+
"lstrip": false,
|
64 |
+
"normalized": false,
|
65 |
+
"rstrip": false,
|
66 |
+
"single_word": false,
|
67 |
+
"special": true
|
68 |
+
}
|
69 |
+
},
|
70 |
+
"additional_special_tokens": [
|
71 |
+
"[|Human|]:",
|
72 |
+
"[|AI|]:",
|
73 |
+
"[SEH]",
|
74 |
+
"[SEA]"
|
75 |
+
],
|
76 |
+
"auto_map": {
|
77 |
+
"AutoTokenizer": [
|
78 |
+
"tokenization_bluelm.BlueLMTokenizer",
|
79 |
+
null
|
80 |
+
]
|
81 |
+
},
|
82 |
+
"bos_token": "<s>",
|
83 |
+
"clean_up_tokenization_spaces": false,
|
84 |
+
"eos_token": "</s>",
|
85 |
+
"model_max_length": 1000000000000000019884624838656,
|
86 |
+
"pad_token": "<pad>",
|
87 |
+
"sp_model_kwargs": {},
|
88 |
+
"tokenizer_class": "BlueLMTokenizer",
|
89 |
+
"unk_token": "<unk>"
|
90 |
+
}
|