From ef81a674706940262d2a85916bfeaa9434ccc206 Mon Sep 17 00:00:00 2001 From: Molly Sophia Date: Sun, 23 Mar 2025 12:37:11 +0800 Subject: [PATCH] fix model conversion with 'blocks.0.att.v[0,1,2]' tensors Signed-off-by: Molly Sophia --- python/convert_pytorch_to_ggml.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/convert_pytorch_to_ggml.py b/python/convert_pytorch_to_ggml.py index 5bcd008..8af4f47 100644 --- a/python/convert_pytorch_to_ggml.py +++ b/python/convert_pytorch_to_ggml.py @@ -59,6 +59,8 @@ def write_state_dict(state_dict: Dict[str, torch.Tensor], dest_path: str, data_t [state_dict_new[f'blocks.{l}.att.x_rwkvag'], state_dict[k]], dim=0) except KeyError: state_dict_new[f'blocks.{l}.att.x_rwkvag'] = state_dict[k] + elif any(['blocks.0.att.v0' in k, 'blocks.0.att.v1' in k, 'blocks.0.att.v2' in k]): + continue else: state_dict_new[k] = state_dict[k]