# NeMo
**Repository Path**: bostenai/NeMo
## Basic Information
- **Project Name**: NeMo
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 1
- **Created**: 2020-11-26
- **Last Updated**: 2021-02-01
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
|status| |stable| |license| |lgtm_grade| |lgtm_alerts| |black|
.. |status| image:: http://www.repostatus.org/badges/latest/active.svg
:target: http://www.repostatus.org/#active
:alt: Project Status: Active – The project has reached a stable, usable state and is being actively developed.
.. |license| image:: https://img.shields.io/badge/License-Apache%202.0-brightgreen.svg
:target: https://github.com/NVIDIA/NeMo/blob/master/LICENSE
:alt: NeMo core license and license for collections in this repo
.. |lgtm_grade| image:: https://img.shields.io/lgtm/grade/python/g/NVIDIA/NeMo.svg?logo=lgtm&logoWidth=18
:target: https://lgtm.com/projects/g/NVIDIA/NeMo/context:python
:alt: Language grade: Python
.. |lgtm_alerts| image:: https://img.shields.io/lgtm/alerts/g/NVIDIA/NeMo.svg?logo=lgtm&logoWidth=18
:target: https://lgtm.com/projects/g/NVIDIA/NeMo/alerts/
:alt: Total alerts
.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: Code style: black
**NVIDIA NeMo**
===============
Create State of the Art Models
------------------------------
Installation
~~~~~~~~~~~~
* ``pip install nemo_toolkit[all]``
* Docker container installation from NGC: https://ngc.nvidia.com/catalog/containers/nvidia:nemo
* `Documentation `_
* NVIDIA `Developer Blog `_
* Pretrained models on NVIDIA `NGC Model repository `_
**Introduction**
NeMo is a toolkit for creating `Conversational AI `_ applications.
NeMo toolkit makes it possible for researchers to easily compose complex neural network architectures for conversational AI using reusable components - Neural Modules.
**Neural Modules** are conceptual blocks of neural networks that take *typed* inputs and produce *typed* outputs. Such modules typically represent data layers, encoders, decoders, language models, loss functions, or methods of combining activations.
The toolkit comes with extendable collections of pre-built modules for automatic speech recognition (ASR), natural language processing (NLP) and text synthesis (TTS).
Built for speed, NeMo can utilize NVIDIA's Tensor Cores and scale out training to multiple GPUs and multiple nodes. NeMo has integration with NVIDIA Jarvis.
**Release v0.11**
* This release improves ease of use with nemo models and module composition
* New models such as Voice activity detection, Speaker identification, Matchboxnet Speech commands; Megatron BERT trained on bio medical data. For a complete list of models, see the table below.
**Resources**
* Watch `this video `_ for a quick walk-through.
* NVIDIA `Developer Blog to learn how to develop speech recognition models for different languages `_
* NVIDIA `Developer Blog announcing NeMo `_
* NVIDIA `Developer Blog for example applications `_
* NVIDIA `Developer Blog for QuartzNet ASR model `_
* Recommended version to install is **0.11** via ``pip install nemo-toolkit[all]``
* Recommended NVIDIA `NGC NeMo Toolkit container `_
* Pretrained models are available on NVIDIA `NGC Model repository `_
Getting started
~~~~~~~~~~~~~~~
THE LATEST STABLE VERSION OF NeMo is **0.11** (Available via PIP).
**Requirements**
1) Python 3.6 or 3.7
2) PyTorch 1.4.* with GPU support
3) (optional, for best performance) NVIDIA APEX. Install from here: https://github.com/NVIDIA/apex
Docker containers
~~~~~~~~~~~~~~~~~
**NeMo docker container**
You can use NeMo's docker container with all dependencies pre-installed
.. code-block:: bash
docker run --runtime=nvidia -it --rm -v --shm-size=16g -p 8888:8888 -p 6006:6006 --ulimit memlock=-1 --ulimit stack=67108864 nvcr.io/nvidia/nemo:v0.11
If you are using the NVIDIA `NGC PyTorch container `_ follow these instructions
* Pull the docker: ``docker pull nvcr.io/nvidia/pytorch:20.01-py3``
* Run:``docker run --gpus all -it --rm -v :/NeMo --shm-size=8g -p 8888:8888 -p 6006:6006 --ulimit memlock=-1 --ulimit stack=67108864 nvcr.io/nvidia/pytorch:20.01-py3``
* ``apt-get update && apt-get install -y libsndfile1 ffmpeg && pip install Cython``
* ``pip install nemo_toolkit`` Installs NeMo core only.
* ``pip install nemo_toolkit[all]`` Installs NeMo core and ALL collections
* ``pip install nemo_toolkit[asr]`` Installs NeMo core and ASR (Speech Recognition) collection
* ``pip install nemo_toolkit[nlp]`` Installs NeMo core and NLP (Natural Language Processing) collection
* ``pip install nemo_toolkit[tts]`` Installs NeMo core and TTS (Speech Synthesis) collection
See `examples/start_here` to get started with the simplest example.
**Tutorials**
* `Speech recognition `_
* `Natural language processing `_
* `Speech Synthesis `_
Pre-trained models
~~~~~~~~~~~~~~~~~~
+------------+----------------------------------------------------------------------------------------------+-----------------------+
| Modality | Model | Trained on |
+============+==============================================================================================+=======================+
| ASR | `Jasper10x5DR_En `_ | LibriSpeech, WSJ, |
| | | Mozilla Common Voice |
| | | (en_1488h_2019-12-10),|
| | | Fisher, Switchboard, |
| | | and Singapore English |
| | | National Speech Corpus|
| | | (Part 1) |
+------------+----------------------------------------------------------------------------------------------+-----------------------+
| ASR | `QuartzNet15x5En `_ | LibriSpeech, WSJ, |
| | | Mozilla Common Voice |
| | | (en_1087h_2019-06-12),|
| | | Fisher, and |
| | | Switchboard |
+------------+----------------------------------------------------------------------------------------------+-----------------------+
| ASR | `QuartzNet15x5Zh `_ | AISHELL-2 Mandarin |
| | | |
| | | |
| | | |
+------------+----------------------------------------------------------------------------------------------+-----------------------+
| NLP | `BERT base uncased `_ |English Wikipedia and |
| | |BookCorpus dataset |
| | |seq len <= 512 |
| | | |
+------------+----------------------------------------------------------------------------------------------+-----------------------+
| NLP | `BERT large uncased `_ |English Wikipedia and |
| | |BookCorpus dataset |
| | |seq len <= 512 |
| | | |
+------------+----------------------------------------------------------------------------------------------+-----------------------+
| TTS | `Tacotron2 `_ |LJspeech |
| | | |
| | | |
| | | |
+------------+----------------------------------------------------------------------------------------------+-----------------------+
| TTS | `WaveGlow `_ |LJspeech |
| | | |
| | | |
| | | |
+------------+----------------------------------------------------------------------------------------------+-----------------------+
DEVELOPMENT
~~~~~~~~~~~
If you'd like to use master branch and/or develop NeMo you can run "reinstall.sh" script.
`Documentation (master branch) `_.
**Installing From Github**
If you prefer to use NeMo's latest development version (from GitHub) follow the steps below:
1) Clone the repository ``git clone https://github.com/NVIDIA/NeMo.git``
2) Go to NeMo folder and re-install the toolkit with collections:
.. code-block:: bash
./reinstall.sh
**Style tests**
.. code-block:: bash
python setup.py style # Checks overall project code style and output issues with diff.
python setup.py style --fix # Tries to fix error in-place.
python setup.py style --scope=tests # Operates within certain scope (dir of file).
**NeMo Documentation**
.. |main| image:: https://readthedocs.com/projects/nvidia-nemo/badge/?version=main
:alt: Documentation Status
:scale: 100%
:target: https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/main/
.. |master| image:: https://readthedocs.com/projects/nvidia-nemo/badge/?version=master
:alt: Documentation Status
:scale: 100%
:target: https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/master/
.. |latest| image:: https://readthedocs.com/projects/nvidia-nemo/badge/?version=main
:alt: Documentation Status
:scale: 100%
:target: https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/main/
.. |stable| image:: https://readthedocs.com/projects/nvidia-nemo/badge/?version=stable
:alt: Documentation Status
:scale: 100%
:target: https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/stable/
.. |v0111| image:: https://readthedocs.com/projects/nvidia-nemo/badge/?version=v0.11.1
:alt: Documentation Status
:scale: 100%
:target: https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/v0.11.1/
.. |v0110| image:: https://readthedocs.com/projects/nvidia-nemo/badge/?version=v0.11.0
:alt: Documentation Status
:scale: 100%
:target: https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/v0.11.0/
.. |v0101| image:: https://readthedocs.com/projects/nvidia-nemo/badge/?version=v0.10.1
:alt: Documentation Status
:scale: 100%
:target: https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/v0.10.1/
+---------+----------+---------------------------------------------------------+
| Version | Status | Description |
+=========+==========+=========================================================+
| Latest | |latest| | Documentation of the latest (i.e. `main`) branch |
+---------+----------+---------------------------------------------------------+
| Stable | |stable| | Documentation of the stable (i.e. `0.11.1`) branch |
+---------+----------+---------------------------------------------------------+
| Main | |main| | Documentation of the `main` branch |
+---------+----------+---------------------------------------------------------+
| Master | |master| | Documentation of the `master` branch |
+---------+----------+---------------------------------------------------------+
| v0.11.1 | |v0111| | Documentation of the v0.11.1 release |
+---------+----------+---------------------------------------------------------+
| v0.11.0 | |v0110| | Documentation of the v0.11.0 release |
+---------+----------+---------------------------------------------------------+
| v0.10.1 | |v0101| | Documentation of the v0.10.1 release |
+---------+----------+---------------------------------------------------------+
**NeMo Test Suite**
NeMo contains test suite divided into 5 subsets:
1) ``unit``: unit tests, i.e. testing a single, well isolated functionality
2) ``integration``: tests checking the elements when integrated into subsystems
3) ``system``: tests working at the highest integration level
4) ``acceptance``: tests checking whether the developed product/model passes the user defined acceptance criteria
5) ``docs``: tests related to documentation (deselect with '-m "not docs"')
The user can run all the tests locally by simply executing:
.. code-block:: bash
pytest
In order to run a subset of tests one can use the ``-m`` argument followed by the subset name, e.g. for ``system`` subset:
.. code-block:: bash
pytest -m system
By default, all the tests will be executed on GPU. There is also an option to run the test suite on CPU
by passing the ``--cpu`` command line argument, e.g.:
.. code-block:: bash
pytest -m unit --cpu
Citation
~~~~~~~~
If you are using NeMo please cite the following publication
.. code-block:: tex
@misc{nemo2019,
title={NeMo: a toolkit for building AI applications using Neural Modules},
author={Oleksii Kuchaiev and Jason Li and Huyen Nguyen and Oleksii Hrinchuk and Ryan Leary and Boris Ginsburg and Samuel Kriman and Stanislav Beliaev and Vitaly Lavrukhin and Jack Cook and Patrice Castonguay and Mariya Popova and Jocelyn Huang and Jonathan M. Cohen},
year={2019},
eprint={1909.09577},
archivePrefix={arXiv},
primaryClass={cs.LG}
}