Repository navigation
DiffBio 0.1.4
Temperature normalization for small mixtures
Adds diffbio.core.soft_ops.temperature_softmax(scores, temperature, *, axis=-1, where=None) with range-aware score and temperature derivatives. Joint coefficient evaluation avoids reciprocal-square overflow and preserves representable sensitivities when a softmax probability rounds to zero or one.
- Supports masks, broadcastable coverage, static reduction axes, JAX transformations and Flax NNX parameter gradients.
- Fully masked slices return zero weights and derivatives.
- First derivatives require quadratic axis work; this operation targets small mixtures. Existing sorting and quantile normalization remains unchanged.
- Callers validate positive finite scalar temperature. Score differences, derivative coefficients and required sums must be representable; this is not an unrestricted finite-range guarantee.
The patch also includes CI corpus, sharding and coverage-gate fixes accumulated since 0.1.3. See the changelog for details.