Skip to content

Commit e51fd1f

Browse files
eagle2-vl: drop Conv3D patch embed handling
1 parent b4f660f commit e51fd1f

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

convert_hf_to_gguf.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3885,7 +3885,7 @@ def set_gguf_parameters(self):
38853885
self.gguf_writer.add_vision_image_std(list(img_std))
38863886

38873887
# Note:
3888-
# Eagle2-specific tensor layout normalization (mlp1 → mm.*, QKV split, Conv3D → Conv2D)
3888+
# Eagle2-specific tensor layout normalization (mlp1 → mm.*, QKV split)
38893889
# will live here in Eagle2VLVisionModel.modify_tensors() in a follow-up.
38903890
# The C++ builder will assume canonical weights and perform zero ad-hoc transposes.
38913891

@@ -3997,18 +3997,7 @@ def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iter
39973997
(self.map_tensor_name(name.replace("qkv", "v")), wv),
39983998
]
39993999

4000-
# 5) Conv3D patch embed -> two Conv2D kernels
4001-
if name.endswith("patch_embed.proj.weight") and data_torch.ndim == 5:
4002-
c_out, c_in, kt, kh, kw = data_torch.shape
4003-
del c_out, c_in, kh, kw # unused
4004-
assert kt == 2, "Current implementation only supports temporal_patch_size of 2"
4005-
base = gguf.TENSOR_NAMES[gguf.MODEL_TENSOR.V_ENC_EMBD_PATCH] + ".weight"
4006-
return [
4007-
(base, data_torch[:, :, 0, ...]),
4008-
(base + ".1", data_torch[:, :, 1, ...]),
4009-
]
4010-
4011-
# 6) Default mapping for remaining Eagle2 vision tensors
4000+
# 5) Default mapping for remaining Eagle2 vision tensors
40124001
if name.startswith("vision_model.") or name.startswith("model.vision_model.") or name.startswith("visual."):
40134002
return [(self.map_tensor_name(name), data_torch)]
40144003

0 commit comments

Comments
 (0)