--- library_name: transformers license: other license_name: nvidia-open-model-license license_link: >- https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-open-model-license/ pipeline_tag: text-generation language: - en tags: - nvidia - llama-3 - pytorch --- # Llama-3.1-Nemotron-Ultra-253B-CPT-v1 ## Model Overview ![Accuracy Plot](./accuracy_plot.png) Llama-3.1-Nemotron-Ultra-253B-CPT-v1 is a large language model (LLM) which is a derivative of [Meta Llama-3.1-405B-Instruct](https://huggingface.co/meta-llama/Llama-3.1-405B-Instruct) (AKA the parent model). This model supports a context length of 128K tokens and fits on a single 8xH100 node for inference. While the model was derived from Llama-3.1-405B-Instruct it has undergone a substantial continual pre-training (CPT). This CPT variant can be viewed as a “re-based” derivative of Llama-3.1-405B-Instruct. Llama-3.1-Nemotron-Ultra-253B-v1 is a model which offers a great tradeoff between model accuracy and efficiency. Efficiency (throughput) directly translates to savings. Using a novel Neural Architecture Search (NAS) approach, we greatly reduce the model’s memory footprint, enabling larger workloads, as well as reducing the number of GPUs required to run the model in a data center environment. This NAS approach enables the selection of a desired point in the accuracy-efficiency tradeoff. Furthermore, by using a novel method to vertically compress the model (see details [here](https://arxiv.org/abs/2503.18908)), it also offers a significant improvement in latency. This model served as the basis model for creating Llama-3.1-Nemotron-Ultra-253B-v1, which is part of the Llama Nemotron Collection. You can find the other models in this family here: - [Llama-3.1-Nemotron-Nano-8B-v1](https://huggingface.co/nvidia/Llama-3.1-Nemotron-Nano-8B-v1) - [Llama-3.3-Nemotron-Super-49B-v1](https://huggingface.co/nvidia/Llama-3_3-Nemotron-Super-49B-v1) - [Llama-3.1-Nemotron-Ultra-253B-v1](https://huggingface.co/nvidia/Llama-3_1-Nemotron-Ultra-253B-v1) This model is ready for commercial use. ## License/Terms of Use GOVERNING TERMS: Your 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: [Llama 3.1 Community License Agreement](https://www.llama.com/llama3\_1/license/). Built with Llama. **Model Developer:** NVIDIA **Model Dates:** Trained between November 2024 and April 2025 **Data Freshness:** The pretraining data has a cutoff of 2023 per Llama-3.1-405B-Instruct ### Use Case: This model can be used as the basis model for any desired application by finetuning to any desired domain or application. ### Release Date: 2025-04-08 ## References * [\[2411.19146\]Puzzle: Distillation-Based NAS for Inference-Optimized LLMs](https://arxiv.org/abs/2411.19146) * [\[2503.18908\]FFN Fusion: Rethinking Sequential Computation in Large Language Models](https://arxiv.org/abs/2503.18908) ## Model Architecture **Architecture Type:** Dense decoder-only Transformer model **Network Architecture:** Llama-3.1-405B-Instruct, customized through Neural Architecture Search (NAS) **This model was developed based on Llama-3.1-405B-Instruct
** This model has 253B model parameters.
The model is a derivative of Llama 3.1-405B-Instruct, using Neural Architecture Search (NAS). The NAS algorithm results in non-standard and non-repetitive blocks. This includes the following: * Skip attention: In some blocks, the attention is skipped entirely, or replaced with a single linear layer. * Variable FFN: The expansion/compression ratio in the FFN layer is different between blocks. * FFN Fusion: When several consecutive attention layers are skipped, which can result in a sequence of multiple FFNs, that sequence of FFNs are fused into a smaller number of wider FFN layers. For each block of the parent model, we created multiple variants providing different tradeoff profiles of quality vs. computational complexity, discussed in more depth [here](https://arxiv.org/abs/2411.19146). We then search over the blocks to create a model which meets the required throughput and memory constraints while minimizing the quality degradation. To recover performance, the model initially underwent knowledge distillation (KD) for 65 billion tokens. This is followed by a continual pretraining (CPT) phase for 88 billion tokens. While the initial model was infused from the instruct version of Llama 3.1-405B-Instruct, the substantial CPT it has undergone can be viewed as “re-basing” the model. Still, however, the re-based CPT final model should keep some of its instruction following capabilities. ## Intended use Llama-3.1-Nemotron-Ultra-253B-CPT-v1 can be used as a base model intended to be used mainly in English and coding languages. ## Input - **Input Type:** Text - **Input Format:** String - **Input Parameters:** One-Dimensional (1D) - **Other Properties Related to Input:** Context length up to 131,072 tokens ## Output - **Output Type:** Text - **Output Format:** String - **Output Parameters:** One-Dimensional (1D) - **Other Properties Related to Output:** Context length up to 131,072 tokens ## Software Integration - **Runtime Engine:** Transformers - **Recommended Hardware Microarchitecture Compatibility:** - NVIDIA Hopper - NVIDIA Ampere - **Preferred Operating System(s):** Linux ## Model Version 1.0 (4/8/2025) ## Quick Start and Usage Recommendations: You can try the reasoning model built on top of this CPT model in the preview API, using this link: [Llama-3_1-Nemotron-Ultra-253B-v1](https://build.nvidia.com/nvidia/llama-3_1-nemotron-ultra-253b-v1). See the snippet below for usage with [Hugging Face Transformers](https://huggingface.co/docs/transformers/main/en/index) library. We recommend using the *transformers* package with version 4.48.3. ```py import torch import transformers model_id = "nvidia/Llama-3_1-Nemotron-Ultra-253B-CPT-v1" model_kwargs = {"torch_dtype": torch.bfloat16, "trust_remote_code": True, "device_map": "auto"} tokenizer = transformers.AutoTokenizer.from_pretrained(model_id) tokenizer.pad_token_id = tokenizer.eos_token_id pipeline = transformers.pipeline( "text-generation", model=model_id, tokenizer=tokenizer, max_new_tokens=32768, do_sample=False, **model_kwargs ) print(pipeline("Hey how are you?")) # Base model usage print(pipeline([{"role": "user", "content": "Hey how are you?"}])) # Chat model usage ``` ## Inference: **Engine:** - Transformers **Test Hardware:** - BF16: - 8x NVIDIA H100-80GB - 4x NVIDIA B100 - FP 8 - 4x NVIDIA H100-80GB ## Training Datasets A large variety of training data was used for the knowledge distillation phase before post-training pipeline, 3 of which included: FineWeb, Buzz-V1.2, and Dolma. **Data Collection for Training Datasets:** - Hybrid: Automated, Human, Synthetic **Data Labeling for Training Datasets:** - Hybrid: Automated, Human, Synthetic ## Evaluation Datasets We used the datasets listed in the next section to evaluate Llama-3.1-Nemotron-Ultra-253B-CPT-v1. Data Collection for Evaluation Datasets: - Hybrid: Human/Synthetic Data Labeling for Evaluation Datasets: - Hybrid: Human/Synthetic/Automatic ## Evaluation Results | Benchmark | Metric | Score | |-----------|--------------|--------| | GSM-8K | strict-match | 84.99 | | MMLU | macro | 88.09 | | MATH500 | micro | 80.4 | | HumanEval | pass@1 | 88.41 | | RULER | 128K | 83.21 | ## 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. For more detailed information on ethical considerations for this model, please see the Model Card++ [Explainability](./EXPLAINABILITY.md), [Bias](./BIAS.md), [Safety & Security](./SAFETY_SECURITY.md), and [Privacy](./PRIVACY.md) Subcards. Please report security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).