Machine Learning on the M1 Pro + M1 Max Macbook Pros?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
are the new m1 pro and m1 max chips a game changer for machine learning let's find out welcome back to my channel my name is jordan if you're new here and i make videos about artificial intelligence emerging tech and the life of a phd student at mit if you like videos like this consider subscribing this video is sponsored by curiositystream and if you want to check out the deeper dive that i go into on the comparison between these chips you should check out the nebula plus version of this video which you can get access to for less than 15 a year when you sign up for curiosity stream and nebula using the link in the description anyway let's get into it anyway let's get into it so similar to last year's video which looked at the performance of the m1 chip for apple computers as machine learning computers this year when the m1 pro and m1 max came out i of course had to do a similar test to see whether or not it's actually worth it for people who work in machine learning or who are interested in dabbling in machine learning to buy these laptops and if you compare the m pro and the m1 max the m1 you can definitely see that they are more powerful chips both the m1 pro and the m1 max have more gpu cores than the m1 chip did and if you're someone who works in graphics rendering then the m1 pro and m1 max both also have much better media encoders than the original m1 chip did they have the same number of neural engine cores but that essentially mostly allows them to optimize their performance on machine learning so we'll see how much of a difference that ends up making i'm expecting the main difference to come in the number of gpus and the ability to essentially distribute these models across a wider number of gpu cores in order to train them faster so if you watch my review of the m1 chip you'll remember that one of my big complaints when it came to running machine learning models on this laptop which i still have was the fact that installing tensorflow such that it could access and enable the m1 chip was complicated and this was because at the time that version of tensorflow was still in beta it was still under development and so it was a little bit clunky to use however i am happy to report that installing tensorflow such that you can enable the m1 ship now is extremely straightforward it took maybe five minutes per laptop and it's much easier to set up than it has been before so that is no longer a barrier when it comes to comparison testing i did the same test that i did last year so i trained the same neural network model on mnist and then had weights and biases as a plug-in to capture all of the metrics that i was interested in looking at and so we'll take a look at these now so section one essentially just looks at accuracy and loss curves as you can see there isn't really a ton to report here the curves are roughly the same they seem to converge around the same point there is a little bit more divergence i think in loss than i would necessarily like to see but especially if you look at accuracy it's close enough to each other where i'm not too worried about whether or not these chips actually have an effect on whether or not you can accurately train models especially since all these models are the same the optimizers are the same there should be no difference in that section two of course is where things start to get interesting we start to look at gpu power usage gpu memory allocations and a lot of this actually matches up with what apple essentially recorded in their original figures i think that it's helpful here to actually have labels on our axes since a lot of the figures that apple showed in their announcement of the m1 pro and m1 max chip didn't actually specify what the units were so it was kind of unclear how much better these chips were but as you can see the m1 max chip is able to use slightly more power but it takes less time in order to essentially run the same model that the m1 pro chip does both of them are significantly faster than the original m1 and of course i also ran things on a tesla v100 and that is still your best option if you're looking to train large models which we'll talk about a little bit later on this you can also see that when it comes to heat dispersion the older m1 actually does worse on this than the newer versions do so it looks like whatever heat dissipation and cooling features they put into these new laptops are definitely working better but on top of that they're also just using less power so it's likely that the computer just doesn't have to get as hot in order to run them in terms of timing you can see that the tesla v100 was still the fastest in terms of training time actually it's not shown here just because of how this report is set up the tpu was the fastest option um the tpu was able to finish training this model faster than the tesla v100 was but as you can see and as one would expect the m1 max does train slightly faster than the m1 pro does i will note that when it comes to the laptops that i was able to get my hands on the m1 pro had 16 gigs of ram and the m1 max had 32 gigs of ram because that's the lowest amount that you can get for the max chip so some of these results might change a little bit when it comes to the amount of time that it takes to run these types of models with equivalent amounts of memory but that memory isn't really involved in the process of training the model itself so that shouldn't be a huge factor in these results in particular actually as you can see here if we look at the system memory utilization percentage the old m1 chip actually uses a decent amount of your memory compared to both the m1 pro and the m1 max so it may be useful for you to upgrade the amount of memory in your computer i still don't think it likely had a huge effect on the training of the model itself but i will note that if you're trying to train a model and also do other things on your laptop at the same time having more memory would be helpful because as you can see the percentage that we're using for the m1 max is less than the percentages that we're using for the m1 pro they're likely actually roughly the same amount of memory because the memory mods are different it looks like it's just under one and a half times as much but the amount that you'll have left to do other things on your computer like run google chrome will actually let you do other things without everything crashing so potentially something to keep in mind so in short as one might expect if you compare the performance of the m1 max the m1 pro the m1 max tends to outperform the m1 pro in terms of speed and otherwise there isn't a huge difference between the two in terms of training your models having said that this is a relatively small model being trained on a relatively uncomplicated data set so as the scales to larger models you could definitely see that difference having a bigger effect on your training time so given all this data should you buy the m1 pro or the m1 max macbooks i think that the conclusion that i come to here is actually pretty similar to the one that i came to in my original m1 review and that is that for people who are researchers in machine learning or working in the tech industry on large models there's no laptop that necessarily makes a huge difference because you're not training your models locally so when i think about the work that i do for my phd i'm pretty much always training models on remote gpu clusters that have way more power than this laptop or any laptop that i would buy ever would because it's just more efficient it makes a lot more sense to do it that way i think that if you are interested in dabbling in machine learning i think that especially if you're someone who's interested in rendering 3d graphics or in you know making complicated youtube videos i think that having a max can be helpful in terms of rendering things faster at the same time i don't know that it's fully necessary i will likely upgrade to a 14 inch pro or max i'm still not entirely sure which one i actually want but i don't think that it will make a huge difference in my workflow when it comes to machine learning i'm actually expecting it to make much more of a dent in my workflow when it comes to rendering videos now if you are training your models locally for whatever reason i think that obviously the m1 max is the more powerful computer so it might be something that you would consider it's also quite expensive so i don't think it would make sense for the average practitioner who's just dabbling in machine learning to get a laptop like this unless there's some other reason why you need that much power now as i mentioned in this video i ended up going into a deeper dive into the comparison data between the m1 pro and the m1 max and the nebula plus version of this video if you haven't heard nebula is a streaming platform built by me and some of my friends including people like tierzoo simon clark and midlife crisis on nebula you can find ad-free versions of all of our videos extended versions of our videos and bonus content that we can post without worrying about how well it will perform on youtube you also get access to our nba originals which you can't find anywhere else including tom scott's game show money or a very good trivia show or i won five hundred dollars for drawing a very nice circle and the best way to sign up for nebula is actually through curiosity stream who are kindly sponsoring today's video curiosity stream is a subscription streaming service with thousands of documentaries and non-fiction videos in fact if you're interested in learning more about how computers process large amounts of data as we see in machine learning i would highly recommend checking out their documentary the end of memory which dives into how we classify store and give meaning to massive amounts of digital information curiosity stream loves independent creators and wants to help us grow our platform so if you click on the link in the description or use my promo code jordan you can get access to curiosity stream for 26 off their annual plans with nebula included for free for as long as you are curious stream member that's less than 15 a year signing up for curiosity stream at nebula is a great way to directly support my channel and get access to that deeper dive into the various m1 max and machine learning analytics so sign up for kiriakis shame and nebula curiositystream.com jordan or using the promo code chart otherwise you can check out the video that i did originally on the m1 ship you can follow me on all my various socials and i will see you all next week bye
Info
Channel: Jordan Harrod
Views: 23,727
Rating: undefined out of 5
Keywords: m1 max, m1 pro, macbook pro, m1x, m1 pro or m1 max, macbook pro 2021, macbook pro m1x, apple event unleashed, m1 pro max, macbook pro 14 m1 pro, m1 max vs m1 pro, apple m1x, new macbook pro 2021, macbook pro 14 inch 2021, m1x macbook pro, macbook pro m1, m1x mac, macbook m1x, prores, new macbook pro, macbook pro 2021 14
Id: p7SXrrYOaME
Channel Id: undefined
Length: 10min 6sec (606 seconds)
Published: Tue Nov 02 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.