Skip to content

Add Hadamard rotation utilities to qwix/contrib.#301

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_930791813
Open

Add Hadamard rotation utilities to qwix/contrib.#301
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_930791813

Conversation

@copybara-service

Copy link
Copy Markdown

Add Hadamard rotation utilities to qwix/contrib.

This change introduces a hadamard_rot module containing functions to generate Hadamard matrices with optional random sign flips and apply them to tensors. The core functionality is hadamard_rotate_inputs, which transforms both an activation and a weight matrix such that their product remains invariant. This is useful for techniques like Hadamard-based quantization.

This change introduces a `hadamard_rot` module containing functions to generate Hadamard matrices with optional random sign flips and apply them to tensors. The core functionality is `hadamard_rotate_inputs`, which transforms both an activation and a weight matrix such that their product remains invariant. This is useful for techniques like Hadamard-based quantization.

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