Skip to content

Conversation

@copybara-service
Copy link

Add clip_gradients option to Qt quantization.

This change introduces a clip_gradients option in QtRule and propagates it to the core quantization functions in conv_general_qt, dot_general_qt, and ragged_dot_qt. When enabled, this option causes gradients to be clipped during quantization, preventing values outside the calibration range from contributing to the gradient. The experimental additional_qt_config field has been removed.

This change introduces a `clip_gradients` option in `QtRule` and propagates it to the core quantization functions in `conv_general_qt`, `dot_general_qt`, and `ragged_dot_qt`. When enabled, this option causes gradients to be clipped during quantization, preventing values outside the calibration range from contributing to the gradient. The experimental `additional_qt_config` field has been removed.

PiperOrigin-RevId: 824727722
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