Transformers
GGUF
Inference Endpoints
aashish1904 commited on
Commit
3fa95dc
·
verified ·
1 Parent(s): 790e2eb

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +155 -0
README.md ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+
4
+ license: other
5
+ license_name: nvidia-open-model-license
6
+ license_link: >-
7
+ https://developer.download.nvidia.com/licenses/nvidia-open-model-license-agreement-june-2024.pdf
8
+ library_name: transformers
9
+
10
+ ---
11
+
12
+ ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiuCm7c8lEwEJuRey9kiVZsRn2W-b4pWlu3-X534V3YmVuVc2ZL-NXg2RkzSOOS2JXGHutDuyyNAUtdJI65jGTo8jT9Y99tMi4H4MqL44Uc5QKG77B0d6-JfIkZHFaUA71-RtjyYZWVIhqsNZcx8-OMaA?key=xt3VSDoCbmTY7o-cwwOFwQ)
13
+
14
+ # QuantFactory/Mistral-NeMo-Minitron-8B-Base-GGUF
15
+ This is quantized version of [nvidia/Mistral-NeMo-Minitron-8B-Base](https://huggingface.co/nvidia/Mistral-NeMo-Minitron-8B-Base) created using llama.cpp
16
+
17
+ # Original Model Card
18
+
19
+
20
+ # Mistral-NeMo-Minitron-8B-Base
21
+
22
+ ## Model Overview
23
+
24
+ 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.
25
+
26
+ **Model Developer:** NVIDIA
27
+
28
+ **Model Dates:** Mistral-NeMo-Minitron-8B-Base was trained between July 24, 2024 and August 10, 2024.
29
+
30
+ ## License
31
+
32
+ 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).
33
+
34
+ ## Model Architecture
35
+
36
+ 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).
37
+
38
+ **Architecture Type:** Transformer Decoder (Auto-Regressive Language Model)
39
+
40
+ **Network Architecture:** Mistral-NeMo
41
+
42
+ **Input Type(s):** Text
43
+
44
+ **Input Format(s):** String
45
+
46
+ **Input Parameters:** One Dimensional (1D)
47
+
48
+ **Other Properties Related to Input:** Works well within 8k characters or less.
49
+
50
+ **Output Type(s):** Text
51
+
52
+ **Output Format:** String
53
+
54
+ **Output Parameters:** 1D
55
+
56
+ **Other Properties Related to Output:** None
57
+
58
+ ## Usage
59
+ Support for this model will be added in the upcoming `transformers` release. In the meantime, please install the library from source:
60
+ ```
61
+ pip install git+https://github.com/huggingface/transformers
62
+ ```
63
+ We can now run inference on this model:
64
+
65
+ ```python
66
+ import torch
67
+ from transformers import AutoTokenizer, LlamaForCausalLM
68
+
69
+ # Load the tokenizer and model
70
+ model_path = "nvidia/Mistral-NeMo-Minitron-8B-Base"
71
+ tokenizer = AutoTokenizer.from_pretrained(model_path)
72
+
73
+ device = 'cuda'
74
+ dtype = torch.bfloat16
75
+ model = LlamaForCausalLM.from_pretrained(model_path, torch_dtype=dtype, device_map=device)
76
+
77
+ # Prepare the input text
78
+ prompt = 'Complete the paragraph: our solar system is'
79
+ inputs = tokenizer.encode(prompt, return_tensors='pt').to(model.device)
80
+
81
+ # Generate the output
82
+ outputs = model.generate(inputs, max_length=20)
83
+
84
+ # Decode and print the output
85
+ output_text = tokenizer.decode(outputs[0])
86
+ print(output_text)
87
+ ```
88
+
89
+ ## Software Integration
90
+ **Runtime Engine(s):**
91
+ * NeMo 24.05
92
+
93
+ **Supported Hardware Microarchitecture Compatibility:** <br>
94
+ * NVIDIA Ampere
95
+ * NVIDIA Blackwell
96
+ * NVIDIA Hopper
97
+ * NVIDIA Lovelace
98
+
99
+
100
+ **Operating System(s):** <br>
101
+ * Linux
102
+
103
+ ## Dataset & Training
104
+
105
+ **Data Collection Method by Dataset:** Automated
106
+
107
+ **Labeling Method by Dataset:** Not Applicable
108
+
109
+ **Properties:**
110
+ 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.
111
+
112
+ **Data Freshness:**
113
+ Training was done in 2024, the pretraining data has a cutoff of June 2023.
114
+
115
+ ## Evaluation Results
116
+
117
+ _5-shot performance._ Language Understanding evaluated using [Massive Multitask Language Understanding](https://arxiv.org/abs/2009.03300):
118
+
119
+ | Average |
120
+ | :---- |
121
+ | 69.5 |
122
+
123
+ _Zero-shot performance._ Evaluated using select datasets from the [LM Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness) with additions:
124
+
125
+ | HellaSwag | Winogrande | GSM8K| ARC-Challenge | XLSum |
126
+ | :---- | :---- | :---- | :---- | :---- |
127
+ | 83.0 | 80.4 | 58.5 | 64.4 | 32.0
128
+
129
+ _Code generation performance._ Evaluated using [MBPP](https://github.com/google-research/google-research/tree/master/mbpp):
130
+ | Score |
131
+ | :---- |
132
+ | 43.77 |
133
+
134
+ ## Inference
135
+
136
+ **Engine:** TensorRT-LLM
137
+
138
+ **Test Hardware:** NVIDIA A100
139
+
140
+ **DType:** BFloat16
141
+
142
+ ## Limitations
143
+
144
+ 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.
145
+
146
+ ## Ethical Considerations
147
+
148
+ 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.
149
+
150
+ Please report security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).
151
+
152
+
153
+ ## References
154
+ * [Minitron: Compact Language Models via Pruning and Knowledge Distillation](https://arxiv.org/abs/2407.14679)
155
+ * [LLM Pruning and Distillation in Practice: The Minitron Approach](https://research.nvidia.com/publication/_llm-pruning-and-distillation-practice-minitron-approach)