Skip to content

Commit

Permalink
[Bugfix]: phi.py get rope_theta from config file (#9503)
Browse files Browse the repository at this point in the history
Co-authored-by: Isotr0py <[email protected]>
  • Loading branch information
Falko1 and Isotr0py authored Oct 22, 2024
1 parent 29acd2c commit 7469242
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vllm/model_executor/models/phi.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ def __init__(self,
# pylint: disable=C0301
# Refer to:
# https://huggingface.co/microsoft/phi-1_5/blob/d212a789620c380ff32ca1d1ee9943a777360987/modeling_phi.py#L518
rope_theta = 10000
max_position_embeddings = getattr(config, "n_positions", 2048)
rope_theta = getattr(config, "rope_theta", 10000.0)
max_position_embeddings = getattr(config, "max_position_embeddings",
2048)
self.rotary_emb = get_rope(
self.head_size,
rotary_dim=rotary_dim,
Expand Down

0 comments on commit 7469242

Please sign in to comment.