|
@@ -85,23 +85,25 @@ func TestTensorLayers(t *testing.T) {
|
|
}
|
|
}
|
|
}),
|
|
}),
|
|
want: map[string]Layer{
|
|
want: map[string]Layer{
|
|
- "mm": {
|
|
|
|
- "0.bias": tensors["mm.0.bias"],
|
|
|
|
- "0.weight": tensors["mm.0.weight"],
|
|
|
|
|
|
+ "mm.0": {
|
|
|
|
+ "bias": tensors["mm.0.bias"],
|
|
|
|
+ "weight": tensors["mm.0.weight"],
|
|
|
|
+ },
|
|
|
|
+ "v.blk.0": {
|
|
|
|
+ "attn_k.weight": tensors["v.blk.0.attn_k.weight"],
|
|
|
|
+ "attn_q.weight": tensors["v.blk.0.attn_q.weight"],
|
|
|
|
+ "attn_v.weight": tensors["v.blk.0.attn_v.weight"],
|
|
|
|
+ "attn_output.weight": tensors["v.blk.0.attn_output.weight"],
|
|
|
|
+ "attn_norm.weight": tensors["v.blk.0.attn_norm.weight"],
|
|
|
|
+ "ffn_down.weight": tensors["v.blk.0.ffn_down.weight"],
|
|
|
|
+ "ffn_gate.weight": tensors["v.blk.0.ffn_gate.weight"],
|
|
|
|
+ "ffn_up.weight": tensors["v.blk.0.ffn_up.weight"],
|
|
|
|
+ "ffn_norm.weight": tensors["v.blk.0.ffn_norm.weight"],
|
|
},
|
|
},
|
|
"v": {
|
|
"v": {
|
|
- "blk.0.attn_k.weight": tensors["v.blk.0.attn_k.weight"],
|
|
|
|
- "blk.0.attn_q.weight": tensors["v.blk.0.attn_q.weight"],
|
|
|
|
- "blk.0.attn_v.weight": tensors["v.blk.0.attn_v.weight"],
|
|
|
|
- "blk.0.attn_output.weight": tensors["v.blk.0.attn_output.weight"],
|
|
|
|
- "blk.0.attn_norm.weight": tensors["v.blk.0.attn_norm.weight"],
|
|
|
|
- "blk.0.ffn_down.weight": tensors["v.blk.0.ffn_down.weight"],
|
|
|
|
- "blk.0.ffn_gate.weight": tensors["v.blk.0.ffn_gate.weight"],
|
|
|
|
- "blk.0.ffn_up.weight": tensors["v.blk.0.ffn_up.weight"],
|
|
|
|
- "blk.0.ffn_norm.weight": tensors["v.blk.0.ffn_norm.weight"],
|
|
|
|
- "patch_embd.weight": tensors["v.patch_embd.weight"],
|
|
|
|
- "position_embd.gate": tensors["v.position_embd.gate"],
|
|
|
|
- "position_embd.weight": tensors["v.position_embd.weight"],
|
|
|
|
|
|
+ "patch_embd.weight": tensors["v.patch_embd.weight"],
|
|
|
|
+ "position_embd.gate": tensors["v.position_embd.gate"],
|
|
|
|
+ "position_embd.weight": tensors["v.position_embd.weight"],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
@@ -122,23 +124,25 @@ func TestTensorLayers(t *testing.T) {
|
|
},
|
|
},
|
|
"token_embd": {"weight": tensors["token_embd.weight"]},
|
|
"token_embd": {"weight": tensors["token_embd.weight"]},
|
|
"output_norm": {"weight": tensors["output_norm.weight"]},
|
|
"output_norm": {"weight": tensors["output_norm.weight"]},
|
|
- "mm": {
|
|
|
|
- "0.bias": tensors["mm.0.bias"],
|
|
|
|
- "0.weight": tensors["mm.0.weight"],
|
|
|
|
|
|
+ "mm.0": {
|
|
|
|
+ "bias": tensors["mm.0.bias"],
|
|
|
|
+ "weight": tensors["mm.0.weight"],
|
|
|
|
+ },
|
|
|
|
+ "v.blk.0": {
|
|
|
|
+ "attn_k.weight": tensors["v.blk.0.attn_k.weight"],
|
|
|
|
+ "attn_q.weight": tensors["v.blk.0.attn_q.weight"],
|
|
|
|
+ "attn_v.weight": tensors["v.blk.0.attn_v.weight"],
|
|
|
|
+ "attn_output.weight": tensors["v.blk.0.attn_output.weight"],
|
|
|
|
+ "attn_norm.weight": tensors["v.blk.0.attn_norm.weight"],
|
|
|
|
+ "ffn_down.weight": tensors["v.blk.0.ffn_down.weight"],
|
|
|
|
+ "ffn_gate.weight": tensors["v.blk.0.ffn_gate.weight"],
|
|
|
|
+ "ffn_up.weight": tensors["v.blk.0.ffn_up.weight"],
|
|
|
|
+ "ffn_norm.weight": tensors["v.blk.0.ffn_norm.weight"],
|
|
},
|
|
},
|
|
"v": {
|
|
"v": {
|
|
- "blk.0.attn_k.weight": tensors["v.blk.0.attn_k.weight"],
|
|
|
|
- "blk.0.attn_q.weight": tensors["v.blk.0.attn_q.weight"],
|
|
|
|
- "blk.0.attn_v.weight": tensors["v.blk.0.attn_v.weight"],
|
|
|
|
- "blk.0.attn_output.weight": tensors["v.blk.0.attn_output.weight"],
|
|
|
|
- "blk.0.attn_norm.weight": tensors["v.blk.0.attn_norm.weight"],
|
|
|
|
- "blk.0.ffn_down.weight": tensors["v.blk.0.ffn_down.weight"],
|
|
|
|
- "blk.0.ffn_gate.weight": tensors["v.blk.0.ffn_gate.weight"],
|
|
|
|
- "blk.0.ffn_up.weight": tensors["v.blk.0.ffn_up.weight"],
|
|
|
|
- "blk.0.ffn_norm.weight": tensors["v.blk.0.ffn_norm.weight"],
|
|
|
|
- "patch_embd.weight": tensors["v.patch_embd.weight"],
|
|
|
|
- "position_embd.gate": tensors["v.position_embd.gate"],
|
|
|
|
- "position_embd.weight": tensors["v.position_embd.weight"],
|
|
|
|
|
|
+ "patch_embd.weight": tensors["v.patch_embd.weight"],
|
|
|
|
+ "position_embd.gate": tensors["v.position_embd.gate"],
|
|
|
|
+ "position_embd.weight": tensors["v.position_embd.weight"],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|