Skip to content

Commit

Permalink
Check rope_scaling attr (huggingface#1609)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiminha authored and huijuanzh committed Jan 7, 2025
1 parent dcce890 commit 7cc6221
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/text-generation/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def setup_distributed_model(args, model_dtype, model_kwargs, logger):
# Construct model with fake meta tensors, later will be replaced on devices during ds-inference ckpt load
with deepspeed.OnDevice(dtype=model_dtype, device="meta"):
if (
config.rope_scaling
hasattr(config, 'rope_scaling') and config.rope_scaling
and config.rope_scaling["rope_type"] == "llama3"
and config.max_position_embeddings > 8192
):
Expand Down

0 comments on commit 7cc6221

Please sign in to comment.