Fix context length (#757)

This commit is contained in:
Liangsheng Yin
2024-07-26 18:13:13 -07:00
committed by GitHub
parent 679ebcbbdc
commit d9fccfefe2

View File

@@ -73,6 +73,8 @@ def get_context_length(config):
rope_scaling = getattr(config, "rope_scaling", None)
if rope_scaling:
rope_scaling_factor = config.rope_scaling["factor"]
if "original_max_position_embeddings" in rope_scaling:
rope_scaling_factor = 1
if config.rope_scaling.get("rope_type", None) == "llama3":
rope_scaling_factor = 1
else: