Nemotron-4 340B Technical Report

Bo Adler, Niket Agarwal, Ashwath Aithal, Dong H. Anh, Pallab Bhattacharya, Annika Brundyn, Jared Casper, Bryan Catanzaro, Sharon Clay, Jonathan M. Cohen, Sirshak Das, Ayush Dattagupta, Olivier Delalleau, Leon Derczynski, Yi Dong, Daniel Egert, Ellie Evans, Aleksander Ficek, Denys Fridman, Shaona Ghosh, Boris Ginsburg, Igor Gitman, Tomasz Grzegorzek, Robert Hero, Jining Huang, Vibhu Jawa, Joseph Jennings, Aastha Jhunjhunwala, John Kamalu, Sadaf Khan, Oleksii Kuchaiev, Patrick LeGresley, Hui Li, Jiwei Liu, Zihan Liu, Eileen Long, Ameya Sunil Mahabaleshwarkar, Somshubra Majumdar, James Maki, Miguel Martinez, Maer Rodrigues de Melo, Ivan Moshkov, Deepak Narayanan, Sean Narenthiran, Jesus Navarro, Phong Nguyen, Osvald Nitski, Vahid Noroozi, Guruprasad Nutheti, Christopher Parisien, Jupinder Parmar, Mostofa Patwary, Krzysztof Pawelec, Wei Ping, Shrimai Prabhumoye, Rajarshi Roy, Trisha Saar, Vasanth Rao Naik Sabavat, Sanjeev Satheesh, Jane Polak Scowcroft, Jason Sewall, Pavel Shamis, Gerald Shen, Mohammad Shoeybi, Dave Sizer, Misha Smelyanskiy, Felipe Soares, Makesh Narsimhan Sreedhar, Dan Su, Sandeep Subramanian, Shengyang Sun, Shubham Toshniwal, Hao Wang, Zhilin Wang, Jiaxuan You, Jiaqi Zeng, Jimmy Zhang, Jing Zhang, Vivienne Zhang, Yian Zhang, Chen ZhuarXiv 2024 · DOI

TL;DR

NVIDIA introduces the Nemotron-4 340B model family, offering open-access, high-performing large language models (LLMs) competitive with leading models. A key innovation is their synthetic data generation pipeline, which was used to create over 98% of the alignment data, demonstrating a powerful approach to scaling LLM development.

What Problem Does This Paper Address?

The paper addresses the growing need for powerful, yet accessible, large language models. While many advanced LLMs exist, they are often proprietary, limiting research and development. Furthermore, training and aligning these models requires vast amounts of high-quality data, which is expensive and time-consuming to collect manually. The authors aim to democratize access to capable LLMs and provide a scalable solution for data generation to facilitate model alignment.

Methods

The Nemotron-4 340B family consists of three models: Base, Instruct, and Reward. The Base model was pretrained on 9 trillion tokens. Alignment for the Instruct model involved a two-stage Supervised Fine-Tuning (SFT) process: first, a dedicated "Code SFT" stage using a synthesized dataset of 800K samples to improve coding and reasoning, followed by a "General SFT" stage on a broader dataset. Preference fine-tuning was then applied using Direct Preference Optimization (DPO) and a novel "Reward-aware Preference Optimization" (RPO) algorithm. The Reward model was trained on a human-annotated dataset called HelpSteer2 and uses a multi-attribute regression head for finer-grained quality assessment.

A significant methodological contribution is the synthetic data generation (SDG) pipeline. This pipeline generates diverse prompts (single-turn, instruction-following, and two-turn) and responses, and crucially, uses the Nemotron-4-340B-Reward model itself for quality filtering and preference ranking. This iterative "weak-to-strong" alignment approach, where a better aligned model is used to generate data for training an even better model, is a core innovation.

Datasets

  • Pretraining Data: A blend of English natural language (70%), multilingual natural language (15%), and source code (15%) totaling 9 trillion tokens.
  • Alignment Data:
    • HelpSteer2: A 10K human-annotated preference dataset used for training the Reward model.
  • Synthetic Data: Over 98% of the data used for SFT and preference fine-tuning was synthetically generated using the authors' pipeline. This includes data from various sources like ShareGPT, LMSYS-Chat-1M, GSM8K, and MATH.
  • Supplementary Datasets: Incorporated for specific capabilities, including CantTalkAboutThis (topic following), Open-Platypus and subsets (STEM/logic), FinQA, and others for document-based reasoning and function calling.

Key Insights and Ideas

  • Synthetic Data is King (for Alignment): The paper strongly advocates for and demonstrates the effectiveness of synthetic data generation for LLM alignment. By generating over 98% of their alignment data, they show it's possible to achieve competitive performance without massive human annotation efforts for this stage.
  • Iterative Weak-to-Strong Alignment: The "iterative weak-to-strong" approach, where a progressively better model generates data for the next iteration, is a powerful self-improvement loop. It highlights that the "teacher" model doesn't necessarily cap the "student's" potential.
  • Two-Stage SFT for Specialization: Separating code SFT from general SFT proved beneficial, preventing conflicts and leading to better overall performance, especially in coding tasks.
  • Reward-aware Preference Optimization (RPO): The RPO algorithm is introduced to address overfitting issues in DPO by better approximating the reward gap, leading to more stable and effective preference tuning.
  • Open Access is Crucial: Releasing the models and the data generation pipeline under a permissive license aims to accelerate research and development in the LLM community.

Key Results

  • Competitive Performance: Nemotron-4 340B models perform competitively with leading open-access models like Llama-3, Mixtral, and Qwen-2 across various benchmarks.
  • Nemotron-4-340B-Base shows strong accuracy on commonsense reasoning and popular benchmarks like BBH.
  • Nemotron-4-340B-Instruct surpasses comparable instruct models in instruction following and chat capabilities.
  • Nemotron-4-340B-Reward achieves top accuracy on RewardBench, outperforming proprietary models like GPT-40-0513.
  • Efficiency: The models are sized to fit on a single DGX H100 with 8 GPUs when deployed in FP8 precision.
  • Safety: Nemotron-4-340B-Instruct demonstrates a very low unsafe response rate, comparable to Llama-3-70B-Instruct.
  • Human Evaluation: Nemotron-4-340B-Instruct shows comparable or better win rates than GPT-4-1106-preview across many task categories, with strong performance in multi-turn chat. It also exhibits a slightly higher rate of appropriate response length.

Limitations and Future Work

  • Jailbreaks: Nemotron-4 340B Chat is susceptible to existing jailbreaks, with a pass rate below 30% for attempted jailbreaks. The authors note that models trained to be helpful can sometimes be easier to exploit.
  • Adversarial Hallucination: The model sometimes provides direct, incorrect answers and falsely denies prime numbers.
  • Malware Generation: The model blocks some, but not all, requests for help in building malware.
  • Future Work: The authors plan to mitigate issues with minor unsafe responses (e.g., under Criminal Planning and Regulated Substances) in future updates. They also aim to share more tools like NVIDIA Inference Microservices (NIMs) for synthetic data generation. The release of the models and pipeline is intended to stimulate further research and development.

Summary updated

BibTeX
@misc{adler2024nemotron,
  author = {Bo Adler and Niket Agarwal and Ashwath Aithal and Dong H. Anh and Pallab Bhattacharya and Annika Brundyn and Jared Casper and Bryan Catanzaro and Sharon Clay and Jonathan M. Cohen and Sirshak Das and Ayush Dattagupta and Olivier Delalleau and Leon Derczynski and Yi Dong and Daniel Egert and Ellie Evans and Aleksander Ficek and Denys Fridman and Shaona Ghosh and Boris Ginsburg and Igor Gitman and Tomasz Grzegorzek and Robert Hero and Jining Huang and Vibhu Jawa and Joseph Jennings and Aastha Jhunjhunwala and John Kamalu and Sadaf Khan and Oleksii Kuchaiev and Patrick LeGresley and Hui Li and Jiwei Liu and Zihan Liu and Eileen Long and Ameya Sunil Mahabaleshwarkar and Somshubra Majumdar and James Maki and Miguel Martinez and Maer Rodrigues de Melo and Ivan Moshkov and Deepak Narayanan and Sean Narenthiran and Jesus Navarro and Phong Nguyen and Osvald Nitski and Vahid Noroozi and Guruprasad Nutheti and Christopher Parisien and Jupinder Parmar and Mostofa Patwary and Krzysztof Pawelec and Wei Ping and Shrimai Prabhumoye and Rajarshi Roy and Trisha Saar and Vasanth Rao Naik Sabavat and Sanjeev Satheesh and Jane Polak Scowcroft and Jason Sewall and Pavel Shamis and Gerald Shen and Mohammad Shoeybi and Dave Sizer and Misha Smelyanskiy and Felipe Soares and Makesh Narsimhan Sreedhar and Dan Su and Sandeep Subramanian and Shengyang Sun and Shubham Toshniwal and Hao Wang and Zhilin Wang and Jiaxuan You and Jiaqi Zeng and Jimmy Zhang and Jing Zhang and Vivienne Zhang and Yian Zhang and Chen Zhu},
  title = {{Nemotron-4 340B Technical Report}},
  year = {2024},
  eprint = {2406.11704},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.11704},
}
Figure