Skip to content

Commit 6af5deb

Browse files
committed
convert : fix tensor naming conflict for llama 4 vision
1 parent a3c3084 commit 6af5deb

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

convert_hf_to_gguf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2169,6 +2169,8 @@ def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iter
21692169
# process vision tensors
21702170
if "positional_embedding_vlm" in name and ".weight" not in name:
21712171
name += ".weight"
2172+
if "multi_modal_projector.linear_1" in name:
2173+
return [(gguf.TENSOR_NAMES[gguf.MODEL_TENSOR.V_MMPROJ_FC], data_torch)]
21722174
return [(self.map_tensor_name(name), data_torch)]
21732175
return []
21742176

gguf-py/gguf/tensor_mapping.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,6 @@ class TensorNameMap:
902902

903903
MODEL_TENSOR.V_MMPROJ_FC: (
904904
"model.connector.modality_projection.proj", # SmolVLM
905-
"multi_modal_projector.linear_1", # llama 4
906905
),
907906

908907
MODEL_TENSOR.V_MMPROJ_MLP: (

0 commit comments

Comments
 (0)