Skip to content

Comments

Ensure attn_norm does not affect the residual stream#680

Merged
2015aroras merged 2 commits intomainfrom
shanea/fix-incorrect-attn-norm
Jul 30, 2024
Merged

Ensure attn_norm does not affect the residual stream#680
2015aroras merged 2 commits intomainfrom
shanea/fix-incorrect-attn-norm

Conversation

@2015aroras
Copy link
Collaborator

@2015aroras 2015aroras commented Jul 30, 2024

Issue: The attention norm, when applied before the attention block, was modifying the residual stream. This was introduced in aac4bdd.

Fix: Ensure the attention norm does not modify the residual stream.

Testing: I used a script to check that this PR made the output match that from https://github.com/allenai/OLMo/tree/ladder-1xC, which is healthy according to @AkshitaB. Before the fix, the outputs (and inputs) would start disagreeing at the feed forward norm.

@2015aroras 2015aroras requested review from AkshitaB and epwalsh July 30, 2024 01:51
Copy link
Member

@epwalsh epwalsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants