Repository navigation
[Fix] Forward the configured epsilon in the bit-linear norm - #1303
Merged
yzhangcs merged 5 commits intoOct 11, 2026
Merged
Conversation
This was referenced Oct 10, 2026
yzhangcs
approved these changes
Oct 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bit_linearandFusedBitLinearnow honor the requested RMS normalization epsilon instead of silently using the fused helper's1e-6default. This affects direct function calls and BitNet's attention projections whenever their epsilon differs from1e-6, including their existing1e-8default.Calls follow signature order, and remaining ordinary helper calls use keyword arguments. Kernels, computation precision, public signatures, and checkpoint layout are unchanged. No test files are added or modified.
Test plan
NVIDIA H200, Python 3.12.13, PyTorch 2.9.1.post5+cu130.msh, Triton 3.5.1; flash-attn installed,
FLA_CI_ENV=0, default backend dispatch enabled.0.01.2c3a40f4, four default/custom-epsilon cases fail numerical comparison while both explicit-1e-6controls pass. The fixed version passes all six.f6a909f8. Final revisiond0d9bbdbremoves the temporary tests and makes four equivalent positional-to-keyword substitutions; AST comparison after argument binding confirms no other executable change. Scoped pre-commit hooks andgit diff --checkpass; the copyright-header check also passed.The existing affected tests can be run with:
Other accelerator platforms and distributed execution were not tested. An initial cache-test attempt on the development host could not initialize CUDA because that host has no NVIDIA driver; the affected BitAttention case passed on H200.
Benchmark / NCU
N/A: this forwards an existing scalar argument without changing kernels, precision, tensor allocation, or launch structure. No performance improvement is claimed.
Breaking changes
None. This restores the behavior promised by the existing epsilon arguments. Outputs and gradients can change for callers that previously received the unintended
1e-6, including default BitNet projections; expliciteps=1e-6keeps the previous behavior. No checkpoint conversion is needed.Checklist