Skip to content

Adding new samplers to NumPyro #2035

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
reubenharry opened this issue Jun 3, 2025 · 1 comment
Open

Adding new samplers to NumPyro #2035

reubenharry opened this issue Jun 3, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@reubenharry
Copy link

Feature Summary

Recently, a couple of samplers have been proposed by the group I work with (https://arxiv.org/abs/2503.01707, https://arxiv.org/abs/2212.08549) as alternatives to NUTS HMC (see issue #1662
). Since they appear to be quite a bit faster than NUTS (at least on benchmark problems I've tried), and relatively simple, I'm interested in adding them to NumPyro, but wanted to get some advice.

Currently, implementations exist in Blackjax. In an ideal world, I'd make a new class like class AdjustedMicrocanonical(numpyro.infer.mcmc.MCMCKernel) which basically just wraps Blackjax.

In addition, my eventual goal would be to add not just the kernel, but also the tuning scheme (which is key to good performance). I'm curious if there's a straightforward way to do that.

Motivation

While it's easy to write a model in NumPyro and extract the density, then use Blackjax for inference, we want to give users more direct access (basically for the purpose of increasing discoverability).

@reubenharry reubenharry added the enhancement New feature or request label Jun 3, 2025
@martinjankowiak
Copy link
Collaborator

one issue with relying on a blackjax implementation is that the numpyro implementation will tend to break every so often as blackjax is refactored. that has certainly been our experience with wrapping jaxns => https://num.pyro.ai/en/latest/contrib.html#nested-sampling

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

No branches or pull requests

2 participants