Develop#2212
Closed
esennesh wants to merge 9 commits into
Closed
Conversation
Signed-off-by: Eli Sennesh <elisennesh@gmail.com>
…check Signed-off-by: Eli Sennesh <elisennesh@gmail.com>
Bugfix/mutables leaves
…alue() Signed-off-by: Eli Sennesh <elisennesh@gmail.com>
xla_pmap_p was removed from jax.extend.core.primitives in JAX 0.10.2. Guard the import and registration with try/except and a None check. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…dependent TransformedDistribution.sample_with_intermediates caches the pre-transform base sample so that log_prob(value, intermediates) can reuse it instead of recomputing transform.inv(value). That optimization was silently lost when the transformed distribution was wrapped: - Independent inherited the base no-op sample_with_intermediates (returning an empty []), so the cached value never reached the trace, and its log_prob did not accept intermediates. - ExpandedDistribution.log_prob ignored the intermediates it was passed (it carried a "TODO: utilize intermediates"). Independent only reinterprets batch dims as event dims and does not reshape the sample, so it can forward the base distribution's intermediates unchanged; ExpandedDistribution already produces intermediates in sample_with_intermediates and now forwards them in log_prob. Both remain backward compatible (intermediates defaults to None). For a TransformedDistribution wrapped by to_event()/expand() (e.g. a smoothed discrete site), this lets log_prob reuse the sampled base value rather than inverting the transform, an 11x speedup on an adaptive-inverse transform whose inverse is an iterative solve. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Just some very minor things I've run into working on improving numpyro.