OpenMOSE commited on
Commit
e40ebbf
·
verified ·
1 Parent(s): ebb5416

Upload folder using huggingface_hub

Browse files
.ipynb_checkpoints/config-checkpoint.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "RWKV07AQwen3ForCausalLM"
4
+ ],
5
+ "auto_map": {
6
+ "AutoConfig": "configuration_rwkv07aqwen3.RWKV07AQwen3Config",
7
+ "AutoModelForCausalLM": "modeling_rwkv07aqwen3.RWKV07AQwen3ForCausalLM"
8
+ },
9
+ "description": "Hybrid-RWKV Strategically Interleaved RWKV-Attention",
10
+ "base_model": "ByteDance-Seed/Seed-OSS-36B-Instruct",
11
+ "model_revision": "alpha",
12
+ "transformer_layers":[3,8,14,20,25,30,35,39,43],
13
+ "rwkv_layers": [0,1,2,4,5,6,7,9,10,11,12,13,15,16,17,18,19,21,22,23,24,26,27,28,29,31,32,33,34,36,37,38,40,41,42],
14
+ "rwkv_architecture": "hxa07a",
15
+ "enable_qk_norm": false,
16
+ "nope_in_transformer": true,
17
+ "nope_in_rwkv": false,
18
+ "lora_rank_decay": 320,
19
+ "lora_rank_iclr":96,
20
+ "lora_rank_gate":320,
21
+ "use_rope":true,
22
+
23
+ "attention_bias": false,
24
+ "attention_out_bias": false,
25
+ "attention_dropout": 0.0,
26
+ "bos_token_id": 100257,
27
+ "classifier_dropout": 0.0,
28
+ "eos_token_id": 100257,
29
+ "head_dim": 96,
30
+ "hidden_act": "silu",
31
+ "hidden_size": 6144,
32
+ "id2label": {
33
+ "0": "LABEL_0"
34
+ },
35
+ "initializer_range": 0.006,
36
+ "intermediate_size": 19648,
37
+ "label2id": {
38
+ "LABEL_0": 0
39
+ },
40
+ "max_position_embeddings": 98304,
41
+ "mlp_bias": false,
42
+ "model_type": "rwkv07aqwen3",
43
+ "num_attention_heads": 64,
44
+ "num_hidden_layers": 44,
45
+ "num_key_value_heads": 8,
46
+ "pretraining_tp": 1,
47
+ "rms_norm_eps": 1e-05,
48
+ "rope_scaling": null,
49
+ "rope_theta": 8000000,
50
+ "tie_word_embeddings": false,
51
+ "torch_dtype": "bfloat16",
52
+ "transformers_version": "4.50.3",
53
+ "use_cache": true,
54
+ "vocab_size": 100352
55
+ }
.ipynb_checkpoints/config_old-checkpoint.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "RWKV07AQwen3ForCausalLM"
4
+ ],
5
+ "auto_map": {
6
+ "AutoConfig": "configuration_rwkv07aqwen3.RWKV07AQwen3Config",
7
+ "AutoModelForCausalLM": "modeling_rwkv07aqwen3.RWKV07AQwen3ForCausalLM"
8
+ },
9
+ "description": "Hybrid-RWKV Strategically Interleaved RWKV-Attention",
10
+ "base_model": "ByteDance-Seed/Seed-OSS-36B-Instruct",
11
+ "model_revision": "alpha",
12
+ "transformer_layers":[3,7,11,15,19,23,27,31,35],
13
+ "rwkv_layers": [0,1,2,4,5,6,8,9,10,12,13,14,16,17,18,20,21,22,24,25,26,28,29,30,32,33,34],
14
+ "rwkv_architecture": "hxa07a",
15
+ "enable_qk_norm": true,
16
+ "nope_in_transformer": true,
17
+ "nope_in_rwkv": false,
18
+ "lora_rank_decay": 256,
19
+ "lora_rank_iclr":96,
20
+ "lora_rank_gate":256,
21
+ "use_rope":true,
22
+
23
+
24
+ "attention_bias": false,
25
+ "attention_out_bias": false,
26
+ "attention_dropout": 0.0,
27
+ "bos_token_id": 151643,
28
+ "eos_token_id": 151645,
29
+ "head_dim": 128,
30
+ "hidden_act": "silu",
31
+ "hidden_size": 4096,
32
+ "initializer_range": 0.02,
33
+ "intermediate_size": 12288,
34
+ "max_position_embeddings": 131072,
35
+ "max_window_layers": 36,
36
+ "model_type": "rwkv07aqwen3",
37
+ "num_attention_heads": 32,
38
+ "num_hidden_layers": 36,
39
+ "num_key_value_heads": 8,
40
+ "rms_norm_eps": 1e-06,
41
+ "rope_scaling": null,
42
+ "rope_theta": 5000000,
43
+ "sliding_window": null,
44
+ "tie_word_embeddings": false,
45
+ "torch_dtype": "bfloat16",
46
+ "transformers_version": "4.51.0",
47
+ "use_cache": true,
48
+ "use_sliding_window": false,
49
+ "vocab_size": 151936
50
+ }
.ipynb_checkpoints/model.safetensors.index-checkpoint.json ADDED
@@ -0,0 +1,687 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 42444902400,
4
+ "format": "safetensors"
5
+ },
6
+ "weight_map": {
7
+ "lm_head.weight": "model-00001-of-00011.safetensors",
8
+ "model.embed_tokens.weight": "model-00001-of-00011.safetensors",
9
+ "model.layers.0.input_layernorm.weight": "model-00001-of-00011.safetensors",
10
+ "model.layers.0.mlp.down_proj.weight": "model-00001-of-00011.safetensors",
11
+ "model.layers.0.mlp.gate_proj.weight": "model-00001-of-00011.safetensors",
12
+ "model.layers.0.mlp.up_proj.weight": "model-00001-of-00011.safetensors",
13
+ "model.layers.0.post_attention_layernorm.weight": "model-00001-of-00011.safetensors",
14
+ "model.layers.0.self_attn.a0": "model-00001-of-00011.safetensors",
15
+ "model.layers.0.self_attn.a1": "model-00001-of-00011.safetensors",
16
+ "model.layers.0.self_attn.a2": "model-00001-of-00011.safetensors",
17
+ "model.layers.0.self_attn.g1": "model-00001-of-00011.safetensors",
18
+ "model.layers.0.self_attn.g2": "model-00001-of-00011.safetensors",
19
+ "model.layers.0.self_attn.key.weight": "model-00001-of-00011.safetensors",
20
+ "model.layers.0.self_attn.output.weight": "model-00001-of-00011.safetensors",
21
+ "model.layers.0.self_attn.receptance.weight": "model-00001-of-00011.safetensors",
22
+ "model.layers.0.self_attn.value.weight": "model-00001-of-00011.safetensors",
23
+ "model.layers.0.self_attn.w0": "model-00001-of-00011.safetensors",
24
+ "model.layers.0.self_attn.w1": "model-00001-of-00011.safetensors",
25
+ "model.layers.0.self_attn.w2": "model-00001-of-00011.safetensors",
26
+ "model.layers.1.input_layernorm.weight": "model-00001-of-00011.safetensors",
27
+ "model.layers.1.mlp.down_proj.weight": "model-00001-of-00011.safetensors",
28
+ "model.layers.1.mlp.gate_proj.weight": "model-00001-of-00011.safetensors",
29
+ "model.layers.1.mlp.up_proj.weight": "model-00001-of-00011.safetensors",
30
+ "model.layers.1.post_attention_layernorm.weight": "model-00001-of-00011.safetensors",
31
+ "model.layers.1.self_attn.a0": "model-00001-of-00011.safetensors",
32
+ "model.layers.1.self_attn.a1": "model-00001-of-00011.safetensors",
33
+ "model.layers.1.self_attn.a2": "model-00001-of-00011.safetensors",
34
+ "model.layers.1.self_attn.g1": "model-00001-of-00011.safetensors",
35
+ "model.layers.1.self_attn.g2": "model-00001-of-00011.safetensors",
36
+ "model.layers.1.self_attn.key.weight": "model-00001-of-00011.safetensors",
37
+ "model.layers.1.self_attn.output.weight": "model-00001-of-00011.safetensors",
38
+ "model.layers.1.self_attn.receptance.weight": "model-00001-of-00011.safetensors",
39
+ "model.layers.1.self_attn.value.weight": "model-00001-of-00011.safetensors",
40
+ "model.layers.1.self_attn.w0": "model-00001-of-00011.safetensors",
41
+ "model.layers.1.self_attn.w1": "model-00001-of-00011.safetensors",
42
+ "model.layers.1.self_attn.w2": "model-00001-of-00011.safetensors",
43
+ "model.layers.2.input_layernorm.weight": "model-00001-of-00011.safetensors",
44
+ "model.layers.2.mlp.down_proj.weight": "model-00002-of-00011.safetensors",
45
+ "model.layers.2.mlp.gate_proj.weight": "model-00002-of-00011.safetensors",
46
+ "model.layers.2.mlp.up_proj.weight": "model-00002-of-00011.safetensors",
47
+ "model.layers.2.post_attention_layernorm.weight": "model-00002-of-00011.safetensors",
48
+ "model.layers.2.self_attn.a0": "model-00002-of-00011.safetensors",
49
+ "model.layers.2.self_attn.a1": "model-00002-of-00011.safetensors",
50
+ "model.layers.2.self_attn.a2": "model-00002-of-00011.safetensors",
51
+ "model.layers.2.self_attn.g1": "model-00002-of-00011.safetensors",
52
+ "model.layers.2.self_attn.g2": "model-00002-of-00011.safetensors",
53
+ "model.layers.2.self_attn.key.weight": "model-00002-of-00011.safetensors",
54
+ "model.layers.2.self_attn.output.weight": "model-00002-of-00011.safetensors",
55
+ "model.layers.2.self_attn.receptance.weight": "model-00002-of-00011.safetensors",
56
+ "model.layers.2.self_attn.value.weight": "model-00002-of-00011.safetensors",
57
+ "model.layers.2.self_attn.w0": "model-00002-of-00011.safetensors",
58
+ "model.layers.2.self_attn.w1": "model-00002-of-00011.safetensors",
59
+ "model.layers.2.self_attn.w2": "model-00002-of-00011.safetensors",
60
+ "model.layers.3.input_layernorm.weight": "model-00002-of-00011.safetensors",
61
+ "model.layers.3.mlp.down_proj.weight": "model-00002-of-00011.safetensors",
62
+ "model.layers.3.mlp.gate_proj.weight": "model-00002-of-00011.safetensors",
63
+ "model.layers.3.mlp.up_proj.weight": "model-00002-of-00011.safetensors",
64
+ "model.layers.3.post_attention_layernorm.weight": "model-00002-of-00011.safetensors",
65
+ "model.layers.3.self_attn.k_proj.weight": "model-00002-of-00011.safetensors",
66
+ "model.layers.3.self_attn.o_proj.weight": "model-00002-of-00011.safetensors",
67
+ "model.layers.3.self_attn.q_proj.weight": "model-00002-of-00011.safetensors",
68
+ "model.layers.3.self_attn.v_proj.weight": "model-00002-of-00011.safetensors",
69
+ "model.layers.4.input_layernorm.weight": "model-00002-of-00011.safetensors",
70
+ "model.layers.4.mlp.down_proj.weight": "model-00002-of-00011.safetensors",
71
+ "model.layers.4.mlp.gate_proj.weight": "model-00002-of-00011.safetensors",
72
+ "model.layers.4.mlp.up_proj.weight": "model-00002-of-00011.safetensors",
73
+ "model.layers.4.post_attention_layernorm.weight": "model-00002-of-00011.safetensors",
74
+ "model.layers.4.self_attn.a0": "model-00002-of-00011.safetensors",
75
+ "model.layers.4.self_attn.a1": "model-00002-of-00011.safetensors",
76
+ "model.layers.4.self_attn.a2": "model-00002-of-00011.safetensors",
77
+ "model.layers.4.self_attn.g1": "model-00002-of-00011.safetensors",
78
+ "model.layers.4.self_attn.g2": "model-00002-of-00011.safetensors",
79
+ "model.layers.4.self_attn.key.weight": "model-00002-of-00011.safetensors",
80
+ "model.layers.4.self_attn.output.weight": "model-00002-of-00011.safetensors",
81
+ "model.layers.4.self_attn.receptance.weight": "model-00002-of-00011.safetensors",
82
+ "model.layers.4.self_attn.value.weight": "model-00002-of-00011.safetensors",
83
+ "model.layers.4.self_attn.w0": "model-00002-of-00011.safetensors",
84
+ "model.layers.4.self_attn.w1": "model-00002-of-00011.safetensors",
85
+ "model.layers.4.self_attn.w2": "model-00002-of-00011.safetensors",
86
+ "model.layers.5.input_layernorm.weight": "model-00002-of-00011.safetensors",
87
+ "model.layers.5.mlp.down_proj.weight": "model-00002-of-00011.safetensors",
88
+ "model.layers.5.mlp.gate_proj.weight": "model-00002-of-00011.safetensors",
89
+ "model.layers.5.mlp.up_proj.weight": "model-00002-of-00011.safetensors",
90
+ "model.layers.5.post_attention_layernorm.weight": "model-00002-of-00011.safetensors",
91
+ "model.layers.5.self_attn.a0": "model-00002-of-00011.safetensors",
92
+ "model.layers.5.self_attn.a1": "model-00002-of-00011.safetensors",
93
+ "model.layers.5.self_attn.a2": "model-00002-of-00011.safetensors",
94
+ "model.layers.5.self_attn.g1": "model-00002-of-00011.safetensors",
95
+ "model.layers.5.self_attn.g2": "model-00002-of-00011.safetensors",
96
+ "model.layers.5.self_attn.key.weight": "model-00002-of-00011.safetensors",
97
+ "model.layers.5.self_attn.output.weight": "model-00002-of-00011.safetensors",
98
+ "model.layers.5.self_attn.receptance.weight": "model-00002-of-00011.safetensors",
99
+ "model.layers.5.self_attn.value.weight": "model-00002-of-00011.safetensors",
100
+ "model.layers.5.self_attn.w0": "model-00002-of-00011.safetensors",
101
+ "model.layers.5.self_attn.w1": "model-00002-of-00011.safetensors",
102
+ "model.layers.5.self_attn.w2": "model-00002-of-00011.safetensors",
103
+ "model.layers.6.input_layernorm.weight": "model-00002-of-00011.safetensors",
104
+ "model.layers.6.mlp.down_proj.weight": "model-00002-of-00011.safetensors",
105
+ "model.layers.6.mlp.gate_proj.weight": "model-00002-of-00011.safetensors",
106
+ "model.layers.6.mlp.up_proj.weight": "model-00003-of-00011.safetensors",
107
+ "model.layers.6.post_attention_layernorm.weight": "model-00003-of-00011.safetensors",
108
+ "model.layers.6.self_attn.a0": "model-00003-of-00011.safetensors",
109
+ "model.layers.6.self_attn.a1": "model-00003-of-00011.safetensors",
110
+ "model.layers.6.self_attn.a2": "model-00003-of-00011.safetensors",
111
+ "model.layers.6.self_attn.g1": "model-00003-of-00011.safetensors",
112
+ "model.layers.6.self_attn.g2": "model-00003-of-00011.safetensors",
113
+ "model.layers.6.self_attn.key.weight": "model-00003-of-00011.safetensors",
114
+ "model.layers.6.self_attn.output.weight": "model-00003-of-00011.safetensors",
115
+ "model.layers.6.self_attn.receptance.weight": "model-00003-of-00011.safetensors",
116
+ "model.layers.6.self_attn.value.weight": "model-00003-of-00011.safetensors",
117
+ "model.layers.6.self_attn.w0": "model-00003-of-00011.safetensors",
118
+ "model.layers.6.self_attn.w1": "model-00003-of-00011.safetensors",
119
+ "model.layers.6.self_attn.w2": "model-00003-of-00011.safetensors",
120
+ "model.layers.7.input_layernorm.weight": "model-00003-of-00011.safetensors",
121
+ "model.layers.7.mlp.down_proj.weight": "model-00003-of-00011.safetensors",
122
+ "model.layers.7.mlp.gate_proj.weight": "model-00003-of-00011.safetensors",
123
+ "model.layers.7.mlp.up_proj.weight": "model-00003-of-00011.safetensors",
124
+ "model.layers.7.post_attention_layernorm.weight": "model-00003-of-00011.safetensors",
125
+ "model.layers.7.self_attn.a0": "model-00003-of-00011.safetensors",
126
+ "model.layers.7.self_attn.a1": "model-00003-of-00011.safetensors",
127
+ "model.layers.7.self_attn.a2": "model-00003-of-00011.safetensors",
128
+ "model.layers.7.self_attn.g1": "model-00003-of-00011.safetensors",
129
+ "model.layers.7.self_attn.g2": "model-00003-of-00011.safetensors",
130
+ "model.layers.7.self_attn.key.weight": "model-00003-of-00011.safetensors",
131
+ "model.layers.7.self_attn.output.weight": "model-00003-of-00011.safetensors",
132
+ "model.layers.7.self_attn.receptance.weight": "model-00003-of-00011.safetensors",
133
+ "model.layers.7.self_attn.value.weight": "model-00003-of-00011.safetensors",
134
+ "model.layers.7.self_attn.w0": "model-00003-of-00011.safetensors",
135
+ "model.layers.7.self_attn.w1": "model-00003-of-00011.safetensors",
136
+ "model.layers.7.self_attn.w2": "model-00003-of-00011.safetensors",
137
+ "model.layers.8.input_layernorm.weight": "model-00003-of-00011.safetensors",
138
+ "model.layers.8.mlp.down_proj.weight": "model-00003-of-00011.safetensors",
139
+ "model.layers.8.mlp.gate_proj.weight": "model-00003-of-00011.safetensors",
140
+ "model.layers.8.mlp.up_proj.weight": "model-00003-of-00011.safetensors",
141
+ "model.layers.8.post_attention_layernorm.weight": "model-00003-of-00011.safetensors",
142
+ "model.layers.8.self_attn.k_proj.weight": "model-00003-of-00011.safetensors",
143
+ "model.layers.8.self_attn.o_proj.weight": "model-00003-of-00011.safetensors",
144
+ "model.layers.8.self_attn.q_proj.weight": "model-00003-of-00011.safetensors",
145
+ "model.layers.8.self_attn.v_proj.weight": "model-00003-of-00011.safetensors",
146
+ "model.layers.9.input_layernorm.weight": "model-00003-of-00011.safetensors",
147
+ "model.layers.9.mlp.down_proj.weight": "model-00003-of-00011.safetensors",
148
+ "model.layers.9.mlp.gate_proj.weight": "model-00003-of-00011.safetensors",
149
+ "model.layers.9.mlp.up_proj.weight": "model-00003-of-00011.safetensors",
150
+ "model.layers.9.post_attention_layernorm.weight": "model-00003-of-00011.safetensors",
151
+ "model.layers.9.self_attn.a0": "model-00003-of-00011.safetensors",
152
+ "model.layers.9.self_attn.a1": "model-00003-of-00011.safetensors",
153
+ "model.layers.9.self_attn.a2": "model-00003-of-00011.safetensors",
154
+ "model.layers.9.self_attn.g1": "model-00003-of-00011.safetensors",
155
+ "model.layers.9.self_attn.g2": "model-00003-of-00011.safetensors",
156
+ "model.layers.9.self_attn.key.weight": "model-00003-of-00011.safetensors",
157
+ "model.layers.9.self_attn.output.weight": "model-00003-of-00011.safetensors",
158
+ "model.layers.9.self_attn.receptance.weight": "model-00003-of-00011.safetensors",
159
+ "model.layers.9.self_attn.value.weight": "model-00003-of-00011.safetensors",
160
+ "model.layers.9.self_attn.w0": "model-00003-of-00011.safetensors",
161
+ "model.layers.9.self_attn.w1": "model-00003-of-00011.safetensors",
162
+ "model.layers.9.self_attn.w2": "model-00003-of-00011.safetensors",
163
+ "model.layers.10.input_layernorm.weight": "model-00003-of-00011.safetensors",
164
+ "model.layers.10.mlp.down_proj.weight": "model-00003-of-00011.safetensors",
165
+ "model.layers.10.mlp.gate_proj.weight": "model-00003-of-00011.safetensors",
166
+ "model.layers.10.mlp.up_proj.weight": "model-00003-of-00011.safetensors",
167
+ "model.layers.10.post_attention_layernorm.weight": "model-00003-of-00011.safetensors",
168
+ "model.layers.10.self_attn.a0": "model-00003-of-00011.safetensors",
169
+ "model.layers.10.self_attn.a1": "model-00003-of-00011.safetensors",
170
+ "model.layers.10.self_attn.a2": "model-00003-of-00011.safetensors",
171
+ "model.layers.10.self_attn.g1": "model-00003-of-00011.safetensors",
172
+ "model.layers.10.self_attn.g2": "model-00003-of-00011.safetensors",
173
+ "model.layers.10.self_attn.key.weight": "model-00003-of-00011.safetensors",
174
+ "model.layers.10.self_attn.output.weight": "model-00003-of-00011.safetensors",
175
+ "model.layers.10.self_attn.receptance.weight": "model-00003-of-00011.safetensors",
176
+ "model.layers.10.self_attn.value.weight": "model-00003-of-00011.safetensors",
177
+ "model.layers.10.self_attn.w0": "model-00003-of-00011.safetensors",
178
+ "model.layers.10.self_attn.w1": "model-00003-of-00011.safetensors",
179
+ "model.layers.10.self_attn.w2": "model-00003-of-00011.safetensors",
180
+ "model.layers.11.input_layernorm.weight": "model-00003-of-00011.safetensors",
181
+ "model.layers.11.mlp.down_proj.weight": "model-00004-of-00011.safetensors",
182
+ "model.layers.11.mlp.gate_proj.weight": "model-00004-of-00011.safetensors",
183
+ "model.layers.11.mlp.up_proj.weight": "model-00004-of-00011.safetensors",
184
+ "model.layers.11.post_attention_layernorm.weight": "model-00004-of-00011.safetensors",
185
+ "model.layers.11.self_attn.a0": "model-00004-of-00011.safetensors",
186
+ "model.layers.11.self_attn.a1": "model-00004-of-00011.safetensors",
187
+ "model.layers.11.self_attn.a2": "model-00004-of-00011.safetensors",
188
+ "model.layers.11.self_attn.g1": "model-00004-of-00011.safetensors",
189
+ "model.layers.11.self_attn.g2": "model-00004-of-00011.safetensors",
190
+ "model.layers.11.self_attn.key.weight": "model-00004-of-00011.safetensors",
191
+ "model.layers.11.self_attn.output.weight": "model-00004-of-00011.safetensors",
192
+ "model.layers.11.self_attn.receptance.weight": "model-00004-of-00011.safetensors",
193
+ "model.layers.11.self_attn.value.weight": "model-00004-of-00011.safetensors",
194
+ "model.layers.11.self_attn.w0": "model-00004-of-00011.safetensors",
195
+ "model.layers.11.self_attn.w1": "model-00004-of-00011.safetensors",
196
+ "model.layers.11.self_attn.w2": "model-00004-of-00011.safetensors",
197
+ "model.layers.12.input_layernorm.weight": "model-00004-of-00011.safetensors",
198
+ "model.layers.12.mlp.down_proj.weight": "model-00004-of-00011.safetensors",
199
+ "model.layers.12.mlp.gate_proj.weight": "model-00004-of-00011.safetensors",
200
+ "model.layers.12.mlp.up_proj.weight": "model-00004-of-00011.safetensors",
201
+ "model.layers.12.post_attention_layernorm.weight": "model-00004-of-00011.safetensors",
202
+ "model.layers.12.self_attn.a0": "model-00004-of-00011.safetensors",
203
+ "model.layers.12.self_attn.a1": "model-00004-of-00011.safetensors",
204
+ "model.layers.12.self_attn.a2": "model-00004-of-00011.safetensors",
205
+ "model.layers.12.self_attn.g1": "model-00004-of-00011.safetensors",
206
+ "model.layers.12.self_attn.g2": "model-00004-of-00011.safetensors",
207
+ "model.layers.12.self_attn.key.weight": "model-00004-of-00011.safetensors",
208
+ "model.layers.12.self_attn.output.weight": "model-00004-of-00011.safetensors",
209
+ "model.layers.12.self_attn.receptance.weight": "model-00004-of-00011.safetensors",
210
+ "model.layers.12.self_attn.value.weight": "model-00004-of-00011.safetensors",
211
+ "model.layers.12.self_attn.w0": "model-00004-of-00011.safetensors",
212
+ "model.layers.12.self_attn.w1": "model-00004-of-00011.safetensors",
213
+ "model.layers.12.self_attn.w2": "model-00004-of-00011.safetensors",
214
+ "model.layers.13.input_layernorm.weight": "model-00004-of-00011.safetensors",
215
+ "model.layers.13.mlp.down_proj.weight": "model-00004-of-00011.safetensors",
216
+ "model.layers.13.mlp.gate_proj.weight": "model-00004-of-00011.safetensors",
217
+ "model.layers.13.mlp.up_proj.weight": "model-00004-of-00011.safetensors",
218
+ "model.layers.13.post_attention_layernorm.weight": "model-00004-of-00011.safetensors",
219
+ "model.layers.13.self_attn.a0": "model-00004-of-00011.safetensors",
220
+ "model.layers.13.self_attn.a1": "model-00004-of-00011.safetensors",
221
+ "model.layers.13.self_attn.a2": "model-00004-of-00011.safetensors",
222
+ "model.layers.13.self_attn.g1": "model-00004-of-00011.safetensors",
223
+ "model.layers.13.self_attn.g2": "model-00004-of-00011.safetensors",
224
+ "model.layers.13.self_attn.key.weight": "model-00004-of-00011.safetensors",
225
+ "model.layers.13.self_attn.output.weight": "model-00004-of-00011.safetensors",
226
+ "model.layers.13.self_attn.receptance.weight": "model-00004-of-00011.safetensors",
227
+ "model.layers.13.self_attn.value.weight": "model-00004-of-00011.safetensors",
228
+ "model.layers.13.self_attn.w0": "model-00004-of-00011.safetensors",
229
+ "model.layers.13.self_attn.w1": "model-00004-of-00011.safetensors",
230
+ "model.layers.13.self_attn.w2": "model-00004-of-00011.safetensors",
231
+ "model.layers.14.input_layernorm.weight": "model-00004-of-00011.safetensors",
232
+ "model.layers.14.mlp.down_proj.weight": "model-00004-of-00011.safetensors",
233
+ "model.layers.14.mlp.gate_proj.weight": "model-00004-of-00011.safetensors",
234
+ "model.layers.14.mlp.up_proj.weight": "model-00004-of-00011.safetensors",
235
+ "model.layers.14.post_attention_layernorm.weight": "model-00004-of-00011.safetensors",
236
+ "model.layers.14.self_attn.k_proj.weight": "model-00004-of-00011.safetensors",
237
+ "model.layers.14.self_attn.o_proj.weight": "model-00004-of-00011.safetensors",
238
+ "model.layers.14.self_attn.q_proj.weight": "model-00004-of-00011.safetensors",
239
+ "model.layers.14.self_attn.v_proj.weight": "model-00004-of-00011.safetensors",
240
+ "model.layers.15.input_layernorm.weight": "model-00004-of-00011.safetensors",
241
+ "model.layers.15.mlp.down_proj.weight": "model-00004-of-00011.safetensors",
242
+ "model.layers.15.mlp.gate_proj.weight": "model-00004-of-00011.safetensors",
243
+ "model.layers.15.mlp.up_proj.weight": "model-00005-of-00011.safetensors",
244
+ "model.layers.15.post_attention_layernorm.weight": "model-00005-of-00011.safetensors",
245
+ "model.layers.15.self_attn.a0": "model-00005-of-00011.safetensors",
246
+ "model.layers.15.self_attn.a1": "model-00005-of-00011.safetensors",
247
+ "model.layers.15.self_attn.a2": "model-00005-of-00011.safetensors",
248
+ "model.layers.15.self_attn.g1": "model-00005-of-00011.safetensors",
249
+ "model.layers.15.self_attn.g2": "model-00005-of-00011.safetensors",
250
+ "model.layers.15.self_attn.key.weight": "model-00005-of-00011.safetensors",
251
+ "model.layers.15.self_attn.output.weight": "model-00005-of-00011.safetensors",
252
+ "model.layers.15.self_attn.receptance.weight": "model-00005-of-00011.safetensors",
253
+ "model.layers.15.self_attn.value.weight": "model-00005-of-00011.safetensors",
254
+ "model.layers.15.self_attn.w0": "model-00005-of-00011.safetensors",
255
+ "model.layers.15.self_attn.w1": "model-00005-of-00011.safetensors",
256
+ "model.layers.15.self_attn.w2": "model-00005-of-00011.safetensors",
257
+ "model.layers.16.input_layernorm.weight": "model-00005-of-00011.safetensors",
258
+ "model.layers.16.mlp.down_proj.weight": "model-00005-of-00011.safetensors",
259
+ "model.layers.16.mlp.gate_proj.weight": "model-00005-of-00011.safetensors",
260
+ "model.layers.16.mlp.up_proj.weight": "model-00005-of-00011.safetensors",
261
+ "model.layers.16.post_attention_layernorm.weight": "model-00005-of-00011.safetensors",
262
+ "model.layers.16.self_attn.a0": "model-00005-of-00011.safetensors",
263
+ "model.layers.16.self_attn.a1": "model-00005-of-00011.safetensors",
264
+ "model.layers.16.self_attn.a2": "model-00005-of-00011.safetensors",
265
+ "model.layers.16.self_attn.g1": "model-00005-of-00011.safetensors",
266
+ "model.layers.16.self_attn.g2": "model-00005-of-00011.safetensors",
267
+ "model.layers.16.self_attn.key.weight": "model-00005-of-00011.safetensors",
268
+ "model.layers.16.self_attn.output.weight": "model-00005-of-00011.safetensors",
269
+ "model.layers.16.self_attn.receptance.weight": "model-00005-of-00011.safetensors",
270
+ "model.layers.16.self_attn.value.weight": "model-00005-of-00011.safetensors",
271
+ "model.layers.16.self_attn.w0": "model-00005-of-00011.safetensors",
272
+ "model.layers.16.self_attn.w1": "model-00005-of-00011.safetensors",
273
+ "model.layers.16.self_attn.w2": "model-00005-of-00011.safetensors",
274
+ "model.layers.17.input_layernorm.weight": "model-00005-of-00011.safetensors",
275
+ "model.layers.17.mlp.down_proj.weight": "model-00005-of-00011.safetensors",
276
+ "model.layers.17.mlp.gate_proj.weight": "model-00005-of-00011.safetensors",
277
+ "model.layers.17.mlp.up_proj.weight": "model-00005-of-00011.safetensors",
278
+ "model.layers.17.post_attention_layernorm.weight": "model-00005-of-00011.safetensors",
279
+ "model.layers.17.self_attn.a0": "model-00005-of-00011.safetensors",
280
+ "model.layers.17.self_attn.a1": "model-00005-of-00011.safetensors",
281
+ "model.layers.17.self_attn.a2": "model-00005-of-00011.safetensors",
282
+ "model.layers.17.self_attn.g1": "model-00005-of-00011.safetensors",
283
+ "model.layers.17.self_attn.g2": "model-00005-of-00011.safetensors",
284
+ "model.layers.17.self_attn.key.weight": "model-00005-of-00011.safetensors",
285
+ "model.layers.17.self_attn.output.weight": "model-00005-of-00011.safetensors",
286
+ "model.layers.17.self_attn.receptance.weight": "model-00005-of-00011.safetensors",
287
+ "model.layers.17.self_attn.value.weight": "model-00005-of-00011.safetensors",
288
+ "model.layers.17.self_attn.w0": "model-00005-of-00011.safetensors",
289
+ "model.layers.17.self_attn.w1": "model-00005-of-00011.safetensors",
290
+ "model.layers.17.self_attn.w2": "model-00005-of-00011.safetensors",
291
+ "model.layers.18.input_layernorm.weight": "model-00005-of-00011.safetensors",
292
+ "model.layers.18.mlp.down_proj.weight": "model-00005-of-00011.safetensors",
293
+ "model.layers.18.mlp.gate_proj.weight": "model-00005-of-00011.safetensors",
294
+ "model.layers.18.mlp.up_proj.weight": "model-00005-of-00011.safetensors",
295
+ "model.layers.18.post_attention_layernorm.weight": "model-00005-of-00011.safetensors",
296
+ "model.layers.18.self_attn.a0": "model-00005-of-00011.safetensors",
297
+ "model.layers.18.self_attn.a1": "model-00005-of-00011.safetensors",
298
+ "model.layers.18.self_attn.a2": "model-00005-of-00011.safetensors",
299
+ "model.layers.18.self_attn.g1": "model-00005-of-00011.safetensors",
300
+ "model.layers.18.self_attn.g2": "model-00005-of-00011.safetensors",
301
+ "model.layers.18.self_attn.key.weight": "model-00005-of-00011.safetensors",
302
+ "model.layers.18.self_attn.output.weight": "model-00005-of-00011.safetensors",
303
+ "model.layers.18.self_attn.receptance.weight": "model-00005-of-00011.safetensors",
304
+ "model.layers.18.self_attn.value.weight": "model-00005-of-00011.safetensors",
305
+ "model.layers.18.self_attn.w0": "model-00005-of-00011.safetensors",
306
+ "model.layers.18.self_attn.w1": "model-00005-of-00011.safetensors",
307
+ "model.layers.18.self_attn.w2": "model-00005-of-00011.safetensors",
308
+ "model.layers.19.input_layernorm.weight": "model-00005-of-00011.safetensors",
309
+ "model.layers.19.mlp.down_proj.weight": "model-00005-of-00011.safetensors",
310
+ "model.layers.19.mlp.gate_proj.weight": "model-00005-of-00011.safetensors",
311
+ "model.layers.19.mlp.up_proj.weight": "model-00005-of-00011.safetensors",
312
+ "model.layers.19.post_attention_layernorm.weight": "model-00005-of-00011.safetensors",
313
+ "model.layers.19.self_attn.a0": "model-00005-of-00011.safetensors",
314
+ "model.layers.19.self_attn.a1": "model-00005-of-00011.safetensors",
315
+ "model.layers.19.self_attn.a2": "model-00005-of-00011.safetensors",
316
+ "model.layers.19.self_attn.g1": "model-00005-of-00011.safetensors",
317
+ "model.layers.19.self_attn.g2": "model-00005-of-00011.safetensors",
318
+ "model.layers.19.self_attn.key.weight": "model-00005-of-00011.safetensors",
319
+ "model.layers.19.self_attn.output.weight": "model-00005-of-00011.safetensors",
320
+ "model.layers.19.self_attn.receptance.weight": "model-00005-of-00011.safetensors",
321
+ "model.layers.19.self_attn.value.weight": "model-00005-of-00011.safetensors",
322
+ "model.layers.19.self_attn.w0": "model-00005-of-00011.safetensors",
323
+ "model.layers.19.self_attn.w1": "model-00005-of-00011.safetensors",
324
+ "model.layers.19.self_attn.w2": "model-00005-of-00011.safetensors",
325
+ "model.layers.20.input_layernorm.weight": "model-00005-of-00011.safetensors",
326
+ "model.layers.20.mlp.down_proj.weight": "model-00006-of-00011.safetensors",
327
+ "model.layers.20.mlp.gate_proj.weight": "model-00006-of-00011.safetensors",
328
+ "model.layers.20.mlp.up_proj.weight": "model-00006-of-00011.safetensors",
329
+ "model.layers.20.post_attention_layernorm.weight": "model-00006-of-00011.safetensors",
330
+ "model.layers.20.self_attn.k_proj.weight": "model-00006-of-00011.safetensors",
331
+ "model.layers.20.self_attn.o_proj.weight": "model-00006-of-00011.safetensors",
332
+ "model.layers.20.self_attn.q_proj.weight": "model-00006-of-00011.safetensors",
333
+ "model.layers.20.self_attn.v_proj.weight": "model-00006-of-00011.safetensors",
334
+ "model.layers.21.input_layernorm.weight": "model-00006-of-00011.safetensors",
335
+ "model.layers.21.mlp.down_proj.weight": "model-00006-of-00011.safetensors",
336
+ "model.layers.21.mlp.gate_proj.weight": "model-00006-of-00011.safetensors",
337
+ "model.layers.21.mlp.up_proj.weight": "model-00006-of-00011.safetensors",
338
+ "model.layers.21.post_attention_layernorm.weight": "model-00006-of-00011.safetensors",
339
+ "model.layers.21.self_attn.a0": "model-00006-of-00011.safetensors",
340
+ "model.layers.21.self_attn.a1": "model-00006-of-00011.safetensors",
341
+ "model.layers.21.self_attn.a2": "model-00006-of-00011.safetensors",
342
+ "model.layers.21.self_attn.g1": "model-00006-of-00011.safetensors",
343
+ "model.layers.21.self_attn.g2": "model-00006-of-00011.safetensors",
344
+ "model.layers.21.self_attn.key.weight": "model-00006-of-00011.safetensors",
345
+ "model.layers.21.self_attn.output.weight": "model-00006-of-00011.safetensors",
346
+ "model.layers.21.self_attn.receptance.weight": "model-00006-of-00011.safetensors",
347
+ "model.layers.21.self_attn.value.weight": "model-00006-of-00011.safetensors",
348
+ "model.layers.21.self_attn.w0": "model-00006-of-00011.safetensors",
349
+ "model.layers.21.self_attn.w1": "model-00006-of-00011.safetensors",
350
+ "model.layers.21.self_attn.w2": "model-00006-of-00011.safetensors",
351
+ "model.layers.22.input_layernorm.weight": "model-00006-of-00011.safetensors",
352
+ "model.layers.22.mlp.down_proj.weight": "model-00006-of-00011.safetensors",
353
+ "model.layers.22.mlp.gate_proj.weight": "model-00006-of-00011.safetensors",
354
+ "model.layers.22.mlp.up_proj.weight": "model-00006-of-00011.safetensors",
355
+ "model.layers.22.post_attention_layernorm.weight": "model-00006-of-00011.safetensors",
356
+ "model.layers.22.self_attn.a0": "model-00006-of-00011.safetensors",
357
+ "model.layers.22.self_attn.a1": "model-00006-of-00011.safetensors",
358
+ "model.layers.22.self_attn.a2": "model-00006-of-00011.safetensors",
359
+ "model.layers.22.self_attn.g1": "model-00006-of-00011.safetensors",
360
+ "model.layers.22.self_attn.g2": "model-00006-of-00011.safetensors",
361
+ "model.layers.22.self_attn.key.weight": "model-00006-of-00011.safetensors",
362
+ "model.layers.22.self_attn.output.weight": "model-00006-of-00011.safetensors",
363
+ "model.layers.22.self_attn.receptance.weight": "model-00006-of-00011.safetensors",
364
+ "model.layers.22.self_attn.value.weight": "model-00006-of-00011.safetensors",
365
+ "model.layers.22.self_attn.w0": "model-00006-of-00011.safetensors",
366
+ "model.layers.22.self_attn.w1": "model-00006-of-00011.safetensors",
367
+ "model.layers.22.self_attn.w2": "model-00006-of-00011.safetensors",
368
+ "model.layers.23.input_layernorm.weight": "model-00006-of-00011.safetensors",
369
+ "model.layers.23.mlp.down_proj.weight": "model-00006-of-00011.safetensors",
370
+ "model.layers.23.mlp.gate_proj.weight": "model-00006-of-00011.safetensors",
371
+ "model.layers.23.mlp.up_proj.weight": "model-00006-of-00011.safetensors",
372
+ "model.layers.23.post_attention_layernorm.weight": "model-00006-of-00011.safetensors",
373
+ "model.layers.23.self_attn.a0": "model-00006-of-00011.safetensors",
374
+ "model.layers.23.self_attn.a1": "model-00006-of-00011.safetensors",
375
+ "model.layers.23.self_attn.a2": "model-00006-of-00011.safetensors",
376
+ "model.layers.23.self_attn.g1": "model-00006-of-00011.safetensors",
377
+ "model.layers.23.self_attn.g2": "model-00006-of-00011.safetensors",
378
+ "model.layers.23.self_attn.key.weight": "model-00006-of-00011.safetensors",
379
+ "model.layers.23.self_attn.output.weight": "model-00006-of-00011.safetensors",
380
+ "model.layers.23.self_attn.receptance.weight": "model-00006-of-00011.safetensors",
381
+ "model.layers.23.self_attn.value.weight": "model-00006-of-00011.safetensors",
382
+ "model.layers.23.self_attn.w0": "model-00006-of-00011.safetensors",
383
+ "model.layers.23.self_attn.w1": "model-00006-of-00011.safetensors",
384
+ "model.layers.23.self_attn.w2": "model-00006-of-00011.safetensors",
385
+ "model.layers.24.input_layernorm.weight": "model-00006-of-00011.safetensors",
386
+ "model.layers.24.mlp.down_proj.weight": "model-00006-of-00011.safetensors",
387
+ "model.layers.24.mlp.gate_proj.weight": "model-00006-of-00011.safetensors",
388
+ "model.layers.24.mlp.up_proj.weight": "model-00007-of-00011.safetensors",
389
+ "model.layers.24.post_attention_layernorm.weight": "model-00007-of-00011.safetensors",
390
+ "model.layers.24.self_attn.a0": "model-00007-of-00011.safetensors",
391
+ "model.layers.24.self_attn.a1": "model-00007-of-00011.safetensors",
392
+ "model.layers.24.self_attn.a2": "model-00007-of-00011.safetensors",
393
+ "model.layers.24.self_attn.g1": "model-00007-of-00011.safetensors",
394
+ "model.layers.24.self_attn.g2": "model-00007-of-00011.safetensors",
395
+ "model.layers.24.self_attn.key.weight": "model-00007-of-00011.safetensors",
396
+ "model.layers.24.self_attn.output.weight": "model-00007-of-00011.safetensors",
397
+ "model.layers.24.self_attn.receptance.weight": "model-00007-of-00011.safetensors",
398
+ "model.layers.24.self_attn.value.weight": "model-00007-of-00011.safetensors",
399
+ "model.layers.24.self_attn.w0": "model-00007-of-00011.safetensors",
400
+ "model.layers.24.self_attn.w1": "model-00007-of-00011.safetensors",
401
+ "model.layers.24.self_attn.w2": "model-00007-of-00011.safetensors",
402
+ "model.layers.25.input_layernorm.weight": "model-00007-of-00011.safetensors",
403
+ "model.layers.25.mlp.down_proj.weight": "model-00007-of-00011.safetensors",
404
+ "model.layers.25.mlp.gate_proj.weight": "model-00007-of-00011.safetensors",
405
+ "model.layers.25.mlp.up_proj.weight": "model-00007-of-00011.safetensors",
406
+ "model.layers.25.post_attention_layernorm.weight": "model-00007-of-00011.safetensors",
407
+ "model.layers.25.self_attn.k_proj.weight": "model-00007-of-00011.safetensors",
408
+ "model.layers.25.self_attn.o_proj.weight": "model-00007-of-00011.safetensors",
409
+ "model.layers.25.self_attn.q_proj.weight": "model-00007-of-00011.safetensors",
410
+ "model.layers.25.self_attn.v_proj.weight": "model-00007-of-00011.safetensors",
411
+ "model.layers.26.input_layernorm.weight": "model-00007-of-00011.safetensors",
412
+ "model.layers.26.mlp.down_proj.weight": "model-00007-of-00011.safetensors",
413
+ "model.layers.26.mlp.gate_proj.weight": "model-00007-of-00011.safetensors",
414
+ "model.layers.26.mlp.up_proj.weight": "model-00007-of-00011.safetensors",
415
+ "model.layers.26.post_attention_layernorm.weight": "model-00007-of-00011.safetensors",
416
+ "model.layers.26.self_attn.a0": "model-00007-of-00011.safetensors",
417
+ "model.layers.26.self_attn.a1": "model-00007-of-00011.safetensors",
418
+ "model.layers.26.self_attn.a2": "model-00007-of-00011.safetensors",
419
+ "model.layers.26.self_attn.g1": "model-00007-of-00011.safetensors",
420
+ "model.layers.26.self_attn.g2": "model-00007-of-00011.safetensors",
421
+ "model.layers.26.self_attn.key.weight": "model-00007-of-00011.safetensors",
422
+ "model.layers.26.self_attn.output.weight": "model-00007-of-00011.safetensors",
423
+ "model.layers.26.self_attn.receptance.weight": "model-00007-of-00011.safetensors",
424
+ "model.layers.26.self_attn.value.weight": "model-00007-of-00011.safetensors",
425
+ "model.layers.26.self_attn.w0": "model-00007-of-00011.safetensors",
426
+ "model.layers.26.self_attn.w1": "model-00007-of-00011.safetensors",
427
+ "model.layers.26.self_attn.w2": "model-00007-of-00011.safetensors",
428
+ "model.layers.27.input_layernorm.weight": "model-00007-of-00011.safetensors",
429
+ "model.layers.27.mlp.down_proj.weight": "model-00007-of-00011.safetensors",
430
+ "model.layers.27.mlp.gate_proj.weight": "model-00007-of-00011.safetensors",
431
+ "model.layers.27.mlp.up_proj.weight": "model-00007-of-00011.safetensors",
432
+ "model.layers.27.post_attention_layernorm.weight": "model-00007-of-00011.safetensors",
433
+ "model.layers.27.self_attn.a0": "model-00007-of-00011.safetensors",
434
+ "model.layers.27.self_attn.a1": "model-00007-of-00011.safetensors",
435
+ "model.layers.27.self_attn.a2": "model-00007-of-00011.safetensors",
436
+ "model.layers.27.self_attn.g1": "model-00007-of-00011.safetensors",
437
+ "model.layers.27.self_attn.g2": "model-00007-of-00011.safetensors",
438
+ "model.layers.27.self_attn.key.weight": "model-00007-of-00011.safetensors",
439
+ "model.layers.27.self_attn.output.weight": "model-00007-of-00011.safetensors",
440
+ "model.layers.27.self_attn.receptance.weight": "model-00007-of-00011.safetensors",
441
+ "model.layers.27.self_attn.value.weight": "model-00007-of-00011.safetensors",
442
+ "model.layers.27.self_attn.w0": "model-00007-of-00011.safetensors",
443
+ "model.layers.27.self_attn.w1": "model-00007-of-00011.safetensors",
444
+ "model.layers.27.self_attn.w2": "model-00007-of-00011.safetensors",
445
+ "model.layers.28.input_layernorm.weight": "model-00007-of-00011.safetensors",
446
+ "model.layers.28.mlp.down_proj.weight": "model-00007-of-00011.safetensors",
447
+ "model.layers.28.mlp.gate_proj.weight": "model-00007-of-00011.safetensors",
448
+ "model.layers.28.mlp.up_proj.weight": "model-00007-of-00011.safetensors",
449
+ "model.layers.28.post_attention_layernorm.weight": "model-00007-of-00011.safetensors",
450
+ "model.layers.28.self_attn.a0": "model-00007-of-00011.safetensors",
451
+ "model.layers.28.self_attn.a1": "model-00007-of-00011.safetensors",
452
+ "model.layers.28.self_attn.a2": "model-00007-of-00011.safetensors",
453
+ "model.layers.28.self_attn.g1": "model-00007-of-00011.safetensors",
454
+ "model.layers.28.self_attn.g2": "model-00007-of-00011.safetensors",
455
+ "model.layers.28.self_attn.key.weight": "model-00007-of-00011.safetensors",
456
+ "model.layers.28.self_attn.output.weight": "model-00007-of-00011.safetensors",
457
+ "model.layers.28.self_attn.receptance.weight": "model-00007-of-00011.safetensors",
458
+ "model.layers.28.self_attn.value.weight": "model-00007-of-00011.safetensors",
459
+ "model.layers.28.self_attn.w0": "model-00007-of-00011.safetensors",
460
+ "model.layers.28.self_attn.w1": "model-00007-of-00011.safetensors",
461
+ "model.layers.28.self_attn.w2": "model-00007-of-00011.safetensors",
462
+ "model.layers.29.input_layernorm.weight": "model-00007-of-00011.safetensors",
463
+ "model.layers.29.mlp.down_proj.weight": "model-00008-of-00011.safetensors",
464
+ "model.layers.29.mlp.gate_proj.weight": "model-00008-of-00011.safetensors",
465
+ "model.layers.29.mlp.up_proj.weight": "model-00008-of-00011.safetensors",
466
+ "model.layers.29.post_attention_layernorm.weight": "model-00008-of-00011.safetensors",
467
+ "model.layers.29.self_attn.a0": "model-00008-of-00011.safetensors",
468
+ "model.layers.29.self_attn.a1": "model-00008-of-00011.safetensors",
469
+ "model.layers.29.self_attn.a2": "model-00008-of-00011.safetensors",
470
+ "model.layers.29.self_attn.g1": "model-00008-of-00011.safetensors",
471
+ "model.layers.29.self_attn.g2": "model-00008-of-00011.safetensors",
472
+ "model.layers.29.self_attn.key.weight": "model-00008-of-00011.safetensors",
473
+ "model.layers.29.self_attn.output.weight": "model-00008-of-00011.safetensors",
474
+ "model.layers.29.self_attn.receptance.weight": "model-00008-of-00011.safetensors",
475
+ "model.layers.29.self_attn.value.weight": "model-00008-of-00011.safetensors",
476
+ "model.layers.29.self_attn.w0": "model-00008-of-00011.safetensors",
477
+ "model.layers.29.self_attn.w1": "model-00008-of-00011.safetensors",
478
+ "model.layers.29.self_attn.w2": "model-00008-of-00011.safetensors",
479
+ "model.layers.30.input_layernorm.weight": "model-00008-of-00011.safetensors",
480
+ "model.layers.30.mlp.down_proj.weight": "model-00008-of-00011.safetensors",
481
+ "model.layers.30.mlp.gate_proj.weight": "model-00008-of-00011.safetensors",
482
+ "model.layers.30.mlp.up_proj.weight": "model-00008-of-00011.safetensors",
483
+ "model.layers.30.post_attention_layernorm.weight": "model-00008-of-00011.safetensors",
484
+ "model.layers.30.self_attn.k_proj.weight": "model-00008-of-00011.safetensors",
485
+ "model.layers.30.self_attn.o_proj.weight": "model-00008-of-00011.safetensors",
486
+ "model.layers.30.self_attn.q_proj.weight": "model-00008-of-00011.safetensors",
487
+ "model.layers.30.self_attn.v_proj.weight": "model-00008-of-00011.safetensors",
488
+ "model.layers.31.input_layernorm.weight": "model-00008-of-00011.safetensors",
489
+ "model.layers.31.mlp.down_proj.weight": "model-00008-of-00011.safetensors",
490
+ "model.layers.31.mlp.gate_proj.weight": "model-00008-of-00011.safetensors",
491
+ "model.layers.31.mlp.up_proj.weight": "model-00008-of-00011.safetensors",
492
+ "model.layers.31.post_attention_layernorm.weight": "model-00008-of-00011.safetensors",
493
+ "model.layers.31.self_attn.a0": "model-00008-of-00011.safetensors",
494
+ "model.layers.31.self_attn.a1": "model-00008-of-00011.safetensors",
495
+ "model.layers.31.self_attn.a2": "model-00008-of-00011.safetensors",
496
+ "model.layers.31.self_attn.g1": "model-00008-of-00011.safetensors",
497
+ "model.layers.31.self_attn.g2": "model-00008-of-00011.safetensors",
498
+ "model.layers.31.self_attn.key.weight": "model-00008-of-00011.safetensors",
499
+ "model.layers.31.self_attn.output.weight": "model-00008-of-00011.safetensors",
500
+ "model.layers.31.self_attn.receptance.weight": "model-00008-of-00011.safetensors",
501
+ "model.layers.31.self_attn.value.weight": "model-00008-of-00011.safetensors",
502
+ "model.layers.31.self_attn.w0": "model-00008-of-00011.safetensors",
503
+ "model.layers.31.self_attn.w1": "model-00008-of-00011.safetensors",
504
+ "model.layers.31.self_attn.w2": "model-00008-of-00011.safetensors",
505
+ "model.layers.32.input_layernorm.weight": "model-00008-of-00011.safetensors",
506
+ "model.layers.32.mlp.down_proj.weight": "model-00008-of-00011.safetensors",
507
+ "model.layers.32.mlp.gate_proj.weight": "model-00008-of-00011.safetensors",
508
+ "model.layers.32.mlp.up_proj.weight": "model-00008-of-00011.safetensors",
509
+ "model.layers.32.post_attention_layernorm.weight": "model-00008-of-00011.safetensors",
510
+ "model.layers.32.self_attn.a0": "model-00008-of-00011.safetensors",
511
+ "model.layers.32.self_attn.a1": "model-00008-of-00011.safetensors",
512
+ "model.layers.32.self_attn.a2": "model-00008-of-00011.safetensors",
513
+ "model.layers.32.self_attn.g1": "model-00008-of-00011.safetensors",
514
+ "model.layers.32.self_attn.g2": "model-00008-of-00011.safetensors",
515
+ "model.layers.32.self_attn.key.weight": "model-00008-of-00011.safetensors",
516
+ "model.layers.32.self_attn.output.weight": "model-00008-of-00011.safetensors",
517
+ "model.layers.32.self_attn.receptance.weight": "model-00008-of-00011.safetensors",
518
+ "model.layers.32.self_attn.value.weight": "model-00008-of-00011.safetensors",
519
+ "model.layers.32.self_attn.w0": "model-00008-of-00011.safetensors",
520
+ "model.layers.32.self_attn.w1": "model-00008-of-00011.safetensors",
521
+ "model.layers.32.self_attn.w2": "model-00008-of-00011.safetensors",
522
+ "model.layers.33.input_layernorm.weight": "model-00008-of-00011.safetensors",
523
+ "model.layers.33.mlp.down_proj.weight": "model-00008-of-00011.safetensors",
524
+ "model.layers.33.mlp.gate_proj.weight": "model-00008-of-00011.safetensors",
525
+ "model.layers.33.mlp.up_proj.weight": "model-00009-of-00011.safetensors",
526
+ "model.layers.33.post_attention_layernorm.weight": "model-00009-of-00011.safetensors",
527
+ "model.layers.33.self_attn.a0": "model-00009-of-00011.safetensors",
528
+ "model.layers.33.self_attn.a1": "model-00009-of-00011.safetensors",
529
+ "model.layers.33.self_attn.a2": "model-00009-of-00011.safetensors",
530
+ "model.layers.33.self_attn.g1": "model-00009-of-00011.safetensors",
531
+ "model.layers.33.self_attn.g2": "model-00009-of-00011.safetensors",
532
+ "model.layers.33.self_attn.key.weight": "model-00009-of-00011.safetensors",
533
+ "model.layers.33.self_attn.output.weight": "model-00009-of-00011.safetensors",
534
+ "model.layers.33.self_attn.receptance.weight": "model-00009-of-00011.safetensors",
535
+ "model.layers.33.self_attn.value.weight": "model-00009-of-00011.safetensors",
536
+ "model.layers.33.self_attn.w0": "model-00009-of-00011.safetensors",
537
+ "model.layers.33.self_attn.w1": "model-00009-of-00011.safetensors",
538
+ "model.layers.33.self_attn.w2": "model-00009-of-00011.safetensors",
539
+ "model.layers.34.input_layernorm.weight": "model-00009-of-00011.safetensors",
540
+ "model.layers.34.mlp.down_proj.weight": "model-00009-of-00011.safetensors",
541
+ "model.layers.34.mlp.gate_proj.weight": "model-00009-of-00011.safetensors",
542
+ "model.layers.34.mlp.up_proj.weight": "model-00009-of-00011.safetensors",
543
+ "model.layers.34.post_attention_layernorm.weight": "model-00009-of-00011.safetensors",
544
+ "model.layers.34.self_attn.a0": "model-00009-of-00011.safetensors",
545
+ "model.layers.34.self_attn.a1": "model-00009-of-00011.safetensors",
546
+ "model.layers.34.self_attn.a2": "model-00009-of-00011.safetensors",
547
+ "model.layers.34.self_attn.g1": "model-00009-of-00011.safetensors",
548
+ "model.layers.34.self_attn.g2": "model-00009-of-00011.safetensors",
549
+ "model.layers.34.self_attn.key.weight": "model-00009-of-00011.safetensors",
550
+ "model.layers.34.self_attn.output.weight": "model-00009-of-00011.safetensors",
551
+ "model.layers.34.self_attn.receptance.weight": "model-00009-of-00011.safetensors",
552
+ "model.layers.34.self_attn.value.weight": "model-00009-of-00011.safetensors",
553
+ "model.layers.34.self_attn.w0": "model-00009-of-00011.safetensors",
554
+ "model.layers.34.self_attn.w1": "model-00009-of-00011.safetensors",
555
+ "model.layers.34.self_attn.w2": "model-00009-of-00011.safetensors",
556
+ "model.layers.35.input_layernorm.weight": "model-00009-of-00011.safetensors",
557
+ "model.layers.35.mlp.down_proj.weight": "model-00009-of-00011.safetensors",
558
+ "model.layers.35.mlp.gate_proj.weight": "model-00009-of-00011.safetensors",
559
+ "model.layers.35.mlp.up_proj.weight": "model-00009-of-00011.safetensors",
560
+ "model.layers.35.post_attention_layernorm.weight": "model-00009-of-00011.safetensors",
561
+ "model.layers.35.self_attn.k_proj.weight": "model-00009-of-00011.safetensors",
562
+ "model.layers.35.self_attn.o_proj.weight": "model-00009-of-00011.safetensors",
563
+ "model.layers.35.self_attn.q_proj.weight": "model-00009-of-00011.safetensors",
564
+ "model.layers.35.self_attn.v_proj.weight": "model-00009-of-00011.safetensors",
565
+ "model.layers.36.input_layernorm.weight": "model-00009-of-00011.safetensors",
566
+ "model.layers.36.mlp.down_proj.weight": "model-00009-of-00011.safetensors",
567
+ "model.layers.36.mlp.gate_proj.weight": "model-00009-of-00011.safetensors",
568
+ "model.layers.36.mlp.up_proj.weight": "model-00009-of-00011.safetensors",
569
+ "model.layers.36.post_attention_layernorm.weight": "model-00009-of-00011.safetensors",
570
+ "model.layers.36.self_attn.a0": "model-00009-of-00011.safetensors",
571
+ "model.layers.36.self_attn.a1": "model-00009-of-00011.safetensors",
572
+ "model.layers.36.self_attn.a2": "model-00009-of-00011.safetensors",
573
+ "model.layers.36.self_attn.g1": "model-00009-of-00011.safetensors",
574
+ "model.layers.36.self_attn.g2": "model-00009-of-00011.safetensors",
575
+ "model.layers.36.self_attn.key.weight": "model-00009-of-00011.safetensors",
576
+ "model.layers.36.self_attn.output.weight": "model-00009-of-00011.safetensors",
577
+ "model.layers.36.self_attn.receptance.weight": "model-00009-of-00011.safetensors",
578
+ "model.layers.36.self_attn.value.weight": "model-00009-of-00011.safetensors",
579
+ "model.layers.36.self_attn.w0": "model-00009-of-00011.safetensors",
580
+ "model.layers.36.self_attn.w1": "model-00009-of-00011.safetensors",
581
+ "model.layers.36.self_attn.w2": "model-00009-of-00011.safetensors",
582
+ "model.layers.37.input_layernorm.weight": "model-00009-of-00011.safetensors",
583
+ "model.layers.37.mlp.down_proj.weight": "model-00009-of-00011.safetensors",
584
+ "model.layers.37.mlp.gate_proj.weight": "model-00009-of-00011.safetensors",
585
+ "model.layers.37.mlp.up_proj.weight": "model-00009-of-00011.safetensors",
586
+ "model.layers.37.post_attention_layernorm.weight": "model-00009-of-00011.safetensors",
587
+ "model.layers.37.self_attn.a0": "model-00009-of-00011.safetensors",
588
+ "model.layers.37.self_attn.a1": "model-00009-of-00011.safetensors",
589
+ "model.layers.37.self_attn.a2": "model-00009-of-00011.safetensors",
590
+ "model.layers.37.self_attn.g1": "model-00009-of-00011.safetensors",
591
+ "model.layers.37.self_attn.g2": "model-00009-of-00011.safetensors",
592
+ "model.layers.37.self_attn.key.weight": "model-00009-of-00011.safetensors",
593
+ "model.layers.37.self_attn.output.weight": "model-00009-of-00011.safetensors",
594
+ "model.layers.37.self_attn.receptance.weight": "model-00009-of-00011.safetensors",
595
+ "model.layers.37.self_attn.value.weight": "model-00009-of-00011.safetensors",
596
+ "model.layers.37.self_attn.w0": "model-00009-of-00011.safetensors",
597
+ "model.layers.37.self_attn.w1": "model-00009-of-00011.safetensors",
598
+ "model.layers.37.self_attn.w2": "model-00009-of-00011.safetensors",
599
+ "model.layers.38.input_layernorm.weight": "model-00009-of-00011.safetensors",
600
+ "model.layers.38.mlp.down_proj.weight": "model-00010-of-00011.safetensors",
601
+ "model.layers.38.mlp.gate_proj.weight": "model-00010-of-00011.safetensors",
602
+ "model.layers.38.mlp.up_proj.weight": "model-00010-of-00011.safetensors",
603
+ "model.layers.38.post_attention_layernorm.weight": "model-00010-of-00011.safetensors",
604
+ "model.layers.38.self_attn.a0": "model-00010-of-00011.safetensors",
605
+ "model.layers.38.self_attn.a1": "model-00010-of-00011.safetensors",
606
+ "model.layers.38.self_attn.a2": "model-00010-of-00011.safetensors",
607
+ "model.layers.38.self_attn.g1": "model-00010-of-00011.safetensors",
608
+ "model.layers.38.self_attn.g2": "model-00010-of-00011.safetensors",
609
+ "model.layers.38.self_attn.key.weight": "model-00010-of-00011.safetensors",
610
+ "model.layers.38.self_attn.output.weight": "model-00010-of-00011.safetensors",
611
+ "model.layers.38.self_attn.receptance.weight": "model-00010-of-00011.safetensors",
612
+ "model.layers.38.self_attn.value.weight": "model-00010-of-00011.safetensors",
613
+ "model.layers.38.self_attn.w0": "model-00010-of-00011.safetensors",
614
+ "model.layers.38.self_attn.w1": "model-00010-of-00011.safetensors",
615
+ "model.layers.38.self_attn.w2": "model-00010-of-00011.safetensors",
616
+ "model.layers.39.input_layernorm.weight": "model-00010-of-00011.safetensors",
617
+ "model.layers.39.mlp.down_proj.weight": "model-00010-of-00011.safetensors",
618
+ "model.layers.39.mlp.gate_proj.weight": "model-00010-of-00011.safetensors",
619
+ "model.layers.39.mlp.up_proj.weight": "model-00010-of-00011.safetensors",
620
+ "model.layers.39.post_attention_layernorm.weight": "model-00010-of-00011.safetensors",
621
+ "model.layers.39.self_attn.k_proj.weight": "model-00010-of-00011.safetensors",
622
+ "model.layers.39.self_attn.o_proj.weight": "model-00010-of-00011.safetensors",
623
+ "model.layers.39.self_attn.q_proj.weight": "model-00010-of-00011.safetensors",
624
+ "model.layers.39.self_attn.v_proj.weight": "model-00010-of-00011.safetensors",
625
+ "model.layers.40.input_layernorm.weight": "model-00010-of-00011.safetensors",
626
+ "model.layers.40.mlp.down_proj.weight": "model-00010-of-00011.safetensors",
627
+ "model.layers.40.mlp.gate_proj.weight": "model-00010-of-00011.safetensors",
628
+ "model.layers.40.mlp.up_proj.weight": "model-00010-of-00011.safetensors",
629
+ "model.layers.40.post_attention_layernorm.weight": "model-00010-of-00011.safetensors",
630
+ "model.layers.40.self_attn.a0": "model-00010-of-00011.safetensors",
631
+ "model.layers.40.self_attn.a1": "model-00010-of-00011.safetensors",
632
+ "model.layers.40.self_attn.a2": "model-00010-of-00011.safetensors",
633
+ "model.layers.40.self_attn.g1": "model-00010-of-00011.safetensors",
634
+ "model.layers.40.self_attn.g2": "model-00010-of-00011.safetensors",
635
+ "model.layers.40.self_attn.key.weight": "model-00010-of-00011.safetensors",
636
+ "model.layers.40.self_attn.output.weight": "model-00010-of-00011.safetensors",
637
+ "model.layers.40.self_attn.receptance.weight": "model-00010-of-00011.safetensors",
638
+ "model.layers.40.self_attn.value.weight": "model-00010-of-00011.safetensors",
639
+ "model.layers.40.self_attn.w0": "model-00010-of-00011.safetensors",
640
+ "model.layers.40.self_attn.w1": "model-00010-of-00011.safetensors",
641
+ "model.layers.40.self_attn.w2": "model-00010-of-00011.safetensors",
642
+ "model.layers.41.input_layernorm.weight": "model-00010-of-00011.safetensors",
643
+ "model.layers.41.mlp.down_proj.weight": "model-00010-of-00011.safetensors",
644
+ "model.layers.41.mlp.gate_proj.weight": "model-00010-of-00011.safetensors",
645
+ "model.layers.41.mlp.up_proj.weight": "model-00010-of-00011.safetensors",
646
+ "model.layers.41.post_attention_layernorm.weight": "model-00010-of-00011.safetensors",
647
+ "model.layers.41.self_attn.a0": "model-00010-of-00011.safetensors",
648
+ "model.layers.41.self_attn.a1": "model-00010-of-00011.safetensors",
649
+ "model.layers.41.self_attn.a2": "model-00010-of-00011.safetensors",
650
+ "model.layers.41.self_attn.g1": "model-00010-of-00011.safetensors",
651
+ "model.layers.41.self_attn.g2": "model-00010-of-00011.safetensors",
652
+ "model.layers.41.self_attn.key.weight": "model-00010-of-00011.safetensors",
653
+ "model.layers.41.self_attn.output.weight": "model-00010-of-00011.safetensors",
654
+ "model.layers.41.self_attn.receptance.weight": "model-00010-of-00011.safetensors",
655
+ "model.layers.41.self_attn.value.weight": "model-00010-of-00011.safetensors",
656
+ "model.layers.41.self_attn.w0": "model-00010-of-00011.safetensors",
657
+ "model.layers.41.self_attn.w1": "model-00010-of-00011.safetensors",
658
+ "model.layers.41.self_attn.w2": "model-00010-of-00011.safetensors",
659
+ "model.layers.42.input_layernorm.weight": "model-00010-of-00011.safetensors",
660
+ "model.layers.42.mlp.down_proj.weight": "model-00010-of-00011.safetensors",
661
+ "model.layers.42.mlp.gate_proj.weight": "model-00010-of-00011.safetensors",
662
+ "model.layers.42.mlp.up_proj.weight": "model-00011-of-00011.safetensors",
663
+ "model.layers.42.post_attention_layernorm.weight": "model-00011-of-00011.safetensors",
664
+ "model.layers.42.self_attn.a0": "model-00011-of-00011.safetensors",
665
+ "model.layers.42.self_attn.a1": "model-00011-of-00011.safetensors",
666
+ "model.layers.42.self_attn.a2": "model-00011-of-00011.safetensors",
667
+ "model.layers.42.self_attn.g1": "model-00011-of-00011.safetensors",
668
+ "model.layers.42.self_attn.g2": "model-00011-of-00011.safetensors",
669
+ "model.layers.42.self_attn.key.weight": "model-00011-of-00011.safetensors",
670
+ "model.layers.42.self_attn.output.weight": "model-00011-of-00011.safetensors",
671
+ "model.layers.42.self_attn.receptance.weight": "model-00011-of-00011.safetensors",
672
+ "model.layers.42.self_attn.value.weight": "model-00011-of-00011.safetensors",
673
+ "model.layers.42.self_attn.w0": "model-00011-of-00011.safetensors",
674
+ "model.layers.42.self_attn.w1": "model-00011-of-00011.safetensors",
675
+ "model.layers.42.self_attn.w2": "model-00011-of-00011.safetensors",
676
+ "model.layers.43.input_layernorm.weight": "model-00011-of-00011.safetensors",
677
+ "model.layers.43.mlp.down_proj.weight": "model-00011-of-00011.safetensors",
678
+ "model.layers.43.mlp.gate_proj.weight": "model-00011-of-00011.safetensors",
679
+ "model.layers.43.mlp.up_proj.weight": "model-00011-of-00011.safetensors",
680
+ "model.layers.43.post_attention_layernorm.weight": "model-00011-of-00011.safetensors",
681
+ "model.layers.43.self_attn.k_proj.weight": "model-00011-of-00011.safetensors",
682
+ "model.layers.43.self_attn.o_proj.weight": "model-00011-of-00011.safetensors",
683
+ "model.layers.43.self_attn.q_proj.weight": "model-00011-of-00011.safetensors",
684
+ "model.layers.43.self_attn.v_proj.weight": "model-00011-of-00011.safetensors",
685
+ "model.norm.weight": "model-00011-of-00011.safetensors"
686
+ }
687
+ }
config.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "RWKV07AQwen3ForCausalLM"
4
+ ],
5
+ "auto_map": {
6
+ "AutoConfig": "configuration_rwkv07aqwen3.RWKV07AQwen3Config",
7
+ "AutoModelForCausalLM": "modeling_rwkv07aqwen3.RWKV07AQwen3ForCausalLM"
8
+ },
9
+ "description": "Hybrid-RWKV Strategically Interleaved RWKV-Attention",
10
+ "base_model": "ByteDance-Seed/Seed-OSS-36B-Instruct",
11
+ "model_revision": "alpha",
12
+ "transformer_layers":[3,8,14,20,25,30,35,39,43],
13
+ "rwkv_layers": [0,1,2,4,5,6,7,9,10,11,12,13,15,16,17,18,19,21,22,23,24,26,27,28,29,31,32,33,34,36,37,38,40,41,42],
14
+ "rwkv_architecture": "hxa07a",
15
+ "enable_qk_norm": false,
16
+ "nope_in_transformer": true,
17
+ "nope_in_rwkv": false,
18
+ "lora_rank_decay": 320,
19
+ "lora_rank_iclr":96,
20
+ "lora_rank_gate":320,
21
+ "use_rope":true,
22
+
23
+ "attention_bias": false,
24
+ "attention_out_bias": false,
25
+ "attention_dropout": 0.0,
26
+ "bos_token_id": 100257,
27
+ "classifier_dropout": 0.0,
28
+ "eos_token_id": 100257,
29
+ "head_dim": 96,
30
+ "hidden_act": "silu",
31
+ "hidden_size": 6144,
32
+ "id2label": {
33
+ "0": "LABEL_0"
34
+ },
35
+ "initializer_range": 0.006,
36
+ "intermediate_size": 19648,
37
+ "label2id": {
38
+ "LABEL_0": 0
39
+ },
40
+ "max_position_embeddings": 98304,
41
+ "mlp_bias": false,
42
+ "model_type": "rwkv07aqwen3",
43
+ "num_attention_heads": 64,
44
+ "num_hidden_layers": 44,
45
+ "num_key_value_heads": 8,
46
+ "pretraining_tp": 1,
47
+ "rms_norm_eps": 1e-05,
48
+ "rope_scaling": null,
49
+ "rope_theta": 8000000,
50
+ "tie_word_embeddings": false,
51
+ "torch_dtype": "bfloat16",
52
+ "transformers_version": "4.50.3",
53
+ "use_cache": true,
54
+ "vocab_size": 100352
55
+ }
config_old.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "RWKV07AQwen3ForCausalLM"
4
+ ],
5
+ "auto_map": {
6
+ "AutoConfig": "configuration_rwkv07aqwen3.RWKV07AQwen3Config",
7
+ "AutoModelForCausalLM": "modeling_rwkv07aqwen3.RWKV07AQwen3ForCausalLM"
8
+ },
9
+ "description": "Hybrid-RWKV Strategically Interleaved RWKV-Attention",
10
+ "base_model": "ByteDance-Seed/Seed-OSS-36B-Instruct",
11
+ "model_revision": "alpha",
12
+ "transformer_layers":[3,7,11,15,19,23,27,31,35],
13
+ "rwkv_layers": [0,1,2,4,5,6,8,9,10,12,13,14,16,17,18,20,21,22,24,25,26,28,29,30,32,33,34],
14
+ "rwkv_architecture": "hxa07a",
15
+ "enable_qk_norm": true,
16
+ "nope_in_transformer": true,
17
+ "nope_in_rwkv": false,
18
+ "lora_rank_decay": 256,
19
+ "lora_rank_iclr":96,
20
+ "lora_rank_gate":256,
21
+ "use_rope":true,
22
+
23
+
24
+ "attention_bias": false,
25
+ "attention_out_bias": false,
26
+ "attention_dropout": 0.0,
27
+ "bos_token_id": 151643,
28
+ "eos_token_id": 151645,
29
+ "head_dim": 128,
30
+ "hidden_act": "silu",
31
+ "hidden_size": 4096,
32
+ "initializer_range": 0.02,
33
+ "intermediate_size": 12288,
34
+ "max_position_embeddings": 131072,
35
+ "max_window_layers": 36,
36
+ "model_type": "rwkv07aqwen3",
37
+ "num_attention_heads": 32,
38
+ "num_hidden_layers": 36,
39
+ "num_key_value_heads": 8,
40
+ "rms_norm_eps": 1e-06,
41
+ "rope_scaling": null,
42
+ "rope_theta": 5000000,
43
+ "sliding_window": null,
44
+ "tie_word_embeddings": false,
45
+ "torch_dtype": "bfloat16",
46
+ "transformers_version": "4.51.0",
47
+ "use_cache": true,
48
+ "use_sliding_window": false,
49
+ "vocab_size": 151936
50
+ }
configuration_rwkv07aqwen3.py ADDED
@@ -0,0 +1,238 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2024 The Qwen team, Alibaba Group and the HuggingFace Inc. team. All rights reserved.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ """RWKV07AQwen3 model configuration"""
16
+
17
+ from transformers.configuration_utils import PretrainedConfig, layer_type_validation
18
+ from transformers.modeling_rope_utils import rope_config_validation
19
+ from transformers.utils import logging
20
+
21
+
22
+ logger = logging.get_logger(__name__)
23
+
24
+
25
+ class RWKV07AQwen3Config(PretrainedConfig):
26
+ r"""
27
+ This is the configuration class to store the configuration of a [`RWKV07AQwen3Model`]. It is used to instantiate a
28
+ RWKV07AQwen3 model according to the specified arguments, defining the model architecture. Instantiating a configuration
29
+ with the defaults will yield a similar configuration to that of
30
+ Qwen3-7B-beta [Qwen/Qwen3-7B-beta](https://huggingface.co/Qwen/Qwen3-7B-beta).
31
+
32
+ Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
33
+ documentation from [`PretrainedConfig`] for more information.
34
+
35
+
36
+ Args:
37
+ vocab_size (`int`, *optional*, defaults to 151936):
38
+ Vocabulary size of the RWKV07AQwen3 model. Defines the number of different tokens that can be represented by the
39
+ `inputs_ids` passed when calling [`RWKV07AQwen3Model`]
40
+ hidden_size (`int`, *optional*, defaults to 4096):
41
+ Dimension of the hidden representations.
42
+ intermediate_size (`int`, *optional*, defaults to 22016):
43
+ Dimension of the MLP representations.
44
+ num_hidden_layers (`int`, *optional*, defaults to 32):
45
+ Number of hidden layers in the Transformer encoder.
46
+ num_attention_heads (`int`, *optional*, defaults to 32):
47
+ Number of attention heads for each attention layer in the Transformer encoder.
48
+ num_key_value_heads (`int`, *optional*, defaults to 32):
49
+ This is the number of key_value heads that should be used to implement Grouped Query Attention. If
50
+ `num_key_value_heads=num_attention_heads`, the model will use Multi Head Attention (MHA), if
51
+ `num_key_value_heads=1` the model will use Multi Query Attention (MQA) otherwise GQA is used. When
52
+ converting a multi-head checkpoint to a GQA checkpoint, each group key and value head should be constructed
53
+ by meanpooling all the original heads within that group. For more details checkout [this
54
+ paper](https://arxiv.org/pdf/2305.13245.pdf). If it is not specified, will default to `32`.
55
+ lora_rank_decay (`int`, *optional*):
56
+ The rank of the lora used to generate decay.
57
+ lora_rank_iclr (`int`, *optional*):
58
+ The rank of the lora used to generate the in-context learning rate.
59
+ lora_rank_value_residual_mix (`int`, *optional*):
60
+ The rank of the lora used to generate the value residual mix amount.
61
+ lora_rank_value_gate (`int`, *optional*):
62
+ The rank of the lora used to generate the gate.
63
+ hidden_act (`str` or `function`, *optional*, defaults to `"silu"`):
64
+ The non-linear activation function (function or string) in the decoder.
65
+ max_position_embeddings (`int`, *optional*, defaults to 32768):
66
+ The maximum sequence length that this model might ever be used with.
67
+ initializer_range (`float`, *optional*, defaults to 0.02):
68
+ The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
69
+ rms_norm_eps (`float`, *optional*, defaults to 1e-06):
70
+ The epsilon used by the rms normalization layers.
71
+ use_cache (`bool`, *optional*, defaults to `True`):
72
+ Whether or not the model should return the last key/values attentions (not used by all models). Only
73
+ relevant if `config.is_decoder=True`.
74
+ tie_word_embeddings (`bool`, *optional*, defaults to `False`):
75
+ Whether the model's input and output word embeddings should be tied.
76
+ rope_theta (`float`, *optional*, defaults to 10000.0):
77
+ The base period of the RoPE embeddings.
78
+ rope_scaling (`Dict`, *optional*):
79
+ Dictionary containing the scaling configuration for the RoPE embeddings. NOTE: if you apply new rope type
80
+ and you expect the model to work on longer `max_position_embeddings`, we recommend you to update this value
81
+ accordingly.
82
+ Expected contents:
83
+ `rope_type` (`str`):
84
+ The sub-variant of RoPE to use. Can be one of ['default', 'linear', 'dynamic', 'yarn', 'longrope',
85
+ 'llama3'], with 'default' being the original RoPE implementation.
86
+ `factor` (`float`, *optional*):
87
+ Used with all rope types except 'default'. The scaling factor to apply to the RoPE embeddings. In
88
+ most scaling types, a `factor` of x will enable the model to handle sequences of length x *
89
+ original maximum pre-trained length.
90
+ `original_max_position_embeddings` (`int`, *optional*):
91
+ Used with 'dynamic', 'longrope' and 'llama3'. The original max position embeddings used during
92
+ pretraining.
93
+ `attention_factor` (`float`, *optional*):
94
+ Used with 'yarn' and 'longrope'. The scaling factor to be applied on the attention
95
+ computation. If unspecified, it defaults to value recommended by the implementation, using the
96
+ `factor` field to infer the suggested value.
97
+ `beta_fast` (`float`, *optional*):
98
+ Only used with 'yarn'. Parameter to set the boundary for extrapolation (only) in the linear
99
+ ramp function. If unspecified, it defaults to 32.
100
+ `beta_slow` (`float`, *optional*):
101
+ Only used with 'yarn'. Parameter to set the boundary for interpolation (only) in the linear
102
+ ramp function. If unspecified, it defaults to 1.
103
+ `short_factor` (`List[float]`, *optional*):
104
+ Only used with 'longrope'. The scaling factor to be applied to short contexts (<
105
+ `original_max_position_embeddings`). Must be a list of numbers with the same length as the hidden
106
+ size divided by the number of attention heads divided by 2
107
+ `long_factor` (`List[float]`, *optional*):
108
+ Only used with 'longrope'. The scaling factor to be applied to long contexts (<
109
+ `original_max_position_embeddings`). Must be a list of numbers with the same length as the hidden
110
+ size divided by the number of attention heads divided by 2
111
+ `low_freq_factor` (`float`, *optional*):
112
+ Only used with 'llama3'. Scaling factor applied to low frequency components of the RoPE
113
+ `high_freq_factor` (`float`, *optional*):
114
+ Only used with 'llama3'. Scaling factor applied to high frequency components of the RoPE
115
+ use_sliding_window (`bool`, *optional*, defaults to `False`):
116
+ Whether to use sliding window attention.
117
+ sliding_window (`int`, *optional*, defaults to 4096):
118
+ Sliding window attention (SWA) window size. If not specified, will default to `4096`.
119
+ max_window_layers (`int`, *optional*, defaults to 28):
120
+ The number of layers that use SWA (Sliding Window Attention). The bottom layers use SWA while the top use full attention.
121
+ attention_dropout (`float`, *optional*, defaults to 0.0):
122
+ The dropout ratio for the attention probabilities.
123
+
124
+ ```python
125
+ >>> from transformers import RWKV07AQwen3Model, RWKV07AQwen3Config
126
+
127
+ >>> # Initializing a RWKV07AQwen3 style configuration
128
+ >>> configuration = RWKV07AQwen3Config()
129
+
130
+ >>> # Initializing a model from the RWKV07AQwen3-7B style configuration
131
+ >>> model = RWKV07AQwen3Model(configuration)
132
+
133
+ >>> # Accessing the model configuration
134
+ >>> configuration = model.config
135
+ ```"""
136
+
137
+ model_type = "rwkv07aqwen3"
138
+ keys_to_ignore_at_inference = ["past_key_values"]
139
+
140
+ def __init__(
141
+ self,
142
+ vocab_size=151936,
143
+ hidden_size=4096,
144
+ intermediate_size=22016,
145
+ num_hidden_layers=32,
146
+ num_attention_heads=32,
147
+ num_key_value_heads=32,
148
+ lora_rank_tokenshift=None,
149
+ lora_rank_decay=None,
150
+ lora_rank_iclr=None,
151
+ lora_rank_value_residual_mix=None,
152
+ lora_rank_value_key_mix=None,
153
+ lora_rank_gate=None,
154
+ hidden_act="silu",
155
+ max_position_embeddings=32768,
156
+ initializer_range=0.02,
157
+ rms_norm_eps=1e-6,
158
+ use_cache=True,
159
+ tie_word_embeddings=False,
160
+ use_rope=True,
161
+ rope_theta=10000.0,
162
+ rope_scaling=None,
163
+ use_sliding_window=False,
164
+ sliding_window=4096,
165
+ max_window_layers=28,
166
+ first_attention_layer=9999,
167
+ first_post_attention_layer=9999,
168
+ attention_striping=1,
169
+ last_striping_layer=99999,
170
+ layer_types=None,
171
+ attention_dropout=0.0,
172
+ attention_bias=True,
173
+ attention_output_bias=False,
174
+ gate_rank_type=2,
175
+ balance_state=True,
176
+ groupnorm_att=False,
177
+ use_tokenshift=False,
178
+ **kwargs,
179
+ ):
180
+ self.vocab_size = vocab_size
181
+ self.max_position_embeddings = max_position_embeddings
182
+ self.hidden_size = hidden_size
183
+ self.intermediate_size = intermediate_size
184
+ self.num_hidden_layers = num_hidden_layers
185
+ self.num_attention_heads = num_attention_heads
186
+ self.use_sliding_window = use_sliding_window
187
+ self.sliding_window = sliding_window if use_sliding_window else None
188
+ self.max_window_layers = max_window_layers
189
+ self.first_attention_layer = first_attention_layer
190
+ self.first_post_attention_layer = first_post_attention_layer
191
+ self.attention_striping = attention_striping
192
+ self.last_striping_layer = last_striping_layer
193
+
194
+ # for backward compatibility
195
+ if num_key_value_heads is None:
196
+ num_key_value_heads = num_attention_heads
197
+
198
+ self.num_key_value_heads = num_key_value_heads
199
+ self.lora_rank_tokenshift = lora_rank_tokenshift
200
+ self.lora_rank_decay = lora_rank_decay
201
+ self.lora_rank_iclr = lora_rank_iclr
202
+ self.lora_rank_value_residual_mix = lora_rank_value_residual_mix
203
+ self.lora_rank_gate = lora_rank_gate
204
+ self.hidden_act = hidden_act
205
+ self.initializer_range = initializer_range
206
+ self.rms_norm_eps = rms_norm_eps
207
+ self.use_cache = use_cache
208
+ self.use_rope = use_rope
209
+ self.rope_theta = rope_theta
210
+ self.rope_scaling = rope_scaling
211
+ self.attention_dropout = attention_dropout
212
+ # Validate the correctness of rotary position embeddings parameters
213
+ # BC: if there is a 'type' field, move it to 'rope_type'.
214
+ if self.rope_scaling is not None and "type" in self.rope_scaling:
215
+ self.rope_scaling["rope_type"] = self.rope_scaling["type"]
216
+ rope_config_validation(self)
217
+
218
+ self.layer_types = layer_types
219
+ if self.layer_types is None:
220
+ self.layer_types = [
221
+ "sliding_attention"
222
+ if self.sliding_window is not None and i >= self.max_window_layers
223
+ else "full_attention"
224
+ for i in range(self.num_hidden_layers)
225
+ ]
226
+ layer_type_validation(self.layer_types)
227
+
228
+ self.attention_bias = attention_bias
229
+ self.attention_output_bias = attention_output_bias
230
+ self.gate_rank_type = gate_rank_type
231
+ self.balance_state = balance_state
232
+ self.groupnorm_att = groupnorm_att
233
+ self.use_tokenshift = use_tokenshift
234
+
235
+ super().__init__(
236
+ tie_word_embeddings=tie_word_embeddings,
237
+ **kwargs,
238
+ )
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 100257,
4
+ "eos_token_id": 100257,
5
+ "transformers_version": "4.50.3"
6
+ }
model-00001-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9403f763937b03e608bf2487a7bd8ce111ba050d6ee3dc0397769a05f418afeb
3
+ size 4290887656
model-00002-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:02afbc9df512156a9f5f8431028ded0f9c969fd0635e28b71eb3c7d147fc96a9
3
+ size 4114004696
model-00003-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:81055b6cfee64e74086c33d86c6b7bf8eacfaf18a50d581ba7978fff9c527772
3
+ size 4060577896
model-00004-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e5bb6f78d213dc4e1d3d1f6f24024ead5965dbe390f82103aaf1673d4c8eb1c
3
+ size 4114004760
model-00005-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fbab38afe043b79b2317b3dad52ef775d8db9118ec7ddc853c90bc493dbdb08f
3
+ size 4078691328
model-00006-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7f0a72ea744731942728ec1fd2f65baa81d04fb874f58508af39148b091b5d13
3
+ size 4114004776
model-00007-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:302f8cdbf7297b85123c8019763d7e71eaa22a39f565f05dc2307a1a388e60ca
3
+ size 4060577968
model-00008-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:96b29a0435673a9d8bcf78ddbe59b56c362b53fc398ec27606cef32824750edc
3
+ size 4114004760
model-00009-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6dbd044aa80d61a90bc1504ec9de8ed7e57679d4f91b480bfb820104296dc14a
3
+ size 4060577968
model-00010-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:79e63b341b18e2aa064ad1c665c12c69038c1de6566f07a8991fc500192533c2
3
+ size 4114004760
model-00011-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3c1fce15a053187fc757cc4f4db442ff0435340452d106c1afee2c0068c50f31
3
+ size 1323641448
model.safetensors.index.json ADDED
@@ -0,0 +1,687 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 42444902400,
4
+ "format": "safetensors"
5
+ },
6
+ "weight_map": {
7
+ "lm_head.weight": "model-00001-of-00011.safetensors",
8
+ "model.embed_tokens.weight": "model-00001-of-00011.safetensors",
9
+ "model.layers.0.input_layernorm.weight": "model-00001-of-00011.safetensors",
10
+ "model.layers.0.mlp.down_proj.weight": "model-00001-of-00011.safetensors",
11
+ "model.layers.0.mlp.gate_proj.weight": "model-00001-of-00011.safetensors",
12
+ "model.layers.0.mlp.up_proj.weight": "model-00001-of-00011.safetensors",
13
+ "model.layers.0.post_attention_layernorm.weight": "model-00001-of-00011.safetensors",
14
+ "model.layers.0.self_attn.a0": "model-00001-of-00011.safetensors",
15
+ "model.layers.0.self_attn.a1": "model-00001-of-00011.safetensors",
16
+ "model.layers.0.self_attn.a2": "model-00001-of-00011.safetensors",
17
+ "model.layers.0.self_attn.g1": "model-00001-of-00011.safetensors",
18
+ "model.layers.0.self_attn.g2": "model-00001-of-00011.safetensors",
19
+ "model.layers.0.self_attn.key.weight": "model-00001-of-00011.safetensors",
20
+ "model.layers.0.self_attn.output.weight": "model-00001-of-00011.safetensors",
21
+ "model.layers.0.self_attn.receptance.weight": "model-00001-of-00011.safetensors",
22
+ "model.layers.0.self_attn.value.weight": "model-00001-of-00011.safetensors",
23
+ "model.layers.0.self_attn.w0": "model-00001-of-00011.safetensors",
24
+ "model.layers.0.self_attn.w1": "model-00001-of-00011.safetensors",
25
+ "model.layers.0.self_attn.w2": "model-00001-of-00011.safetensors",
26
+ "model.layers.1.input_layernorm.weight": "model-00001-of-00011.safetensors",
27
+ "model.layers.1.mlp.down_proj.weight": "model-00001-of-00011.safetensors",
28
+ "model.layers.1.mlp.gate_proj.weight": "model-00001-of-00011.safetensors",
29
+ "model.layers.1.mlp.up_proj.weight": "model-00001-of-00011.safetensors",
30
+ "model.layers.1.post_attention_layernorm.weight": "model-00001-of-00011.safetensors",
31
+ "model.layers.1.self_attn.a0": "model-00001-of-00011.safetensors",
32
+ "model.layers.1.self_attn.a1": "model-00001-of-00011.safetensors",
33
+ "model.layers.1.self_attn.a2": "model-00001-of-00011.safetensors",
34
+ "model.layers.1.self_attn.g1": "model-00001-of-00011.safetensors",
35
+ "model.layers.1.self_attn.g2": "model-00001-of-00011.safetensors",
36
+ "model.layers.1.self_attn.key.weight": "model-00001-of-00011.safetensors",
37
+ "model.layers.1.self_attn.output.weight": "model-00001-of-00011.safetensors",
38
+ "model.layers.1.self_attn.receptance.weight": "model-00001-of-00011.safetensors",
39
+ "model.layers.1.self_attn.value.weight": "model-00001-of-00011.safetensors",
40
+ "model.layers.1.self_attn.w0": "model-00001-of-00011.safetensors",
41
+ "model.layers.1.self_attn.w1": "model-00001-of-00011.safetensors",
42
+ "model.layers.1.self_attn.w2": "model-00001-of-00011.safetensors",
43
+ "model.layers.2.input_layernorm.weight": "model-00001-of-00011.safetensors",
44
+ "model.layers.2.mlp.down_proj.weight": "model-00002-of-00011.safetensors",
45
+ "model.layers.2.mlp.gate_proj.weight": "model-00002-of-00011.safetensors",
46
+ "model.layers.2.mlp.up_proj.weight": "model-00002-of-00011.safetensors",
47
+ "model.layers.2.post_attention_layernorm.weight": "model-00002-of-00011.safetensors",
48
+ "model.layers.2.self_attn.a0": "model-00002-of-00011.safetensors",
49
+ "model.layers.2.self_attn.a1": "model-00002-of-00011.safetensors",
50
+ "model.layers.2.self_attn.a2": "model-00002-of-00011.safetensors",
51
+ "model.layers.2.self_attn.g1": "model-00002-of-00011.safetensors",
52
+ "model.layers.2.self_attn.g2": "model-00002-of-00011.safetensors",
53
+ "model.layers.2.self_attn.key.weight": "model-00002-of-00011.safetensors",
54
+ "model.layers.2.self_attn.output.weight": "model-00002-of-00011.safetensors",
55
+ "model.layers.2.self_attn.receptance.weight": "model-00002-of-00011.safetensors",
56
+ "model.layers.2.self_attn.value.weight": "model-00002-of-00011.safetensors",
57
+ "model.layers.2.self_attn.w0": "model-00002-of-00011.safetensors",
58
+ "model.layers.2.self_attn.w1": "model-00002-of-00011.safetensors",
59
+ "model.layers.2.self_attn.w2": "model-00002-of-00011.safetensors",
60
+ "model.layers.3.input_layernorm.weight": "model-00002-of-00011.safetensors",
61
+ "model.layers.3.mlp.down_proj.weight": "model-00002-of-00011.safetensors",
62
+ "model.layers.3.mlp.gate_proj.weight": "model-00002-of-00011.safetensors",
63
+ "model.layers.3.mlp.up_proj.weight": "model-00002-of-00011.safetensors",
64
+ "model.layers.3.post_attention_layernorm.weight": "model-00002-of-00011.safetensors",
65
+ "model.layers.3.self_attn.k_proj.weight": "model-00002-of-00011.safetensors",
66
+ "model.layers.3.self_attn.o_proj.weight": "model-00002-of-00011.safetensors",
67
+ "model.layers.3.self_attn.q_proj.weight": "model-00002-of-00011.safetensors",
68
+ "model.layers.3.self_attn.v_proj.weight": "model-00002-of-00011.safetensors",
69
+ "model.layers.4.input_layernorm.weight": "model-00002-of-00011.safetensors",
70
+ "model.layers.4.mlp.down_proj.weight": "model-00002-of-00011.safetensors",
71
+ "model.layers.4.mlp.gate_proj.weight": "model-00002-of-00011.safetensors",
72
+ "model.layers.4.mlp.up_proj.weight": "model-00002-of-00011.safetensors",
73
+ "model.layers.4.post_attention_layernorm.weight": "model-00002-of-00011.safetensors",
74
+ "model.layers.4.self_attn.a0": "model-00002-of-00011.safetensors",
75
+ "model.layers.4.self_attn.a1": "model-00002-of-00011.safetensors",
76
+ "model.layers.4.self_attn.a2": "model-00002-of-00011.safetensors",
77
+ "model.layers.4.self_attn.g1": "model-00002-of-00011.safetensors",
78
+ "model.layers.4.self_attn.g2": "model-00002-of-00011.safetensors",
79
+ "model.layers.4.self_attn.key.weight": "model-00002-of-00011.safetensors",
80
+ "model.layers.4.self_attn.output.weight": "model-00002-of-00011.safetensors",
81
+ "model.layers.4.self_attn.receptance.weight": "model-00002-of-00011.safetensors",
82
+ "model.layers.4.self_attn.value.weight": "model-00002-of-00011.safetensors",
83
+ "model.layers.4.self_attn.w0": "model-00002-of-00011.safetensors",
84
+ "model.layers.4.self_attn.w1": "model-00002-of-00011.safetensors",
85
+ "model.layers.4.self_attn.w2": "model-00002-of-00011.safetensors",
86
+ "model.layers.5.input_layernorm.weight": "model-00002-of-00011.safetensors",
87
+ "model.layers.5.mlp.down_proj.weight": "model-00002-of-00011.safetensors",
88
+ "model.layers.5.mlp.gate_proj.weight": "model-00002-of-00011.safetensors",
89
+ "model.layers.5.mlp.up_proj.weight": "model-00002-of-00011.safetensors",
90
+ "model.layers.5.post_attention_layernorm.weight": "model-00002-of-00011.safetensors",
91
+ "model.layers.5.self_attn.a0": "model-00002-of-00011.safetensors",
92
+ "model.layers.5.self_attn.a1": "model-00002-of-00011.safetensors",
93
+ "model.layers.5.self_attn.a2": "model-00002-of-00011.safetensors",
94
+ "model.layers.5.self_attn.g1": "model-00002-of-00011.safetensors",
95
+ "model.layers.5.self_attn.g2": "model-00002-of-00011.safetensors",
96
+ "model.layers.5.self_attn.key.weight": "model-00002-of-00011.safetensors",
97
+ "model.layers.5.self_attn.output.weight": "model-00002-of-00011.safetensors",
98
+ "model.layers.5.self_attn.receptance.weight": "model-00002-of-00011.safetensors",
99
+ "model.layers.5.self_attn.value.weight": "model-00002-of-00011.safetensors",
100
+ "model.layers.5.self_attn.w0": "model-00002-of-00011.safetensors",
101
+ "model.layers.5.self_attn.w1": "model-00002-of-00011.safetensors",
102
+ "model.layers.5.self_attn.w2": "model-00002-of-00011.safetensors",
103
+ "model.layers.6.input_layernorm.weight": "model-00002-of-00011.safetensors",
104
+ "model.layers.6.mlp.down_proj.weight": "model-00002-of-00011.safetensors",
105
+ "model.layers.6.mlp.gate_proj.weight": "model-00002-of-00011.safetensors",
106
+ "model.layers.6.mlp.up_proj.weight": "model-00003-of-00011.safetensors",
107
+ "model.layers.6.post_attention_layernorm.weight": "model-00003-of-00011.safetensors",
108
+ "model.layers.6.self_attn.a0": "model-00003-of-00011.safetensors",
109
+ "model.layers.6.self_attn.a1": "model-00003-of-00011.safetensors",
110
+ "model.layers.6.self_attn.a2": "model-00003-of-00011.safetensors",
111
+ "model.layers.6.self_attn.g1": "model-00003-of-00011.safetensors",
112
+ "model.layers.6.self_attn.g2": "model-00003-of-00011.safetensors",
113
+ "model.layers.6.self_attn.key.weight": "model-00003-of-00011.safetensors",
114
+ "model.layers.6.self_attn.output.weight": "model-00003-of-00011.safetensors",
115
+ "model.layers.6.self_attn.receptance.weight": "model-00003-of-00011.safetensors",
116
+ "model.layers.6.self_attn.value.weight": "model-00003-of-00011.safetensors",
117
+ "model.layers.6.self_attn.w0": "model-00003-of-00011.safetensors",
118
+ "model.layers.6.self_attn.w1": "model-00003-of-00011.safetensors",
119
+ "model.layers.6.self_attn.w2": "model-00003-of-00011.safetensors",
120
+ "model.layers.7.input_layernorm.weight": "model-00003-of-00011.safetensors",
121
+ "model.layers.7.mlp.down_proj.weight": "model-00003-of-00011.safetensors",
122
+ "model.layers.7.mlp.gate_proj.weight": "model-00003-of-00011.safetensors",
123
+ "model.layers.7.mlp.up_proj.weight": "model-00003-of-00011.safetensors",
124
+ "model.layers.7.post_attention_layernorm.weight": "model-00003-of-00011.safetensors",
125
+ "model.layers.7.self_attn.a0": "model-00003-of-00011.safetensors",
126
+ "model.layers.7.self_attn.a1": "model-00003-of-00011.safetensors",
127
+ "model.layers.7.self_attn.a2": "model-00003-of-00011.safetensors",
128
+ "model.layers.7.self_attn.g1": "model-00003-of-00011.safetensors",
129
+ "model.layers.7.self_attn.g2": "model-00003-of-00011.safetensors",
130
+ "model.layers.7.self_attn.key.weight": "model-00003-of-00011.safetensors",
131
+ "model.layers.7.self_attn.output.weight": "model-00003-of-00011.safetensors",
132
+ "model.layers.7.self_attn.receptance.weight": "model-00003-of-00011.safetensors",
133
+ "model.layers.7.self_attn.value.weight": "model-00003-of-00011.safetensors",
134
+ "model.layers.7.self_attn.w0": "model-00003-of-00011.safetensors",
135
+ "model.layers.7.self_attn.w1": "model-00003-of-00011.safetensors",
136
+ "model.layers.7.self_attn.w2": "model-00003-of-00011.safetensors",
137
+ "model.layers.8.input_layernorm.weight": "model-00003-of-00011.safetensors",
138
+ "model.layers.8.mlp.down_proj.weight": "model-00003-of-00011.safetensors",
139
+ "model.layers.8.mlp.gate_proj.weight": "model-00003-of-00011.safetensors",
140
+ "model.layers.8.mlp.up_proj.weight": "model-00003-of-00011.safetensors",
141
+ "model.layers.8.post_attention_layernorm.weight": "model-00003-of-00011.safetensors",
142
+ "model.layers.8.self_attn.k_proj.weight": "model-00003-of-00011.safetensors",
143
+ "model.layers.8.self_attn.o_proj.weight": "model-00003-of-00011.safetensors",
144
+ "model.layers.8.self_attn.q_proj.weight": "model-00003-of-00011.safetensors",
145
+ "model.layers.8.self_attn.v_proj.weight": "model-00003-of-00011.safetensors",
146
+ "model.layers.9.input_layernorm.weight": "model-00003-of-00011.safetensors",
147
+ "model.layers.9.mlp.down_proj.weight": "model-00003-of-00011.safetensors",
148
+ "model.layers.9.mlp.gate_proj.weight": "model-00003-of-00011.safetensors",
149
+ "model.layers.9.mlp.up_proj.weight": "model-00003-of-00011.safetensors",
150
+ "model.layers.9.post_attention_layernorm.weight": "model-00003-of-00011.safetensors",
151
+ "model.layers.9.self_attn.a0": "model-00003-of-00011.safetensors",
152
+ "model.layers.9.self_attn.a1": "model-00003-of-00011.safetensors",
153
+ "model.layers.9.self_attn.a2": "model-00003-of-00011.safetensors",
154
+ "model.layers.9.self_attn.g1": "model-00003-of-00011.safetensors",
155
+ "model.layers.9.self_attn.g2": "model-00003-of-00011.safetensors",
156
+ "model.layers.9.self_attn.key.weight": "model-00003-of-00011.safetensors",
157
+ "model.layers.9.self_attn.output.weight": "model-00003-of-00011.safetensors",
158
+ "model.layers.9.self_attn.receptance.weight": "model-00003-of-00011.safetensors",
159
+ "model.layers.9.self_attn.value.weight": "model-00003-of-00011.safetensors",
160
+ "model.layers.9.self_attn.w0": "model-00003-of-00011.safetensors",
161
+ "model.layers.9.self_attn.w1": "model-00003-of-00011.safetensors",
162
+ "model.layers.9.self_attn.w2": "model-00003-of-00011.safetensors",
163
+ "model.layers.10.input_layernorm.weight": "model-00003-of-00011.safetensors",
164
+ "model.layers.10.mlp.down_proj.weight": "model-00003-of-00011.safetensors",
165
+ "model.layers.10.mlp.gate_proj.weight": "model-00003-of-00011.safetensors",
166
+ "model.layers.10.mlp.up_proj.weight": "model-00003-of-00011.safetensors",
167
+ "model.layers.10.post_attention_layernorm.weight": "model-00003-of-00011.safetensors",
168
+ "model.layers.10.self_attn.a0": "model-00003-of-00011.safetensors",
169
+ "model.layers.10.self_attn.a1": "model-00003-of-00011.safetensors",
170
+ "model.layers.10.self_attn.a2": "model-00003-of-00011.safetensors",
171
+ "model.layers.10.self_attn.g1": "model-00003-of-00011.safetensors",
172
+ "model.layers.10.self_attn.g2": "model-00003-of-00011.safetensors",
173
+ "model.layers.10.self_attn.key.weight": "model-00003-of-00011.safetensors",
174
+ "model.layers.10.self_attn.output.weight": "model-00003-of-00011.safetensors",
175
+ "model.layers.10.self_attn.receptance.weight": "model-00003-of-00011.safetensors",
176
+ "model.layers.10.self_attn.value.weight": "model-00003-of-00011.safetensors",
177
+ "model.layers.10.self_attn.w0": "model-00003-of-00011.safetensors",
178
+ "model.layers.10.self_attn.w1": "model-00003-of-00011.safetensors",
179
+ "model.layers.10.self_attn.w2": "model-00003-of-00011.safetensors",
180
+ "model.layers.11.input_layernorm.weight": "model-00003-of-00011.safetensors",
181
+ "model.layers.11.mlp.down_proj.weight": "model-00004-of-00011.safetensors",
182
+ "model.layers.11.mlp.gate_proj.weight": "model-00004-of-00011.safetensors",
183
+ "model.layers.11.mlp.up_proj.weight": "model-00004-of-00011.safetensors",
184
+ "model.layers.11.post_attention_layernorm.weight": "model-00004-of-00011.safetensors",
185
+ "model.layers.11.self_attn.a0": "model-00004-of-00011.safetensors",
186
+ "model.layers.11.self_attn.a1": "model-00004-of-00011.safetensors",
187
+ "model.layers.11.self_attn.a2": "model-00004-of-00011.safetensors",
188
+ "model.layers.11.self_attn.g1": "model-00004-of-00011.safetensors",
189
+ "model.layers.11.self_attn.g2": "model-00004-of-00011.safetensors",
190
+ "model.layers.11.self_attn.key.weight": "model-00004-of-00011.safetensors",
191
+ "model.layers.11.self_attn.output.weight": "model-00004-of-00011.safetensors",
192
+ "model.layers.11.self_attn.receptance.weight": "model-00004-of-00011.safetensors",
193
+ "model.layers.11.self_attn.value.weight": "model-00004-of-00011.safetensors",
194
+ "model.layers.11.self_attn.w0": "model-00004-of-00011.safetensors",
195
+ "model.layers.11.self_attn.w1": "model-00004-of-00011.safetensors",
196
+ "model.layers.11.self_attn.w2": "model-00004-of-00011.safetensors",
197
+ "model.layers.12.input_layernorm.weight": "model-00004-of-00011.safetensors",
198
+ "model.layers.12.mlp.down_proj.weight": "model-00004-of-00011.safetensors",
199
+ "model.layers.12.mlp.gate_proj.weight": "model-00004-of-00011.safetensors",
200
+ "model.layers.12.mlp.up_proj.weight": "model-00004-of-00011.safetensors",
201
+ "model.layers.12.post_attention_layernorm.weight": "model-00004-of-00011.safetensors",
202
+ "model.layers.12.self_attn.a0": "model-00004-of-00011.safetensors",
203
+ "model.layers.12.self_attn.a1": "model-00004-of-00011.safetensors",
204
+ "model.layers.12.self_attn.a2": "model-00004-of-00011.safetensors",
205
+ "model.layers.12.self_attn.g1": "model-00004-of-00011.safetensors",
206
+ "model.layers.12.self_attn.g2": "model-00004-of-00011.safetensors",
207
+ "model.layers.12.self_attn.key.weight": "model-00004-of-00011.safetensors",
208
+ "model.layers.12.self_attn.output.weight": "model-00004-of-00011.safetensors",
209
+ "model.layers.12.self_attn.receptance.weight": "model-00004-of-00011.safetensors",
210
+ "model.layers.12.self_attn.value.weight": "model-00004-of-00011.safetensors",
211
+ "model.layers.12.self_attn.w0": "model-00004-of-00011.safetensors",
212
+ "model.layers.12.self_attn.w1": "model-00004-of-00011.safetensors",
213
+ "model.layers.12.self_attn.w2": "model-00004-of-00011.safetensors",
214
+ "model.layers.13.input_layernorm.weight": "model-00004-of-00011.safetensors",
215
+ "model.layers.13.mlp.down_proj.weight": "model-00004-of-00011.safetensors",
216
+ "model.layers.13.mlp.gate_proj.weight": "model-00004-of-00011.safetensors",
217
+ "model.layers.13.mlp.up_proj.weight": "model-00004-of-00011.safetensors",
218
+ "model.layers.13.post_attention_layernorm.weight": "model-00004-of-00011.safetensors",
219
+ "model.layers.13.self_attn.a0": "model-00004-of-00011.safetensors",
220
+ "model.layers.13.self_attn.a1": "model-00004-of-00011.safetensors",
221
+ "model.layers.13.self_attn.a2": "model-00004-of-00011.safetensors",
222
+ "model.layers.13.self_attn.g1": "model-00004-of-00011.safetensors",
223
+ "model.layers.13.self_attn.g2": "model-00004-of-00011.safetensors",
224
+ "model.layers.13.self_attn.key.weight": "model-00004-of-00011.safetensors",
225
+ "model.layers.13.self_attn.output.weight": "model-00004-of-00011.safetensors",
226
+ "model.layers.13.self_attn.receptance.weight": "model-00004-of-00011.safetensors",
227
+ "model.layers.13.self_attn.value.weight": "model-00004-of-00011.safetensors",
228
+ "model.layers.13.self_attn.w0": "model-00004-of-00011.safetensors",
229
+ "model.layers.13.self_attn.w1": "model-00004-of-00011.safetensors",
230
+ "model.layers.13.self_attn.w2": "model-00004-of-00011.safetensors",
231
+ "model.layers.14.input_layernorm.weight": "model-00004-of-00011.safetensors",
232
+ "model.layers.14.mlp.down_proj.weight": "model-00004-of-00011.safetensors",
233
+ "model.layers.14.mlp.gate_proj.weight": "model-00004-of-00011.safetensors",
234
+ "model.layers.14.mlp.up_proj.weight": "model-00004-of-00011.safetensors",
235
+ "model.layers.14.post_attention_layernorm.weight": "model-00004-of-00011.safetensors",
236
+ "model.layers.14.self_attn.k_proj.weight": "model-00004-of-00011.safetensors",
237
+ "model.layers.14.self_attn.o_proj.weight": "model-00004-of-00011.safetensors",
238
+ "model.layers.14.self_attn.q_proj.weight": "model-00004-of-00011.safetensors",
239
+ "model.layers.14.self_attn.v_proj.weight": "model-00004-of-00011.safetensors",
240
+ "model.layers.15.input_layernorm.weight": "model-00004-of-00011.safetensors",
241
+ "model.layers.15.mlp.down_proj.weight": "model-00004-of-00011.safetensors",
242
+ "model.layers.15.mlp.gate_proj.weight": "model-00004-of-00011.safetensors",
243
+ "model.layers.15.mlp.up_proj.weight": "model-00005-of-00011.safetensors",
244
+ "model.layers.15.post_attention_layernorm.weight": "model-00005-of-00011.safetensors",
245
+ "model.layers.15.self_attn.a0": "model-00005-of-00011.safetensors",
246
+ "model.layers.15.self_attn.a1": "model-00005-of-00011.safetensors",
247
+ "model.layers.15.self_attn.a2": "model-00005-of-00011.safetensors",
248
+ "model.layers.15.self_attn.g1": "model-00005-of-00011.safetensors",
249
+ "model.layers.15.self_attn.g2": "model-00005-of-00011.safetensors",
250
+ "model.layers.15.self_attn.key.weight": "model-00005-of-00011.safetensors",
251
+ "model.layers.15.self_attn.output.weight": "model-00005-of-00011.safetensors",
252
+ "model.layers.15.self_attn.receptance.weight": "model-00005-of-00011.safetensors",
253
+ "model.layers.15.self_attn.value.weight": "model-00005-of-00011.safetensors",
254
+ "model.layers.15.self_attn.w0": "model-00005-of-00011.safetensors",
255
+ "model.layers.15.self_attn.w1": "model-00005-of-00011.safetensors",
256
+ "model.layers.15.self_attn.w2": "model-00005-of-00011.safetensors",
257
+ "model.layers.16.input_layernorm.weight": "model-00005-of-00011.safetensors",
258
+ "model.layers.16.mlp.down_proj.weight": "model-00005-of-00011.safetensors",
259
+ "model.layers.16.mlp.gate_proj.weight": "model-00005-of-00011.safetensors",
260
+ "model.layers.16.mlp.up_proj.weight": "model-00005-of-00011.safetensors",
261
+ "model.layers.16.post_attention_layernorm.weight": "model-00005-of-00011.safetensors",
262
+ "model.layers.16.self_attn.a0": "model-00005-of-00011.safetensors",
263
+ "model.layers.16.self_attn.a1": "model-00005-of-00011.safetensors",
264
+ "model.layers.16.self_attn.a2": "model-00005-of-00011.safetensors",
265
+ "model.layers.16.self_attn.g1": "model-00005-of-00011.safetensors",
266
+ "model.layers.16.self_attn.g2": "model-00005-of-00011.safetensors",
267
+ "model.layers.16.self_attn.key.weight": "model-00005-of-00011.safetensors",
268
+ "model.layers.16.self_attn.output.weight": "model-00005-of-00011.safetensors",
269
+ "model.layers.16.self_attn.receptance.weight": "model-00005-of-00011.safetensors",
270
+ "model.layers.16.self_attn.value.weight": "model-00005-of-00011.safetensors",
271
+ "model.layers.16.self_attn.w0": "model-00005-of-00011.safetensors",
272
+ "model.layers.16.self_attn.w1": "model-00005-of-00011.safetensors",
273
+ "model.layers.16.self_attn.w2": "model-00005-of-00011.safetensors",
274
+ "model.layers.17.input_layernorm.weight": "model-00005-of-00011.safetensors",
275
+ "model.layers.17.mlp.down_proj.weight": "model-00005-of-00011.safetensors",
276
+ "model.layers.17.mlp.gate_proj.weight": "model-00005-of-00011.safetensors",
277
+ "model.layers.17.mlp.up_proj.weight": "model-00005-of-00011.safetensors",
278
+ "model.layers.17.post_attention_layernorm.weight": "model-00005-of-00011.safetensors",
279
+ "model.layers.17.self_attn.a0": "model-00005-of-00011.safetensors",
280
+ "model.layers.17.self_attn.a1": "model-00005-of-00011.safetensors",
281
+ "model.layers.17.self_attn.a2": "model-00005-of-00011.safetensors",
282
+ "model.layers.17.self_attn.g1": "model-00005-of-00011.safetensors",
283
+ "model.layers.17.self_attn.g2": "model-00005-of-00011.safetensors",
284
+ "model.layers.17.self_attn.key.weight": "model-00005-of-00011.safetensors",
285
+ "model.layers.17.self_attn.output.weight": "model-00005-of-00011.safetensors",
286
+ "model.layers.17.self_attn.receptance.weight": "model-00005-of-00011.safetensors",
287
+ "model.layers.17.self_attn.value.weight": "model-00005-of-00011.safetensors",
288
+ "model.layers.17.self_attn.w0": "model-00005-of-00011.safetensors",
289
+ "model.layers.17.self_attn.w1": "model-00005-of-00011.safetensors",
290
+ "model.layers.17.self_attn.w2": "model-00005-of-00011.safetensors",
291
+ "model.layers.18.input_layernorm.weight": "model-00005-of-00011.safetensors",
292
+ "model.layers.18.mlp.down_proj.weight": "model-00005-of-00011.safetensors",
293
+ "model.layers.18.mlp.gate_proj.weight": "model-00005-of-00011.safetensors",
294
+ "model.layers.18.mlp.up_proj.weight": "model-00005-of-00011.safetensors",
295
+ "model.layers.18.post_attention_layernorm.weight": "model-00005-of-00011.safetensors",
296
+ "model.layers.18.self_attn.a0": "model-00005-of-00011.safetensors",
297
+ "model.layers.18.self_attn.a1": "model-00005-of-00011.safetensors",
298
+ "model.layers.18.self_attn.a2": "model-00005-of-00011.safetensors",
299
+ "model.layers.18.self_attn.g1": "model-00005-of-00011.safetensors",
300
+ "model.layers.18.self_attn.g2": "model-00005-of-00011.safetensors",
301
+ "model.layers.18.self_attn.key.weight": "model-00005-of-00011.safetensors",
302
+ "model.layers.18.self_attn.output.weight": "model-00005-of-00011.safetensors",
303
+ "model.layers.18.self_attn.receptance.weight": "model-00005-of-00011.safetensors",
304
+ "model.layers.18.self_attn.value.weight": "model-00005-of-00011.safetensors",
305
+ "model.layers.18.self_attn.w0": "model-00005-of-00011.safetensors",
306
+ "model.layers.18.self_attn.w1": "model-00005-of-00011.safetensors",
307
+ "model.layers.18.self_attn.w2": "model-00005-of-00011.safetensors",
308
+ "model.layers.19.input_layernorm.weight": "model-00005-of-00011.safetensors",
309
+ "model.layers.19.mlp.down_proj.weight": "model-00005-of-00011.safetensors",
310
+ "model.layers.19.mlp.gate_proj.weight": "model-00005-of-00011.safetensors",
311
+ "model.layers.19.mlp.up_proj.weight": "model-00005-of-00011.safetensors",
312
+ "model.layers.19.post_attention_layernorm.weight": "model-00005-of-00011.safetensors",
313
+ "model.layers.19.self_attn.a0": "model-00005-of-00011.safetensors",
314
+ "model.layers.19.self_attn.a1": "model-00005-of-00011.safetensors",
315
+ "model.layers.19.self_attn.a2": "model-00005-of-00011.safetensors",
316
+ "model.layers.19.self_attn.g1": "model-00005-of-00011.safetensors",
317
+ "model.layers.19.self_attn.g2": "model-00005-of-00011.safetensors",
318
+ "model.layers.19.self_attn.key.weight": "model-00005-of-00011.safetensors",
319
+ "model.layers.19.self_attn.output.weight": "model-00005-of-00011.safetensors",
320
+ "model.layers.19.self_attn.receptance.weight": "model-00005-of-00011.safetensors",
321
+ "model.layers.19.self_attn.value.weight": "model-00005-of-00011.safetensors",
322
+ "model.layers.19.self_attn.w0": "model-00005-of-00011.safetensors",
323
+ "model.layers.19.self_attn.w1": "model-00005-of-00011.safetensors",
324
+ "model.layers.19.self_attn.w2": "model-00005-of-00011.safetensors",
325
+ "model.layers.20.input_layernorm.weight": "model-00005-of-00011.safetensors",
326
+ "model.layers.20.mlp.down_proj.weight": "model-00006-of-00011.safetensors",
327
+ "model.layers.20.mlp.gate_proj.weight": "model-00006-of-00011.safetensors",
328
+ "model.layers.20.mlp.up_proj.weight": "model-00006-of-00011.safetensors",
329
+ "model.layers.20.post_attention_layernorm.weight": "model-00006-of-00011.safetensors",
330
+ "model.layers.20.self_attn.k_proj.weight": "model-00006-of-00011.safetensors",
331
+ "model.layers.20.self_attn.o_proj.weight": "model-00006-of-00011.safetensors",
332
+ "model.layers.20.self_attn.q_proj.weight": "model-00006-of-00011.safetensors",
333
+ "model.layers.20.self_attn.v_proj.weight": "model-00006-of-00011.safetensors",
334
+ "model.layers.21.input_layernorm.weight": "model-00006-of-00011.safetensors",
335
+ "model.layers.21.mlp.down_proj.weight": "model-00006-of-00011.safetensors",
336
+ "model.layers.21.mlp.gate_proj.weight": "model-00006-of-00011.safetensors",
337
+ "model.layers.21.mlp.up_proj.weight": "model-00006-of-00011.safetensors",
338
+ "model.layers.21.post_attention_layernorm.weight": "model-00006-of-00011.safetensors",
339
+ "model.layers.21.self_attn.a0": "model-00006-of-00011.safetensors",
340
+ "model.layers.21.self_attn.a1": "model-00006-of-00011.safetensors",
341
+ "model.layers.21.self_attn.a2": "model-00006-of-00011.safetensors",
342
+ "model.layers.21.self_attn.g1": "model-00006-of-00011.safetensors",
343
+ "model.layers.21.self_attn.g2": "model-00006-of-00011.safetensors",
344
+ "model.layers.21.self_attn.key.weight": "model-00006-of-00011.safetensors",
345
+ "model.layers.21.self_attn.output.weight": "model-00006-of-00011.safetensors",
346
+ "model.layers.21.self_attn.receptance.weight": "model-00006-of-00011.safetensors",
347
+ "model.layers.21.self_attn.value.weight": "model-00006-of-00011.safetensors",
348
+ "model.layers.21.self_attn.w0": "model-00006-of-00011.safetensors",
349
+ "model.layers.21.self_attn.w1": "model-00006-of-00011.safetensors",
350
+ "model.layers.21.self_attn.w2": "model-00006-of-00011.safetensors",
351
+ "model.layers.22.input_layernorm.weight": "model-00006-of-00011.safetensors",
352
+ "model.layers.22.mlp.down_proj.weight": "model-00006-of-00011.safetensors",
353
+ "model.layers.22.mlp.gate_proj.weight": "model-00006-of-00011.safetensors",
354
+ "model.layers.22.mlp.up_proj.weight": "model-00006-of-00011.safetensors",
355
+ "model.layers.22.post_attention_layernorm.weight": "model-00006-of-00011.safetensors",
356
+ "model.layers.22.self_attn.a0": "model-00006-of-00011.safetensors",
357
+ "model.layers.22.self_attn.a1": "model-00006-of-00011.safetensors",
358
+ "model.layers.22.self_attn.a2": "model-00006-of-00011.safetensors",
359
+ "model.layers.22.self_attn.g1": "model-00006-of-00011.safetensors",
360
+ "model.layers.22.self_attn.g2": "model-00006-of-00011.safetensors",
361
+ "model.layers.22.self_attn.key.weight": "model-00006-of-00011.safetensors",
362
+ "model.layers.22.self_attn.output.weight": "model-00006-of-00011.safetensors",
363
+ "model.layers.22.self_attn.receptance.weight": "model-00006-of-00011.safetensors",
364
+ "model.layers.22.self_attn.value.weight": "model-00006-of-00011.safetensors",
365
+ "model.layers.22.self_attn.w0": "model-00006-of-00011.safetensors",
366
+ "model.layers.22.self_attn.w1": "model-00006-of-00011.safetensors",
367
+ "model.layers.22.self_attn.w2": "model-00006-of-00011.safetensors",
368
+ "model.layers.23.input_layernorm.weight": "model-00006-of-00011.safetensors",
369
+ "model.layers.23.mlp.down_proj.weight": "model-00006-of-00011.safetensors",
370
+ "model.layers.23.mlp.gate_proj.weight": "model-00006-of-00011.safetensors",
371
+ "model.layers.23.mlp.up_proj.weight": "model-00006-of-00011.safetensors",
372
+ "model.layers.23.post_attention_layernorm.weight": "model-00006-of-00011.safetensors",
373
+ "model.layers.23.self_attn.a0": "model-00006-of-00011.safetensors",
374
+ "model.layers.23.self_attn.a1": "model-00006-of-00011.safetensors",
375
+ "model.layers.23.self_attn.a2": "model-00006-of-00011.safetensors",
376
+ "model.layers.23.self_attn.g1": "model-00006-of-00011.safetensors",
377
+ "model.layers.23.self_attn.g2": "model-00006-of-00011.safetensors",
378
+ "model.layers.23.self_attn.key.weight": "model-00006-of-00011.safetensors",
379
+ "model.layers.23.self_attn.output.weight": "model-00006-of-00011.safetensors",
380
+ "model.layers.23.self_attn.receptance.weight": "model-00006-of-00011.safetensors",
381
+ "model.layers.23.self_attn.value.weight": "model-00006-of-00011.safetensors",
382
+ "model.layers.23.self_attn.w0": "model-00006-of-00011.safetensors",
383
+ "model.layers.23.self_attn.w1": "model-00006-of-00011.safetensors",
384
+ "model.layers.23.self_attn.w2": "model-00006-of-00011.safetensors",
385
+ "model.layers.24.input_layernorm.weight": "model-00006-of-00011.safetensors",
386
+ "model.layers.24.mlp.down_proj.weight": "model-00006-of-00011.safetensors",
387
+ "model.layers.24.mlp.gate_proj.weight": "model-00006-of-00011.safetensors",
388
+ "model.layers.24.mlp.up_proj.weight": "model-00007-of-00011.safetensors",
389
+ "model.layers.24.post_attention_layernorm.weight": "model-00007-of-00011.safetensors",
390
+ "model.layers.24.self_attn.a0": "model-00007-of-00011.safetensors",
391
+ "model.layers.24.self_attn.a1": "model-00007-of-00011.safetensors",
392
+ "model.layers.24.self_attn.a2": "model-00007-of-00011.safetensors",
393
+ "model.layers.24.self_attn.g1": "model-00007-of-00011.safetensors",
394
+ "model.layers.24.self_attn.g2": "model-00007-of-00011.safetensors",
395
+ "model.layers.24.self_attn.key.weight": "model-00007-of-00011.safetensors",
396
+ "model.layers.24.self_attn.output.weight": "model-00007-of-00011.safetensors",
397
+ "model.layers.24.self_attn.receptance.weight": "model-00007-of-00011.safetensors",
398
+ "model.layers.24.self_attn.value.weight": "model-00007-of-00011.safetensors",
399
+ "model.layers.24.self_attn.w0": "model-00007-of-00011.safetensors",
400
+ "model.layers.24.self_attn.w1": "model-00007-of-00011.safetensors",
401
+ "model.layers.24.self_attn.w2": "model-00007-of-00011.safetensors",
402
+ "model.layers.25.input_layernorm.weight": "model-00007-of-00011.safetensors",
403
+ "model.layers.25.mlp.down_proj.weight": "model-00007-of-00011.safetensors",
404
+ "model.layers.25.mlp.gate_proj.weight": "model-00007-of-00011.safetensors",
405
+ "model.layers.25.mlp.up_proj.weight": "model-00007-of-00011.safetensors",
406
+ "model.layers.25.post_attention_layernorm.weight": "model-00007-of-00011.safetensors",
407
+ "model.layers.25.self_attn.k_proj.weight": "model-00007-of-00011.safetensors",
408
+ "model.layers.25.self_attn.o_proj.weight": "model-00007-of-00011.safetensors",
409
+ "model.layers.25.self_attn.q_proj.weight": "model-00007-of-00011.safetensors",
410
+ "model.layers.25.self_attn.v_proj.weight": "model-00007-of-00011.safetensors",
411
+ "model.layers.26.input_layernorm.weight": "model-00007-of-00011.safetensors",
412
+ "model.layers.26.mlp.down_proj.weight": "model-00007-of-00011.safetensors",
413
+ "model.layers.26.mlp.gate_proj.weight": "model-00007-of-00011.safetensors",
414
+ "model.layers.26.mlp.up_proj.weight": "model-00007-of-00011.safetensors",
415
+ "model.layers.26.post_attention_layernorm.weight": "model-00007-of-00011.safetensors",
416
+ "model.layers.26.self_attn.a0": "model-00007-of-00011.safetensors",
417
+ "model.layers.26.self_attn.a1": "model-00007-of-00011.safetensors",
418
+ "model.layers.26.self_attn.a2": "model-00007-of-00011.safetensors",
419
+ "model.layers.26.self_attn.g1": "model-00007-of-00011.safetensors",
420
+ "model.layers.26.self_attn.g2": "model-00007-of-00011.safetensors",
421
+ "model.layers.26.self_attn.key.weight": "model-00007-of-00011.safetensors",
422
+ "model.layers.26.self_attn.output.weight": "model-00007-of-00011.safetensors",
423
+ "model.layers.26.self_attn.receptance.weight": "model-00007-of-00011.safetensors",
424
+ "model.layers.26.self_attn.value.weight": "model-00007-of-00011.safetensors",
425
+ "model.layers.26.self_attn.w0": "model-00007-of-00011.safetensors",
426
+ "model.layers.26.self_attn.w1": "model-00007-of-00011.safetensors",
427
+ "model.layers.26.self_attn.w2": "model-00007-of-00011.safetensors",
428
+ "model.layers.27.input_layernorm.weight": "model-00007-of-00011.safetensors",
429
+ "model.layers.27.mlp.down_proj.weight": "model-00007-of-00011.safetensors",
430
+ "model.layers.27.mlp.gate_proj.weight": "model-00007-of-00011.safetensors",
431
+ "model.layers.27.mlp.up_proj.weight": "model-00007-of-00011.safetensors",
432
+ "model.layers.27.post_attention_layernorm.weight": "model-00007-of-00011.safetensors",
433
+ "model.layers.27.self_attn.a0": "model-00007-of-00011.safetensors",
434
+ "model.layers.27.self_attn.a1": "model-00007-of-00011.safetensors",
435
+ "model.layers.27.self_attn.a2": "model-00007-of-00011.safetensors",
436
+ "model.layers.27.self_attn.g1": "model-00007-of-00011.safetensors",
437
+ "model.layers.27.self_attn.g2": "model-00007-of-00011.safetensors",
438
+ "model.layers.27.self_attn.key.weight": "model-00007-of-00011.safetensors",
439
+ "model.layers.27.self_attn.output.weight": "model-00007-of-00011.safetensors",
440
+ "model.layers.27.self_attn.receptance.weight": "model-00007-of-00011.safetensors",
441
+ "model.layers.27.self_attn.value.weight": "model-00007-of-00011.safetensors",
442
+ "model.layers.27.self_attn.w0": "model-00007-of-00011.safetensors",
443
+ "model.layers.27.self_attn.w1": "model-00007-of-00011.safetensors",
444
+ "model.layers.27.self_attn.w2": "model-00007-of-00011.safetensors",
445
+ "model.layers.28.input_layernorm.weight": "model-00007-of-00011.safetensors",
446
+ "model.layers.28.mlp.down_proj.weight": "model-00007-of-00011.safetensors",
447
+ "model.layers.28.mlp.gate_proj.weight": "model-00007-of-00011.safetensors",
448
+ "model.layers.28.mlp.up_proj.weight": "model-00007-of-00011.safetensors",
449
+ "model.layers.28.post_attention_layernorm.weight": "model-00007-of-00011.safetensors",
450
+ "model.layers.28.self_attn.a0": "model-00007-of-00011.safetensors",
451
+ "model.layers.28.self_attn.a1": "model-00007-of-00011.safetensors",
452
+ "model.layers.28.self_attn.a2": "model-00007-of-00011.safetensors",
453
+ "model.layers.28.self_attn.g1": "model-00007-of-00011.safetensors",
454
+ "model.layers.28.self_attn.g2": "model-00007-of-00011.safetensors",
455
+ "model.layers.28.self_attn.key.weight": "model-00007-of-00011.safetensors",
456
+ "model.layers.28.self_attn.output.weight": "model-00007-of-00011.safetensors",
457
+ "model.layers.28.self_attn.receptance.weight": "model-00007-of-00011.safetensors",
458
+ "model.layers.28.self_attn.value.weight": "model-00007-of-00011.safetensors",
459
+ "model.layers.28.self_attn.w0": "model-00007-of-00011.safetensors",
460
+ "model.layers.28.self_attn.w1": "model-00007-of-00011.safetensors",
461
+ "model.layers.28.self_attn.w2": "model-00007-of-00011.safetensors",
462
+ "model.layers.29.input_layernorm.weight": "model-00007-of-00011.safetensors",
463
+ "model.layers.29.mlp.down_proj.weight": "model-00008-of-00011.safetensors",
464
+ "model.layers.29.mlp.gate_proj.weight": "model-00008-of-00011.safetensors",
465
+ "model.layers.29.mlp.up_proj.weight": "model-00008-of-00011.safetensors",
466
+ "model.layers.29.post_attention_layernorm.weight": "model-00008-of-00011.safetensors",
467
+ "model.layers.29.self_attn.a0": "model-00008-of-00011.safetensors",
468
+ "model.layers.29.self_attn.a1": "model-00008-of-00011.safetensors",
469
+ "model.layers.29.self_attn.a2": "model-00008-of-00011.safetensors",
470
+ "model.layers.29.self_attn.g1": "model-00008-of-00011.safetensors",
471
+ "model.layers.29.self_attn.g2": "model-00008-of-00011.safetensors",
472
+ "model.layers.29.self_attn.key.weight": "model-00008-of-00011.safetensors",
473
+ "model.layers.29.self_attn.output.weight": "model-00008-of-00011.safetensors",
474
+ "model.layers.29.self_attn.receptance.weight": "model-00008-of-00011.safetensors",
475
+ "model.layers.29.self_attn.value.weight": "model-00008-of-00011.safetensors",
476
+ "model.layers.29.self_attn.w0": "model-00008-of-00011.safetensors",
477
+ "model.layers.29.self_attn.w1": "model-00008-of-00011.safetensors",
478
+ "model.layers.29.self_attn.w2": "model-00008-of-00011.safetensors",
479
+ "model.layers.30.input_layernorm.weight": "model-00008-of-00011.safetensors",
480
+ "model.layers.30.mlp.down_proj.weight": "model-00008-of-00011.safetensors",
481
+ "model.layers.30.mlp.gate_proj.weight": "model-00008-of-00011.safetensors",
482
+ "model.layers.30.mlp.up_proj.weight": "model-00008-of-00011.safetensors",
483
+ "model.layers.30.post_attention_layernorm.weight": "model-00008-of-00011.safetensors",
484
+ "model.layers.30.self_attn.k_proj.weight": "model-00008-of-00011.safetensors",
485
+ "model.layers.30.self_attn.o_proj.weight": "model-00008-of-00011.safetensors",
486
+ "model.layers.30.self_attn.q_proj.weight": "model-00008-of-00011.safetensors",
487
+ "model.layers.30.self_attn.v_proj.weight": "model-00008-of-00011.safetensors",
488
+ "model.layers.31.input_layernorm.weight": "model-00008-of-00011.safetensors",
489
+ "model.layers.31.mlp.down_proj.weight": "model-00008-of-00011.safetensors",
490
+ "model.layers.31.mlp.gate_proj.weight": "model-00008-of-00011.safetensors",
491
+ "model.layers.31.mlp.up_proj.weight": "model-00008-of-00011.safetensors",
492
+ "model.layers.31.post_attention_layernorm.weight": "model-00008-of-00011.safetensors",
493
+ "model.layers.31.self_attn.a0": "model-00008-of-00011.safetensors",
494
+ "model.layers.31.self_attn.a1": "model-00008-of-00011.safetensors",
495
+ "model.layers.31.self_attn.a2": "model-00008-of-00011.safetensors",
496
+ "model.layers.31.self_attn.g1": "model-00008-of-00011.safetensors",
497
+ "model.layers.31.self_attn.g2": "model-00008-of-00011.safetensors",
498
+ "model.layers.31.self_attn.key.weight": "model-00008-of-00011.safetensors",
499
+ "model.layers.31.self_attn.output.weight": "model-00008-of-00011.safetensors",
500
+ "model.layers.31.self_attn.receptance.weight": "model-00008-of-00011.safetensors",
501
+ "model.layers.31.self_attn.value.weight": "model-00008-of-00011.safetensors",
502
+ "model.layers.31.self_attn.w0": "model-00008-of-00011.safetensors",
503
+ "model.layers.31.self_attn.w1": "model-00008-of-00011.safetensors",
504
+ "model.layers.31.self_attn.w2": "model-00008-of-00011.safetensors",
505
+ "model.layers.32.input_layernorm.weight": "model-00008-of-00011.safetensors",
506
+ "model.layers.32.mlp.down_proj.weight": "model-00008-of-00011.safetensors",
507
+ "model.layers.32.mlp.gate_proj.weight": "model-00008-of-00011.safetensors",
508
+ "model.layers.32.mlp.up_proj.weight": "model-00008-of-00011.safetensors",
509
+ "model.layers.32.post_attention_layernorm.weight": "model-00008-of-00011.safetensors",
510
+ "model.layers.32.self_attn.a0": "model-00008-of-00011.safetensors",
511
+ "model.layers.32.self_attn.a1": "model-00008-of-00011.safetensors",
512
+ "model.layers.32.self_attn.a2": "model-00008-of-00011.safetensors",
513
+ "model.layers.32.self_attn.g1": "model-00008-of-00011.safetensors",
514
+ "model.layers.32.self_attn.g2": "model-00008-of-00011.safetensors",
515
+ "model.layers.32.self_attn.key.weight": "model-00008-of-00011.safetensors",
516
+ "model.layers.32.self_attn.output.weight": "model-00008-of-00011.safetensors",
517
+ "model.layers.32.self_attn.receptance.weight": "model-00008-of-00011.safetensors",
518
+ "model.layers.32.self_attn.value.weight": "model-00008-of-00011.safetensors",
519
+ "model.layers.32.self_attn.w0": "model-00008-of-00011.safetensors",
520
+ "model.layers.32.self_attn.w1": "model-00008-of-00011.safetensors",
521
+ "model.layers.32.self_attn.w2": "model-00008-of-00011.safetensors",
522
+ "model.layers.33.input_layernorm.weight": "model-00008-of-00011.safetensors",
523
+ "model.layers.33.mlp.down_proj.weight": "model-00008-of-00011.safetensors",
524
+ "model.layers.33.mlp.gate_proj.weight": "model-00008-of-00011.safetensors",
525
+ "model.layers.33.mlp.up_proj.weight": "model-00009-of-00011.safetensors",
526
+ "model.layers.33.post_attention_layernorm.weight": "model-00009-of-00011.safetensors",
527
+ "model.layers.33.self_attn.a0": "model-00009-of-00011.safetensors",
528
+ "model.layers.33.self_attn.a1": "model-00009-of-00011.safetensors",
529
+ "model.layers.33.self_attn.a2": "model-00009-of-00011.safetensors",
530
+ "model.layers.33.self_attn.g1": "model-00009-of-00011.safetensors",
531
+ "model.layers.33.self_attn.g2": "model-00009-of-00011.safetensors",
532
+ "model.layers.33.self_attn.key.weight": "model-00009-of-00011.safetensors",
533
+ "model.layers.33.self_attn.output.weight": "model-00009-of-00011.safetensors",
534
+ "model.layers.33.self_attn.receptance.weight": "model-00009-of-00011.safetensors",
535
+ "model.layers.33.self_attn.value.weight": "model-00009-of-00011.safetensors",
536
+ "model.layers.33.self_attn.w0": "model-00009-of-00011.safetensors",
537
+ "model.layers.33.self_attn.w1": "model-00009-of-00011.safetensors",
538
+ "model.layers.33.self_attn.w2": "model-00009-of-00011.safetensors",
539
+ "model.layers.34.input_layernorm.weight": "model-00009-of-00011.safetensors",
540
+ "model.layers.34.mlp.down_proj.weight": "model-00009-of-00011.safetensors",
541
+ "model.layers.34.mlp.gate_proj.weight": "model-00009-of-00011.safetensors",
542
+ "model.layers.34.mlp.up_proj.weight": "model-00009-of-00011.safetensors",
543
+ "model.layers.34.post_attention_layernorm.weight": "model-00009-of-00011.safetensors",
544
+ "model.layers.34.self_attn.a0": "model-00009-of-00011.safetensors",
545
+ "model.layers.34.self_attn.a1": "model-00009-of-00011.safetensors",
546
+ "model.layers.34.self_attn.a2": "model-00009-of-00011.safetensors",
547
+ "model.layers.34.self_attn.g1": "model-00009-of-00011.safetensors",
548
+ "model.layers.34.self_attn.g2": "model-00009-of-00011.safetensors",
549
+ "model.layers.34.self_attn.key.weight": "model-00009-of-00011.safetensors",
550
+ "model.layers.34.self_attn.output.weight": "model-00009-of-00011.safetensors",
551
+ "model.layers.34.self_attn.receptance.weight": "model-00009-of-00011.safetensors",
552
+ "model.layers.34.self_attn.value.weight": "model-00009-of-00011.safetensors",
553
+ "model.layers.34.self_attn.w0": "model-00009-of-00011.safetensors",
554
+ "model.layers.34.self_attn.w1": "model-00009-of-00011.safetensors",
555
+ "model.layers.34.self_attn.w2": "model-00009-of-00011.safetensors",
556
+ "model.layers.35.input_layernorm.weight": "model-00009-of-00011.safetensors",
557
+ "model.layers.35.mlp.down_proj.weight": "model-00009-of-00011.safetensors",
558
+ "model.layers.35.mlp.gate_proj.weight": "model-00009-of-00011.safetensors",
559
+ "model.layers.35.mlp.up_proj.weight": "model-00009-of-00011.safetensors",
560
+ "model.layers.35.post_attention_layernorm.weight": "model-00009-of-00011.safetensors",
561
+ "model.layers.35.self_attn.k_proj.weight": "model-00009-of-00011.safetensors",
562
+ "model.layers.35.self_attn.o_proj.weight": "model-00009-of-00011.safetensors",
563
+ "model.layers.35.self_attn.q_proj.weight": "model-00009-of-00011.safetensors",
564
+ "model.layers.35.self_attn.v_proj.weight": "model-00009-of-00011.safetensors",
565
+ "model.layers.36.input_layernorm.weight": "model-00009-of-00011.safetensors",
566
+ "model.layers.36.mlp.down_proj.weight": "model-00009-of-00011.safetensors",
567
+ "model.layers.36.mlp.gate_proj.weight": "model-00009-of-00011.safetensors",
568
+ "model.layers.36.mlp.up_proj.weight": "model-00009-of-00011.safetensors",
569
+ "model.layers.36.post_attention_layernorm.weight": "model-00009-of-00011.safetensors",
570
+ "model.layers.36.self_attn.a0": "model-00009-of-00011.safetensors",
571
+ "model.layers.36.self_attn.a1": "model-00009-of-00011.safetensors",
572
+ "model.layers.36.self_attn.a2": "model-00009-of-00011.safetensors",
573
+ "model.layers.36.self_attn.g1": "model-00009-of-00011.safetensors",
574
+ "model.layers.36.self_attn.g2": "model-00009-of-00011.safetensors",
575
+ "model.layers.36.self_attn.key.weight": "model-00009-of-00011.safetensors",
576
+ "model.layers.36.self_attn.output.weight": "model-00009-of-00011.safetensors",
577
+ "model.layers.36.self_attn.receptance.weight": "model-00009-of-00011.safetensors",
578
+ "model.layers.36.self_attn.value.weight": "model-00009-of-00011.safetensors",
579
+ "model.layers.36.self_attn.w0": "model-00009-of-00011.safetensors",
580
+ "model.layers.36.self_attn.w1": "model-00009-of-00011.safetensors",
581
+ "model.layers.36.self_attn.w2": "model-00009-of-00011.safetensors",
582
+ "model.layers.37.input_layernorm.weight": "model-00009-of-00011.safetensors",
583
+ "model.layers.37.mlp.down_proj.weight": "model-00009-of-00011.safetensors",
584
+ "model.layers.37.mlp.gate_proj.weight": "model-00009-of-00011.safetensors",
585
+ "model.layers.37.mlp.up_proj.weight": "model-00009-of-00011.safetensors",
586
+ "model.layers.37.post_attention_layernorm.weight": "model-00009-of-00011.safetensors",
587
+ "model.layers.37.self_attn.a0": "model-00009-of-00011.safetensors",
588
+ "model.layers.37.self_attn.a1": "model-00009-of-00011.safetensors",
589
+ "model.layers.37.self_attn.a2": "model-00009-of-00011.safetensors",
590
+ "model.layers.37.self_attn.g1": "model-00009-of-00011.safetensors",
591
+ "model.layers.37.self_attn.g2": "model-00009-of-00011.safetensors",
592
+ "model.layers.37.self_attn.key.weight": "model-00009-of-00011.safetensors",
593
+ "model.layers.37.self_attn.output.weight": "model-00009-of-00011.safetensors",
594
+ "model.layers.37.self_attn.receptance.weight": "model-00009-of-00011.safetensors",
595
+ "model.layers.37.self_attn.value.weight": "model-00009-of-00011.safetensors",
596
+ "model.layers.37.self_attn.w0": "model-00009-of-00011.safetensors",
597
+ "model.layers.37.self_attn.w1": "model-00009-of-00011.safetensors",
598
+ "model.layers.37.self_attn.w2": "model-00009-of-00011.safetensors",
599
+ "model.layers.38.input_layernorm.weight": "model-00009-of-00011.safetensors",
600
+ "model.layers.38.mlp.down_proj.weight": "model-00010-of-00011.safetensors",
601
+ "model.layers.38.mlp.gate_proj.weight": "model-00010-of-00011.safetensors",
602
+ "model.layers.38.mlp.up_proj.weight": "model-00010-of-00011.safetensors",
603
+ "model.layers.38.post_attention_layernorm.weight": "model-00010-of-00011.safetensors",
604
+ "model.layers.38.self_attn.a0": "model-00010-of-00011.safetensors",
605
+ "model.layers.38.self_attn.a1": "model-00010-of-00011.safetensors",
606
+ "model.layers.38.self_attn.a2": "model-00010-of-00011.safetensors",
607
+ "model.layers.38.self_attn.g1": "model-00010-of-00011.safetensors",
608
+ "model.layers.38.self_attn.g2": "model-00010-of-00011.safetensors",
609
+ "model.layers.38.self_attn.key.weight": "model-00010-of-00011.safetensors",
610
+ "model.layers.38.self_attn.output.weight": "model-00010-of-00011.safetensors",
611
+ "model.layers.38.self_attn.receptance.weight": "model-00010-of-00011.safetensors",
612
+ "model.layers.38.self_attn.value.weight": "model-00010-of-00011.safetensors",
613
+ "model.layers.38.self_attn.w0": "model-00010-of-00011.safetensors",
614
+ "model.layers.38.self_attn.w1": "model-00010-of-00011.safetensors",
615
+ "model.layers.38.self_attn.w2": "model-00010-of-00011.safetensors",
616
+ "model.layers.39.input_layernorm.weight": "model-00010-of-00011.safetensors",
617
+ "model.layers.39.mlp.down_proj.weight": "model-00010-of-00011.safetensors",
618
+ "model.layers.39.mlp.gate_proj.weight": "model-00010-of-00011.safetensors",
619
+ "model.layers.39.mlp.up_proj.weight": "model-00010-of-00011.safetensors",
620
+ "model.layers.39.post_attention_layernorm.weight": "model-00010-of-00011.safetensors",
621
+ "model.layers.39.self_attn.k_proj.weight": "model-00010-of-00011.safetensors",
622
+ "model.layers.39.self_attn.o_proj.weight": "model-00010-of-00011.safetensors",
623
+ "model.layers.39.self_attn.q_proj.weight": "model-00010-of-00011.safetensors",
624
+ "model.layers.39.self_attn.v_proj.weight": "model-00010-of-00011.safetensors",
625
+ "model.layers.40.input_layernorm.weight": "model-00010-of-00011.safetensors",
626
+ "model.layers.40.mlp.down_proj.weight": "model-00010-of-00011.safetensors",
627
+ "model.layers.40.mlp.gate_proj.weight": "model-00010-of-00011.safetensors",
628
+ "model.layers.40.mlp.up_proj.weight": "model-00010-of-00011.safetensors",
629
+ "model.layers.40.post_attention_layernorm.weight": "model-00010-of-00011.safetensors",
630
+ "model.layers.40.self_attn.a0": "model-00010-of-00011.safetensors",
631
+ "model.layers.40.self_attn.a1": "model-00010-of-00011.safetensors",
632
+ "model.layers.40.self_attn.a2": "model-00010-of-00011.safetensors",
633
+ "model.layers.40.self_attn.g1": "model-00010-of-00011.safetensors",
634
+ "model.layers.40.self_attn.g2": "model-00010-of-00011.safetensors",
635
+ "model.layers.40.self_attn.key.weight": "model-00010-of-00011.safetensors",
636
+ "model.layers.40.self_attn.output.weight": "model-00010-of-00011.safetensors",
637
+ "model.layers.40.self_attn.receptance.weight": "model-00010-of-00011.safetensors",
638
+ "model.layers.40.self_attn.value.weight": "model-00010-of-00011.safetensors",
639
+ "model.layers.40.self_attn.w0": "model-00010-of-00011.safetensors",
640
+ "model.layers.40.self_attn.w1": "model-00010-of-00011.safetensors",
641
+ "model.layers.40.self_attn.w2": "model-00010-of-00011.safetensors",
642
+ "model.layers.41.input_layernorm.weight": "model-00010-of-00011.safetensors",
643
+ "model.layers.41.mlp.down_proj.weight": "model-00010-of-00011.safetensors",
644
+ "model.layers.41.mlp.gate_proj.weight": "model-00010-of-00011.safetensors",
645
+ "model.layers.41.mlp.up_proj.weight": "model-00010-of-00011.safetensors",
646
+ "model.layers.41.post_attention_layernorm.weight": "model-00010-of-00011.safetensors",
647
+ "model.layers.41.self_attn.a0": "model-00010-of-00011.safetensors",
648
+ "model.layers.41.self_attn.a1": "model-00010-of-00011.safetensors",
649
+ "model.layers.41.self_attn.a2": "model-00010-of-00011.safetensors",
650
+ "model.layers.41.self_attn.g1": "model-00010-of-00011.safetensors",
651
+ "model.layers.41.self_attn.g2": "model-00010-of-00011.safetensors",
652
+ "model.layers.41.self_attn.key.weight": "model-00010-of-00011.safetensors",
653
+ "model.layers.41.self_attn.output.weight": "model-00010-of-00011.safetensors",
654
+ "model.layers.41.self_attn.receptance.weight": "model-00010-of-00011.safetensors",
655
+ "model.layers.41.self_attn.value.weight": "model-00010-of-00011.safetensors",
656
+ "model.layers.41.self_attn.w0": "model-00010-of-00011.safetensors",
657
+ "model.layers.41.self_attn.w1": "model-00010-of-00011.safetensors",
658
+ "model.layers.41.self_attn.w2": "model-00010-of-00011.safetensors",
659
+ "model.layers.42.input_layernorm.weight": "model-00010-of-00011.safetensors",
660
+ "model.layers.42.mlp.down_proj.weight": "model-00010-of-00011.safetensors",
661
+ "model.layers.42.mlp.gate_proj.weight": "model-00010-of-00011.safetensors",
662
+ "model.layers.42.mlp.up_proj.weight": "model-00011-of-00011.safetensors",
663
+ "model.layers.42.post_attention_layernorm.weight": "model-00011-of-00011.safetensors",
664
+ "model.layers.42.self_attn.a0": "model-00011-of-00011.safetensors",
665
+ "model.layers.42.self_attn.a1": "model-00011-of-00011.safetensors",
666
+ "model.layers.42.self_attn.a2": "model-00011-of-00011.safetensors",
667
+ "model.layers.42.self_attn.g1": "model-00011-of-00011.safetensors",
668
+ "model.layers.42.self_attn.g2": "model-00011-of-00011.safetensors",
669
+ "model.layers.42.self_attn.key.weight": "model-00011-of-00011.safetensors",
670
+ "model.layers.42.self_attn.output.weight": "model-00011-of-00011.safetensors",
671
+ "model.layers.42.self_attn.receptance.weight": "model-00011-of-00011.safetensors",
672
+ "model.layers.42.self_attn.value.weight": "model-00011-of-00011.safetensors",
673
+ "model.layers.42.self_attn.w0": "model-00011-of-00011.safetensors",
674
+ "model.layers.42.self_attn.w1": "model-00011-of-00011.safetensors",
675
+ "model.layers.42.self_attn.w2": "model-00011-of-00011.safetensors",
676
+ "model.layers.43.input_layernorm.weight": "model-00011-of-00011.safetensors",
677
+ "model.layers.43.mlp.down_proj.weight": "model-00011-of-00011.safetensors",
678
+ "model.layers.43.mlp.gate_proj.weight": "model-00011-of-00011.safetensors",
679
+ "model.layers.43.mlp.up_proj.weight": "model-00011-of-00011.safetensors",
680
+ "model.layers.43.post_attention_layernorm.weight": "model-00011-of-00011.safetensors",
681
+ "model.layers.43.self_attn.k_proj.weight": "model-00011-of-00011.safetensors",
682
+ "model.layers.43.self_attn.o_proj.weight": "model-00011-of-00011.safetensors",
683
+ "model.layers.43.self_attn.q_proj.weight": "model-00011-of-00011.safetensors",
684
+ "model.layers.43.self_attn.v_proj.weight": "model-00011-of-00011.safetensors",
685
+ "model.norm.weight": "model-00011-of-00011.safetensors"
686
+ }
687
+ }
modeling_rwkv07aqwen3.py ADDED
@@ -0,0 +1,1045 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2024 The Qwen team, Alibaba Group 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
+ """
21
+ PyTorch RWKV07AQwen3 model.
22
+ base code from SmerkyG @ recursal.ai, featherless.ai
23
+ hxa07A implementation RWKV07A + NoPE Hybrid Attention
24
+
25
+ """
26
+
27
+ import math
28
+ import inspect
29
+ from typing import List, Optional, Tuple, Union, Dict, Any
30
+
31
+ import torch
32
+ import torch.utils.checkpoint
33
+ from torch import nn
34
+ import torch.nn.functional as F
35
+ from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
36
+
37
+ from transformers.activations import ACT2FN
38
+ from transformers.cache_utils import Cache, DynamicCache, CacheLayerMixin
39
+ from transformers.generation import GenerationMixin
40
+ from transformers.integrations import use_kernel_forward_from_hub
41
+ from transformers.masking_utils import create_causal_mask, create_sliding_window_causal_mask
42
+ from transformers.modeling_flash_attention_utils import FlashAttentionKwargs
43
+ from transformers.modeling_layers import (
44
+ GenericForQuestionAnswering,
45
+ GenericForSequenceClassification,
46
+ GenericForTokenClassification,
47
+ GradientCheckpointingLayer,
48
+ )
49
+ from transformers.modeling_outputs import BaseModelOutputWithPast, CausalLMOutputWithPast
50
+ from transformers.modeling_rope_utils import ROPE_INIT_FUNCTIONS, dynamic_rope_update
51
+ from transformers.modeling_utils import ALL_ATTENTION_FUNCTIONS, PreTrainedModel
52
+ from transformers.processing_utils import Unpack
53
+ from transformers.utils import TransformersKwargs, auto_docstring, can_return_tuple
54
+ from transformers.utils.generic import check_model_inputs
55
+
56
+ from .configuration_rwkv07aqwen3 import RWKV07AQwen3Config
57
+
58
+ from transformers.models.qwen3.modeling_qwen3 import Qwen3DecoderLayer, Qwen3MLP, Qwen3RMSNorm, Qwen3Attention
59
+
60
+ class RWKV07AState():
61
+ def __init__(self) -> None:
62
+ #super().__init__()
63
+ self._seen_tokens = 0 # Used in `generate` to keep tally of how many tokens the cache has seen
64
+ self.layer_kv_states: List[torch.Tensor] = []
65
+ self.layer_shift_states: List[torch.Tensor] = []
66
+ self.cumulative_scores: List[torch.Tensor] = []
67
+ self.sin: List[torch.Tensor] = []
68
+ self.cos: List[torch.Tensor] = []
69
+
70
+ def __getitem__(self, layer_idx: int) -> Tuple[torch.Tensor, torch.Tensor]:
71
+ """
72
+ Support for backwards-compatible `past_key_value` indexing, e.g. `past_key_value[0][0].shape[2]` to get the
73
+ sequence length.
74
+ """
75
+ if layer_idx < len(self):
76
+ return (self.layer_kv_states[layer_idx], self.layer_shift_states[layer_idx])
77
+ else:
78
+ raise KeyError(f"Cache only has {len(self)} layers, attempted to access layer with index {layer_idx}")
79
+
80
+ def __iter__(self):
81
+ """
82
+ Support for backwards-compatible `past_key_value` iteration, e.g. `for x in past_key_value:` to iterate over
83
+ keys and values
84
+ """
85
+ for layer_idx in range(len(self)):
86
+ yield (self.layer_kv_states[layer_idx], self.layer_shift_states[layer_idx])
87
+
88
+ def __len__(self):
89
+ """
90
+ Support for backwards-compatible `past_key_value` length, e.g. `len(past_key_value)`. This value corresponds
91
+ to the number of layers in the model.
92
+ """
93
+ return len(self.layer_kv_states)
94
+
95
+ def get_usable_length(self, new_seq_length: int, layer_idx: Optional[int] = 0) -> int:
96
+ """Given the sequence length of the new inputs, returns the usable length of the cache."""
97
+ # Linear Attention variants do not have a maximum length
98
+ return new_seq_length
99
+
100
+ def reorder_cache(self, beam_idx: torch.LongTensor):
101
+ """Reorders the cache for beam search, given the selected beam indices."""
102
+ raise NotImplementedError('Cannot reorder Linear Attention state')
103
+
104
+ def get_seq_length(self, layer_idx: int = 0) -> int:
105
+ """Returns the sequence length of the cached states. A layer index can be optionally passed."""
106
+ return self._seen_tokens
107
+
108
+ def get_max_cache_shape(self) -> Optional[int]:
109
+ """Returns the maximum sequence length of the cache object. DynamicCache does not have a maximum length."""
110
+ return None
111
+
112
+ def get_max_length(self) -> Optional[int]:
113
+ """
114
+ Returns the maximum sequence length of the cached states. DynamicCache does not have a maximum length.
115
+ """
116
+ return None
117
+
118
+ def crop(self, max_length: int):
119
+ # can't implement this for linear attention variants
120
+ return
121
+
122
+ def get_mask_sizes(self, cache_position: torch.Tensor, layer_idx: int) -> tuple[int, int]:
123
+ """Return the length and offset of the cache, used to generate the mask"""
124
+ kv_offset = 0
125
+ query_length = cache_position.shape[0]
126
+ past_seen_tokens = self.get_seq_length()
127
+ kv_length = query_length + past_seen_tokens
128
+ return kv_length, kv_offset
129
+
130
+ @property
131
+ def is_compileable(self) -> bool:
132
+ """Return whether the cache is compileable"""
133
+ return True #all(layer.is_compileable for layer in self.layers)
134
+
135
+ @torch.no_grad
136
+ def update(
137
+ self,
138
+ kv_state: torch.Tensor,
139
+ shift_state: torch.Tensor,
140
+ layer_idx: int,
141
+ token_count: int = 0,
142
+ is_attention_layer: bool = True,
143
+ cache_kwargs: Optional[Dict[str, Any]] = None,
144
+ ) -> Tuple[torch.Tensor, torch.Tensor]:
145
+ # Update the number of seen tokens
146
+ if layer_idx == 0:
147
+ if is_attention_layer:
148
+ token_count = kv_state.size(-2)
149
+ self._seen_tokens += token_count
150
+
151
+ #print(f'self._seen_tokens = {self._seen_tokens} layer_idx = {layer_idx} is_attention_layer = {is_attention_layer} kv_state.size(-2) = {kv_state.size(-2)}')
152
+
153
+ # Update the cache
154
+ if kv_state is not None:
155
+ # There may be skipped layers, fill them with empty lists
156
+ if layer_idx >= len(self.layer_kv_states):
157
+ for _ in range(len(self.layer_kv_states), layer_idx):
158
+ if is_attention_layer:
159
+ self.layer_kv_states.append(torch.tensor([], dtype=kv_state.dtype, device=kv_state.device)) # acts as key_cache
160
+ self.layer_shift_states.append(torch.tensor([], dtype=shift_state.dtype, device=shift_state.device)) # acts as value_cache
161
+ else:
162
+ self.layer_kv_states.append(torch.zeros_like(kv_state).requires_grad_(False))
163
+ self.layer_shift_states.append(torch.zeros_like(shift_state).requires_grad_(False))
164
+ self.layer_kv_states.append(kv_state) # acts as key_cache
165
+ self.layer_shift_states.append(shift_state) # acts as value_cache
166
+ else:
167
+ if is_attention_layer:
168
+ self.layer_kv_states[layer_idx] = torch.cat([self.layer_kv_states[layer_idx], kv_state], dim=-2) # acts as key_cache
169
+ self.layer_shift_states[layer_idx] = torch.cat([self.layer_shift_states[layer_idx], shift_state], dim=-2) # acts as value_cache
170
+ else:
171
+ self.layer_kv_states[layer_idx].copy_(kv_state)
172
+ self.layer_shift_states[layer_idx].copy_(shift_state)
173
+
174
+ return self.layer_kv_states[layer_idx], self.layer_shift_states[layer_idx]
175
+
176
+ try:
177
+ from fla.ops.rwkv7.chunk import chunk_rwkv7
178
+ from fla.ops.rwkv7.fused_recurrent import fused_recurrent_rwkv7
179
+ except ImportError:
180
+ print("Required module is not installed. Please install it using the following commands:")
181
+ print("pip install --no-use-pep517 flash-linear-attention")
182
+ print("Additionally, ensure you have at least version 2.2.0 of Triton installed:")
183
+ print("pip install triton>=2.2.0")
184
+
185
+ # def is_layer_attention(config, layer_id):
186
+ # return layer_id >= config.first_attention_layer and layer_id < config.first_post_attention_layer and (layer_id > min(config.num_hidden_layers, config.last_striping_layer) or (min(config.num_hidden_layers-1, config.last_striping_layer) - layer_id) % config.attention_striping == 0)
187
+
188
+ def is_layer_attention(config, layer_id):
189
+ return layer_id in config.transformer_layers
190
+
191
+ def repeat_kv_rwkv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor:
192
+ """
193
+ Repeat KV heads along the head dimension (GQA).
194
+ Input: (B, T, H_kv, D)
195
+ Output: (B, T, H_kv * n_rep, D)
196
+ """
197
+ B, T, H_kv, D = hidden_states.shape
198
+ if n_rep == 1:
199
+ return hidden_states
200
+ # Expand head dim
201
+ hidden_states = hidden_states[:, :, :, None, :] # (B, T, H_kv, 1, D)
202
+ hidden_states = hidden_states.expand(B, T, H_kv, n_rep, D) # (B, T, H_kv, n_rep, D)
203
+ return hidden_states.reshape(B, T, H_kv * n_rep, D).contiguous()
204
+
205
+ def T5RMSNorm(hidden_states,weight,variance_epsilon:float=1e-6):
206
+ input_dtype = hidden_states.dtype
207
+ hidden_states = hidden_states.to(torch.float32)
208
+ variance = hidden_states.pow(2).mean(-1, keepdim=True)
209
+ hidden_states = hidden_states * torch.rsqrt(variance + variance_epsilon)
210
+ return (weight * hidden_states).to(input_dtype)
211
+
212
+ def compute_qwen3_rope_cache(seq_len, rotary_dim, device, dtype, rope_theta):
213
+ half_dim = rotary_dim // 2
214
+ freq_seq = torch.arange(half_dim, dtype=dtype, device=device)
215
+ inv_freq = 1.0 / (rope_theta ** (freq_seq / half_dim))
216
+ positions = torch.arange(seq_len, dtype=dtype, device=device)
217
+ freqs = torch.einsum("i,j->ij", positions, inv_freq)
218
+ emb = torch.cat([freqs, freqs], dim=-1)
219
+ cos = emb.cos()
220
+ sin = emb.sin()
221
+ return cos.unsqueeze(0), sin.unsqueeze(0), inv_freq
222
+
223
+ # def apply_rotary_pos_emb(q, k, cos, sin, position_ids=None, unsqueeze_dim=1):
224
+ # """Applies Rotary Position Embedding to the query and key tensors.
225
+
226
+ # Args:
227
+ # q (`torch.Tensor`): The query tensor.
228
+ # k (`torch.Tensor`): The key tensor.
229
+ # cos (`torch.Tensor`): The cosine part of the rotary embedding.
230
+ # sin (`torch.Tensor`): The sine part of the rotary embedding.
231
+ # position_ids (`torch.Tensor`, *optional*):
232
+ # Deprecated and unused.
233
+ # unsqueeze_dim (`int`, *optional*, defaults to 1):
234
+ # The 'unsqueeze_dim' argument specifies the dimension along which to unsqueeze cos[position_ids] and
235
+ # sin[position_ids] so that they can be properly broadcasted to the dimensions of q and k. For example, note
236
+ # that cos[position_ids] and sin[position_ids] have the shape [batch_size, seq_len, head_dim]. Then, if q and
237
+ # k have the shape [batch_size, heads, seq_len, head_dim], then setting unsqueeze_dim=1 makes
238
+ # cos[position_ids] and sin[position_ids] broadcastable to the shapes of q and k. Similarly, if q and k have
239
+ # the shape [batch_size, seq_len, heads, head_dim], then set unsqueeze_dim=2.
240
+ # Returns:
241
+ # `tuple(torch.Tensor)` comprising of the query and key tensors rotated using the Rotary Position Embedding.
242
+ # """
243
+ # cos = cos.unsqueeze(unsqueeze_dim)
244
+ # sin = sin.unsqueeze(unsqueeze_dim)
245
+ # q_embed = (q * cos) + (rotate_half(q) * sin)
246
+ # k_embed = (k * cos) + (rotate_half(k) * sin)
247
+ # return q_embed, k_embed
248
+
249
+ class Qwen3RotaryEmbedding(nn.Module):
250
+ def __init__(self, config: RWKV07AQwen3Config, device=None):
251
+ super().__init__()
252
+ # BC: "rope_type" was originally "type"
253
+ if hasattr(config, "rope_scaling") and config.rope_scaling is not None:
254
+ self.rope_type = config.rope_scaling.get("rope_type", config.rope_scaling.get("type"))
255
+ else:
256
+ self.rope_type = "default"
257
+ self.max_seq_len_cached = config.max_position_embeddings
258
+ self.original_max_seq_len = config.max_position_embeddings
259
+
260
+ self.config = config
261
+ self.rope_init_fn = ROPE_INIT_FUNCTIONS[self.rope_type]
262
+
263
+ inv_freq, self.attention_scaling = self.rope_init_fn(self.config, device)
264
+ self.register_buffer("inv_freq", inv_freq, persistent=False)
265
+ self.original_inv_freq = self.inv_freq
266
+
267
+ def _dynamic_frequency_update(self, position_ids, device):
268
+ """
269
+ dynamic RoPE layers should recompute `inv_freq` in the following situations:
270
+ 1 - growing beyond the cached sequence length (allow scaling)
271
+ 2 - the current sequence length is in the original scale (avoid losing precision with small sequences)
272
+ """
273
+ seq_len = torch.max(position_ids) + 1
274
+ if seq_len > self.max_seq_len_cached: # growth
275
+ inv_freq, self.attention_scaling = self.rope_init_fn(self.config, device, seq_len=seq_len)
276
+ self.register_buffer("inv_freq", inv_freq, persistent=False) # TODO joao: may break with compilation
277
+ self.max_seq_len_cached = seq_len
278
+
279
+ if seq_len < self.original_max_seq_len and self.max_seq_len_cached > self.original_max_seq_len: # reset
280
+ # This .to() is needed if the model has been moved to a device after being initialized (because
281
+ # the buffer is automatically moved, but not the original copy)
282
+ self.original_inv_freq = self.original_inv_freq.to(device)
283
+ self.register_buffer("inv_freq", self.original_inv_freq, persistent=False)
284
+ self.max_seq_len_cached = self.original_max_seq_len
285
+
286
+ @torch.no_grad()
287
+ def forward(self, x, position_ids):
288
+ if "dynamic" in self.rope_type:
289
+ self._dynamic_frequency_update(position_ids, device=x.device)
290
+
291
+ # Core RoPE block
292
+ inv_freq_expanded = self.inv_freq[None, :, None].float().expand(position_ids.shape[0], -1, 1)
293
+ position_ids_expanded = position_ids[:, None, :].float()
294
+ # Force float32 (see https://github.com/huggingface/transformers/pull/29285)
295
+ device_type = x.device.type
296
+ device_type = device_type if isinstance(device_type, str) and device_type != "mps" else "cpu"
297
+ with torch.autocast(device_type=device_type, enabled=False):
298
+ freqs = (inv_freq_expanded.float() @ position_ids_expanded.float()).transpose(1, 2)
299
+ emb = torch.cat((freqs, freqs), dim=-1)
300
+ cos = emb.cos()
301
+ sin = emb.sin()
302
+
303
+ # Advanced RoPE types (e.g. yarn) apply a post-processing scaling factor, equivalent to scaling attention
304
+ cos = cos * self.attention_scaling
305
+ sin = sin * self.attention_scaling
306
+
307
+ return cos.to(dtype=x.dtype), sin.to(dtype=x.dtype)
308
+
309
+ def rms_norm(hidden_states, eps = 1e-6):
310
+ #print('ugyuugyu')
311
+ input_dtype = hidden_states.dtype
312
+ hidden_states = hidden_states.to(torch.float32)
313
+ variance = hidden_states.pow(2).mean(-1, keepdim=True)
314
+ hidden_states = hidden_states * torch.rsqrt(variance + eps)
315
+ return hidden_states.to(input_dtype)
316
+
317
+ def generate_rotary_embedding(max_seqlen:int, dim:int, theta:float = 10000.0, scale:float = 1):
318
+ #inv_freq = 1.0 / (theta ** (torch.arange(0, dim, 2, dtype=torch.float).to(device) / dim))
319
+
320
+ angular_velocity = theta ** -(torch.arange(0, dim, 2, dtype=torch.float) / dim) / scale # frequencies from 1.0 ... 1/theta
321
+ angles = torch.outer(torch.arange(max_seqlen), angular_velocity)
322
+ # Different from paper, but it uses a different permutation in order to obtain the same calculation
323
+ emb = torch.cat((angles, angles), dim=-1)
324
+ return torch.stack([emb.cos(), emb.sin()], dim=0)
325
+ #return torch.polar(torch.ones_like(angles), angles)
326
+
327
+ # Copied from transformers.models.llama.modeling_llama.rotate_half
328
+ def rotate_half(x):
329
+ """Rotates half the hidden dims of the input."""
330
+ x1 = x[..., : x.shape[-1] // 2]
331
+ x2 = x[..., x.shape[-1] // 2 :]
332
+ return torch.cat((-x2, x1), dim=-1)
333
+
334
+ def apply_rotary_pos_emb(q, k, cos, sin, position_ids=None, unsqueeze_dim=1):
335
+ """Applies Rotary Position Embedding to the query and key tensors.
336
+
337
+ Args:
338
+ q (`torch.Tensor`): The query tensor.
339
+ k (`torch.Tensor`): The key tensor.
340
+ cos (`torch.Tensor`): The cosine part of the rotary embedding.
341
+ sin (`torch.Tensor`): The sine part of the rotary embedding.
342
+ position_ids (`torch.Tensor`, *optional*):
343
+ Deprecated and unused.
344
+ unsqueeze_dim (`int`, *optional*, defaults to 1):
345
+ The 'unsqueeze_dim' argument specifies the dimension along which to unsqueeze cos[position_ids] and
346
+ sin[position_ids] so that they can be properly broadcasted to the dimensions of q and k. For example, note
347
+ that cos[position_ids] and sin[position_ids] have the shape [batch_size, seq_len, head_dim]. Then, if q and
348
+ k have the shape [batch_size, heads, seq_len, head_dim], then setting unsqueeze_dim=1 makes
349
+ cos[position_ids] and sin[position_ids] broadcastable to the shapes of q and k. Similarly, if q and k have
350
+ the shape [batch_size, seq_len, heads, head_dim], then set unsqueeze_dim=2.
351
+ Returns:
352
+ `tuple(torch.Tensor)` comprising of the query and key tensors rotated using the Rotary Position Embedding.
353
+ """
354
+ cos = cos.unsqueeze(unsqueeze_dim)
355
+ sin = sin.unsqueeze(unsqueeze_dim)
356
+ q_embed = (q * cos) + (rotate_half(q) * sin)
357
+ k_embed = (k * cos) + (rotate_half(k) * sin)
358
+ return q_embed, k_embed
359
+
360
+ def apply_rotary_pos_emb_single(x, cos, sin, unsqueeze_dim=1):
361
+ return (x * cos.unsqueeze(unsqueeze_dim)) + (rotate_half(x) * sin.unsqueeze(unsqueeze_dim))
362
+
363
+ from typing import Callable, Optional, Tuple, Union
364
+ from transformers.modeling_utils import ALL_ATTENTION_FUNCTIONS, PreTrainedModel
365
+ from transformers.processing_utils import Unpack
366
+ from transformers.modeling_flash_attention_utils import FlashAttentionKwargs
367
+
368
+ def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor:
369
+ """
370
+ This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch,
371
+ num_key_value_heads, seqlen, head_dim) to (batch, num_attention_heads, seqlen, head_dim)
372
+ """
373
+ batch, num_key_value_heads, slen, head_dim = hidden_states.shape
374
+ if n_rep == 1:
375
+ return hidden_states
376
+ hidden_states = hidden_states[:, :, None, :, :].expand(batch, num_key_value_heads, n_rep, slen, head_dim)
377
+ return hidden_states.reshape(batch, num_key_value_heads * n_rep, slen, head_dim)
378
+
379
+ def eager_attention_forward(
380
+ module: nn.Module,
381
+ query: torch.Tensor,
382
+ key: torch.Tensor,
383
+ value: torch.Tensor,
384
+ attention_mask: Optional[torch.Tensor],
385
+ scaling: float,
386
+ dropout: float = 0.0,
387
+ **kwargs,
388
+ ):
389
+ key_states = repeat_kv(key, module.num_key_value_groups)
390
+ value_states = repeat_kv(value, module.num_key_value_groups)
391
+
392
+ attn_weights = torch.matmul(query, key_states.transpose(2, 3)) * scaling
393
+ if attention_mask is not None:
394
+ causal_mask = attention_mask[:, :, :, : key_states.shape[-2]]
395
+ attn_weights = attn_weights + causal_mask
396
+
397
+ attn_weights = nn.functional.softmax(attn_weights, dim=-1, dtype=torch.float32).to(query.dtype)
398
+ attn_weights = attn_weights.masked_fill(attn_weights.isnan(), 0) # IMPORTANT FOR BATCHED INFERENCE IN LM EVAL!
399
+ attn_weights = nn.functional.dropout(attn_weights, p=dropout, training=module.training)
400
+ attn_output = torch.matmul(attn_weights, value_states)
401
+ attn_output = attn_output.transpose(1, 2).contiguous()
402
+
403
+ return attn_output, attn_weights
404
+
405
+ from torch.nn.attention.flex_attention import create_block_mask, flex_attention, create_mask
406
+ from functools import lru_cache
407
+
408
+ block_mask = None
409
+
410
+
411
+
412
+ def scaled_dot_product_attention(query, key, value, attn_mask=None, dropout_p=0.0,
413
+ is_causal=False, scale=None, enable_gqa=False) -> torch.Tensor:
414
+ L, S = query.size(-2), key.size(-2)
415
+ scale_factor = 1 / math.sqrt(query.size(-1)) if scale is None else scale
416
+ attn_bias = torch.zeros(L, S, dtype=query.dtype, device=query.device)
417
+ if is_causal:
418
+ assert attn_mask is None
419
+ temp_mask = torch.ones(L, S, dtype=torch.bool).tril(diagonal=0)
420
+ attn_bias.masked_fill_(temp_mask.logical_not(), float("-inf"))
421
+ attn_bias.to(query.dtype)
422
+
423
+ if attn_mask is not None:
424
+ if attn_mask.dtype == torch.bool:
425
+ attn_bias.masked_fill_(attn_mask.logical_not(), float("-inf"))
426
+ else:
427
+ attn_bias = attn_mask + attn_bias
428
+
429
+ if enable_gqa:
430
+ key = key.repeat_interleave(query.size(-3)//key.size(-3), -3)
431
+ value = value.repeat_interleave(query.size(-3)//value.size(-3), -3)
432
+
433
+ attn_weight = query.float() @ key.float().transpose(-2, -1) * scale_factor
434
+ attn_weight += attn_bias.float()
435
+ #attn_weight = stable_softmax(attn_weight, dim=-1)
436
+ attn_weight = torch.softmax(attn_weight, dim=-1)
437
+ attn_weight = attn_weight.masked_fill(attn_weight.isnan(), 0) # IMPORTANT FOR BATCHED INFERENCE IN LM EVAL!
438
+ #attn_weight = torch.dropout(attn_weight, dropout_p, train=True)
439
+ return attn_weight @ value.float()
440
+
441
+
442
+
443
+ class Qwen3AttentionNoPE_Causal(Qwen3Attention):
444
+ def forward(
445
+ self,
446
+ hidden_states: torch.Tensor,
447
+ frozen_residual: torch.Tensor,
448
+ v_first: Optional[torch.Tensor] = None,
449
+ k_first: Optional[torch.Tensor] = None,
450
+ position_embeddings: Optional[Tuple[torch.Tensor, torch.Tensor]] = None,
451
+ attention_mask: Optional[torch.Tensor] = None,
452
+ past_key_values: Optional[Cache] = None,
453
+ cache_position: Optional[torch.LongTensor] = None,
454
+ **kwargs: Unpack[FlashAttentionKwargs],
455
+ ) -> Tuple[torch.Tensor, Optional[torch.Tensor], Optional[torch.Tensor]]:
456
+ x = hidden_states
457
+
458
+ B, L, D = x.size()
459
+
460
+ input_shape = x.shape[:-1]
461
+ hidden_shape = (*input_shape, -1, self.head_dim)
462
+
463
+ if self.config.enable_qk_norm:
464
+ q = self.q_norm(self.q_proj(x).view(hidden_shape)).transpose(1, 2)
465
+ k = self.k_norm(self.k_proj(x).view(hidden_shape)).transpose(1, 2)
466
+ else:
467
+ q = self.q_proj(x).view(hidden_shape).transpose(1, 2)
468
+ k = self.k_proj(x).view(hidden_shape).transpose(1, 2)
469
+
470
+
471
+ v = self.v_proj(x).view(hidden_shape).transpose(1, 2)
472
+
473
+ if past_key_values is not None:
474
+ # sin and cos are specific to RoPE models; cache_position needed for the static cache
475
+ cache_kwargs = {"cache_position": cache_position}
476
+ k, v = past_key_values.update(k, v, self.layer_idx, cache_kwargs)
477
+
478
+ # repeat k/v heads if n_kv_heads < n_heads
479
+ k = repeat_kv(k, self.num_key_value_groups)
480
+ v = repeat_kv(v, self.num_key_value_groups)
481
+
482
+ S = k.size(-2)
483
+
484
+ y = nn.functional.scaled_dot_product_attention(q, k, v, dropout_p=0.0, attn_mask=attention_mask, is_causal=attention_mask is None and L==S)
485
+ y = y.transpose(1,2)
486
+ y = y.reshape(*input_shape, -1)#.contiguous()
487
+ y = self.o_proj(y)
488
+
489
+ attn_weights = None
490
+
491
+ return y, v_first, k_first
492
+
493
+ class RWKV07AAttention(nn.Module):
494
+ """
495
+ This is a simplified RWKV block that prioritizes inference efficiency.
496
+ Decay and Gate are increased to minimize performance degradation.
497
+
498
+ from RWKV v7
499
+ 1. delete Tokenshift
500
+ 2. delete GroupNorm
501
+ 3. delete r_k
502
+ 4. delete v_first
503
+ 5. changed iclr 1-w+a
504
+ 6. big decaysize
505
+ """
506
+ def __init__(self, config, layer_idx: Optional[int] = None):
507
+ super().__init__()
508
+ self.config = config
509
+ self.layer_idx = layer_idx
510
+ C = self.hidden_size = config.hidden_size
511
+ H = self.num_heads = config.num_attention_heads
512
+ H_kv = config.num_key_value_heads
513
+ N = self.head_dim = getattr(config, 'head_dim', self.hidden_size // self.num_heads)
514
+ self.num_key_value_heads = config.num_key_value_heads
515
+ self.num_key_value_groups = self.num_heads // self.num_key_value_heads
516
+ self.attention_dropout = config.attention_dropout
517
+
518
+ if self.hidden_size % self.num_heads != 0:
519
+ raise ValueError(
520
+ f"hidden_size must be divisible by num_heads (got `hidden_size`: {self.hidden_size}"
521
+ f" and `num_heads`: {self.num_heads})."
522
+ )
523
+ self.receptance = nn.Linear(
524
+ config.hidden_size, config.num_attention_heads * self.head_dim, bias=config.attention_bias
525
+ )
526
+ self.key = nn.Linear(
527
+ config.hidden_size, config.num_key_value_heads * self.head_dim, bias=config.attention_bias
528
+ )
529
+ self.value = nn.Linear(
530
+ config.hidden_size, config.num_key_value_heads * self.head_dim, bias=config.attention_bias
531
+ )
532
+ self.output = nn.Linear(
533
+ config.num_attention_heads * self.head_dim, config.hidden_size, bias=config.attention_out_bias
534
+ )
535
+
536
+ lora_rank_decay = config.lora_rank_decay
537
+ lora_rank_iclr = config.lora_rank_iclr
538
+ lora_rank_gate = config.lora_rank_gate
539
+
540
+
541
+
542
+
543
+ self.w0 = nn.Parameter(torch.empty(1,1,H*N))
544
+ self.w1 = nn.Parameter(torch.empty(C, lora_rank_decay))
545
+ self.w2 = nn.Parameter(torch.empty(lora_rank_decay, H*N))
546
+
547
+ self.a0 = nn.Parameter(torch.empty(1,1,H*N))
548
+ self.a1 = nn.Parameter(torch.empty(C, lora_rank_iclr))
549
+ self.a2 = nn.Parameter(torch.empty(lora_rank_iclr, H*N))
550
+
551
+
552
+
553
+
554
+ self.g1 = nn.Parameter(torch.empty(C, lora_rank_gate))
555
+ self.g2 = nn.Parameter(torch.empty(lora_rank_gate, H*N))
556
+
557
+
558
+ if self.config.enable_qk_norm:
559
+ self.r_norm = Qwen3RMSNorm(self.head_dim, eps=config.rms_norm_eps) # unlike olmo, only on the head dim!
560
+ self.k_norm = Qwen3RMSNorm(self.head_dim, eps=config.rms_norm_eps) # thus post q_norm does not need reshape
561
+
562
+
563
+
564
+ def forward(
565
+ self,
566
+ hidden_states: torch.Tensor,
567
+ frozen_residual: torch.Tensor,
568
+ v_first: Optional[torch.Tensor] = None,
569
+ k_first: Optional[torch.Tensor] = None,
570
+ attention_mask: Optional[torch.Tensor] = None,
571
+ position_ids: Optional[torch.LongTensor] = None,
572
+ past_key_values: Optional[RWKV07AState] = None,
573
+ output_attentions: bool = False,
574
+ use_cache: bool = False,
575
+ cache_position: Optional[torch.LongTensor] = None,
576
+ position_embeddings: Optional[Tuple[torch.Tensor, torch.Tensor]] = None,
577
+ **kwargs,
578
+ ):
579
+ if attention_mask is not None:
580
+ assert len(attention_mask.shape) in (2, 4)
581
+
582
+ output_shift_state = hidden_states[:, -1:].detach().clone()
583
+
584
+ x = hidden_states
585
+
586
+ B, T, C = hidden_states.shape
587
+ H = self.num_heads
588
+ N = self.head_dim
589
+
590
+ q_len = T
591
+
592
+ if use_cache and past_key_values is not None and len(past_key_values) > self.layer_idx:
593
+ #print(f'use past state layer {self.layer_idx}')
594
+ input_vk_state, input_shift_state = past_key_values[self.layer_idx]
595
+ else:
596
+ input_vk_state, input_shift_state = torch.zeros(B,H,N,N, dtype=torch.bfloat16,device=x.device), torch.zeros_like(x[:, -1:])
597
+
598
+ xr = xw = xk = xv = xa = xg = x
599
+
600
+ r = self.receptance(xr).view(B,T,-1,N)
601
+ w = -F.softplus(-(self.w0 + torch.tanh(xw @ self.w1) @ self.w2)) -0.5
602
+ k = self.key(xk).view(B,T,-1,N)
603
+
604
+ if self.config.enable_qk_norm:
605
+ r = self.r_norm(r)
606
+ k = self.k_norm(k)
607
+
608
+ v = self.value(xv).view(B,T,-1,N)
609
+ a = torch.sigmoid(self.a0 + (xa @ self.a1) @ self.a2)
610
+ g = torch.sigmoid(xg @ self.g1) @ self.g2
611
+
612
+ if position_embeddings is not None:
613
+ cos, sin = position_embeddings
614
+ r, k = apply_rotary_pos_emb(r, k, cos, sin, unsqueeze_dim=2)
615
+
616
+ #for left-padding
617
+ if attention_mask is not None:
618
+ if attention_mask is not None:
619
+ if attention_mask.ndim == 2:
620
+ # [B, S]
621
+ mask = attention_mask[:, -T:] # [B, T]
622
+ v = v * mask[:, :, None, None] # → [B, T, 1, 1] に拡張して掛け算
623
+ elif attention_mask.ndim == 4:
624
+ # [B, 1, L, S]
625
+ mask = attention_mask[:, 0, -1, -T:] # [B, T]
626
+ v = v * mask[:, :, None, None] # 同上
627
+
628
+
629
+ # repeat k/v heads if n_kv_heads < n_heads
630
+
631
+ k = repeat_kv_rwkv(k, self.num_key_value_groups).view(B, T, -1)
632
+ v = repeat_kv_rwkv(v, self.num_key_value_groups).view(B, T, -1)
633
+ dropout_rate = 0.0 if not self.training else self.attention_dropout
634
+
635
+ kk = (k).view(B,T,H,-1).float()
636
+ kk = (kk / (torch.norm(kk, dim=-1, keepdim=True) + 1e-12)).view(B,T,-1).to(k.dtype)
637
+ k = k * (1.0 - w + a)
638
+
639
+ aa = -kk
640
+ bb = kk * a
641
+ w = -w.exp()
642
+
643
+ r_,w_,k_,v_,aa_,bb_ = [i.view(B,T,H,N) for i in [r,w,k,v,aa,bb]]
644
+
645
+ x, output_vk_state = fused_recurrent_rwkv7(r_, w_, k_, v_, aa_, bb_, scale=1.0, initial_state=input_vk_state, output_final_state=True, head_first=False)
646
+
647
+ x = x.view(B,T,-1) * (float(N) ** -0.5)
648
+ x = x * g
649
+ x = self.output(x)
650
+
651
+ if past_key_values is not None:
652
+ past_key_values.update(output_vk_state, output_shift_state, self.layer_idx, q_len, is_layer_attention(self.config, self.layer_idx))
653
+
654
+ return x, v_first, k_first
655
+
656
+ class RWKV07AQwen3DecoderLayer(nn.Module):
657
+ def __init__(self, config: RWKV07AQwen3Config, layer_idx: int):
658
+ nn.Module.__init__(self)
659
+ self.hidden_size = config.hidden_size
660
+ self.layer_idx = layer_idx
661
+
662
+ if is_layer_attention(config, layer_idx):
663
+ print(f'layer {layer_idx} : attention')
664
+ att_fn = Qwen3AttentionNoPE_Causal #Qwen3KeyQuant #Qwen3SWAPrefill #Qwen3DropoutSWASink #Qwen3AttentionNoPE #Qwen3MOBA #Qwen3AttentionVerticalSparse # Qwen3DoubleAttention # Qwen3SymPow #Qwen3Chunk #Qwen3Power #Qwen3MOBA #Qwen3Attention # Qwen3NewAttention # Qwen3AttentionAdapted
665
+ else:
666
+ print(f'layer {layer_idx} : rwkv')
667
+ att_fn = RWKV07AAttention
668
+
669
+ self.self_attn = att_fn(config, layer_idx)
670
+
671
+ self.mlp = Qwen3MLP(config)
672
+ self.input_layernorm = Qwen3RMSNorm(config.hidden_size, eps=config.rms_norm_eps)
673
+ self.post_attention_layernorm = Qwen3RMSNorm(config.hidden_size, eps=config.rms_norm_eps)
674
+ self.attention_type = config.layer_types[layer_idx]
675
+
676
+ def forward(
677
+ self,
678
+ hidden_states: torch.Tensor,
679
+ frozen_residual: torch.Tensor,
680
+ v_first: Optional[torch.Tensor],
681
+ k_first: Optional[torch.Tensor],
682
+ attention_mask: Optional[torch.Tensor] = None,
683
+ position_ids: Optional[torch.LongTensor] = None,
684
+ past_key_values: Optional[Cache] = None,
685
+ output_attentions: Optional[bool] = False,
686
+ use_cache: Optional[bool] = False,
687
+ cache_position: Optional[torch.LongTensor] = None,
688
+ position_embeddings: Optional[Tuple[torch.Tensor, torch.Tensor]] = None,
689
+ **kwargs,
690
+ ) -> Tuple[torch.FloatTensor, Optional[Tuple[torch.FloatTensor, torch.FloatTensor]]]:
691
+ residual = hidden_states
692
+
693
+ hidden_states = self.input_layernorm(hidden_states)
694
+
695
+ # Self Attention
696
+ hidden_states, v_first, k_first = self.self_attn(
697
+ hidden_states=hidden_states,
698
+ frozen_residual=frozen_residual,
699
+ v_first=v_first,
700
+ k_first=k_first,
701
+ attention_mask=attention_mask,
702
+ position_ids=position_ids,
703
+ past_key_values=past_key_values,
704
+ output_attentions=output_attentions,
705
+ use_cache=use_cache,
706
+ cache_position=cache_position,
707
+ position_embeddings=position_embeddings,
708
+ #is_causal=True,
709
+ )
710
+
711
+ hidden_states = residual + hidden_states
712
+
713
+ # Fully Connected
714
+ residual = hidden_states
715
+ hidden_states = self.post_attention_layernorm(hidden_states)
716
+ hidden_states = self.mlp(hidden_states)
717
+ hidden_states = residual + hidden_states
718
+
719
+ outputs = (hidden_states, v_first,k_first,)
720
+
721
+ if output_attentions:
722
+ outputs += (self_attn_weights,)
723
+
724
+ return outputs
725
+
726
+
727
+ @auto_docstring
728
+ class RWKV07AQwen3PreTrainedModel(PreTrainedModel):
729
+ config: RWKV07AQwen3Config
730
+ config_class = RWKV07AQwen3Config
731
+ base_model_prefix = "model"
732
+ supports_gradient_checkpointing = True
733
+ _no_split_modules = ["RWKV07AQwen3DecoderLayer"]
734
+ _skip_keys_device_placement = "past_key_values"
735
+ _supports_flash_attn_2 = True
736
+ _supports_sdpa = True
737
+ _supports_flex_attn = True
738
+
739
+ _supports_cache_class = True
740
+ _supports_quantized_cache = True
741
+ _supports_static_cache = True
742
+
743
+ # def _init_weights(self, module):
744
+ # std = self.config.initializer_range
745
+ # if isinstance(module, nn.Linear):
746
+ # module.weight.data.normal_(mean=0.0, std=std)
747
+ # if module.bias is not None:
748
+ # module.bias.data.zero_()
749
+ # elif isinstance(module, nn.Embedding):
750
+ # module.weight.data.normal_(mean=0.0, std=std)
751
+ # if module.padding_idx is not None:
752
+ # module.weight.data[module.padding_idx].zero_()
753
+
754
+ @auto_docstring
755
+ class RWKV07AQwen3Model(RWKV07AQwen3PreTrainedModel):
756
+ """
757
+ Transformer decoder consisting of *config.num_hidden_layers* layers. Each layer is a [`Qwen3DecoderLayer`]
758
+
759
+ Args:
760
+ config: RWKV07AQwen3Config
761
+ """
762
+
763
+ def __init__(self, config: RWKV07AQwen3Config):
764
+ super().__init__(config)
765
+ self.padding_idx = config.pad_token_id
766
+ self.vocab_size = config.vocab_size
767
+
768
+ self.embed_tokens = nn.Embedding(config.vocab_size, config.hidden_size, self.padding_idx)
769
+ self.layers = nn.ModuleList(
770
+ [RWKV07AQwen3DecoderLayer(config, layer_idx) for layer_idx in range(config.num_hidden_layers)]
771
+ )
772
+ self.norm = Qwen3RMSNorm(config.hidden_size, eps=config.rms_norm_eps)
773
+ self.rotary_emb = Qwen3RotaryEmbedding(config=config)
774
+ self.gradient_checkpointing = False
775
+ self.has_sliding_layers = "sliding_attention" in self.config.layer_types
776
+
777
+ # Initialize weights and apply final processing
778
+ self.post_init()
779
+
780
+ #@check_model_inputs
781
+ @auto_docstring
782
+ def forward(
783
+ self,
784
+ input_ids: Optional[torch.LongTensor] = None,
785
+ attention_mask: Optional[torch.Tensor] = None,
786
+ position_ids: Optional[torch.LongTensor] = None,
787
+ past_key_values: Optional[Cache] = None,
788
+ inputs_embeds: Optional[torch.FloatTensor] = None,
789
+ use_cache: Optional[bool] = None,
790
+ output_attentions: Optional[bool] = None,
791
+ output_hidden_states: Optional[bool] = None,
792
+ cache_position: Optional[torch.LongTensor] = None,
793
+ **kwargs: Unpack[TransformersKwargs],
794
+ ) -> Union[Tuple, BaseModelOutputWithPast]:
795
+ output_attentions = output_attentions if output_attentions is not None else self.config.output_attentions
796
+ output_hidden_states = (
797
+ output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
798
+ )
799
+ use_cache = use_cache if use_cache is not None else self.config.use_cache
800
+
801
+ if (input_ids is None) ^ (inputs_embeds is not None):
802
+ raise ValueError("You must specify exactly one of input_ids or inputs_embeds")
803
+
804
+ if self.gradient_checkpointing and self.training and use_cache:
805
+ logger.warning_once(
806
+ "`use_cache=True` is incompatible with gradient checkpointing. Setting `use_cache=False`..."
807
+ )
808
+ use_cache = False
809
+
810
+ if inputs_embeds is None:
811
+ inputs_embeds = self.embed_tokens(input_ids)
812
+
813
+ if use_cache and not isinstance(past_key_values, RWKV07AState):
814
+ past_key_values = RWKV07AState()
815
+
816
+ if cache_position is None:
817
+ past_seen_tokens = past_key_values.get_seq_length() if past_key_values is not None else 0
818
+ cache_position = torch.arange(
819
+ past_seen_tokens, past_seen_tokens + inputs_embeds.shape[1], device=inputs_embeds.device
820
+ )
821
+
822
+ if position_ids is None:
823
+ position_ids = cache_position.unsqueeze(0)
824
+
825
+ # It may already have been prepared by e.g. `generate`
826
+ if not isinstance(causal_mask_mapping := attention_mask, dict):
827
+ # Prepare mask arguments
828
+ mask_kwargs = {
829
+ "config": self.config,
830
+ "input_embeds": inputs_embeds,
831
+ "attention_mask": attention_mask,
832
+ "cache_position": cache_position,
833
+ "past_key_values": past_key_values,
834
+ "position_ids": position_ids,
835
+ }
836
+ # Create the masks
837
+ causal_mask_mapping = {
838
+ "full_attention": create_causal_mask(**mask_kwargs),
839
+ }
840
+ # The sliding window alternating layers are not always activated depending on the config
841
+ if self.has_sliding_layers:
842
+ causal_mask_mapping["sliding_attention"] = create_sliding_window_causal_mask(**mask_kwargs)
843
+
844
+ hidden_states = inputs_embeds
845
+
846
+ # create position embeddings to be shared across the decoder layers
847
+ if self.config.use_rope:
848
+ position_embeddings = self.rotary_emb(hidden_states, position_ids)
849
+ else:
850
+ position_embeddings = None
851
+
852
+ # decoder layers
853
+ all_hidden_states = () if output_hidden_states else None
854
+ all_self_attns = () if output_attentions else None
855
+ next_decoder_cache = None
856
+ v_first = None
857
+ k_first = None
858
+ frozen_residual = None
859
+
860
+ for decoder_layer in self.layers:
861
+ if not is_layer_attention(self.config, decoder_layer.layer_idx):
862
+ frozen_residual = hidden_states#rms_norm(hidden_states)
863
+ if output_hidden_states:
864
+ all_hidden_states += (hidden_states,)
865
+
866
+ attention_mask = causal_mask_mapping[decoder_layer.attention_type]
867
+ if attention_mask is not None and attention_mask.ndim == 1:
868
+ attention_mask = None
869
+ #attention_mask = None
870
+
871
+ layer_outputs = decoder_layer(
872
+ hidden_states,
873
+ frozen_residual=frozen_residual,
874
+ attention_mask=attention_mask,
875
+ position_ids=position_ids,
876
+ past_key_values=past_key_values,
877
+ output_attentions=output_attentions,
878
+ use_cache=use_cache,
879
+ cache_position=cache_position,
880
+ position_embeddings=position_embeddings,
881
+ v_first=v_first,
882
+ k_first=k_first
883
+ )
884
+
885
+ hidden_states = layer_outputs[0]
886
+ v_first = layer_outputs[1]
887
+ k_first = layer_outputs[2]
888
+
889
+ if output_attentions:
890
+ all_self_attns += (layer_outputs[2],)
891
+
892
+ hidden_states = self.norm(hidden_states)
893
+
894
+ # add hidden states from the last decoder layer
895
+ if output_hidden_states:
896
+ all_hidden_states += (hidden_states,)
897
+
898
+ #if return_legacy_cache:
899
+ # next_cache = next_cache.to_legacy_cache()
900
+
901
+ return BaseModelOutputWithPast(
902
+ last_hidden_state=hidden_states,
903
+ past_key_values=past_key_values if use_cache else None,
904
+ hidden_states=all_hidden_states,
905
+ attentions=all_self_attns,
906
+ )
907
+
908
+ class RWKV07AQwen3ForCausalLM(RWKV07AQwen3PreTrainedModel, GenerationMixin):
909
+ _tied_weights_keys = ["lm_head.weight"]
910
+
911
+ def __init__(self, config):
912
+ super().__init__(config)
913
+ self.model = RWKV07AQwen3Model(config)
914
+ self.vocab_size = config.vocab_size
915
+ self.lm_head = nn.Linear(config.hidden_size, config.vocab_size, bias=False)
916
+
917
+ # Initialize weights and apply final processing
918
+ self.post_init()
919
+
920
+ @can_return_tuple
921
+ @auto_docstring
922
+ def forward(
923
+ self,
924
+ input_ids: torch.LongTensor = None,
925
+ attention_mask: Optional[torch.Tensor] = None,
926
+ position_ids: Optional[torch.LongTensor] = None,
927
+ past_key_values: Optional[List[torch.FloatTensor]] = None,
928
+ inputs_embeds: Optional[torch.FloatTensor] = None,
929
+ labels: Optional[torch.LongTensor] = None,
930
+ use_cache: Optional[bool] = None,
931
+ output_attentions: Optional[bool] = None,
932
+ output_hidden_states: Optional[bool] = None,
933
+ cache_position: Optional[torch.LongTensor] = None,
934
+ logits_to_keep: Union[int, torch.Tensor] = 0,
935
+ **loss_kwargs,
936
+ ) -> Union[Tuple, CausalLMOutputWithPast]:
937
+ r"""
938
+ Args:
939
+ labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
940
+ Labels for computing the masked language modeling loss. Indices should either be in `[0, ...,
941
+ config.vocab_size]` or -100 (see `input_ids` docstring). Tokens with indices set to `-100` are ignored
942
+ (masked), the loss is only computed for the tokens with labels in `[0, ..., config.vocab_size]`.
943
+
944
+ num_logits_to_keep (`int`, *optional*):
945
+ Calculate logits for the last `num_logits_to_keep` tokens. If `0`, calculate logits for all
946
+ `input_ids` (special case). Only last token logits are needed for generation, and calculating them only for that
947
+ token can save memory, which becomes pretty significant for long sequences or large vocabulary size.
948
+
949
+ Returns:
950
+
951
+ Example:
952
+
953
+ ```python
954
+ >>> from transformers import AutoTokenizer, RWKV07AQwen3ForCausalLM
955
+
956
+ >>> model = RWKV07AQwen3ForCausalLM.from_pretrained(PATH_TO_CONVERTED_WEIGHTS)
957
+ >>> tokenizer = AutoTokenizer.from_pretrained(PATH_TO_CONVERTED_TOKENIZER)
958
+
959
+ >>> prompt = "Hey, are you conscious? Can you talk to me?"
960
+ >>> inputs = tokenizer(prompt, return_tensors="pt")
961
+
962
+ >>> # Generate
963
+ >>> generate_ids = model.generate(inputs.input_ids, max_length=30)
964
+ >>> tokenizer.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
965
+ "Hey, are you conscious? Can you talk to me?\nI'm not conscious, but I can talk to you."
966
+ ```"""
967
+
968
+ # # run the prefill only up to the last token, then run one more for the actual result
969
+ # # we do this so that called code doesn't have to handle the dichotomy specially and can just check for L==1
970
+ # for i in range(2):
971
+ # all_but_one = max(1, input_ids.size(-1)-1)
972
+ # iid = input_ids[..., i*all_but_one:(i+1)*all_but_one]
973
+ # if iid.size(-1) == 0:
974
+ # continue
975
+ # pids = position_ids
976
+ # if pids is not None:
977
+ # pids = position_ids[..., i*all_but_one:(i+1)*all_but_one]
978
+ # cp = cache_position
979
+ # if cp is not None:
980
+ # cp = cache_position[..., i*all_but_one:(i+1)*all_but_one]
981
+ # rv = self.forward_inner(iid, attention_mask=attention_mask, position_ids=pids, past_key_values=past_key_values, inputs_embeds=inputs_embeds, labels=labels, use_cache=use_cache, output_attentions=output_attentions, output_hidden_states=output_hidden_states, cache_position=cp, num_logits_to_keep=num_logits_to_keep, **loss_kwargs)
982
+ # past_key_values = rv.past_key_values
983
+ # return rv
984
+
985
+ # def forward_inner(
986
+ # self,
987
+ # input_ids: torch.LongTensor = None,
988
+ # attention_mask: Optional[torch.Tensor] = None,
989
+ # position_ids: Optional[torch.LongTensor] = None,
990
+ # past_key_values: Optional[List[torch.FloatTensor]] = None,
991
+ # inputs_embeds: Optional[torch.FloatTensor] = None,
992
+ # labels: Optional[torch.LongTensor] = None,
993
+ # use_cache: Optional[bool] = None,
994
+ # output_attentions: Optional[bool] = None,
995
+ # output_hidden_states: Optional[bool] = None,
996
+ # cache_position: Optional[torch.LongTensor] = None,
997
+ # num_logits_to_keep: int = 0,
998
+ # **loss_kwargs,
999
+ # ) -> Union[Tuple, CausalLMOutputWithPast]:
1000
+ output_attentions = output_attentions if output_attentions is not None else self.config.output_attentions
1001
+ output_hidden_states = (
1002
+ output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
1003
+ )
1004
+
1005
+ # decoder outputs consists of (dec_features, layer_state, dec_hidden, dec_attn)
1006
+ outputs = self.model(
1007
+ input_ids=input_ids,
1008
+ attention_mask=attention_mask,
1009
+ position_ids=position_ids,
1010
+ past_key_values=past_key_values,
1011
+ inputs_embeds=inputs_embeds,
1012
+ use_cache=use_cache,
1013
+ output_attentions=output_attentions,
1014
+ output_hidden_states=output_hidden_states,
1015
+ cache_position=cache_position,
1016
+ )
1017
+
1018
+ hidden_states = outputs.last_hidden_state
1019
+ # Only compute necessary logits, and do not upcast them to float if we are not computing the loss
1020
+ slice_indices = slice(-logits_to_keep, None) if isinstance(logits_to_keep, int) else logits_to_keep
1021
+ logits = self.lm_head(hidden_states[:, slice_indices, :])
1022
+
1023
+ loss = None
1024
+ if labels is not None:
1025
+ loss = self.loss_function(logits=logits, labels=labels, vocab_size=self.vocab_size, **loss_kwargs)
1026
+
1027
+ return CausalLMOutputWithPast(
1028
+ loss=loss,
1029
+ logits=logits,
1030
+ past_key_values=outputs.past_key_values,
1031
+ hidden_states=outputs.hidden_states,
1032
+ attentions=outputs.attentions,
1033
+ )
1034
+
1035
+ @auto_docstring
1036
+ class RWKV07AQwen3ForSequenceClassification(RWKV07AQwen3PreTrainedModel):
1037
+ pass
1038
+
1039
+ @auto_docstring
1040
+ class RWKV07AQwen3ForTokenClassification(RWKV07AQwen3PreTrainedModel):
1041
+ pass
1042
+
1043
+ @auto_docstring
1044
+ class RWKV07AQwen3ForQuestionAnswering(RWKV07AQwen3PreTrainedModel):
1045
+ base_model_prefix = "transformer" # For BC, where `transformer` was used instead of `model`
special_tokens_map.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|endoftext|>",
4
+ "<|fim_prefix|>",
5
+ "<|fim_middle|>",
6
+ "<|fim_suffix|>",
7
+ "<|endofprompt|>",
8
+ "<|_unuse_missing_100256|>",
9
+ "<|_unuse_missing_100261|>",
10
+ "<|_unuse_missing_100262|>",
11
+ "<|_unuse_missing_100263|>",
12
+ "<|_unuse_missing_100264|>",
13
+ "<|_unuse_missing_100265|>",
14
+ "<|_unuse_missing_100266|>",
15
+ "<|_unuse_missing_100267|>",
16
+ "<|_unuse_missing_100268|>",
17
+ "<|_unuse_missing_100269|>",
18
+ "<|_unuse_missing_100270|>",
19
+ "<|_unuse_missing_100271|>",
20
+ "<|_unuse_missing_100272|>",
21
+ "<|_unuse_missing_100273|>",
22
+ "<|_unuse_missing_100274|>",
23
+ "<|_unuse_missing_100275|>"
24
+ ],
25
+ "bos_token": {
26
+ "content": "<|endoftext|>",
27
+ "lstrip": false,
28
+ "normalized": false,
29
+ "rstrip": false,
30
+ "single_word": false
31
+ },
32
+ "eos_token": {
33
+ "content": "<|endoftext|>",
34
+ "lstrip": false,
35
+ "normalized": false,
36
+ "rstrip": false,
37
+ "single_word": false
38
+ },
39
+ "unk_token": {
40
+ "content": "<|endoftext|>",
41
+ "lstrip": false,
42
+ "normalized": false,
43
+ "rstrip": false,
44
+ "single_word": false
45
+ }
46
+ }
tokenization_rwkv07aqwen3.py ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ from transformers.models.qwen3.tokenization_qwen3 import Qwen3Tokenizer
2
+
3
+ class RWKV6Qwen3Tokenizer(Qwen3Tokenizer):
4
+ pass
tokenization_rwkv07aqwen3_fast.py ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ from transformers.models.qwen2.tokenization_qwen3_fast import Qwen3TokenizerFast
2
+
3
+ class RWKV6Qwen3TokenizerFast(Qwen3TokenizerFast):
4
+ pass
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "100256": {
5
+ "content": "<|_unuse_missing_100256|>",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "100257": {
13
+ "content": "<|endoftext|>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "100258": {
21
+ "content": "<|fim_prefix|>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ },
28
+ "100259": {
29
+ "content": "<|fim_middle|>",
30
+ "lstrip": false,
31
+ "normalized": false,
32
+ "rstrip": false,
33
+ "single_word": false,
34
+ "special": true
35
+ },
36
+ "100260": {
37
+ "content": "<|fim_suffix|>",
38
+ "lstrip": false,
39
+ "normalized": false,
40
+ "rstrip": false,
41
+ "single_word": false,
42
+ "special": true
43
+ },
44
+ "100261": {
45
+ "content": "<|_unuse_missing_100261|>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false,
50
+ "special": true
51
+ },
52
+ "100262": {
53
+ "content": "<|_unuse_missing_100262|>",
54
+ "lstrip": false,
55
+ "normalized": false,
56
+ "rstrip": false,
57
+ "single_word": false,
58
+ "special": true
59
+ },
60
+ "100263": {
61
+ "content": "<|_unuse_missing_100263|>",
62
+ "lstrip": false,
63
+ "normalized": false,
64
+ "rstrip": false,
65
+ "single_word": false,
66
+ "special": true
67
+ },
68
+ "100264": {
69
+ "content": "<|_unuse_missing_100264|>",
70
+ "lstrip": false,
71
+ "normalized": false,
72
+ "rstrip": false,
73
+ "single_word": false,
74
+ "special": true
75
+ },
76
+ "100265": {
77
+ "content": "<|_unuse_missing_100265|>",
78
+ "lstrip": false,
79
+ "normalized": false,
80
+ "rstrip": false,
81
+ "single_word": false,
82
+ "special": true
83
+ },
84
+ "100266": {
85
+ "content": "<|_unuse_missing_100266|>",
86
+ "lstrip": false,
87
+ "normalized": false,
88
+ "rstrip": false,
89
+ "single_word": false,
90
+ "special": true
91
+ },
92
+ "100267": {
93
+ "content": "<|_unuse_missing_100267|>",
94
+ "lstrip": false,
95
+ "normalized": false,
96
+ "rstrip": false,
97
+ "single_word": false,
98
+ "special": true
99
+ },
100
+ "100268": {
101
+ "content": "<|_unuse_missing_100268|>",
102
+ "lstrip": false,
103
+ "normalized": false,
104
+ "rstrip": false,
105
+ "single_word": false,
106
+ "special": true
107
+ },
108
+ "100269": {
109
+ "content": "<|_unuse_missing_100269|>",
110
+ "lstrip": false,
111
+ "normalized": false,
112
+ "rstrip": false,
113
+ "single_word": false,
114
+ "special": true
115
+ },
116
+ "100270": {
117
+ "content": "<|_unuse_missing_100270|>",
118
+ "lstrip": false,
119
+ "normalized": false,
120
+ "rstrip": false,
121
+ "single_word": false,
122
+ "special": true
123
+ },
124
+ "100271": {
125
+ "content": "<|_unuse_missing_100271|>",
126
+ "lstrip": false,
127
+ "normalized": false,
128
+ "rstrip": false,
129
+ "single_word": false,
130
+ "special": true
131
+ },
132
+ "100272": {
133
+ "content": "<|_unuse_missing_100272|>",
134
+ "lstrip": false,
135
+ "normalized": false,
136
+ "rstrip": false,
137
+ "single_word": false,
138
+ "special": true
139
+ },
140
+ "100273": {
141
+ "content": "<|_unuse_missing_100273|>",
142
+ "lstrip": false,
143
+ "normalized": false,
144
+ "rstrip": false,
145
+ "single_word": false,
146
+ "special": true
147
+ },
148
+ "100274": {
149
+ "content": "<|_unuse_missing_100274|>",
150
+ "lstrip": false,
151
+ "normalized": false,
152
+ "rstrip": false,
153
+ "single_word": false,
154
+ "special": true
155
+ },
156
+ "100275": {
157
+ "content": "<|_unuse_missing_100275|>",
158
+ "lstrip": false,
159
+ "normalized": false,
160
+ "rstrip": false,
161
+ "single_word": false,
162
+ "special": true
163
+ },
164
+ "100276": {
165
+ "content": "<|endofprompt|>",
166
+ "lstrip": false,
167
+ "normalized": false,
168
+ "rstrip": false,
169
+ "single_word": false,
170
+ "special": true
171
+ }
172
+ },
173
+ "additional_special_tokens": [
174
+ "<|endoftext|>",
175
+ "<|fim_prefix|>",
176
+ "<|fim_middle|>",
177
+ "<|fim_suffix|>",
178
+ "<|endofprompt|>",
179
+ "<|_unuse_missing_100256|>",
180
+ "<|_unuse_missing_100261|>",
181
+ "<|_unuse_missing_100262|>",
182
+ "<|_unuse_missing_100263|>",
183
+ "<|_unuse_missing_100264|>",
184
+ "<|_unuse_missing_100265|>",
185
+ "<|_unuse_missing_100266|>",
186
+ "<|_unuse_missing_100267|>",
187
+ "<|_unuse_missing_100268|>",
188
+ "<|_unuse_missing_100269|>",
189
+ "<|_unuse_missing_100270|>",
190
+ "<|_unuse_missing_100271|>",
191
+ "<|_unuse_missing_100272|>",
192
+ "<|_unuse_missing_100273|>",
193
+ "<|_unuse_missing_100274|>",
194
+ "<|_unuse_missing_100275|>"
195
+ ],
196
+ "bos_token": "<|endoftext|>",
197
+ "chat_template": "{% if messages[0]['role'] == 'system' %}{% set merged_content = messages[0]['content'] + ' ' + messages[1]['content'] %}{% set merged_messages = [{'role': messages[1]['role'], 'content': merged_content}] + messages[2:] %}{% else %}{% set merged_messages = messages %}{% endif %}{% for message in merged_messages %}{{('human' if message['role'] == 'user' else message['role']) + ': ' + (message['content'].split('<reasoning>')|first + message['content'].split('</reasoning>')|last if message['role'] == 'assistant' and '</reasoning>' in message['content'] else message['content'])}}{% if (loop.last and add_generation_prompt and merged_messages[-1]['role'] != 'assistant') or not loop.last %}{{ ' <sep> ' }}{% endif %}{% endfor %}{% if add_generation_prompt and merged_messages[-1]['role'] != 'assistant' %}{{ 'assistant:' }}{% endif %}",
198
+ "clean_up_tokenization_spaces": true,
199
+ "eos_token": "<|endoftext|>",
200
+ "extra_special_tokens": {},
201
+ "model_max_length": 32768,
202
+ "tokenizer_class": "GPT2Tokenizer",
203
+ "unk_token": "<|endoftext|>"
204
+ }