Skip to content

[QwixQuantizedTraining] Clip Gradients for Out-of-Bound Activations and Weights in dot_general_qt.#173

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_830564253
Nov 18, 2025
Merged

[QwixQuantizedTraining] Clip Gradients for Out-of-Bound Activations and Weights in dot_general_qt.#173
copybara-service[bot] merged 1 commit into
mainfrom
test_830564253

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Nov 15, 2025

Copy link
Copy Markdown

[QwixQuantizedTraining] Clip Gradients for Out-of-Bound Activations and Weights in dot_general_qt.

This change zeroes out the backward pass gradients (dlhs, drhs) that correspond to forward pass inputs (both activations and weights) that were outside their calibration bounds.

  • For "in-bound" values, qwix QT will calculate the derivative using low precision data type.
  • For "out-bound" values, qwix QT will set the derivative to 0.

This will ensure mathematical correctness and numerical stability.

@copybara-service copybara-service Bot force-pushed the test_830564253 branch 2 times, most recently from 354ea7b to 91f52ce Compare November 17, 2025 23:22
@copybara-service copybara-service Bot changed the title [QwixClipGradient] Clip dlhs/drhs in dot_general_qt. [QwixQuantizedTraining] Clip Gradients for Out-of-Bound Activations and Weights in dot_general_qt. Nov 17, 2025
@copybara-service copybara-service Bot force-pushed the test_830564253 branch 2 times, most recently from c759bf4 to 2ae0179 Compare November 18, 2025 01:07
…nd Weights in dot_general_qt.

This change zeroes out the backward pass gradients (dlhs, drhs) that correspond to forward pass inputs (both activations and weights) that were outside their calibration bounds.
- For "in-bound" values, qwix QT will calculate the derivative using low precision data type.
- For "out-bound" values, qwix QT will set the derivative to 0.

This will ensure mathematical correctness and numerical stability.

PiperOrigin-RevId: 833558845
@copybara-service copybara-service Bot merged commit eb06932 into main Nov 18, 2025
@copybara-service copybara-service Bot deleted the test_830564253 branch November 18, 2025 01:15
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.

1 participant