NeMo
PyTorch
nemotron
srvm commited on
Commit
6d7f9b3
1 Parent(s): c648d1c

Update model card

Browse files
Files changed (1) hide show
  1. README.md +63 -7
README.md CHANGED
@@ -5,22 +5,56 @@ license_link: >-
5
  https://developer.download.nvidia.com/licenses/nvidia-open-model-license-agreement-june-2024.pdf
6
  ---
7
 
8
- # Nemotron-4 Minitron 8B Base
9
 
10
- 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.
11
 
12
  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.
13
 
14
- Minitron models are for research and development only.
15
 
16
- ## HuggingFace Quickstart
17
 
18
- 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:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
  ```
21
  $ git clone -b aot/head_dim_rope --single-branch https://github.com/suiyoubi/transformers.git && cd transformers
22
  $ pip install -e .
23
  ```
 
24
  The following code provides an example of how to load the Nemotron-4-Minitron-8B model and use it to perform text generation.
25
 
26
  ```python
@@ -47,9 +81,15 @@ output_text = tokenizer.decode(output_ids[0], skip_special_tokens=True)
47
  print(output_text)
48
  ```
49
 
50
- ## License
51
 
52
- Minitron is released under the [NVIDIA Open Model License Agreement](https://developer.download.nvidia.com/licenses/nvidia-open-model-license-agreement-june-2024.pdf).
 
 
 
 
 
 
53
 
54
  ## Evaluation Results
55
 
@@ -74,6 +114,22 @@ HellaSwag | Winogrande | GSM8K| ARC-C | XLSum |
74
 
75
  Please refer to our [paper](https://arxiv.org/abs/2407.14679) for the full set of results.
76
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  ## Citation
78
 
79
  If you find our work helpful, please consider citing our paper:
 
5
  https://developer.download.nvidia.com/licenses/nvidia-open-model-license-agreement-june-2024.pdf
6
  ---
7
 
8
+ # Model Overview
9
 
10
+ 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.
11
 
12
  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.
13
 
14
+ This model is for research and development only.
15
 
16
+ **Model Developer:** NVIDIA
17
 
18
+ **Model Dates:** Nemotron-4-Minitron-8B-Base was trained between February 2024 and June 2024.
19
+
20
+ ## License
21
+
22
+ 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).
23
+
24
+ ## Model Architecture
25
+
26
+ Nemotron-4-Minitron-8B-Base uses a model embedding size of 4096, 48 attention heads, and an MLP intermediate dimension of 16384.
27
+ It also uses Grouped-Query Attention (GQA) and Rotary Position Embeddings (RoPE).
28
+
29
+ **Architecture Type:** Transformer Decoder (auto-regressive language model)
30
+
31
+ **Network Architecture:** Nemotron-4
32
+
33
+ **Input Type:** Text
34
+
35
+ **Input Format:** String
36
+
37
+ **Input Parameters:** None
38
+
39
+ **Other Properties Related to Input:** None
40
+
41
+ **Output Type:** Text
42
+
43
+ **Output Format:** String
44
+
45
+ **Output Parameters:** None
46
+
47
+ **Other Properties Related to Output:** None
48
+
49
+ ## Usage
50
+
51
+ 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:
52
 
53
  ```
54
  $ git clone -b aot/head_dim_rope --single-branch https://github.com/suiyoubi/transformers.git && cd transformers
55
  $ pip install -e .
56
  ```
57
+
58
  The following code provides an example of how to load the Nemotron-4-Minitron-8B model and use it to perform text generation.
59
 
60
  ```python
 
81
  print(output_text)
82
  ```
83
 
84
+ ## Dataset & Training
85
 
86
+ **Data Collection Method:** Hybrid
87
+
88
+ **Labeling Method:** Not Applicable
89
+
90
+ **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.
91
+
92
+ **Data Freshness:** The pretraining data has a cutoff of June 2023.
93
 
94
  ## Evaluation Results
95
 
 
114
 
115
  Please refer to our [paper](https://arxiv.org/abs/2407.14679) for the full set of results.
116
 
117
+ ## Inference
118
+ **Engine:** TensorRT-LLM
119
+
120
+ **Test Hardware:** NVIDIA A100
121
+
122
+ **DType:** Float16/BFloat16
123
+
124
+ ## Limitations
125
+
126
+ 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.
127
+
128
+ ## Ethical Considerations
129
+
130
+ 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/).
131
+
132
+
133
  ## Citation
134
 
135
  If you find our work helpful, please consider citing our paper: