Skip to content

remove dead code from fast_rms_layernorm_inference #2135

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

KareemMusleh
Copy link
Contributor

If XX is None it will error out on

XX *= variance.rsqrt_()

also I'd like to know:

  1. why X.copy_(XX) over X[:] = XX
  2. what is the purposed of doing torch_square = torch.square outside the function?

Thank you for your work on unsloth!

@danielhanchen
Copy link
Contributor

Sorry on the delay - I think technically I removed error msgs for XX = None to reduce CPU overhead - it's not much though.

.copy_ I guess also reduces CPU overhead vs [:] - it's the same though

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