nvidia/Gemma-2b-it-ONNX-INT4
By nvidia · ↓ 0 · ♥ 8 · Updated 2024-11-15
What's in this repo
This page lists the files in nvidia/Gemma-2b-it-ONNX-INT4, including model.onnx.
- 1 ONNX models (.onnx files)
- 14 files, including 5 .txt, 4 .json, 1 .md, 1 .onnx, 1 .onnx_data, 1 .model
- Last updated 2024-11-15
ONNX files
| File | Size | Download |
|---|---|---|
| model.onnx | — | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
Gemma-2b-it ONNX INT4
Model Developer: Google
Model Description
The NVIDIA Gemma-2b-it ONNX INT4 model is the quantized version of the Google Gemma-2b-it model which is a text-to-text, decoder-only large language models, available in English, with open weights, pre-trained variants, and instruction-tuned variants. It is well-suited for a variety of text generation tasks, including question answering, summarization, and reasoning. Relatively small size makes it possible to deploy them in environments with limited resources such as a laptop, desktop or your own cloud infrastructure. For more information, please check here. The NVIDIA Gemma-2b-it ONNX INT4 model is quantized with TensorRT Model Optimizer.
This model is ready for commercial and research use case.
Steps followed to generate this quantized model:
-
- Download Google Gemma-2b-it model in Pytorch bfloat16 format from HuggingFace.
-
- Convert PyTorch model to ONNX FP16 using onnxruntime-genai model builder.
-
- Quantize Gemma-2b-it ONNX FP16 model to Gemma-2b-it ONNX INT4 AWQ model using TensorRT Model Optimizer – Windows.
Third-Party Community Consideration
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 the Gemma-2b-it Model Card.
License/Terms of Use:
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: Gemma Terms of Use (found at https://ai.google.dev/gemma/terms).
Reference:
Gemma-2b-it Model Card
Model Architecture:
Architecture Type: Transformer
Network Architecture: Gemma
Input
-
Input Type: Text
-
Input Format: String
-
Input Parameters: Sequence (1D)
-
Other Properties Related to Input: Text strings can include a question, prompt, or a document to be summarized. Primarily for English language
Output
-
Output Type: Text
-
Output Format: String
-
Output Parameters: Sequence (1D)
-
Other properties: Generated English-language text in response to the input, such as an answer to a question, or a summary of a document.
Software Integration:
-
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.
-
Supported Operating System(s): Windows
Model Version(s): 1.0
Training, Testing, and Evaluation Datasets:
Refer to Gemma-2b-it Model Card for the details.
Calibration Dataset: cnn_daily mail used for calibration.
Link: https://huggingface.co/datasets/abisee/cnn_dailymail
-
Data Collection Method by dataset: Automated
-
Labeling Method by dataset: [Unknown]
Evaluation Dataset:
Link: https://people.eecs.berkeley.edu/~hendrycks/data.tar
-
Data Collection Method by dataset - Unknown
-
Labeling Method by dataset - Not Applicable
Evaluation Results:
MMLU (5# shots):
With GenAI ORT->DML backend, we got below mentioned accuracy numbers on a desktop RTX 4090 GPU system.
"overall_accuracy": 37.26
Test configuration:
-
GPU: RTX 4090, RTX 3090.
-
Windows 11: 23H2
-
NVIDIA Graphics driver: R565 or higher
Inference:
Inference Backend: Onnxruntime-GenAI-DirectML
We used GenAI ORT->DML backend for inference. The instructions to use this backend are given in readme.txt file available under Files section.
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.
Model info
Created: 2024-11-14
Updated: 2024-11-15
View on Hugging FaceFiles (14)
Related models
More from nvidia
More models
No task type declared.