Skip to content

Commit 7844fb7

Browse files
committed
add qwen2 ptq map
1 parent a6bde28 commit 7844fb7

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"act_scale":{
3+
"qkv_in_scale": "qwen2.layers.#.self_attn.q_proj.activation_quanter",
4+
"out_linear_in_scale": "qwen2.layers.#.self_attn.o_proj.activation_quanter",
5+
"ffn1_in_scale": "qwen2.layers.#.mlp.gate_proj.activation_quanter",
6+
"ffn2_in_scale": "qwen2.layers.#.mlp.down_proj.activation_quanter"
7+
},
8+
"weight_scale":{
9+
"q_weight_scale":"qwen2.layers.#.self_attn.q_proj.weight_quanter",
10+
"k_weight_scale":"qwen2.layers.#.self_attn.k_proj.weight_quanter",
11+
"v_weight_scale":"qwen2.layers.#.self_attn.v_proj.weight_quanter",
12+
"out_linear_weight_scale":"qwen2.layers.#.self_attn.o_proj.weight_quanter",
13+
"ffn1_1_weight_scale":"qwen2.layers.#.mlp.gate_proj.weight_quanter",
14+
"ffn1_2_weight_scale":"qwen2.layers.#.mlp.up_proj.weight_quanter",
15+
"ffn2_weight_scale":"qwen2.layers.#.mlp.down_proj.weight_quanter"
16+
},
17+
"cachekv_scale":{
18+
"cache_k_scale": "qwen2.layers.#.self_attn.cachek_matmul.activation_quanter",
19+
"cache_v_scale": "qwen2.layers.#.self_attn.cachev_matmul.activation_quanter"
20+
}
21+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"act_scale":{
3+
"qkv_in_scale": "qwen2.layers.#.self_attn.q_proj.activation_quanter",
4+
"out_linear_in_scale": "qwen2.layers.#.self_attn.o_proj.layer.activation_quanter",
5+
"ffn1_in_scale": "qwen2.layers.#.mlp.gate_proj.activation_quanter",
6+
"ffn2_in_scale": "qwen2.layers.#.mlp.down_proj.layer.activation_quanter"
7+
},
8+
"weight_scale":{
9+
"q_weight_scale":"qwen2.layers.#.self_attn.q_proj.weight_quanter",
10+
"k_weight_scale":"qwen2.layers.#.self_attn.k_proj.weight_quanter",
11+
"v_weight_scale":"qwen2.layers.#.self_attn.v_proj.weight_quanter",
12+
"out_linear_weight_scale":"qwen2.layers.#.self_attn.o_proj.layer.weight_quanter",
13+
"ffn1_1_weight_scale":"qwen2.layers.#.mlp.gate_proj.weight_quanter",
14+
"ffn1_2_weight_scale":"qwen2.layers.#.mlp.up_proj.weight_quanter",
15+
"ffn2_weight_scale":"qwen2.layers.#.mlp.down_proj.layer.weight_quanter"
16+
},
17+
"cachekv_scale":{
18+
"cache_k_scale": "qwen2.layers.#.self_attn.cachek_matmul.activation_quanter",
19+
"cache_v_scale": "qwen2.layers.#.self_attn.cachev_matmul.activation_quanter"
20+
}
21+
}

0 commit comments

Comments
 (0)