mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-06-19 15:52:08 +00:00
fix: remove check for default rope type
This commit is contained in:
parent
cb7ec9cb60
commit
79550f8b47
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user