From cc398007238cbbb064609cbdc9bc4aab03c658d7 Mon Sep 17 00:00:00 2001 From: saood06 Date: Tue, 22 Apr 2025 01:34:13 -0500 Subject: Add support for bitnet2b_2501 model (#337) * add support for bitnet2b_2501 model * Fixes * Support both model names --------- Co-authored-by: potassiummmm --- gguf-py/gguf/tensor_mapping.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gguf-py/gguf/tensor_mapping.py') diff --git a/gguf-py/gguf/tensor_mapping.py b/gguf-py/gguf/tensor_mapping.py index e8725426..1dea6a82 100644 --- a/gguf-py/gguf/tensor_mapping.py +++ b/gguf-py/gguf/tensor_mapping.py @@ -131,6 +131,7 @@ class TensorNameMap: "model.layers.{bid}.self_attn.qkv_proj", # phi3 "encoder.layers.{bid}.self_attention.query_key_value", # chatglm "transformer.layers.{bid}.attn.qkv_proj", # openelm + "layers.{bid}.attention.wqkv", ), # Attention query @@ -464,10 +465,14 @@ class TensorNameMap: MODEL_TENSOR.ATTN_SUB_NORM: ( "model.layers.{bid}.self_attn.inner_attn_ln", # bitnet + "layers.{bid}.attention.attn_sub_norm", # bitnet + "model.layers.{bid}.self_attn.attn_sub_norm", ), MODEL_TENSOR.FFN_SUB_NORM: ( "model.layers.{bid}.mlp.ffn_layernorm", # bitnet + "layers.{bid}.feed_forward.ffn_sub_norm", # bitnet + "model.layers.{bid}.mlp.ffn_sub_norm", ), MODEL_TENSOR.DEC_ATTN_NORM: ( -- cgit v1.2.3