Skip to content

Commit

Permalink
Check rope_scaling attr (#1609)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiminha authored Dec 16, 2024
1 parent 67bc4cb commit c95c4d6
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 @@ -433,7 +433,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 c95c4d6

Please sign in to comment.