diff --git a/docs/source/asr/results.rst b/docs/source/asr/results.rst index 97b2aeb9550e..07927feb79d8 100644 --- a/docs/source/asr/results.rst +++ b/docs/source/asr/results.rst @@ -103,6 +103,21 @@ Alternatively, you can change the attention model after loading a checkpoint: att_context_size=[64, 64] ) + +Inference on Apple M-Series GPU +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +To perform inference on Apple Mac M-Series GPU (``mps`` PyTorch device), use PyTorch 2.0 or higher (see :ref:`mac-installation` section). Environment variable ``PYTORCH_ENABLE_MPS_FALLBACK=1`` should be set, since not all operations in PyTorch are currently implemented on ``mps`` device. + +If ``allow_mps=true`` flag is passed to ``speech_to_text_eval.py``, the ``mps`` device will be selected automatically. + +.. code-block:: python + + PYTORCH_ENABLE_MPS_FALLBACK=1 python speech_to_text_eval.py \ + (...other parameters...) \ + allow_mps=true + + Fine-tuning on Different Datasets ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/docs/source/starthere/intro.rst b/docs/source/starthere/intro.rst index 115502a47bf1..2e0e272c93f4 100644 --- a/docs/source/starthere/intro.rst +++ b/docs/source/starthere/intro.rst @@ -149,6 +149,37 @@ If you chose to work with the ``main`` branch, we recommend using `NVIDIA's PyTo -p 8888:8888 -p 6006:6006 --ulimit memlock=-1 --ulimit \ stack=67108864 --device=/dev/snd nvcr.io/nvidia/pytorch:21.05-py3 +.. _mac-installation: + +Mac computers with Apple silicon +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +To install NeMo on Mac with Apple M-Series GPU: + +- install `Homebrew `_ package manager + +- create a new Conda environment + +- install PyTorch 2.0 or higher + +- run the following code: + +.. code-block:: shell + + # install mecab using Homebrew, required for sacrebleu for NLP collection + brew install mecab + + # install pynini using Conda, required for text normalization + conda install -c conda-forge pynini + + # install Cython manually + pip install cython + + # clone the repo and install in development mode + git clone https://github.com/NVIDIA/NeMo + cd NeMo + ./reinstall.sh + + `FAQ `_ ---------------------------------------------------