Numpyro: Clarify meaning of "experimental" for chain_method='vectorized'

Created on 6 Jan 2021  路  2Comments  路  Source: pyro-ppl/numpyro

Hi numpyro team,

First off, thanks a lot for your work -- so far, the NUTS sampler you have written has been great to use!

I wanted to ask about some clarification about why chain_method='vectorized' for the mcmc function (https://github.com/pyro-ppl/numpyro/blob/master/numpyro/infer/mcmc.py#L198) is labelled experimental in the docstring. In particular, is there a reason to believe that its estimates are in any way compromised compared to parallel or sequential? As someone who tends to have access to one GPU only, I've found it much faster than running the chains in sequence, but I'm a little concerned about it perhaps being less reliable somehow. Should I be testing the results against the parallel implementation, or should vectorized be fine to use?

Thanks!

question

All 2 comments

Hi @martiningram, I think it would be safe to use, though I didn't play much with that option. In GPU, it might be fast in small models but usually in CPU, it will be slower than other options. The experimental label is for performance: we didn't benchmark it throughout to encourage users use/not use it. :)

@fehiepsi that's very helpful, thanks! It certainly seems to be much faster for me than running things in sequence on a single GPU. Good to hear the experimental label applies only to performance. That answers my question -- please feel free to close the issue if you like!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ross-h1 picture ross-h1  路  6Comments

fehiepsi picture fehiepsi  路  4Comments

neerajprad picture neerajprad  路  4Comments

ziatdinovmax picture ziatdinovmax  路  4Comments

LysSanzMoreta picture LysSanzMoreta  路  3Comments