NeMo
PyTorch
nemotron
srvm commited on
Commit
babe61e
1 Parent(s): 475785a

Update model card.

Browse files
Files changed (1) hide show
  1. README.md +62 -7
README.md CHANGED
@@ -5,15 +5,48 @@ license_link: >-
5
  https://developer.download.nvidia.com/licenses/nvidia-open-model-license-agreement-june-2024.pdf
6
  ---
7
 
8
- # Nemotron-4-Minitron-4B-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
  Support for Nemotron models will be added in the upcoming transformers library release. In the meantime, please install the library from source:
19
 
@@ -21,7 +54,7 @@ Support for Nemotron models will be added in the upcoming transformers library r
21
  pip install git+https://github.com/huggingface/transformers
22
  ```
23
 
24
- The following code provides an example of how to load the Minitron-4B model and use it to perform text generation.
25
 
26
  ```python
27
  import torch
@@ -47,9 +80,15 @@ output_text = tokenizer.decode(outputs[0])
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 +113,22 @@ Minitron is released under the [NVIDIA Open Model License Agreement](https://dev
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-4B-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:** Minitron-8B-Base and Minitron-4B-Base were trained between February 2024 and June 2024.
19
+
20
+ ## License
21
+
22
+ Nemotron-4-Minitron-4B-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-4B-Base uses a model embedding size of 3072, 32 attention heads, and an MLP intermediate dimension of 9216.
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
  Support for Nemotron models will be added in the upcoming transformers library release. In the meantime, please install the library from source:
52
 
 
54
  pip install git+https://github.com/huggingface/transformers
55
  ```
56
 
57
+ The following code provides an example of how to load the Nemotron-4-Minitron-4B-Base model and use it to perform text generation.
58
 
59
  ```python
60
  import torch
 
80
  print(output_text)
81
  ```
82
 
83
+ ## Dataset & Training
84
+
85
+ **Data Collection Method:** Hybrid
86
 
87
+ **Labeling Method:** Not Applicable
88
+
89
+ **Properties:** The training corpus for Nemotron-4-Minitron-4B-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.
90
+
91
+ **Data Freshness:** The pretraining data has a cutoff of June 2023.
92
 
93
  ## Evaluation Results
94
 
 
113
 
114
  Please refer to our [paper](https://arxiv.org/abs/2407.14679) for the full set of results.
115
 
116
+ ## Inference
117
+ **Engine:** TensorRT-LLM
118
+
119
+ **Test Hardware:** NVIDIA A100
120
+
121
+ **DType:** Float16/BFloat16
122
+
123
+ ## Limitations
124
+
125
+ 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.
126
+
127
+ ## Ethical Considerations
128
+
129
+ 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/).
130
+
131
+
132
  ## Citation
133
 
134
  If you find our work helpful, please consider citing our paper: