My current laptop (mid 2014 macbook pro, 16 GB ram, 2.8 GHz intel core i7, 1 TB SSD) is on its way out. I am going to buy a new laptop, and I wanted to ask the community for recommendations. I know a lot of stan users do not use apple computers, but this is something that is a deal breaker for me—I am going to buy a new macbook pro, and I want to know what processor & RAM I should get. I am a PhD student (soon to be post-doc) who runs R-INLA, brms, and Stan regularly. I often do hierarchical models and have to add a phylogenentic component (which seems to really slow things down). For example, I have a brms model running with 570 observations, one random effect with a random slope and intercept per group (I have 25 groups–species), three predictors, and a phylogeny, 40,000 iterations, and we are going on > 24 hrs to run. I am not too tech-y, and have a basic understanding of RAM, processors, storage.
As I used my current computer for >5 years (and expect the next one to be used for a similar timespan), I want to make sure the specs I go with today will be appropriate even with 5 years of use.
There are the following questions I am thinking of:
In buying a new mbp, I am already going to get at least 6 or 8 cores, which will be an improvement over my 4. Should I get 6 or 8?
I currently have 16 GB ram. Should I spring for the 32 gb ram at an additional price of $380?
Do I want an i7 (what I currently have) or an i9 processor?
Have a look at the razer blade lineup. Apple-level quality/finish with often much beefier internals for the same price point. Throw linux on there and you can theme it to look/act pretty similar to OS X. (I say this as someone that spent a decade in mac-land, but has happily been on linux for the past 5 years)
6-vs-8 cores: with 8, you can dedicate two cores per chain and still have the “standard” 4 chains. Unless you’re talking much faster individual cores in the 6 core, I’d say go 8.
16-vs-32gb RAM: run your model and check it’s memory usage while going. Are you getting anywhere near maxing out 16?
i7-vs-i9: out of my expertise, but note that last I checked the common wisdom here was that hyperthreading doesn’t help Stan sampling, so if that’s your only reason for looking at i9, it’s not going to be any help.
Another thought: instead of worrying about future-proofing yourself, you could grab something that you’ll be happy with running small models and use the $ saved to run your bigger models in the cloud on EC2 or google compute.
Depending on your need I am on a 2014 Macbook Pro 11,2 running Ubuntu 20. I switched it over three years ago. I can still run a number of large models Stan, brms, and R-INLA fairly quickly. This is a fairly cheap way to extend the life of a laptop and get a performance boost.
If you can afford it go for max cores, and max RAM - I have a 64GB RAM MBP and I can fill it up,a nd though it was costly I do not regret it. People seem to forget having more cores and Ram means you can build more models at once too.
I recently found myself in the unusual situation of having a fairly large budget to buy a new laptop for work, and running Stan models was one of my main drivers for choosing the system specifications. (It’s typically the most demanding thing my laptop has to handle.)
To answer the question for people who aren’t looking to buy a MacBook, I followed the advice here and eventually ordered a Thinkpad P1 Gen2 with the Intel Core i9-9880H Processor and 64GB RAM (and an NVIDIA Quadro T2000 GPU). There are faster machines out there, such as the Thinkpad P53 and workstations from other manufacturers, but the P1 has the advantage of still being a fairly slim and portable 15".
At the top end of the CPU specifications, the P1 has an option of an Intel Core i9-9880H Processor or an Intel Xeon E-2276M. The i9 has eight cores, with 512K L1 cache, 2MB L2 cache, and 16MB L3 cache. The Xeon is six cores with 384 KB L1 cache, 1.5 MB L2 cache, and 12 MB L3 cache. The Xeon’s main advantage is support for ECC RAM at the cost of slower performance, so the i9 seemed much the best option.
To be honest, though, I get the impression that “lots of RAM, as fast as possible, lots of cores, lots of cache” is probably enough for most people when making the decision, and much more comes down to building models well. For anything truly taxing, I would be looking to offload the model to my department’s compute server. It is nice to be able to iterate reduced versions of models locally before doing that, though.
(And, for reference, that’s advice very much from a Stan novice who hasn’t yet had their shiny new laptop delivered after 8 weeks of waiting…)
EDIT: All this is in the context of (Arch) Linux, although with 4TB of drive space I’ll likely be dual booting with Windows 10.
I’m windows 10 at work and I have a mac and linux at home. If you aren’t constrained by the OS and your main goal is running Stan, I highly recommend getting linux. I’ve found cmdstan in particular to install much faster and run faster on it. A couple years ago I was totally new to linux and I bought a system76 which has pop_os. I’ve been really happy with it. If I were to get a laptop today I’d spring for their lemur pro.
Thank you so much for the advice! This is really helpful. I think I am convinced that I need to get the i9 processor, but now contemplating RAM. I am currently trying to figure out how to monitor RAM when a model is running to see the peak. Thanks again!
Thanks! Would love to do this but the reason I am replacing my laptop is the motherboard is failing—don’t think there is a way around this unless I replace it (not worth it on a 5.5 yr old laptop) or get a new one…