Best laptop for doing Bayesian modelling with PyMC?

Hi everyone!

In February I will start a new research job, and I need to get a new work laptop. Since there is no default model from the uni, I need to tell them what model I would like. The most computationally intensive thing I am planning to do is fit large Bayesian models, mostly with PyMC. I will probably do the heavy lifting on the server, but still I was wondering if anyone has recommendations on what models to get for running stuff locally / what specs I should pay particular attention to (especially given the new jax backend). The price range is around 1200 euros. Thanks in advance!

Hello :slight_smile:

I used PyMC mostly for side projects and only marginally for my research (i.e. mostly for fitting a couple of multilevel regression models).

I bought this brick in 2017 and I believe I never had an issue hardwer-wise (except some OOM problems for model that were not supposed to be fitted on a local machine).

The most painful aspect for me was running a Windows OS, in particular when dealing with the Gaussian Processes API and some multivariate distribution (it was not possible to run multiple chains in parallel).

I do not know if it is going to be the same for PyMC v4 but I believe at the moment Jax only partially support Windows OS.

1 Like

I run PyMC3 on Windows, actually within Ubuntu on WSL, and it works great. I expect JAX to work fine as well.

In terms of laptops, focus on memory (for medium to large models, I think 32 Gb is the highest you’ll realistically need for local development) and single-core performance (think higher GHz, which probably leads to Intel processors over AMD Ryzen).

If JAX parallelization of PyMC v4 will work out soon, you may want a GPU, but for $1300 during these times you’ll probably not afford anything good enough.

1 Like

My answer should have been more complete, the issues are mentioned arise from using running PyMC on barebone Windows . What @NowanIlfideme suggested is the got-to workaround for Windows users.

I’m having joy running PyMC on my M1 MacBook Air. Any stupidly big models might benefit from something with a GPU and something more hardcore, but the MacBook Air ticks so many other boxes for me and does absolutely fine running PyMC.

1 Like

+1 most recent devices which are in lists for ml/computation stuff would be good enough usually, sometimes there’ll be larger models and obviously more memory helps but I’d say prioritise the non-PyMC side of things you want in a device, like size, mac or not, any other things that make life easier for you. as @drbenvincent a Macbook air works pretty great actually. Windows, um if you buy a non mac, consider dual booting or something, over time I’ve found my life to be easier just using linux instead of WSL and what not, i mean unless you really require windows for work side by side, I’d say install one of the simpler flavours of linux and things are far easier. Lots of software has windows-specific bugs which do get resolved but sometimes takes time, so yes there are tradeoffs i guess.

3 Likes