---
base_model:
- meta-llama/Llama-3.1-8B-Instruct
license: other
license_name: nvidia-open-model-license
license_link: >-
https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-open-model-license
library_name: Model Optimizer
tags:
- nvidia
- ModelOpt
- llama3
- quantized
- FP4
- fp4
---
# Model Overview
## Description:
The NVIDIA Llama 3.1 8B Instruct FP4 model is the quantized language model of the Meta's Llama 3.1 8B model, which is an auto-regressive language model. For more information, please check [here](https://huggingface.co/meta-llama/Llama-3.1-8B).
This model is ready for commercial and non-commercial use.
## 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 Non-NVIDIA [(Llama-3.1-8B-Instruct) Model Card](https://huggingface.co/meta-llama/Llama-3.1-8B).
### License/Terms of Use:
GOVERNING TERMS: Use of this model is governed by the [NVIDIA Open Model License](https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-open-model-license).
ADDITIONAL INFORMATION: [Llama3](https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct/blob/main/LICENSE) Community License Agreement. Built with Llama.
### Deployment Geography:
Global, except in European Union
### Use Case:
Developers looking to take off the shelf pre-quantized models for deployment in AI Agent systems, chatbots, RAG systems, and other AI-powered applications.
### Release Date:
Huggingface 09/15/2025 via [https://huggingface.co/nvidia/Llama-3.1-8B-Instruct-FP4]
## Model Architecture:
**Architecture Type:** Transformers
**Network Architecture:** Llama3
**This model was developed based on Llama3.1-8B-Instruct
** Number of model parameters 8.0*10^9
## Input:
**Input Type(s):** Text
**Input Format(s):** String
**Input Parameters:** 1D (One-Dimensional): Sequences
**Other Properties Related to Input:** Context length up to 128,000
## Output:
**Output Type(s):** Text
**Output Format:** String
**Output Parameters:** 1D (One-Dimensional): Sequences
**Other Properties Related to Output:** N/A
Our AI models are designed and/or optimized to run on NVIDIA GPU-accelerated systems. By leveraging NVIDIA’s hardware (e.g. GPU cores) and software frameworks (e.g., CUDA libraries), the model achieves faster training and inference times compared to CPU-only solutions.
## Software Integration :
**Supported Runtime Engine(s):**
* TensorRT-LLM
* vLLM
* SGLang
**Supported Hardware Microarchitecture Compatibility:**
* NVIDIA Blackwell
**[Preferred/Supported] Operating System(s):**
* Linux
## Model Version(s):
The model is quantized with nvidia-modelopt **v0.35.0**
## Post Training Quantization
This model was obtained by quantizing the weights and activations of Llama 3.1 8B Instruct to FP4 data type, ready for inference with TensorRT-LLM. Only the weights and activations of the linear operators within transformer blocks are quantized.
## Training and Testing Datasets:
** Data Modality
* [Text]
## Calibration Dataset:
** Link: [cnn_dailymail](https://huggingface.co/datasets/abisee/cnn_dailymail)
** Data collection method: Automated
** Labeling method: Automated.
## Training Datasets:
** Data Collection Method by Dataset: Undisclosed
** Labeling Method by Dataset: Undisclosed
** Properties: Undisclosed
## Testing Dataset:
** Data Collection Method by Dataset: Undisclosed
** Labeling Method by Dataset: Undisclosed
** Properties: Undisclosed
## Inference:
**Engine:** TensorRT-LLM
**Test Hardware:** B200
## Usage
### Deploy with TensorRT-LLM
To serve the quantized checkpoint with [TensorRT-LLM](https://github.com/NVIDIA/TensorRT-LLM), follow the sample commands below with the TensorRT-LLM GitHub repo:
* LLM API sample usage:
```
import asyncio
from tensorrt_llm import LLM, SamplingParams
def main():
llm = LLM(model="nvidia/Llama-3.1-8B-Instruct-FP4", attn_backend="FLASHINFER", backend="pytorch", tensor_parallel_size=1)
prompts = [
"Hello, my name is",
"The president of the United States is",
"The capital of France is",
"The future of AI is",
]
sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
async def task(prompt: str):
output = await llm.generate_async(prompt, sampling_params)
print(
f"Prompt: {output.prompt!r}, Generated text: {output.outputs[0].text!r}"
)
async def main():
tasks = [task(prompt) for prompt in prompts]
await asyncio.gather(*tasks)
asyncio.run(main())
# The entry point of the program need to be protected for spawning processes.
if __name__ == '__main__':
main()
```
## 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. Developers should perform safety testing and tuning tailored to their specific applications of the model. 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 model quality, risk, security vulnerabilities or NVIDIA AI Concerns here.