Requirements:
- Apple Silicon Mac (M1, M2, M1 Pro, M1 Max, M1 Ultra, etc).
- macOS 12.3+
- Download and install Homebrew from https://brew.sh. Follow the steps it prompts you to go through after installation.
- Download Miniforge3 (Conda installer) for macOS arm64 chips (M1, M2, M1 Pro, M1 Max, M1 Ultra).
- Install Miniforge3 into home directory.
chmod +x ~/Downloads/Miniforge3-MacOSX-arm64.sh
sh ~/Downloads/Miniforge3-MacOSX-arm64.sh
source ~/miniforge3/bin/activate
- Restart terminal.
- Create a directory to setup PyTorch environment.
mkdir pytorch-test
cd pytorch-test
- Make and activate Conda environment.
Note: Python 3.8 is the most stable for using the following setup.
conda create --prefix ./env python=3.8
conda activate ./env
- Install the PyTorch 1.12.0+ default version for Mac with pip from the PyTorch getting started page.
pip3 install torch torchvision torchaudio
This will install the following:
Installing collected packages: urllib3, typing-extensions, pillow, numpy, idna, charset-normalizer, certifi, torch, requests, torchvision, torchaudio
- An Image Is Worth 16x16 Words: Transformers For Image Recognition At Scale
- Are Transformers More Robust Than CNNs?
- https://www.kdnuggets.com/2022/01/machine-learning-models-die-silence.html
- https://github.com/jeonsworld/ViT-pytorch
- https://gist.github.com/khizirsiddiqui/559a91dab223944fb83f8480715d2582
- https://github.com/srivatsan88/ContinousModelDeploy
- Building MLOps Pipeline for NLP: Machine Translation Task
- https://github.com/mrdbourke/pytorch-apple-silicon