Thanks to visit codestin.com
Credit goes to github.com

Skip to content

use rms_norm_eps for the L2Norm for Llama4 #37418

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

Merged
merged 1 commit into from
Apr 10, 2025
Merged

use rms_norm_eps for the L2Norm for Llama4 #37418

merged 1 commit into from
Apr 10, 2025

Conversation

ArthurZucker
Copy link
Collaborator

What does this PR do?

It seems like this changes throughout the port, updating and will test!

@github-actions github-actions bot marked this pull request as draft April 10, 2025 09:53
Copy link

Hi 👋, thank you for opening this pull request! The pull request is converted to draft by default. The CI will be paused while the PR is in draft mode. When it is ready for review, please click the Ready for review button (at the bottom of the PR page). This will assign reviewers and trigger CI.

@ArthurZucker ArthurZucker requested a review from Copilot April 10, 2025 09:54
@ArthurZucker ArthurZucker added the for patch Tag issues / labels that should be included in the next patch label Apr 10, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

src/transformers/models/llama4/modeling_llama4.py:113

  • [nitpick] If the 'dim' parameter is intentionally removed, please update the related documentation or comments to clearly state that only the epsilon parameter is used.
def __init__(self, eps: float = 1e-6):

src/transformers/models/llama4/modeling_llama4.py:304

  • Ensure that 'config.rms_norm_eps' is reliably defined in the configuration; otherwise, this could result in a runtime error.
self.qk_norm = Llama4TextL2Norm(config.rms_norm_eps)

@ArthurZucker ArthurZucker marked this pull request as ready for review April 10, 2025 10:05
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@ArthurZucker ArthurZucker merged commit 10144ff into main Apr 10, 2025
25 checks passed
@ArthurZucker ArthurZucker deleted the fix-rmsnorm branch April 10, 2025 11:33
ArthurZucker added a commit that referenced this pull request Apr 10, 2025
cyr0930 pushed a commit to cyr0930/transformers that referenced this pull request Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for patch Tag issues / labels that should be included in the next patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants