Skip to content

Commit a5f4e39

Browse files
committed
fix: wrong check for qk_norm_config
1 parent 2880e1a commit a5f4e39

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/modalities/models/gpt2/gpt2_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ def __init__(
475475
# so if the model wants to increase the distance between logits
476476
# it needs to scale q or k OR adjust the angle between them
477477
# qk norm forces the model to mostly adjust the angle between q and k which stabilizes training
478-
if attention_config.attention_config is not None:
478+
if attention_config.qk_norm_config is not None:
479479
self.q_norm = attention_config.qk_norm_config.norm_type.value(
480480
**dict(attention_config.qk_norm_config.config)
481481
)

0 commit comments

Comments
 (0)