Skip to content

Add a fast path in _matrix_perturbation(epsilon=0.0) to simplify caller sides #186

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 1 commit into
base: main
Choose a base branch
from

Conversation

tsunghsienlee
Copy link
Contributor

@tsunghsienlee tsunghsienlee commented Jun 11, 2025

Summary:

  • The fast path is used when epsilon=0.0, which helps stabilize the following scenarios in stabilize_and_pow_eigenvalues(rank_deficient_stability_config=PerturbationConfig()):
    • perturb_before_computation=True and lambda_min = 0.0.
    • perturb_before_computation=True and lambda_min > 0.0.
    • epsilon = 0.0.
  • Remove outdated comments mentioning "DampingConfig".

This failed before was due to missing @gajjanag 's fix.

Differential Revision: D76242419

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 11, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D76242419

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D76242419

tsunghsienlee added a commit to tsunghsienlee/optimizers that referenced this pull request Jun 12, 2025
…ller sides (facebookresearch#186)

Summary:
Pull Request resolved: facebookresearch#186

- The fast path is used when `epsilon=0.0`, which helps stabilize the following scenarios in `stabilize_and_pow_eigenvalues(rank_deficient_stability_config=PerturbationConfig())`:
   - `perturb_before_computation=True` and `lambda_min = 0.0`.
   - `perturb_before_computation=True` and `lambda_min > 0.0`.
   - `epsilon = 0.0`.
- Remove outdated comments mentioning "DampingConfig".

[This failed before](https://github.com/facebookresearch/optimizers/actions/runs/15541753042/job/43772139730) was due to missing [gajjanag's fix](facebookresearch#185).

Differential Revision: D76242419
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D76242419

tsunghsienlee added a commit to tsunghsienlee/optimizers that referenced this pull request Jun 13, 2025
…ller sides (facebookresearch#186)

Summary:
Pull Request resolved: facebookresearch#186

- The fast path is used when `epsilon=0.0`, which helps stabilize the following scenarios in `stabilize_and_pow_eigenvalues(rank_deficient_stability_config=PerturbationConfig())`:
   - `perturb_before_computation=True` and `lambda_min = 0.0`.
   - `perturb_before_computation=True` and `lambda_min > 0.0`.
   - `epsilon = 0.0`.
- Remove outdated comments mentioning "DampingConfig".

[This failed before](https://github.com/facebookresearch/optimizers/actions/runs/15541753042/job/43772139730) was due to missing [gajjanag's fix](facebookresearch#185).

Differential Revision: D76242419
…ller sides (facebookresearch#186)

Summary:
Pull Request resolved: facebookresearch#186

- The fast path is used when `epsilon=0.0`, which helps stabilize the following scenarios in `stabilize_and_pow_eigenvalues(rank_deficient_stability_config=PerturbationConfig())`:
   - `perturb_before_computation=True` and `lambda_min = 0.0`.
   - `perturb_before_computation=True` and `lambda_min > 0.0`.
   - `epsilon = 0.0`.
- Remove outdated comments mentioning "DampingConfig".

[This failed before](https://github.com/facebookresearch/optimizers/actions/runs/15541753042/job/43772139730) was due to missing [gajjanag's fix](facebookresearch#185).

Differential Revision: D76242419
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D76242419

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants