Update README.md
Browse files
README.md
CHANGED
@@ -1,6 +1,118 @@
|
|
1 |
-
---
|
2 |
-
license: other
|
3 |
-
license_name: nvidia-open-model-license
|
4 |
-
license_link: >-
|
5 |
-
https://developer.download.nvidia.com/licenses/nvidia-open-model-license-agreement-june-2024.pdf
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: other
|
3 |
+
license_name: nvidia-open-model-license
|
4 |
+
license_link: >-
|
5 |
+
https://developer.download.nvidia.com/licenses/nvidia-open-model-license-agreement-june-2024.pdf
|
6 |
+
base_model:
|
7 |
+
- nvidia/Nemotron-Mini-4B-Instruct
|
8 |
+
---
|
9 |
+
|
10 |
+
|
11 |
+
# Nemotron Mini 4B Instruct ONNX INT4
|
12 |
+
|
13 |
+
## Model Developer: NVIDIA
|
14 |
+
|
15 |
+
## Model Description
|
16 |
+
|
17 |
+
Nemotron-Mini-4B Instruct is a model for generating responses for roleplaying, retrieval augmented generation, and function calling. It is a small language model (SLM) optimized through distillation, pruning and quantization for speed and on-device deployment. VRAM usage has been minimized to approximately 2 GB, providing significantly faster time to first token compared to LLMs. The NVIDIA Nemotron-Mini-4B Instruct ONNX INT4 model is quantized with [TensorRT Model Optimizer](https://github.com/NVIDIA/TensorRT-Model-Optimizer).
|
18 |
+
|
19 |
+
|
20 |
+
Steps followed to generate this quantized model:
|
21 |
+
|
22 |
+
* 1. Download Nemotron-Mini-4B Instruct model in Pytorch bfloat16 format from HuggingFace.
|
23 |
+
|
24 |
+
* 2. Convert PyTorch model to ONNX FP16 using onnxruntime-genai model builder.
|
25 |
+
|
26 |
+
* 3. Quantize Nemotron-Mini-4B Instruct ONNX FP16 model to Nemotron-Mini-4B Instruct ONNX INT4 AWQ model using TensorRT Model Optimizer – Windows.
|
27 |
+
|
28 |
+
|
29 |
+
This model is ready for commercial/non-commercial use.
|
30 |
+
|
31 |
+
|
32 |
+
## License/Terms of Use:
|
33 |
+
GOVERNING TERMS: Use of this model is governed by the NVIDIA Open Model License Agreement (found at https://developer.download.nvidia.com/licenses/nvidia-open-model-license-agreement-june-2024.pdf ). ADDITIONAL INFORMATION: Apache License, Version 2.0 (found at https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/apache-2.0.md).
|
34 |
+
|
35 |
+
|
36 |
+
## Reference:
|
37 |
+
|
38 |
+
[Nemotron Mini 4B Model](https://huggingface.co/nvidia/Nemotron-Mini-4B-Instruct)
|
39 |
+
|
40 |
+
## Model Architecture:
|
41 |
+
|
42 |
+
**Architecture Type:** Transformer <br>
|
43 |
+
|
44 |
+
**Network Architecture:** Decoder-only <br>
|
45 |
+
|
46 |
+
**Input**
|
47 |
+
|
48 |
+
* Input Type: Text
|
49 |
+
|
50 |
+
* Input Format: String
|
51 |
+
|
52 |
+
* Input Parameters: Sequence (1D)
|
53 |
+
|
54 |
+
* Other Properties Related to Input: The model has a maximum of 4096 input tokens.
|
55 |
+
|
56 |
+
**Output**
|
57 |
+
|
58 |
+
* Output Type: Text
|
59 |
+
|
60 |
+
* Output Format: String
|
61 |
+
|
62 |
+
* Output Parameters: Sequence (1D)
|
63 |
+
|
64 |
+
* Other Properties Related to Output: The model has a maximum of 4096 input tokens. Maximum output for both versions can be set apart from input.
|
65 |
+
|
66 |
+
## Software Integration:
|
67 |
+
|
68 |
+
* **Supported Hardware Microarchitecture Compatibility :** Nvidia Ampere and newer GPUs. 6GB or higher VRAM GPUs are recommended. Higher VRAM may be required for larger context length use cases.
|
69 |
+
|
70 |
+
* **Supported Operating System(s):** Windows
|
71 |
+
|
72 |
+
## Model Version(s): 1.0
|
73 |
+
|
74 |
+
## Training, Testing, and Evaluation Datasets:
|
75 |
+
Refer to [Nemotron-Mini-4B Model Card]( https://huggingface.co/nvidia/Nemotron-Mini-4B-Instruct) for the details.
|
76 |
+
|
77 |
+
|
78 |
+
### Calibration Dataset: cnn_daily mail used for calibration.
|
79 |
+
|
80 |
+
Link: https://huggingface.co/datasets/abisee/cnn_dailymail
|
81 |
+
|
82 |
+
* Data Collection Method by dataset: Automated
|
83 |
+
|
84 |
+
* Labeling Method by dataset: [Unknown]
|
85 |
+
|
86 |
+
### Evaluation Dataset:
|
87 |
+
|
88 |
+
Link: https://people.eecs.berkeley.edu/~hendrycks/data.tar
|
89 |
+
|
90 |
+
* Data Collection Method by dataset - Unknown
|
91 |
+
|
92 |
+
* Labeling Method by dataset - Not Applicable
|
93 |
+
|
94 |
+
## Evaluation Results:
|
95 |
+
|
96 |
+
**MMLU (5# shots):**
|
97 |
+
|
98 |
+
With GenAI ORT->DML backend, we got below mentioned accuracy numbers on a desktop RTX 4090 GPU system.
|
99 |
+
|
100 |
+
"overall_accuracy": 56.01
|
101 |
+
|
102 |
+
**Test configuration:**
|
103 |
+
|
104 |
+
* **GPU:** RTX 4090
|
105 |
+
|
106 |
+
* **Windows 11:** 23H2
|
107 |
+
|
108 |
+
* **NVIDIA Graphics driver:** R565 or higher
|
109 |
+
|
110 |
+
## Inference:
|
111 |
+
We used GenAI ORT->DML backend for inference. The instructions to use this backend are given in readme.txt file available under Files section.
|
112 |
+
|
113 |
+
|
114 |
+
## Ethical Considerations:
|
115 |
+
|
116 |
+
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.
|
117 |
+
|
118 |
+
Please report security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).
|