@fehiepsi Thanks for sharing two issues, I have subscribed to notifications and will keep an eye out for progress.
Before trying to understanding SVI and Guides, I am thinking its worth checking whether it would be faster if I separated the dataset into smaller batches and ran the sampler on each batch in a loop. Something like how its done in this post.
That post mentions how I could speed things up by using jit_model_args=True
in that case to avoid recompiling the model for each batch. Each of the L
instances in my dataset can be sampled independently, so batching is possible. However the batches will not all be the same shape, since the value of SL
will be different. Your comment here mentions how I can still use jit_model_args=True
in this case if my model has no local latent variables and I can pad my dataset and use masking. Can you explain what you mean by local latent variables? Does that mean latent variables inside a plate? I’m trying to figure out if my model above has local latent variables and whether the approach I mention here is possible in my case.