Earlier quoted context omitted.
In machine learning (especially deep learning or neural networks), the 'training' is done by using Stochastic Gradient Descent. These gradients are computed using Backpropagation. Backpropagation requires you to do a backward pass of your model (typically many layers of neural weights) and thus requires you to keep in memory a lot of intermediate values (called activations). However, if you are doing "inference" that…
it took me 20 years to learn this body of knowledge and now it can just sort of be summed up in a paragraph. When I learned and used gradient descent, you had to analytically determine your own gradients ( https://web.archive.org/web/20161028022707/https://genomics.... ). I went to grad school to learn how to determine my own gradients. Unfortunately, in my realm, loss landscapes have multiple minima, and gradient de…
Accelerated PyTorch Training on M1 Mac
121–130 of 153 posts
Re: Accelerated PyTorch Training on M1 Mac
#122Earlier quoted context omitted.
Probably because it will be impossible to compare with old results. If every year the community chooses a different model, how are you going to compare results year over year?
The numbers are relative speedups, not absolute numbers that can be compared with any prior results, so I don't really see how this matters.
Re: Accelerated PyTorch Training on M1 Mac
#123Nice results! But why are people still reporting benchmark results on VGG? Does anybody actually use this network anymore? Better would be mobilenets or efficientNets or NFNets or vision transformers or almost anything that's come out in the 8 years since VGG was published (great work it was at the time!).
> But why are people still reporting benchmark results on VGG? It makes me feel like i’m missing something! Is is still used as a backbone in the same way as legacy code is everywhere, or is it something else entirely??
Re: Accelerated PyTorch Training on M1 Mac
#124This is really cool for a number of reasons: 1.) Apple Silicon currently can't compete with Nvidia GPUs in terms of raw compute power, but they're already way ahead on energy efficiency. Training a small deep learning model on battery power on a laptop could actually be a thing now. Edit: I've been informed that for matrix math, Apple Silicon isn't actually ahead in efficiency 2.) Apple Silicon probably will compete…
> but they're already way ahead on energy efficiency 1) Nope. For neural network training not the case: https://tlkh.dev/benchmarking-the-apple-m1-max And that's with the 3090 set at a very high 400W power limit, can get far more efficient when clocked lower. (which is normal, because no dedicated matrix math accelerators on the GPU notably) 2) We'll see, hopefully Apple thinks that the market is worth bothering with…
Re: Accelerated PyTorch Training on M1 Mac
#125Earlier quoted context omitted.
Question about terminology (no background in AI). In econometrics, estimation is model fitting (training, I guess), and inference refers to hypothesis testing (e.g. t or F tests). What does inference mean here?
In machine learning (especially deep learning or neural networks), the 'training' is done by using Stochastic Gradient Descent. These gradients are computed using Backpropagation. Backpropagation requires you to do a backward pass of your model (typically many layers of neural weights) and thus requires you to keep in memory a lot of intermediate values (called activations). However, if you are doing "inference" that…
Re: Accelerated PyTorch Training on M1 Mac
#126Earlier quoted context omitted.
> but they're already way ahead on energy efficiency 1) Nope. For neural network training not the case: https://tlkh.dev/benchmarking-the-apple-m1-max And that's with the 3090 set at a very high 400W power limit, can get far more efficient when clocked lower. (which is normal, because no dedicated matrix math accelerators on the GPU notably) 2) We'll see, hopefully Apple thinks that the market is worth bothering with…
What do you mean by: "if you can stand Metal for your use case?" What is Metal?
Re: Accelerated PyTorch Training on M1 Mac
#127Earlier quoted context omitted.
> but they're already way ahead on energy efficiency 1) Nope. For neural network training not the case: https://tlkh.dev/benchmarking-the-apple-m1-max And that's with the 3090 set at a very high 400W power limit, can get far more efficient when clocked lower. (which is normal, because no dedicated matrix math accelerators on the GPU notably) 2) We'll see, hopefully Apple thinks that the market is worth bothering with…
What do you mean by: "if you can stand Metal for your use case?" What is Metal?
Re: Accelerated PyTorch Training on M1 Mac
#128Earlier quoted context omitted.
Grouped convolutions can't really run faster than groups * conv(ch/group) and I believe that's close to where they're at? Note that for ch So unfortunately depthwise convolutions end up having terrible performance.
Why wouldn’t you be able to run them in parallel using CUDA? You shouldn’t be memory-transfer speed limited when group convolution layers are a part of a bigger net. Note that pointwise 1x1 convolutions are a special case of group convolutions and actually I think they might be specially optimized in PyTorch (I’d have to run some benchmarks to test it though).
You can fuse grouped convs (depthwise is a special case of grouped convs) into preceding or following layers. Maybe JAX can do this already? No clue if any library offers such an optimization out of the box
Re: Accelerated PyTorch Training on M1 Mac
#129 $ conda install pytorch torchvision torchaudio -c pytorch-nightly
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- torchaudio
And the pip install variant installs an old version of torchaudio that is broken OSError: dlopen(/opt/homebrew/Caskroom/miniforge/base/envs/test123/lib/python3.10/site-packages/torchaudio/lib/libtorchaudio.so, 0x0006): Symbol not found: __ZN2at14RecordFunctionC1ENS_11RecordScopeEbRe: Accelerated PyTorch Training on M1 Mac
#130Does this work on any Metal hardware or just the M1 GPU?