Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure attn_norm does not affect the residual stream #680

Merged
merged 2 commits into from
Jul 30, 2024

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.

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.

@2015aroras 2015aroras merged commit c482df7 into main Jul 30, 2024
12 checks passed
@2015aroras 2015aroras deleted the shanea/fix-incorrect-attn-norm branch July 30, 2024 05:01
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