Skip to content
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

Test using cached or pre-heated metric for NUTS sampling to decrease inference time #285

Open
SamuelBrand1 opened this issue Oct 22, 2024 · 3 comments
Labels
experiment some sort of experiment to better understand a part of the model

Comments

@SamuelBrand1
Copy link
Contributor

From f2f discussion with @kokbent he noted that a large proportion of the sampling time in NUTS was during early sampling. This contributes to very long sampling times overall (many hours to get to 4000 samples).

This is suggestive that a lot of time is spent during adaptation phase, probably/possibly identification of a good metric for the momentum refresh step in NUTS.

A possible action to help with this would be to either serialise the metric from a successful run, for reusing in future runs on the same state. Or doing the same using an estimate of the inverse correlation matrix of posterior samples. A major limitation here would of course be that the number of parameters grows with number of variants, but this might be a useful approach to pre-heating the NUTS process.

@seabbs
Copy link

seabbs commented Oct 23, 2024

Just a fly by but a simple speed up is to reduce warmup steps as NUTs often doesn't need the default settings.

(otherwise yes agree with ideas here)

@arik-shurygin arik-shurygin added the experiment some sort of experiment to better understand a part of the model label Oct 23, 2024
@kokbent
Copy link
Collaborator

kokbent commented Oct 28, 2024

Need inferer/runner to expose the inverse_mass_matrix argument. Will work on that.

@arik-shurygin
Copy link
Collaborator

Need inferer/runner to expose the inverse_mass_matrix argument. Will work on that.

Hey @kokbent is this functionality you found useful in the most recent update? If so I can expose the inverse_mass_matrix in main as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experiment some sort of experiment to better understand a part of the model
Projects
None yet
Development

No branches or pull requests

4 participants