Skip to content

Commit

Permalink
Add support for Internlm2 (#362)
Browse files Browse the repository at this point in the history
  • Loading branch information
Crystalcareai authored Jul 3, 2024
1 parent 21937cd commit 3eb146f
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions mergekit/_data/architectures/internlm2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"model_type": "internlm2",
"architectures": [
"InternLM2ForCausalLM"
],
"pre_weights": [
{
"name": "model.tok_embeddings.weight",
"is_embed": true
}
],
"post_weights": [
{
"name": "model.norm.weight"
},
{
"name": "output.weight",
"is_embed": true,
"aliases": [
"model.tok_embeddings.weight"
]
}
],
"num_layers_config_key": "num_hidden_layers",
"layer_templates": {
"weights": [
{
"name": "model.layers.${layer_index}.attention_norm.weight"
},
{
"name": "model.layers.${layer_index}.ffn_norm.weight"
},
{
"name": "model.layers.${layer_index}.attention.wqkv.weight"
},
{
"name": "model.layers.${layer_index}.attention.wo.weight"
},
{
"name": "model.layers.${layer_index}.feed_forward.w1.weight"
},
{
"name": "model.layers.${layer_index}.feed_forward.w2.weight"
},
{
"name": "model.layers.${layer_index}.feed_forward.w3.weight"
}
]
}
}

0 comments on commit 3eb146f

Please sign in to comment.