fix: remove check for default rope type

This commit is contained in:
drbh 2025-01-29 16:10:17 +00:00
parent cb7ec9cb60
commit 79550f8b47

View File

@ -88,10 +88,8 @@ class PositionRotaryEmbedding(nn.Module):
rope_type = rope_scaling.get("rope_type", rope_scaling.get("type", None)) rope_type = rope_scaling.get("rope_type", rope_scaling.get("type", None))
mrope_section = rope_scaling.get("mrope_section", None) mrope_section = rope_scaling.get("mrope_section", None)
# only apply mrope if sections are provided and the rope type is mrope or default # only apply mrope if sections are provided and the rope type is mrope and a section is provided
if mrope_section is not None and ( if mrope_section is not None and rope_type == "mrope":
rope_type == "mrope" or rope_type == "default"
):
mrope_section = rope_scaling.get("mrope_section") mrope_section = rope_scaling.get("mrope_section")
return RotaryPositionEmbeddingMultimodalSections( return RotaryPositionEmbeddingMultimodalSections(
inv_freq, scaling_factor, mrope_section inv_freq, scaling_factor, mrope_section