convert : fix tensor naming conflict for llama 4 vision (#13836)
* convert : fix tensor naming conflict for llama 4 vision * add comment
This commit is contained in:
parent
1e8659e65a
commit
26b79b6cb3
2 changed files with 3 additions and 1 deletions
|
@ -2169,6 +2169,9 @@ class Llama4VisionModel(MmprojModel):
|
||||||
# process vision tensors
|
# process vision tensors
|
||||||
if "positional_embedding_vlm" in name and ".weight" not in name:
|
if "positional_embedding_vlm" in name and ".weight" not in name:
|
||||||
name += ".weight"
|
name += ".weight"
|
||||||
|
if "multi_modal_projector.linear_1" in name:
|
||||||
|
# despite the name with number postfix, this is a single fully connected layer
|
||||||
|
return [(gguf.TENSOR_NAMES[gguf.MODEL_TENSOR.V_MMPROJ_FC], data_torch)]
|
||||||
return [(self.map_tensor_name(name), data_torch)]
|
return [(self.map_tensor_name(name), data_torch)]
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
|
@ -902,7 +902,6 @@ class TensorNameMap:
|
||||||
|
|
||||||
MODEL_TENSOR.V_MMPROJ_FC: (
|
MODEL_TENSOR.V_MMPROJ_FC: (
|
||||||
"model.connector.modality_projection.proj", # SmolVLM
|
"model.connector.modality_projection.proj", # SmolVLM
|
||||||
"multi_modal_projector.linear_1", # llama 4
|
|
||||||
),
|
),
|
||||||
|
|
||||||
MODEL_TENSOR.V_MMPROJ_MLP: (
|
MODEL_TENSOR.V_MMPROJ_MLP: (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue