Unverified Commit d9fccfef authored by Liangsheng Yin's avatar Liangsheng Yin Committed by GitHub
Browse files

Fix context length (#757)

parent 679ebcbb
...@@ -73,6 +73,8 @@ def get_context_length(config): ...@@ -73,6 +73,8 @@ def get_context_length(config):
rope_scaling = getattr(config, "rope_scaling", None) rope_scaling = getattr(config, "rope_scaling", None)
if rope_scaling: if rope_scaling:
rope_scaling_factor = config.rope_scaling["factor"] 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": if config.rope_scaling.get("rope_type", None) == "llama3":
rope_scaling_factor = 1 rope_scaling_factor = 1
else: else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment