| 12345678910111213141516171819202122232425 |
- package qwen3
- import "makarna/pkg/model/weightmap"
- func init() {
- weightmap.Register("qwen3", weightmap.MapperFunc(mapQwen3Name))
- }
- func mapQwen3Name(name string) (int, string, bool) {
- return weightmap.ParseLayerName(name, "model.layers.", qwen3Fields)
- }
- var qwen3Fields = map[string]string{
- "input_layernorm.weight": "attn_norm",
- "self_attn.q_proj.weight": "wq",
- "self_attn.k_proj.weight": "wk",
- "self_attn.v_proj.weight": "wv",
- "self_attn.o_proj.weight": "wo",
- "self_attn.q_norm.weight": "q_norm",
- "self_attn.k_norm.weight": "k_norm",
- "post_attention_layernorm.weight": "mlp_norm",
- "mlp.gate_proj.weight": "gate",
- "mlp.up_proj.weight": "up",
- "mlp.down_proj.weight": "down",
- }
|