muon can be installed from PyPI with
pip install muon
To use a pre-release version of
muon, install it from from the GitHub repository:
pip install git+https://github.com/gtca/muon
If you encounter the error
Illegal instruction: 4 when installing
muon on Apple Silicon (e.g. M1 or M2 chips), try these steps that were suggested for a similar error when installing TensorFlow.
For hacking on the package, it is most convenient to do a so-called development-mode install, which symlinks files in your Python package directory to your muon working directory, such that you do not need to reinstall after every change. We use flit as our build system. After installing flit, you can run
flit install -s from within the muon project directory to perform a development-mode install. Happy hacking!