[Model] Rename Phi3 rope scaling type (#5595)

This commit is contained in:
Amit Garg
2024-06-17 12:04:14 -04:00
committed by GitHub
parent e2b85cf86a
commit 9333fb8eb9
2 changed files with 16 additions and 8 deletions
+4 -1
View File
@@ -1287,7 +1287,10 @@ def _get_and_verify_max_len(
derived_max_model_len = default_max_len
rope_scaling = getattr(hf_config, "rope_scaling", None)
if rope_scaling is not None and rope_scaling["type"] != "su":
# The correct one should be "longrope", kept "su" here
# to be backward compatible
if rope_scaling is not None and rope_scaling["type"] != "su" \
and rope_scaling["type"] != "longrope":
if disable_sliding_window:
# TODO(robertgshaw): Find a model that supports rope_scaling
# with sliding window to see if this case should be allowed.