-
Notifications
You must be signed in to change notification settings - Fork 106
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
Waste Free SMC available for adaptive tempered and tempered SMC. #721
Waste Free SMC available for adaptive tempered and tempered SMC. #721
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #721 +/- ##
==========================================
- Coverage 98.72% 98.67% -0.05%
==========================================
Files 59 60 +1
Lines 2746 2803 +57
==========================================
+ Hits 2711 2766 +55
- Misses 35 37 +2 ☔ View full report in Codecov by Sentry. |
957b958
to
5c34177
Compare
By the way, whilst we are on that, I remember being a bit dubious about waste free for parallel environments: when you have a lot of processors the analysis in the paper does not hold anymore. |
It's true that waste-free SMC shines best when the number of processors is small relative to the number of particles. (Say, a dozen of processors for several thousand of particles.) I think this is the case for most practical applications. If your number of particles is comparable to that of processors (say, 500 processors and 500 particles), then yes standard SMC is better. However, if you have that many processors, you probably have a lot of memory as well. When you increase the number of particles to about a million (still with 500 CPUs), waste-free starts to be preferable again. |
Well, not really: a commercial grade GPU has fairly little memory so it's
not all that black and white. I'll have a think.
…On Fri, 16 Aug 2024, 11:09 hai-dang-dau, ***@***.***> wrote:
It's true that waste-free SMC shines best when the number of processors is
small relative to the number of particles. (Say, a dozen of processors for
several thousand of particles.) I think this is the case for most practical
applications.
If your number of particles is comparable to that of processors (say, 500
processors and 500 particles), then yes standard SMC is better.
However, if you have that many processors, you probably have a lot of
memory as well. When you increase the number of particles to about a
million (still with 500 CPUs), waste-free starts to be preferable again.
—
Reply to this email directly, view it on GitHub
<#721 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEYGFZ5MOG624WOTBJF2BQTZRXFWRAVCNFSM6AAAAABMSYWGTWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTGIZDQOBSHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
In my previous post, by "processors" I meant the number of MCMC chains that can be run on parallel. Although GPU has a lot of parallel processing capacity, I'm not sure how this translates into the number of MCMC chains. The delicate point is that one MCMC chain itself involves a lot of parallelizable operations (ie matrix multiplications for calculating the likelihood or for generating preconditioned proposals). It is these primitive operations that are usually parallelized automatically by JAX/XLA, not the higher level operations that were taken into account in my reasoning above. Having said that, it's true that we developed and tested waste-free SMC with CPUs in mind; so it'd definitely be relevant to have recommendations tailored to GPU-accelerated environment. |
bf0fbee
to
9550d5d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nit
Co-authored-by: Junpeng Lao <[email protected]>
Feel free to merge after fixing the code style |
@junpenglao the review gets dismissed whenever we commit something new, even if it is just github's commiting a reviewer suggestion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Although SMC base.py was ready for waste-free, tempered and adaptive tempered are coupled to using classic SMC (iterate MCMC and keep the last sample). This PR makes Waste-free available at all levels of the hierarchy.
#710