hahnyuan commited on
Commit
d0eeb98
1 Parent(s): c9ee669

Upload ASVDLlamaForCausalLM

Browse files
config.json ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "huggingface_repos/Llama-2-7b-hf-asvd95",
3
+ "architectures": [
4
+ "ASVDLlamaForCausalLM"
5
+ ],
6
+ "attention_bias": false,
7
+ "auto_map": {
8
+ "AutoConfig": "configuration_asvd_llama.ASVDLlamaConfig",
9
+ "AutoModelForCausalLM": "modeling_asvd_llama.ASVDLlamaForCausalLM"
10
+ },
11
+ "bos_token_id": 1,
12
+ "eos_token_id": 2,
13
+ "hidden_act": "silu",
14
+ "hidden_size": 4096,
15
+ "initializer_range": 0.02,
16
+ "intermediate_size": 11008,
17
+ "max_position_embeddings": 4096,
18
+ "model_type": "llama",
19
+ "num_attention_heads": 32,
20
+ "num_hidden_layers": 32,
21
+ "num_key_value_heads": 32,
22
+ "pretraining_tp": 1,
23
+ "rms_norm_eps": 1e-05,
24
+ "rope_scaling": null,
25
+ "rope_theta": 10000.0,
26
+ "tie_word_embeddings": false,
27
+ "torch_dtype": "float16",
28
+ "transformers_version": "4.35.2",
29
+ "truncation_ranks": {
30
+ "model.layers.0.mlp.down_proj": 2686,
31
+ "model.layers.0.mlp.gate_proj": 1791,
32
+ "model.layers.0.mlp.up_proj": 2089,
33
+ "model.layers.0.self_attn.k_proj": 204,
34
+ "model.layers.0.self_attn.o_proj": 1433,
35
+ "model.layers.0.self_attn.q_proj": 204,
36
+ "model.layers.0.self_attn.v_proj": 614,
37
+ "model.layers.1.mlp.gate_proj": 2388,
38
+ "model.layers.1.self_attn.k_proj": 614,
39
+ "model.layers.1.self_attn.o_proj": 1843,
40
+ "model.layers.1.self_attn.q_proj": 204,
41
+ "model.layers.1.self_attn.v_proj": 1228,
42
+ "model.layers.11.self_attn.q_proj": 409,
43
+ "model.layers.12.mlp.gate_proj": 2089,
44
+ "model.layers.12.mlp.up_proj": 1791,
45
+ "model.layers.12.self_attn.q_proj": 819,
46
+ "model.layers.14.self_attn.q_proj": 1843,
47
+ "model.layers.16.self_attn.k_proj": 1024,
48
+ "model.layers.16.self_attn.q_proj": 1024,
49
+ "model.layers.17.self_attn.k_proj": 1843,
50
+ "model.layers.18.self_attn.q_proj": 1843,
51
+ "model.layers.20.self_attn.k_proj": 409,
52
+ "model.layers.20.self_attn.q_proj": 614,
53
+ "model.layers.24.mlp.gate_proj": 2686,
54
+ "model.layers.24.mlp.up_proj": 2686,
55
+ "model.layers.24.self_attn.k_proj": 204,
56
+ "model.layers.24.self_attn.o_proj": 1638,
57
+ "model.layers.24.self_attn.q_proj": 204,
58
+ "model.layers.26.self_attn.k_proj": 1433,
59
+ "model.layers.27.self_attn.k_proj": 1024,
60
+ "model.layers.27.self_attn.q_proj": 1228,
61
+ "model.layers.29.self_attn.q_proj": 1638,
62
+ "model.layers.3.self_attn.k_proj": 614,
63
+ "model.layers.6.self_attn.k_proj": 1228,
64
+ "model.layers.7.self_attn.k_proj": 1638,
65
+ "model.layers.7.self_attn.q_proj": 1843
66
+ },
67
+ "use_cache": true,
68
+ "vocab_size": 32000
69
+ }
configuration_asvd_llama.py ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers.configuration_utils import PretrainedConfig
2
+ from transformers.utils import logging
3
+
4
+ logger = logging.get_logger(__name__)
5
+
6
+ class ASVDLlamaConfig(PretrainedConfig):
7
+ r"""
8
+ This is the configuration class to store the configuration of a [`LlamaModel`]. It is used to instantiate an LLaMA
9
+ model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
10
+ defaults will yield a similar configuration to that of the LLaMA-7B.
11
+
12
+ Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
13
+ documentation from [`PretrainedConfig`] for more information.
14
+
15
+
16
+ Args:
17
+ vocab_size (`int`, *optional*, defaults to 32000):
18
+ Vocabulary size of the LLaMA model. Defines the number of different tokens that can be represented by the
19
+ `inputs_ids` passed when calling [`LlamaModel`]
20
+ hidden_size (`int`, *optional*, defaults to 4096):
21
+ Dimension of the hidden representations.
22
+ intermediate_size (`int`, *optional*, defaults to 11008):
23
+ Dimension of the MLP representations.
24
+ num_hidden_layers (`int`, *optional*, defaults to 32):
25
+ Number of hidden layers in the Transformer decoder.
26
+ num_attention_heads (`int`, *optional*, defaults to 32):
27
+ Number of attention heads for each attention layer in the Transformer decoder.
28
+ num_key_value_heads (`int`, *optional*):
29
+ This is the number of key_value heads that should be used to implement Grouped Query Attention. If
30
+ `num_key_value_heads=num_attention_heads`, the model will use Multi Head Attention (MHA), if
31
+ `num_key_value_heads=1 the model will use Multi Query Attention (MQA) otherwise GQA is used. When
32
+ converting a multi-head checkpoint to a GQA checkpoint, each group key and value head should be constructed
33
+ by meanpooling all the original heads within that group. For more details checkout [this
34
+ paper](https://arxiv.org/pdf/2305.13245.pdf). If it is not specified, will default to
35
+ `num_attention_heads`.
36
+ hidden_act (`str` or `function`, *optional*, defaults to `"silu"`):
37
+ The non-linear activation function (function or string) in the decoder.
38
+ max_position_embeddings (`int`, *optional*, defaults to 2048):
39
+ The maximum sequence length that this model might ever be used with. Llama 1 supports up to 2048 tokens,
40
+ Llama 2 up to 4096, CodeLlama up to 16384.
41
+ initializer_range (`float`, *optional*, defaults to 0.02):
42
+ The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
43
+ rms_norm_eps (`float`, *optional*, defaults to 1e-06):
44
+ The epsilon used by the rms normalization layers.
45
+ use_cache (`bool`, *optional*, defaults to `True`):
46
+ Whether or not the model should return the last key/values attentions (not used by all models). Only
47
+ relevant if `config.is_decoder=True`.
48
+ pad_token_id (`int`, *optional*):
49
+ Padding token id.
50
+ bos_token_id (`int`, *optional*, defaults to 1):
51
+ Beginning of stream token id.
52
+ eos_token_id (`int`, *optional*, defaults to 2):
53
+ End of stream token id.
54
+ pretraining_tp (`int`, *optional*, defaults to 1):
55
+ Experimental feature. Tensor parallelism rank used during pretraining. Please refer to [this
56
+ document](https://huggingface.co/docs/transformers/parallelism) to understand more about it. This value is
57
+ necessary to ensure exact reproducibility of the pretraining results. Please refer to [this
58
+ issue](https://github.com/pytorch/pytorch/issues/76232).
59
+ tie_word_embeddings (`bool`, *optional*, defaults to `False`):
60
+ Whether to tie weight embeddings
61
+ rope_theta (`float`, *optional*, defaults to 10000.0):
62
+ The base period of the RoPE embeddings.
63
+ rope_scaling (`Dict`, *optional*):
64
+ Dictionary containing the scaling configuration for the RoPE embeddings. Currently supports two scaling
65
+ strategies: linear and dynamic. Their scaling factor must be a float greater than 1. The expected format is
66
+ `{"type": strategy name, "factor": scaling factor}`. When using this flag, don't update
67
+ `max_position_embeddings` to the expected new maximum. See the following thread for more information on how
68
+ these scaling strategies behave:
69
+ https://www.reddit.com/r/LocalLLaMA/comments/14mrgpr/dynamically_scaled_rope_further_increases/. This is an
70
+ experimental feature, subject to breaking API changes in future versions.
71
+ attention_bias (`bool`, defaults to `False`, *optional*, defaults to `False`):
72
+ Whether to use a bias in the query, key, value and output projection layers during self-attention.
73
+
74
+
75
+ ```python
76
+ >>> from transformers import LlamaModel, LlamaConfig
77
+
78
+ >>> # Initializing a LLaMA llama-7b style configuration
79
+ >>> configuration = LlamaConfig()
80
+
81
+ >>> # Initializing a model from the llama-7b style configuration
82
+ >>> model = LlamaModel(configuration)
83
+
84
+ >>> # Accessing the model configuration
85
+ >>> configuration = model.config
86
+ ```"""
87
+ model_type = "llama"
88
+ keys_to_ignore_at_inference = ["past_key_values"]
89
+
90
+ def __init__(
91
+ self,
92
+ vocab_size=32000,
93
+ hidden_size=4096,
94
+ intermediate_size=11008,
95
+ num_hidden_layers=32,
96
+ num_attention_heads=32,
97
+ num_key_value_heads=None,
98
+ hidden_act="silu",
99
+ max_position_embeddings=2048,
100
+ initializer_range=0.02,
101
+ rms_norm_eps=1e-6,
102
+ use_cache=True,
103
+ pad_token_id=None,
104
+ bos_token_id=1,
105
+ eos_token_id=2,
106
+ pretraining_tp=1,
107
+ tie_word_embeddings=False,
108
+ rope_theta=10000.0,
109
+ rope_scaling=None,
110
+ attention_bias=False,
111
+ truncation_ranks=None,
112
+ **kwargs,
113
+ ):
114
+ self.vocab_size = vocab_size
115
+ self.max_position_embeddings = max_position_embeddings
116
+ self.hidden_size = hidden_size
117
+ self.intermediate_size = intermediate_size
118
+ self.num_hidden_layers = num_hidden_layers
119
+ self.num_attention_heads = num_attention_heads
120
+
121
+ # for backward compatibility
122
+ if num_key_value_heads is None:
123
+ num_key_value_heads = num_attention_heads
124
+
125
+ self.num_key_value_heads = num_key_value_heads
126
+ self.hidden_act = hidden_act
127
+ self.initializer_range = initializer_range
128
+ self.rms_norm_eps = rms_norm_eps
129
+ self.pretraining_tp = pretraining_tp
130
+ self.use_cache = use_cache
131
+ self.rope_theta = rope_theta
132
+ self.rope_scaling = rope_scaling
133
+ self._rope_scaling_validation()
134
+ self.attention_bias = attention_bias
135
+
136
+ super().__init__(
137
+ pad_token_id=pad_token_id,
138
+ bos_token_id=bos_token_id,
139
+ eos_token_id=eos_token_id,
140
+ tie_word_embeddings=tie_word_embeddings,
141
+ **kwargs,
142
+ )
143
+
144
+ # for avsd
145
+ self.truncation_ranks = truncation_ranks
146
+
147
+ def _rope_scaling_validation(self):
148
+ """
149
+ Validate the `rope_scaling` configuration.
150
+ """
151
+ if self.rope_scaling is None:
152
+ return
153
+
154
+ if not isinstance(self.rope_scaling, dict) or len(self.rope_scaling) != 2:
155
+ raise ValueError(
156
+ "`rope_scaling` must be a dictionary with with two fields, `type` and `factor`, "
157
+ f"got {self.rope_scaling}"
158
+ )
159
+ rope_scaling_type = self.rope_scaling.get("type", None)
160
+ rope_scaling_factor = self.rope_scaling.get("factor", None)
161
+ if rope_scaling_type is None or rope_scaling_type not in ["linear", "dynamic"]:
162
+ raise ValueError(
163
+ f"`rope_scaling`'s type field must be one of ['linear', 'dynamic'], got {rope_scaling_type}"
164
+ )
165
+ if rope_scaling_factor is None or not isinstance(rope_scaling_factor, float) or rope_scaling_factor <= 1.0:
166
+ raise ValueError(f"`rope_scaling`'s factor field must be a float > 1, got {rope_scaling_factor}")
167
+
generation_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 1,
3
+ "do_sample": true,
4
+ "eos_token_id": 2,
5
+ "max_length": 4096,
6
+ "pad_token_id": 0,
7
+ "temperature": 0.6,
8
+ "top_p": 0.9,
9
+ "transformers_version": "4.35.2"
10
+ }
model-00001-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:094d026d754a35e7760c73c8c2eb43071929a17b91075cc2a478bcdcd916bcb7
3
+ size 4982636336
model-00002-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4bd76239e8cccec4b7732b1c21658f1fcb1d946ee720e8e6955dc28a7669c695
3
+ size 4941859984
model-00003-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ee7dc49eeebca74ba0ba767d86e913655d57bef799ebe4d67c343f0b38a6035f
3
+ size 2914303352
model.safetensors.index.json ADDED
@@ -0,0 +1,334 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 12838761472
4
+ },
5
+ "weight_map": {
6
+ "lm_head.weight": "model-00003-of-00003.safetensors",
7
+ "model.embed_tokens.weight": "model-00001-of-00003.safetensors",
8
+ "model.layers.0.input_layernorm.weight": "model-00001-of-00003.safetensors",
9
+ "model.layers.0.mlp.down_proj.ALinear.weight": "model-00001-of-00003.safetensors",
10
+ "model.layers.0.mlp.down_proj.BLinear.weight": "model-00001-of-00003.safetensors",
11
+ "model.layers.0.mlp.gate_proj.ALinear.weight": "model-00001-of-00003.safetensors",
12
+ "model.layers.0.mlp.gate_proj.BLinear.weight": "model-00001-of-00003.safetensors",
13
+ "model.layers.0.mlp.up_proj.ALinear.weight": "model-00001-of-00003.safetensors",
14
+ "model.layers.0.mlp.up_proj.BLinear.weight": "model-00001-of-00003.safetensors",
15
+ "model.layers.0.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
16
+ "model.layers.0.self_attn.k_proj.ALinear.weight": "model-00001-of-00003.safetensors",
17
+ "model.layers.0.self_attn.k_proj.BLinear.weight": "model-00001-of-00003.safetensors",
18
+ "model.layers.0.self_attn.o_proj.ALinear.weight": "model-00001-of-00003.safetensors",
19
+ "model.layers.0.self_attn.o_proj.BLinear.weight": "model-00001-of-00003.safetensors",
20
+ "model.layers.0.self_attn.q_proj.ALinear.weight": "model-00001-of-00003.safetensors",
21
+ "model.layers.0.self_attn.q_proj.BLinear.weight": "model-00001-of-00003.safetensors",
22
+ "model.layers.0.self_attn.v_proj.ALinear.weight": "model-00001-of-00003.safetensors",
23
+ "model.layers.0.self_attn.v_proj.BLinear.weight": "model-00001-of-00003.safetensors",
24
+ "model.layers.1.input_layernorm.weight": "model-00001-of-00003.safetensors",
25
+ "model.layers.1.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
26
+ "model.layers.1.mlp.gate_proj.ALinear.weight": "model-00001-of-00003.safetensors",
27
+ "model.layers.1.mlp.gate_proj.BLinear.weight": "model-00001-of-00003.safetensors",
28
+ "model.layers.1.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
29
+ "model.layers.1.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
30
+ "model.layers.1.self_attn.k_proj.ALinear.weight": "model-00001-of-00003.safetensors",
31
+ "model.layers.1.self_attn.k_proj.BLinear.weight": "model-00001-of-00003.safetensors",
32
+ "model.layers.1.self_attn.o_proj.ALinear.weight": "model-00001-of-00003.safetensors",
33
+ "model.layers.1.self_attn.o_proj.BLinear.weight": "model-00001-of-00003.safetensors",
34
+ "model.layers.1.self_attn.q_proj.ALinear.weight": "model-00001-of-00003.safetensors",
35
+ "model.layers.1.self_attn.q_proj.BLinear.weight": "model-00001-of-00003.safetensors",
36
+ "model.layers.1.self_attn.v_proj.ALinear.weight": "model-00001-of-00003.safetensors",
37
+ "model.layers.1.self_attn.v_proj.BLinear.weight": "model-00001-of-00003.safetensors",
38
+ "model.layers.10.input_layernorm.weight": "model-00001-of-00003.safetensors",
39
+ "model.layers.10.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
40
+ "model.layers.10.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
41
+ "model.layers.10.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
42
+ "model.layers.10.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
43
+ "model.layers.10.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
44
+ "model.layers.10.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
45
+ "model.layers.10.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
46
+ "model.layers.10.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
47
+ "model.layers.11.input_layernorm.weight": "model-00001-of-00003.safetensors",
48
+ "model.layers.11.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
49
+ "model.layers.11.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
50
+ "model.layers.11.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
51
+ "model.layers.11.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
52
+ "model.layers.11.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
53
+ "model.layers.11.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
54
+ "model.layers.11.self_attn.q_proj.ALinear.weight": "model-00001-of-00003.safetensors",
55
+ "model.layers.11.self_attn.q_proj.BLinear.weight": "model-00001-of-00003.safetensors",
56
+ "model.layers.11.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
57
+ "model.layers.12.input_layernorm.weight": "model-00002-of-00003.safetensors",
58
+ "model.layers.12.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
59
+ "model.layers.12.mlp.gate_proj.ALinear.weight": "model-00001-of-00003.safetensors",
60
+ "model.layers.12.mlp.gate_proj.BLinear.weight": "model-00001-of-00003.safetensors",
61
+ "model.layers.12.mlp.up_proj.ALinear.weight": "model-00002-of-00003.safetensors",
62
+ "model.layers.12.mlp.up_proj.BLinear.weight": "model-00001-of-00003.safetensors",
63
+ "model.layers.12.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
64
+ "model.layers.12.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
65
+ "model.layers.12.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
66
+ "model.layers.12.self_attn.q_proj.ALinear.weight": "model-00001-of-00003.safetensors",
67
+ "model.layers.12.self_attn.q_proj.BLinear.weight": "model-00001-of-00003.safetensors",
68
+ "model.layers.12.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
69
+ "model.layers.13.input_layernorm.weight": "model-00002-of-00003.safetensors",
70
+ "model.layers.13.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
71
+ "model.layers.13.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
72
+ "model.layers.13.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
73
+ "model.layers.13.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
74
+ "model.layers.13.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
75
+ "model.layers.13.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
76
+ "model.layers.13.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
77
+ "model.layers.13.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
78
+ "model.layers.14.input_layernorm.weight": "model-00002-of-00003.safetensors",
79
+ "model.layers.14.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
80
+ "model.layers.14.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
81
+ "model.layers.14.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
82
+ "model.layers.14.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
83
+ "model.layers.14.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
84
+ "model.layers.14.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
85
+ "model.layers.14.self_attn.q_proj.ALinear.weight": "model-00002-of-00003.safetensors",
86
+ "model.layers.14.self_attn.q_proj.BLinear.weight": "model-00002-of-00003.safetensors",
87
+ "model.layers.14.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
88
+ "model.layers.15.input_layernorm.weight": "model-00002-of-00003.safetensors",
89
+ "model.layers.15.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
90
+ "model.layers.15.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
91
+ "model.layers.15.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
92
+ "model.layers.15.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
93
+ "model.layers.15.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
94
+ "model.layers.15.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
95
+ "model.layers.15.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
96
+ "model.layers.15.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
97
+ "model.layers.16.input_layernorm.weight": "model-00002-of-00003.safetensors",
98
+ "model.layers.16.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
99
+ "model.layers.16.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
100
+ "model.layers.16.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
101
+ "model.layers.16.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
102
+ "model.layers.16.self_attn.k_proj.ALinear.weight": "model-00002-of-00003.safetensors",
103
+ "model.layers.16.self_attn.k_proj.BLinear.weight": "model-00002-of-00003.safetensors",
104
+ "model.layers.16.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
105
+ "model.layers.16.self_attn.q_proj.ALinear.weight": "model-00002-of-00003.safetensors",
106
+ "model.layers.16.self_attn.q_proj.BLinear.weight": "model-00002-of-00003.safetensors",
107
+ "model.layers.16.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
108
+ "model.layers.17.input_layernorm.weight": "model-00002-of-00003.safetensors",
109
+ "model.layers.17.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
110
+ "model.layers.17.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
111
+ "model.layers.17.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
112
+ "model.layers.17.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
113
+ "model.layers.17.self_attn.k_proj.ALinear.weight": "model-00002-of-00003.safetensors",
114
+ "model.layers.17.self_attn.k_proj.BLinear.weight": "model-00002-of-00003.safetensors",
115
+ "model.layers.17.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
116
+ "model.layers.17.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
117
+ "model.layers.17.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
118
+ "model.layers.18.input_layernorm.weight": "model-00002-of-00003.safetensors",
119
+ "model.layers.18.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
120
+ "model.layers.18.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
121
+ "model.layers.18.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
122
+ "model.layers.18.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
123
+ "model.layers.18.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
124
+ "model.layers.18.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
125
+ "model.layers.18.self_attn.q_proj.ALinear.weight": "model-00002-of-00003.safetensors",
126
+ "model.layers.18.self_attn.q_proj.BLinear.weight": "model-00002-of-00003.safetensors",
127
+ "model.layers.18.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
128
+ "model.layers.19.input_layernorm.weight": "model-00002-of-00003.safetensors",
129
+ "model.layers.19.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
130
+ "model.layers.19.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
131
+ "model.layers.19.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
132
+ "model.layers.19.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
133
+ "model.layers.19.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
134
+ "model.layers.19.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
135
+ "model.layers.19.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
136
+ "model.layers.19.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
137
+ "model.layers.2.input_layernorm.weight": "model-00001-of-00003.safetensors",
138
+ "model.layers.2.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
139
+ "model.layers.2.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
140
+ "model.layers.2.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
141
+ "model.layers.2.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
142
+ "model.layers.2.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
143
+ "model.layers.2.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
144
+ "model.layers.2.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
145
+ "model.layers.2.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
146
+ "model.layers.20.input_layernorm.weight": "model-00002-of-00003.safetensors",
147
+ "model.layers.20.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
148
+ "model.layers.20.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
149
+ "model.layers.20.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
150
+ "model.layers.20.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
151
+ "model.layers.20.self_attn.k_proj.ALinear.weight": "model-00002-of-00003.safetensors",
152
+ "model.layers.20.self_attn.k_proj.BLinear.weight": "model-00002-of-00003.safetensors",
153
+ "model.layers.20.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
154
+ "model.layers.20.self_attn.q_proj.ALinear.weight": "model-00002-of-00003.safetensors",
155
+ "model.layers.20.self_attn.q_proj.BLinear.weight": "model-00002-of-00003.safetensors",
156
+ "model.layers.20.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
157
+ "model.layers.21.input_layernorm.weight": "model-00002-of-00003.safetensors",
158
+ "model.layers.21.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
159
+ "model.layers.21.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
160
+ "model.layers.21.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
161
+ "model.layers.21.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
162
+ "model.layers.21.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
163
+ "model.layers.21.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
164
+ "model.layers.21.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
165
+ "model.layers.21.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
166
+ "model.layers.22.input_layernorm.weight": "model-00002-of-00003.safetensors",
167
+ "model.layers.22.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
168
+ "model.layers.22.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
169
+ "model.layers.22.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
170
+ "model.layers.22.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
171
+ "model.layers.22.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
172
+ "model.layers.22.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
173
+ "model.layers.22.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
174
+ "model.layers.22.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
175
+ "model.layers.23.input_layernorm.weight": "model-00002-of-00003.safetensors",
176
+ "model.layers.23.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
177
+ "model.layers.23.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
178
+ "model.layers.23.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
179
+ "model.layers.23.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
180
+ "model.layers.23.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
181
+ "model.layers.23.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
182
+ "model.layers.23.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
183
+ "model.layers.23.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
184
+ "model.layers.24.input_layernorm.weight": "model-00002-of-00003.safetensors",
185
+ "model.layers.24.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
186
+ "model.layers.24.mlp.gate_proj.ALinear.weight": "model-00002-of-00003.safetensors",
187
+ "model.layers.24.mlp.gate_proj.BLinear.weight": "model-00002-of-00003.safetensors",
188
+ "model.layers.24.mlp.up_proj.ALinear.weight": "model-00002-of-00003.safetensors",
189
+ "model.layers.24.mlp.up_proj.BLinear.weight": "model-00002-of-00003.safetensors",
190
+ "model.layers.24.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
191
+ "model.layers.24.self_attn.k_proj.ALinear.weight": "model-00002-of-00003.safetensors",
192
+ "model.layers.24.self_attn.k_proj.BLinear.weight": "model-00002-of-00003.safetensors",
193
+ "model.layers.24.self_attn.o_proj.ALinear.weight": "model-00002-of-00003.safetensors",
194
+ "model.layers.24.self_attn.o_proj.BLinear.weight": "model-00002-of-00003.safetensors",
195
+ "model.layers.24.self_attn.q_proj.ALinear.weight": "model-00002-of-00003.safetensors",
196
+ "model.layers.24.self_attn.q_proj.BLinear.weight": "model-00002-of-00003.safetensors",
197
+ "model.layers.24.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
198
+ "model.layers.25.input_layernorm.weight": "model-00003-of-00003.safetensors",
199
+ "model.layers.25.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
200
+ "model.layers.25.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
201
+ "model.layers.25.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
202
+ "model.layers.25.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
203
+ "model.layers.25.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
204
+ "model.layers.25.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
205
+ "model.layers.25.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
206
+ "model.layers.25.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
207
+ "model.layers.26.input_layernorm.weight": "model-00003-of-00003.safetensors",
208
+ "model.layers.26.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
209
+ "model.layers.26.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
210
+ "model.layers.26.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
211
+ "model.layers.26.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
212
+ "model.layers.26.self_attn.k_proj.ALinear.weight": "model-00003-of-00003.safetensors",
213
+ "model.layers.26.self_attn.k_proj.BLinear.weight": "model-00003-of-00003.safetensors",
214
+ "model.layers.26.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
215
+ "model.layers.26.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
216
+ "model.layers.26.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
217
+ "model.layers.27.input_layernorm.weight": "model-00003-of-00003.safetensors",
218
+ "model.layers.27.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
219
+ "model.layers.27.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
220
+ "model.layers.27.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
221
+ "model.layers.27.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
222
+ "model.layers.27.self_attn.k_proj.ALinear.weight": "model-00003-of-00003.safetensors",
223
+ "model.layers.27.self_attn.k_proj.BLinear.weight": "model-00003-of-00003.safetensors",
224
+ "model.layers.27.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
225
+ "model.layers.27.self_attn.q_proj.ALinear.weight": "model-00003-of-00003.safetensors",
226
+ "model.layers.27.self_attn.q_proj.BLinear.weight": "model-00003-of-00003.safetensors",
227
+ "model.layers.27.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
228
+ "model.layers.28.input_layernorm.weight": "model-00003-of-00003.safetensors",
229
+ "model.layers.28.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
230
+ "model.layers.28.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
231
+ "model.layers.28.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
232
+ "model.layers.28.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
233
+ "model.layers.28.self_attn.k_proj.weight": "model-00003-of-00003.safetensors",
234
+ "model.layers.28.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
235
+ "model.layers.28.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
236
+ "model.layers.28.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
237
+ "model.layers.29.input_layernorm.weight": "model-00003-of-00003.safetensors",
238
+ "model.layers.29.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
239
+ "model.layers.29.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
240
+ "model.layers.29.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
241
+ "model.layers.29.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
242
+ "model.layers.29.self_attn.k_proj.weight": "model-00003-of-00003.safetensors",
243
+ "model.layers.29.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
244
+ "model.layers.29.self_attn.q_proj.ALinear.weight": "model-00003-of-00003.safetensors",
245
+ "model.layers.29.self_attn.q_proj.BLinear.weight": "model-00003-of-00003.safetensors",
246
+ "model.layers.29.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
247
+ "model.layers.3.input_layernorm.weight": "model-00001-of-00003.safetensors",
248
+ "model.layers.3.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
249
+ "model.layers.3.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
250
+ "model.layers.3.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
251
+ "model.layers.3.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
252
+ "model.layers.3.self_attn.k_proj.ALinear.weight": "model-00001-of-00003.safetensors",
253
+ "model.layers.3.self_attn.k_proj.BLinear.weight": "model-00001-of-00003.safetensors",
254
+ "model.layers.3.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
255
+ "model.layers.3.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
256
+ "model.layers.3.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
257
+ "model.layers.30.input_layernorm.weight": "model-00003-of-00003.safetensors",
258
+ "model.layers.30.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
259
+ "model.layers.30.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
260
+ "model.layers.30.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
261
+ "model.layers.30.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
262
+ "model.layers.30.self_attn.k_proj.weight": "model-00003-of-00003.safetensors",
263
+ "model.layers.30.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
264
+ "model.layers.30.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
265
+ "model.layers.30.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
266
+ "model.layers.31.input_layernorm.weight": "model-00003-of-00003.safetensors",
267
+ "model.layers.31.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
268
+ "model.layers.31.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
269
+ "model.layers.31.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
270
+ "model.layers.31.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
271
+ "model.layers.31.self_attn.k_proj.weight": "model-00003-of-00003.safetensors",
272
+ "model.layers.31.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
273
+ "model.layers.31.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
274
+ "model.layers.31.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
275
+ "model.layers.4.input_layernorm.weight": "model-00001-of-00003.safetensors",
276
+ "model.layers.4.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
277
+ "model.layers.4.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
278
+ "model.layers.4.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
279
+ "model.layers.4.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
280
+ "model.layers.4.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
281
+ "model.layers.4.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
282
+ "model.layers.4.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
283
+ "model.layers.4.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
284
+ "model.layers.5.input_layernorm.weight": "model-00001-of-00003.safetensors",
285
+ "model.layers.5.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
286
+ "model.layers.5.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
287
+ "model.layers.5.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
288
+ "model.layers.5.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
289
+ "model.layers.5.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
290
+ "model.layers.5.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
291
+ "model.layers.5.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
292
+ "model.layers.5.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
293
+ "model.layers.6.input_layernorm.weight": "model-00001-of-00003.safetensors",
294
+ "model.layers.6.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
295
+ "model.layers.6.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
296
+ "model.layers.6.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
297
+ "model.layers.6.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
298
+ "model.layers.6.self_attn.k_proj.ALinear.weight": "model-00001-of-00003.safetensors",
299
+ "model.layers.6.self_attn.k_proj.BLinear.weight": "model-00001-of-00003.safetensors",
300
+ "model.layers.6.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
301
+ "model.layers.6.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
302
+ "model.layers.6.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
303
+ "model.layers.7.input_layernorm.weight": "model-00001-of-00003.safetensors",
304
+ "model.layers.7.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
305
+ "model.layers.7.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
306
+ "model.layers.7.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
307
+ "model.layers.7.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
308
+ "model.layers.7.self_attn.k_proj.ALinear.weight": "model-00001-of-00003.safetensors",
309
+ "model.layers.7.self_attn.k_proj.BLinear.weight": "model-00001-of-00003.safetensors",
310
+ "model.layers.7.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
311
+ "model.layers.7.self_attn.q_proj.ALinear.weight": "model-00001-of-00003.safetensors",
312
+ "model.layers.7.self_attn.q_proj.BLinear.weight": "model-00001-of-00003.safetensors",
313
+ "model.layers.7.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
314
+ "model.layers.8.input_layernorm.weight": "model-00001-of-00003.safetensors",
315
+ "model.layers.8.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
316
+ "model.layers.8.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
317
+ "model.layers.8.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
318
+ "model.layers.8.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
319
+ "model.layers.8.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
320
+ "model.layers.8.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
321
+ "model.layers.8.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
322
+ "model.layers.8.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
323
+ "model.layers.9.input_layernorm.weight": "model-00001-of-00003.safetensors",
324
+ "model.layers.9.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
325
+ "model.layers.9.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
326
+ "model.layers.9.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
327
+ "model.layers.9.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
328
+ "model.layers.9.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
329
+ "model.layers.9.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
330
+ "model.layers.9.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
331
+ "model.layers.9.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
332
+ "model.norm.weight": "model-00003-of-00003.safetensors"
333
+ }
334
+ }
modeling_asvd_llama.py ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import LlamaForCausalLM
2
+ from .configuration_asvd_llama import ASVDLlamaConfig
3
+ import torch.nn as nn
4
+
5
+ class ASVDLinear(nn.Module):
6
+ def __init__(self, in_features, out_features, rank, bias=True):
7
+ super().__init__()
8
+ self.BLinear = nn.Linear(in_features, rank, bias=False)
9
+ self.ALinear = nn.Linear(rank, out_features, bias=bias)
10
+
11
+ def forward(self, input):
12
+ return self.ALinear(self.BLinear(input))
13
+
14
+ class ASVDLlamaForCausalLM(LlamaForCausalLM):
15
+ config_class = ASVDLlamaConfig
16
+ def __init__(self, config:ASVDLlamaConfig):
17
+ super().__init__(config)
18
+ self.truncation_ranks=config.truncation_ranks
19
+
20
+ full_name_dict = {module: name for name, module in self.named_modules()}
21
+ linear_info = {}
22
+ modules = [self]
23
+ while len(modules) > 0:
24
+ submodule = modules.pop()
25
+ for name, raw_linear in submodule.named_children():
26
+ if isinstance(raw_linear, nn.Linear):
27
+ full_name = full_name_dict[raw_linear]
28
+ linear_info[raw_linear] = {
29
+ "father": submodule,
30
+ "name": name,
31
+ "full_name": full_name,
32
+ }
33
+ else:
34
+ modules.append(raw_linear)
35
+
36
+
37
+ for name,module in self.named_modules():
38
+ if name in self.truncation_ranks:
39
+ info=linear_info[module]
40
+ new_layer=ASVDLinear(module.in_features,module.out_features,self.truncation_ranks[name],bias=module.bias is not None)
41
+ setattr(info["father"], info["name"], new_layer)
42
+
43
+