Update README.md
Browse files
README.md
CHANGED
|
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
datasets:
|
| 3 |
+
- agentica-org/DeepScaleR-Preview-Dataset
|
| 4 |
+
language:
|
| 5 |
+
- en
|
| 6 |
+
metrics:
|
| 7 |
+
- accuracy
|
| 8 |
+
base_model:
|
| 9 |
+
- nvidia/Llama-3.1-Nemotron-Nano-8B-v1
|
| 10 |
+
---
|
| 11 |
+
# Model Overview
|
| 12 |
+
|
| 13 |
+
### Description:
|
| 14 |
+
DLER-Llama-3.1-Nemotron-8B is an ultra-efficient 8B open-weight reasoning model designed for challenging tasks such as mathematics, programming, and scientific problem-solving. It is first trained with the DLER algorithm on agentica-org/DeepScaleR-Preview-Dataset and then enhanced using a weight-merging technique to merge with the base model to mitigate accuracy degradation. Compared to the Llama-3.1-Nemotron-8B model, DLER-Llama-Nemotron-8B-Merge achieves substantial efficiency gains, reducing the average response length by nearly 50% across diverse mathematical benchmarks without sacrificing accuracy.
|
| 15 |
+
|
| 16 |
+
This model is for research and development only.
|
| 17 |
+
|
| 18 |
+
### Deployment Geography:
|
| 19 |
+
Global <br>
|
| 20 |
+
|
| 21 |
+
### Use Case: <br>
|
| 22 |
+
Researchers and developers can use this model to solve math, coding, and STEM questions.
|
| 23 |
+
|
| 24 |
+
### Release Date: <br>
|
| 25 |
+
Hugging Face 9/10/2025 via https://huggingface.co/nvidia/DLER-nvidia/DLER-Llama-Nemotron-8B-Merge <br>
|
| 26 |
+
|
| 27 |
+
## Model Architecture:
|
| 28 |
+
**Architecture Type:** Dense decoder-only Transformer model <br>
|
| 29 |
+
|
| 30 |
+
**Network Architecture:** [Llama-3.1-Nemotron-Nano-8B-v1](https://huggingface.co/nvidia/Llama-3.1-Nemotron-Nano-8B-v1) <br>
|
| 31 |
+
|
| 32 |
+
**This model was developed based on Llama-3.1-Nemotron-Nano-8B-v1 <br>
|
| 33 |
+
|
| 34 |
+
## Software Integration:
|
| 35 |
+
**Runtime Engine(s):** Transformers
|
| 36 |
+
|
| 37 |
+
**Supported Hardware Microarchitecture Compatibility:** <br>
|
| 38 |
+
* NVIDIA Ampere <br>
|
| 39 |
+
* NVIDIA Hopper <br>
|
| 40 |
+
|
| 41 |
+
**Preferred/Supported Operating System(s):**
|
| 42 |
+
* Linux <br>
|
| 43 |
+
|
| 44 |
+
The integration of foundation and fine-tuned models into AI systems requires additional testing using use-case-specific data to ensure safe and effective deployment. Following the V-model methodology, iterative testing and validation at both unit and system levels are essential to mitigate risks, meet technical and functional requirements, and ensure compliance with safety and ethical standards before deployment.
|
| 45 |
+
|
| 46 |
+
## Model Version(s):
|
| 47 |
+
1.0
|
| 48 |
+
|
| 49 |
+
### Training Dataset:
|
| 50 |
+
|
| 51 |
+
| Dataset | Link |
|
| 52 |
+
|---------------------------|-------------------------------------------------------------------------------------------|
|
| 53 |
+
| DeepScaleR-Preview-Dataset | [Link](https://huggingface.co/datasets/agentica-org/DeepScaleR-Preview-Dataset) |
|
| 54 |
+
|
| 55 |
+
**Properties:** 479K question and answer pairs <br>
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
### Evaluation Results:
|
| 59 |
+
|
| 60 |
+
**Benchmark Score <br>
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
| Model | MATH | AVG Length | AIME | # Tokens | AMC | # Tokens | Minerva | # Tokens | Olympiad | # Tokens | Avg # Tokens |
|
| 64 |
+
|---------------------------------|----------|------------|--------------------|------------------|--------------------|------------------|--------------------|------------------|--------------------|------------------|-----------------|
|
| 65 |
+
| Llama-3.1-Nemotron-Nano-8B-v1 | 95.4 | 3069 | 66.4 | 9899 | 88.25 | 6228 | 52.38 | 4031 | 64.33 | 6755 | 5996 |
|
| 66 |
+
| **DLER-Llama-Nemotron-8B-Merge**| **95.2** | **1995** | **66.7** | **5013** | **89.23** | **3358** | **53.19** | **2301** | **65.39** | **3520** | **3237 (-46%)** |
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
# Inference:
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
```python
|
| 74 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 75 |
+
import torch
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
tokenizer = AutoTokenizer.from_pretrained("nvidia/DLER-Llama-Nemotron-8B-Merge")
|
| 82 |
+
model = AutoModelForCausalLM.from_pretrained("nvidia/DLER-Llama-Nemotron-8B-Merge").to(device)
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
messages = [{"role": "system", "content": "detailed thinking on"}, {"role": "user", "content": "Below is a math question. I want you to reason through the steps and then give a final answer. Your final answer should be in \\boxed{}.\nQuestion: Convert the point $(0,3)$ in rectangular coordinates to polar coordinates. Enter your answer in the form $(r,\\theta),$ where $r > 0$ and $0 \\le \\theta < 2 \\pi.$"}]
|
| 86 |
+
|
| 87 |
+
tokenized_chat = tokenizer.apply_chat_template(
|
| 88 |
+
messages,
|
| 89 |
+
tokenize=True,
|
| 90 |
+
add_generation_prompt=True,
|
| 91 |
+
return_tensors="pt").to(model.device)
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
outputs = model.generate(
|
| 95 |
+
tokenized_chat,
|
| 96 |
+
max_new_tokens=10000,
|
| 97 |
+
eos_token_id=tokenizer.eos_token_id)
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=False))
|
| 101 |
+
```
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
### License/Terms of Use
|
| 105 |
+
TBD
|
| 106 |
+
https://docs.google.com/spreadsheets/d/15AiIBHLsm-HY1RZH5nkaA0siE-5grHke9uFYaiD_28E/edit?gid=1088371820#gid=1088371820
|
| 107 |
+
|
| 108 |
+
|
| 109 |
+
## Ethical Considerations:
|
| 110 |
+
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.
|
| 111 |
+
|
| 112 |
+
|
| 113 |
+
Please report security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).
|
| 114 |
+
|
| 115 |
+
|
| 116 |
+
## Citation
|
| 117 |
+
If you find our dataset helpful, please cite the following [paper]():
|
| 118 |
+
|
| 119 |
+
```
|
| 120 |
+
|
| 121 |
+
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
|
| 126 |
+
|
| 127 |
+
|
| 128 |
+
```
|