Update README.md
Browse files
README.md
CHANGED
@@ -1,6 +1,114 @@
|
|
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 |
+
- mistralai/Mistral-7B-Instruct-v0.3
|
8 |
+
---
|
9 |
+
|
10 |
+
# Mistral-7B-Instruct-v0.3 ONNX INT4
|
11 |
+
|
12 |
+
### Model Developer: Mistralai
|
13 |
+
|
14 |
+
### Model Description
|
15 |
+
|
16 |
+
The Mistral-7B-Instruct-v0.3 ONNX INT4 model is the quantized version of the Mistral-7B-Instruct-v0.3 model, which is an instruct fine-tuned version of the Mistral-7B-v0.3 model used for text generation and question answering. Quantization is done with [TensorRT Model Optimizer-Windows](https://github.com/NVIDIA/TensorRT-Model-Optimizer).
|
17 |
+
|
18 |
+
This model is ready for commercial use.
|
19 |
+
|
20 |
+
Steps followed to generate this quantized model:
|
21 |
+
|
22 |
+
* 1. Download Mistral-7B-Instruct-v0.3 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 Mistral-7B-Instruct-v0.3 ONNX FP16 model to Mistral-7B-Instruct-v0.3 ONNX INT4 AWQ model using TensorRT Model Optimizer – Windows.
|
27 |
+
|
28 |
+
### Third-Party Community Consideration
|
29 |
+
This model is not owned or developed by NVIDIA. This model has been developed and built to a third-party’s requirements for this application and use case; see link to Non-NVIDIA [Mistral-7B-Instruct-v0.3 Model card](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.3).
|
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 |
+
### Model Architecture:
|
36 |
+
|
37 |
+
The Mistral-7B-Instruct-v0.3 Large Language Model (LLM) is an instruct fine-tuned version of the Mistral-7B-v0.3.
|
38 |
+
|
39 |
+
**Architecture Type:** Transformer <br>
|
40 |
+
|
41 |
+
**Network Architecture:** Mistral-7B <br>
|
42 |
+
|
43 |
+
**Input**
|
44 |
+
|
45 |
+
* Input Type: Text
|
46 |
+
|
47 |
+
* Input Format: String
|
48 |
+
|
49 |
+
* Input Parameters: Sequence (1D)
|
50 |
+
|
51 |
+
* Other Properties Related to Input: Supports English, German, French, Italian, Portuguese, Hindi, Spanish, and Thai
|
52 |
+
|
53 |
+
**Output**
|
54 |
+
|
55 |
+
* Output Type: Text
|
56 |
+
|
57 |
+
* Output Format: String
|
58 |
+
|
59 |
+
* Output Parameters: Sequence (1D)
|
60 |
+
|
61 |
+
## Software Integration:
|
62 |
+
|
63 |
+
* **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.
|
64 |
+
|
65 |
+
* **Supported Operating System(s):** Windows
|
66 |
+
|
67 |
+
## Model Version(s): 1.0
|
68 |
+
|
69 |
+
## Training, Testing, and Evaluation Datasets:
|
70 |
+
Refer to https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.3 for the details.
|
71 |
+
|
72 |
+
### Calibration Dataset: cnn_dailymail used for calibration.
|
73 |
+
|
74 |
+
Link: https://huggingface.co/datasets/abisee/cnn_dailymail
|
75 |
+
|
76 |
+
* Data Collection Method by dataset: Automated
|
77 |
+
|
78 |
+
* Labeling Method by dataset: [Unknown]
|
79 |
+
|
80 |
+
### Evaluation Dataset:
|
81 |
+
|
82 |
+
Link: https://people.eecs.berkeley.edu/~hendrycks/data.tar
|
83 |
+
|
84 |
+
* Data Collection Method by dataset - Unknown
|
85 |
+
|
86 |
+
* Labeling Method by dataset - Not Applicable
|
87 |
+
|
88 |
+
## Evaluation Results:
|
89 |
+
|
90 |
+
**MMLU (5# shots):**
|
91 |
+
|
92 |
+
With GenAI ORT->DML backend, we got below mentioned accuracy numbers on a desktop RTX 4090 GPU system.
|
93 |
+
|
94 |
+
"overall_accuracy": 60.73
|
95 |
+
|
96 |
+
**Test configuration:**
|
97 |
+
|
98 |
+
* **GPU:** RTX 4090, RTX 3090.
|
99 |
+
|
100 |
+
* **Windows 11:** 23H2
|
101 |
+
|
102 |
+
* **NVIDIA Graphics driver:** R565 or higher
|
103 |
+
|
104 |
+
## Inference:
|
105 |
+
Inference Backend: [Onnxruntime-GenAI-DirectML](https://onnxruntime.ai/docs/genai/howto/install.html#directml)
|
106 |
+
|
107 |
+
We used GenAI ORT->DML backend for inference. The instructions to use this backend are given in readme.txt file available under Files section.
|
108 |
+
|
109 |
+
|
110 |
+
## Ethical Considerations:
|
111 |
+
|
112 |
+
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.
|
113 |
+
|
114 |
+
Please report security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).
|