From 6d7f9b30e179f736bee69d92674b58def30b3284 Mon Sep 17 00:00:00 2001 From: Saurav Muralidharan Date: Thu, 15 Aug 2024 12:37:28 -0700 Subject: [PATCH] Update model card --- README.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 63 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 70ed070..0e83835 100644 --- a/README.md +++ b/README.md @@ -5,22 +5,56 @@ license_link: >- https://developer.download.nvidia.com/licenses/nvidia-open-model-license-agreement-june-2024.pdf --- -# Nemotron-4 Minitron 8B Base +# Model Overview -Minitron is a family of small language models (SLMs) obtained by pruning NVIDIA's [Nemotron-4 15B](https://arxiv.org/abs/2402.16819) model. We prune model embedding size, attention heads, and MLP intermediate dimension, following which, we perform continued training with distillation to arrive at the final models. +Nemotron-4-Minitron-8B-Base is a large language model (LLM) obtained by pruning Nemotron-4 15B; specifically, we prune model embedding size, number of attention heads, and MLP intermediate dimension. Following pruning, we perform continued training with distillation using 94 billion tokens to arrive at the final model; we use the continuous pre-training data corpus used in Nemotron-4 15B for this purpose. Deriving the Minitron 8B and 4B models from the base 15B model using our approach requires up to **40x fewer training tokens** per model compared to training from scratch; this results in **compute cost savings of 1.8x** for training the full model family (15B, 8B, and 4B). Minitron models exhibit up to a 16% improvement in MMLU scores compared to training from scratch, perform comparably to other community models such as Mistral 7B, Gemma 7B and Llama-3 8B, and outperform state-of-the-art compression techniques from the literature. Please refer to our [arXiv paper](https://arxiv.org/abs/2407.14679) for more details. -Minitron models are for research and development only. +This model is for research and development only. -## HuggingFace Quickstart +**Model Developer:** NVIDIA -The [pull request](https://github.com/huggingface/transformers/pull/32495) to support this model in Hugging Face Transformers is under review and expected to be merged soon. In the meantime, please follow the installation instructions below: +**Model Dates:** Nemotron-4-Minitron-8B-Base was trained between February 2024 and June 2024. + +## License + +Nemotron-4-Minitron-8B-Base is released under the [NVIDIA Open Model License Agreement](https://developer.download.nvidia.com/licenses/nvidia-open-model-license-agreement-june-2024.pdf). + +## Model Architecture + +Nemotron-4-Minitron-8B-Base uses a model embedding size of 4096, 48 attention heads, and an MLP intermediate dimension of 16384. +It also uses Grouped-Query Attention (GQA) and Rotary Position Embeddings (RoPE). + +**Architecture Type:** Transformer Decoder (auto-regressive language model) + +**Network Architecture:** Nemotron-4 + +**Input Type:** Text + +**Input Format:** String + +**Input Parameters:** None + +**Other Properties Related to Input:** None + +**Output Type:** Text + +**Output Format:** String + +**Output Parameters:** None + +**Other Properties Related to Output:** None + +## Usage + +The [pull request](https://github.com/huggingface/transformers/pull/32495) to support this model in Hugging Face Transformers is under review and is expected to be merged soon. In the meantime, please follow the installation instructions below: ``` $ git clone -b aot/head_dim_rope --single-branch https://github.com/suiyoubi/transformers.git && cd transformers $ pip install -e . ``` + The following code provides an example of how to load the Nemotron-4-Minitron-8B model and use it to perform text generation. ```python @@ -47,9 +81,15 @@ output_text = tokenizer.decode(output_ids[0], skip_special_tokens=True) print(output_text) ``` -## License +## Dataset & Training -Minitron is released under the [NVIDIA Open Model License Agreement](https://developer.download.nvidia.com/licenses/nvidia-open-model-license-agreement-june-2024.pdf). +**Data Collection Method:** Hybrid + +**Labeling Method:** Not Applicable + +**Properties:** The training corpus for Nemotron-4-Minitron-8B-Base consists of English and multilingual text, as well as code. Our sources cover a variety of document types such as: webpages, dialogue, articles, and other written materials. The corpus spans domains including legal, math, science, finance, and more. In our continued training set, we introduce a small portion of question-answering, and alignment style data to improve model performance. + +**Data Freshness:** The pretraining data has a cutoff of June 2023. ## Evaluation Results @@ -74,6 +114,22 @@ HellaSwag | Winogrande | GSM8K| ARC-C | XLSum | Please refer to our [paper](https://arxiv.org/abs/2407.14679) for the full set of results. +## Inference +**Engine:** TensorRT-LLM + +**Test Hardware:** NVIDIA A100 + +**DType:** Float16/BFloat16 + +## Limitations + +The model was trained on data that contains toxic language, unsafe content, and societal biases originally crawled from the internet. Therefore, the model may amplify those biases and return toxic responses especially when prompted with toxic prompts. The model may generate answers that may be inaccurate, omit key information, or include irrelevant or redundant text producing socially unacceptable or undesirable text, even if the prompt itself does not include anything explicitly offensive. + +## Ethical Considerations + +NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. When downloaded or used in accordance with our terms of service, developers should work with their internal model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse. Please report security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/). + + ## Citation If you find our work helpful, please consider citing our paper: