[Bugfix]: phi.py get rope_theta from config file (#9503)
Co-authored-by: Isotr0py <2037008807@qq.com>
This commit is contained in:
parent
29acd2c34c
commit
74692421f7
@ -102,8 +102,9 @@ class PhiAttention(nn.Module):
|
||||
# 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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user