Skip to content

Add precision-dependent epsilon configuration#16

Closed
rmanhaeve wants to merge 1 commit intomainfrom
precision-epsilon-config
Closed

Add precision-dependent epsilon configuration#16
rmanhaeve wants to merge 1 commit intomainfrom
precision-epsilon-config

Conversation

@rmanhaeve
Copy link
Contributor

  • Add EPS global constant for numerical stability operations
  • Add DEFAULT_EPS_VALUES_PROB and DEFAULT_EPS_VALUES_LOGPROB dicts with precision-specific defaults (float16, bfloat16, float32, float64)
  • Add set_eps(eps) function to configure epsilon globally
  • Remove eps parameters from all functions (log1mexp, negate_real, layers, forward methods) - use global EPS constant instead
  • Export set_eps, EPS, and default value dicts from klay.torch

- Add EPS global constant for numerical stability operations
- Add DEFAULT_EPS_VALUES_PROB and DEFAULT_EPS_VALUES_LOGPROB dicts
  with precision-specific defaults (float16, bfloat16, float32, float64)
- Add set_eps(eps) function to configure epsilon globally
- Remove eps parameters from all functions (log1mexp, negate_real,
  layers, forward methods) - use global EPS constant instead
- Export set_eps, EPS, and default value dicts from klay.torch
@rmanhaeve rmanhaeve added the enhancement New feature or request label Nov 18, 2025
@rmanhaeve rmanhaeve linked an issue Nov 18, 2025 that may be closed by this pull request
@jjcmoon
Copy link
Member

jjcmoon commented Nov 19, 2025

Fixed in a90fb57.

@jjcmoon jjcmoon closed this Nov 19, 2025
@jjcmoon jjcmoon deleted the precision-epsilon-config branch November 21, 2025 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: Allow user to easily set EPS globally.

2 participants