NeMo-Aligner is a scalable toolkit for efficient model alignment. The toolkit has support for state of the art model alignment algorithms such as SteerLM, DPO and Reinforcement Learning from Human Feedback (RLHF). These algorithms enable users to align language models to be more safe, harmless and helpful. Users can do end-to-end model alignment on a wide range of model sizes and take advantage of all the parallelism techniques to ensure their model alignment is done in a performant and resource efficient manner.
NeMo-Aligner toolkit is built using the NeMo Toolkit which allows for scaling training up to 1000s of GPUs using tensor, data and pipeline parallelism for all components of alignment. All of our checkpoints are cross compatible with the NeMo ecosystem; allowing for inference deployment and further customization.
The toolkit is currently in it's early stages, and we are committed to improving the toolkit to make it easier for developers to pick and choose different alignment algorithms to build safe, helpful and reliable models.
- SteerLM: Attribute Conditioned SFT as an (User-Steerable) Alternative to RLHF.
- Try NV-Llama2-70B-SteerLM-Chat model aligned with NeMo Aligner on NVIDIA AI Foundation for free (no registration required).
- Corresponding reward model Llama2-13B-SteerLM-RM
- Learn more at our SteerLM and HelpSteer papers.
- Supervised Fine Tuning
- Reward Model Training
- Reinforcement Learning from Human Feedback using the PPO Algorithm
- Try NV-Llama2-70B-RLHF model aligned with NeMo Aligner on NVIDIA AI Foundation for free (no registration required).
- Corresponding reward model NV-Llama2-13B-RLHF-RM
- Direct Preference Optimization as described in Direct Preference Optimization: Your Language Model is Secretly a Reward Model
For the latest stable release please see the releases page. All releases come with a pre-built container. Changes within each release will be documented in CHANGELOG.
NeMo-Aligner has the same requirements as the NeMo Toolkit Requirements with the addition of PyTriton.
Please follow the same steps as the NeMo Toolkit Installation Guide but run the following after installing NeMo
pip install nemo-aligner
or if you prefer to install the latest commit
pip install .
We provide an official NeMo-Aligner Dockerfile which is based on stable, tested versions of NeMo, Megatron-LM, and TransformerEngine. The goal of this Dockerfile is stability, so it may not track the very latest versions of those 3 packages. You can access our Dockerfile here
Alternatively, you can build the NeMo Dockerfile here NeMo Dockerfile and add RUN pip install nemo-aligner
at the end.
- Add Rejection Sampling support
- We will continue improving the stability of the PPO learning phase.
- Improve the performance of RLHF
We welcome community contributions! Please refer to CONTRIBUTING.md for guidelines.
This toolkit is licensed under the Apache License, Version 2.0.