File size: 10,568 Bytes
299d8af
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
Quantization made by Richard Erkhov.

[Github](https://github.com/RichardErkhov)

[Discord](https://discord.gg/pvy7H8DZMG)

[Request more models](https://github.com/RichardErkhov/quant_request)


Mistral-NeMo-Minitron-8B-Base - GGUF
- Model creator: https://huggingface.co./nvidia/
- Original model: https://huggingface.co./nvidia/Mistral-NeMo-Minitron-8B-Base/


| Name | Quant method | Size |
| ---- | ---- | ---- |
| [Mistral-NeMo-Minitron-8B-Base.Q2_K.gguf](https://huggingface.co./RichardErkhov/nvidia_-_Mistral-NeMo-Minitron-8B-Base-gguf/blob/main/Mistral-NeMo-Minitron-8B-Base.Q2_K.gguf) | Q2_K | 3.1GB |
| [Mistral-NeMo-Minitron-8B-Base.IQ3_XS.gguf](https://huggingface.co./RichardErkhov/nvidia_-_Mistral-NeMo-Minitron-8B-Base-gguf/blob/main/Mistral-NeMo-Minitron-8B-Base.IQ3_XS.gguf) | IQ3_XS | 3.43GB |
| [Mistral-NeMo-Minitron-8B-Base.IQ3_S.gguf](https://huggingface.co./RichardErkhov/nvidia_-_Mistral-NeMo-Minitron-8B-Base-gguf/blob/main/Mistral-NeMo-Minitron-8B-Base.IQ3_S.gguf) | IQ3_S | 3.59GB |
| [Mistral-NeMo-Minitron-8B-Base.Q3_K_S.gguf](https://huggingface.co./RichardErkhov/nvidia_-_Mistral-NeMo-Minitron-8B-Base-gguf/blob/main/Mistral-NeMo-Minitron-8B-Base.Q3_K_S.gguf) | Q3_K_S | 3.57GB |
| [Mistral-NeMo-Minitron-8B-Base.IQ3_M.gguf](https://huggingface.co./RichardErkhov/nvidia_-_Mistral-NeMo-Minitron-8B-Base-gguf/blob/main/Mistral-NeMo-Minitron-8B-Base.IQ3_M.gguf) | IQ3_M | 3.7GB |
| [Mistral-NeMo-Minitron-8B-Base.Q3_K.gguf](https://huggingface.co./RichardErkhov/nvidia_-_Mistral-NeMo-Minitron-8B-Base-gguf/blob/main/Mistral-NeMo-Minitron-8B-Base.Q3_K.gguf) | Q3_K | 3.92GB |
| [Mistral-NeMo-Minitron-8B-Base.Q3_K_M.gguf](https://huggingface.co./RichardErkhov/nvidia_-_Mistral-NeMo-Minitron-8B-Base-gguf/blob/main/Mistral-NeMo-Minitron-8B-Base.Q3_K_M.gguf) | Q3_K_M | 3.92GB |
| [Mistral-NeMo-Minitron-8B-Base.Q3_K_L.gguf](https://huggingface.co./RichardErkhov/nvidia_-_Mistral-NeMo-Minitron-8B-Base-gguf/blob/main/Mistral-NeMo-Minitron-8B-Base.Q3_K_L.gguf) | Q3_K_L | 4.23GB |
| [Mistral-NeMo-Minitron-8B-Base.IQ4_XS.gguf](https://huggingface.co./RichardErkhov/nvidia_-_Mistral-NeMo-Minitron-8B-Base-gguf/blob/main/Mistral-NeMo-Minitron-8B-Base.IQ4_XS.gguf) | IQ4_XS | 4.37GB |
| [Mistral-NeMo-Minitron-8B-Base.Q4_0.gguf](https://huggingface.co./RichardErkhov/nvidia_-_Mistral-NeMo-Minitron-8B-Base-gguf/blob/main/Mistral-NeMo-Minitron-8B-Base.Q4_0.gguf) | Q4_0 | 4.55GB |
| [Mistral-NeMo-Minitron-8B-Base.IQ4_NL.gguf](https://huggingface.co./RichardErkhov/nvidia_-_Mistral-NeMo-Minitron-8B-Base-gguf/blob/main/Mistral-NeMo-Minitron-8B-Base.IQ4_NL.gguf) | IQ4_NL | 4.59GB |
| [Mistral-NeMo-Minitron-8B-Base.Q4_K_S.gguf](https://huggingface.co./RichardErkhov/nvidia_-_Mistral-NeMo-Minitron-8B-Base-gguf/blob/main/Mistral-NeMo-Minitron-8B-Base.Q4_K_S.gguf) | Q4_K_S | 4.57GB |
| [Mistral-NeMo-Minitron-8B-Base.Q4_K.gguf](https://huggingface.co./RichardErkhov/nvidia_-_Mistral-NeMo-Minitron-8B-Base-gguf/blob/main/Mistral-NeMo-Minitron-8B-Base.Q4_K.gguf) | Q4_K | 4.79GB |
| [Mistral-NeMo-Minitron-8B-Base.Q4_K_M.gguf](https://huggingface.co./RichardErkhov/nvidia_-_Mistral-NeMo-Minitron-8B-Base-gguf/blob/main/Mistral-NeMo-Minitron-8B-Base.Q4_K_M.gguf) | Q4_K_M | 4.79GB |
| [Mistral-NeMo-Minitron-8B-Base.Q4_1.gguf](https://huggingface.co./RichardErkhov/nvidia_-_Mistral-NeMo-Minitron-8B-Base-gguf/blob/main/Mistral-NeMo-Minitron-8B-Base.Q4_1.gguf) | Q4_1 | 5.0GB |
| [Mistral-NeMo-Minitron-8B-Base.Q5_0.gguf](https://huggingface.co./RichardErkhov/nvidia_-_Mistral-NeMo-Minitron-8B-Base-gguf/blob/main/Mistral-NeMo-Minitron-8B-Base.Q5_0.gguf) | Q5_0 | 5.46GB |
| [Mistral-NeMo-Minitron-8B-Base.Q5_K_S.gguf](https://huggingface.co./RichardErkhov/nvidia_-_Mistral-NeMo-Minitron-8B-Base-gguf/blob/main/Mistral-NeMo-Minitron-8B-Base.Q5_K_S.gguf) | Q5_K_S | 5.46GB |
| [Mistral-NeMo-Minitron-8B-Base.Q5_K.gguf](https://huggingface.co./RichardErkhov/nvidia_-_Mistral-NeMo-Minitron-8B-Base-gguf/blob/main/Mistral-NeMo-Minitron-8B-Base.Q5_K.gguf) | Q5_K | 5.59GB |
| [Mistral-NeMo-Minitron-8B-Base.Q5_K_M.gguf](https://huggingface.co./RichardErkhov/nvidia_-_Mistral-NeMo-Minitron-8B-Base-gguf/blob/main/Mistral-NeMo-Minitron-8B-Base.Q5_K_M.gguf) | Q5_K_M | 5.59GB |
| [Mistral-NeMo-Minitron-8B-Base.Q5_1.gguf](https://huggingface.co./RichardErkhov/nvidia_-_Mistral-NeMo-Minitron-8B-Base-gguf/blob/main/Mistral-NeMo-Minitron-8B-Base.Q5_1.gguf) | Q5_1 | 5.92GB |
| [Mistral-NeMo-Minitron-8B-Base.Q6_K.gguf](https://huggingface.co./RichardErkhov/nvidia_-_Mistral-NeMo-Minitron-8B-Base-gguf/blob/main/Mistral-NeMo-Minitron-8B-Base.Q6_K.gguf) | Q6_K | 6.44GB |
| [Mistral-NeMo-Minitron-8B-Base.Q8_0.gguf](https://huggingface.co./RichardErkhov/nvidia_-_Mistral-NeMo-Minitron-8B-Base-gguf/blob/main/Mistral-NeMo-Minitron-8B-Base.Q8_0.gguf) | Q8_0 | 8.33GB |




Original model description:
---
license: other
license_name: nvidia-open-model-license
license_link: >-
  https://developer.download.nvidia.com/licenses/nvidia-open-model-license-agreement-june-2024.pdf
library_name: transformers
---

# Mistral-NeMo-Minitron-8B-Base

## Model Overview

Mistral-NeMo-Minitron-8B-Base is a base text-to-text model that can be adopted for a variety of natural language generation tasks. It is a large language model (LLM) obtained by pruning and distilling the Mistral-NeMo 12B; specifically, we prune the embedding dimension and MLP intermediate dimension in the  model. Following pruning, we perform continued training with distillation using 380 billion tokens to arrive at the final model; we use the continuous pre-training data corpus used in Nemotron-4 15B for this purpose. Please refer to our [technical report](https://arxiv.org/abs/2408.11796) for more details.

**Model Developer:** NVIDIA

**Model Dates:** Mistral-NeMo-Minitron-8B-Base was trained between July 24, 2024 and August 10, 2024.

## License

This model 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

Mistral-NeMo-Minitron-8B-Base uses a model embedding size of 4096, 32 attention heads, MLP intermediate dimension of 11520, with 40 layers in total. Additionally, it uses Grouped-Query Attention (GQA) and Rotary Position Embeddings (RoPE). 

**Architecture Type:** Transformer Decoder (Auto-Regressive Language Model) 

**Network Architecture:** Mistral-NeMo 

**Input Type(s):** Text 

**Input Format(s):** String 

**Input Parameters:** One Dimensional (1D)

**Other Properties Related to Input:** Works well within 8k characters or less. 
  
**Output Type(s):** Text

**Output Format:** String

**Output Parameters:** 1D

**Other Properties Related to Output:** None

## Usage
Support for this model will be added in the upcoming `transformers` release. In the meantime, please install the library from source:
```
pip install git+https://github.com/huggingface/transformers
```
We can now run inference on this model:

```python
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

# Load the tokenizer and model
model_path = "nvidia/Mistral-NeMo-Minitron-8B-Base"
tokenizer = AutoTokenizer.from_pretrained(model_path)

device = 'cuda'
dtype = torch.bfloat16
model = AutoModelForCausalLM.from_pretrained(model_path, torch_dtype=dtype, device_map=device)

# Prepare the input text
prompt = 'Complete the paragraph: our solar system is'
inputs = tokenizer.encode(prompt, return_tensors='pt').to(model.device)

# Generate the output
outputs = model.generate(inputs, max_length=20)

# Decode and print the output
output_text = tokenizer.decode(outputs[0])
print(output_text)
```

## Software Integration
**Runtime Engine(s):**
* NeMo 24.05

**Supported Hardware Microarchitecture Compatibility:** <br>
* NVIDIA Ampere
* NVIDIA Blackwell
* NVIDIA Hopper
* NVIDIA Lovelace


**Operating System(s):** <br>
* Linux

## Dataset & Training

**Data Collection Method by Dataset:** Automated

**Labeling Method by Dataset:** Not Applicable

**Properties:**
The training corpus for Mistral-NeMo-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:** 
Training was done in 2024, the pretraining data has a cutoff of June 2023.

## Evaluation Results

_5-shot performance._ Language Understanding evaluated using [Massive Multitask Language Understanding](https://arxiv.org/abs/2009.03300):

| Average |
| :---- |
| 69.5 | 

_Zero-shot performance._ Evaluated using select datasets from the [LM Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness) with additions:

| HellaSwag | Winogrande | GSM8K| ARC-Challenge | XLSum |
| :---- | :---- | :---- | :---- | :---- |
| 83.0 | 80.4 | 58.5 | 64.4 | 32.0

_Code generation performance._ Evaluated using [MBPP](https://github.com/google-research/google-research/tree/master/mbpp):
 | Score |
 | :---- |
 | 43.77 | 

## Inference

**Engine:** TensorRT-LLM 

**Test Hardware:** NVIDIA A100 

**DType:** 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/). 


## References

* [Minitron: Compact Language Models via Pruning and Knowledge Distillation](https://arxiv.org/abs/2407.14679)
* [LLM Pruning and Distillation in Practice: The Minitron Approach](https://arxiv.org/abs/2408.11796)