wasiuddina commited on
Commit
f9f5111
·
verified ·
1 Parent(s): 5f7ffb4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +104 -112
README.md CHANGED
@@ -1,187 +1,179 @@
1
  ---
2
  library_name: transformers
3
  license: other
4
- license_name: nvidia-internal-scientific-research-and-development-model-license
5
  license_link: >-
6
- https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-internal-scientific-research-and-development-model-license/
7
  pipeline_tag: text-generation
8
  tags:
9
  - nvidia
10
  - pytorch
11
  ---
12
 
13
- # Nemotron-H-56B-Base-8K
14
 
15
  ## Model Overview
16
 
17
- NVIDIA Nemotron-H-56B-Base-8K Base is a large language model (LLM) developed by NVIDIA that is designed as a completion model for a given piece of text. It uses a hybrid model architecture that consists primarily of Mamba-2 and MLP layers combined with just four Attention layers. The model features a context length of 8K. The supported languages include: English, German, Spanish, French, Italian, Korean, Portuguese, Russian, Japanese, and Chinese. For more detailed information on the model architecture, training, and evaluation, please see the [project page](https://research.nvidia.com/labs/adlr/nemotronh/) and the [technical report](https://arxiv.org/abs/2504.03624).
18
 
19
- For best performance on a given task, users are encouraged to customize the model using the [NeMo Framework](https://docs.nvidia.com/nemo-framework/index.html) suite of customization tools including Parameter-Efficient Fine-Tuning (P-tuning, Adapters, LoRA, and more), and Model Alignment (SFT, SteerLM, RLHF, and more) using [NeMo-Aligner](https://github.com/NVIDIA/NeMo-Aligner).
20
 
21
- This model is for research and development only.
 
 
22
 
23
- This model is part of the Nemotron-H Collection. You can find the models in this family here:
24
- - [Nemotron-H-56B-Base-8K](https://huggingface.co/nvidia/Nemotron-H-56B-Base-8K)
25
- - [Nemotron-H-47B-Base-8K](https://huggingface.co/nvidia/Nemotron-H-47B-Base-8K)
26
- - [Nemotron-H-8B-Base-8K](https://huggingface.co/nvidia/Nemotron-H-8B-Base-8K)
27
 
28
  ## License/Terms of Use
29
 
30
- GOVERNING TERMS: Use of this model is governed by the [NVIDIA Internal Scientific Research and Development Model License](https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-internal-scientific-research-and-development-model-license/).
31
 
32
  **Model Developer:** NVIDIA
33
 
34
- **Model Dates:**
35
-
36
- October 2024 - March 2025
37
-
38
- **Data Freshness:**
39
-
40
- September 2024
41
-
42
- The pretraining data has a cutoff date of September 2024.
43
-
44
 
45
- ## Use Case:
46
 
47
- This model is intended for developers and researchers building LLMs.
 
48
 
49
  ## Release Date:
50
 
51
- 4/14/2025
52
 
53
  ## References
54
 
55
- - [\[2504.03624\] Nemotron-H: A Family of Accurate and Efficient Hybrid Mamba-Transformer Models](https://arxiv.org/abs/2504.03624)
56
 
57
  ## Model Architecture
58
- - Architecture Type: Hybrid Mamba-Transformer
59
- - Network Architecture: Nemotron-H
60
 
61
- This model has 56B of model parameters.
 
62
 
63
- ## Input
64
- - Input Type(s): Text
65
- - Input Format(s): String
66
- - Input Parameters: One-Dimensional (1D): Sequences
67
- - Other Properties Related to Input: Context length up to 8K. Supported languages include German, Spanish, French, Italian, Korean, Portuguese, Russian, Japanese, Chinese and English.
68
 
69
- ## Output
70
- - Output Type(s): Text
71
- - Output Format: String
72
- - Output Parameters: One-Dimensional (1D): Sequences
73
 
74
- 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. <br>
 
 
 
 
75
 
76
- ## Software Integration
77
- - Runtime Engine(s): NeMo 24.12
78
- - Supported Hardware Microarchitecture Compatibility: NVIDIA H100-80GB, NVIDIA A100
79
- - Operating System(s): Linux
 
80
 
81
- ## Model Version
82
- - v1.0
 
 
 
 
83
 
84
- ## Prompt Format
 
85
 
86
- As this is a base model, no explicit prompt format is recommended or required.
87
 
88
- ### Example
89
 
90
- ```python
91
- import torch
92
- from transformers import AutoTokenizer, AutoModelForCausalLM
93
-
94
- # Load the tokenizer and model
95
- tokenizer = AutoTokenizer.from_pretrained("nvidia/Nemotron-H-56B-Base-8K", trust_remote_code=True)
96
- model = AutoModelForCausalLM.from_pretrained("nvidia/Nemotron-H-56B-Base-8K", torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto")
97
 
98
- prompt = "When was NVIDIA founded?"
 
99
 
100
- outputs = model.generate(**tokenizer(prompt, return_tensors="pt", add_special_tokens=False).to(model.device))
101
- print(tokenizer.decode(outputs[0]))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  ```
103
 
104
- ## Training, Testing, and Evaluation Datasets
105
 
106
- ### Training & Testing Datasets:
107
 
108
- The training corpus for Nemotron-H-56B-Base-8K Base consists of English and multilingual text (German, Spanish, French, Italian, Korean, Portuguese, Russian, Japanese, Chinese and English), as well as code. Our sources cover a variety of document types such as: webpages, dialogue, articles, and other written materials. This model was also improved using synthetic data from Qwen (Built with Qwen). The corpus spans domains including legal, math, science, finance, and more. We also include a small portion of question-answering, and alignment style data to improve model accuracies.
109
 
110
- **Data Collection for Training & Testing Datasets:**
111
- Hybrid: Automated, Human, Synthetic
112
 
113
- **Data Labeling for Training & Testing Datasets:**
114
- Hybrid: Automated, Human, Synthetic
115
 
116
- ### Evaluation Datasets
117
 
118
- We used the datasets listed in the next section to evaluate Nemotron-H-56B-Base-8K Base.
119
 
120
- Data Collection for Evaluation Datasets:
121
- Hybrid: Human, Synthetic
122
 
123
- Data Labeling for Evaluation Datasets:
124
- Hybrid: Human, Synthetic, Automatic
125
-
126
- #### Commonsense Understanding Evaluations:
127
-
128
- | ARC Challenge 25-shot | Hellaswag 10-shot | Winogrande 5-shot | CommonsenseQA 7-shot |
129
- |-------------|--------------|-----------------|------------------|
130
- | 94.97 | 89.00 | 84.45 | 86.73 |
131
 
132
- - ARC (Ai2 reasoning challenge)-Challenge - The challenge set of questions from a benchmark that contains grade-school level, multiple-choice science questions to assess question answering ability of language models. [Dataset](https://huggingface.co/datasets/allenai/ai2_arc)
133
- - Hellaswag - Tests the ability of a language model to correctly finish the provided context from a choice of possible options. [Dataset](https://huggingface.co/datasets/Rowan/hellaswag )
134
- - Winogrande - Tests the ability to choose the right option for a given sentence which requires commonsense reasoning. [Dataset](https://huggingface.co/datasets/allenai/winogrande )
135
- - CommonsenseQA - A multiple-choice question answering dataset that requires different types of commonsense knowledge to predict the correct answers. [Dataset](https://huggingface.co/datasets/tau/commonsense_qa )
136
 
137
- #### Coding Evaluations:
138
 
139
- | MBPP (sanitized) 3-shot | MBPP+ 0-shot | HumanEval 0-shot | HumanEval+ 0-shot |
140
- |-------------|--------------|-----------------|------------------|
141
- | 77.82 | 67.20| 60.37 | 54.27 |
142
 
143
- - MBPP (Mostly Basic Python Programming Problems) - Evaluates ability to generate solutions for Python programming tasks. [Dataset](https://github.com/google-research/google-research/tree/master/mbpp)
144
- - MBPP+ - Extended version of MBPP with additional validation. [Dataset](https://huggingface.co/datasets/evalplus/mbppplus)
145
- - HumanEval - Tests code generation and completion abilities in Python. [Dataset](https://github.com/openai/human-eval)
146
 
147
- #### Math Evaluations:
148
 
 
149
 
150
- | GSM8K 8-shot CoT | MATH 4-shot CoT | MATH-Lvl 5 4-shot CoT | MATH-500 4-shot CoT |
151
- |--------------|------------|------------|------------|
152
- | 93.71 | 59.42 | 35.19 | 57.37 |
153
 
154
- - GSM8K (Grade School Math 8K) - Evaluates grade school level mathematical word problem solving. [Dataset](https://github.com/openai/grade-school-math)
155
- - MATH - Tests mathematical ability across multiple difficulty levels and various subjects including: Prealgebra, Algebra, Number Theory, Counting and Probability, Geometry, Intermediate Algebra, and Precalculus. [Dataset](https://github.com/hendrycks/math)
156
- - MATH Lvl 5 - Only the most difficult questions from the MATH dataset. [Dataset](https://github.com/hendrycks/math)
157
- - MATH-500 - Tests advanced mathematical problem solving across algebra, geometry, and calculus. [Dataset](https://huggingface.co/datasets/HuggingFaceH4/MATH-500)
158
 
 
159
 
160
- #### General Evaluations:
 
161
 
 
162
 
163
- | MMLU-Pro 5-shot CoT | MMLU 5-shot|
164
- |-------------------|------------------|
165
- |60.51 |84.21 |
 
 
166
 
167
- - MMLU Pro - Evaluates language understanding models across a broad range of challenging, reasoning-focused questions across 14 diverse domains.
168
- [Dataset](https://huggingface.co/datasets/TIGER-Lab/MMLU-Pro)
169
- - MMLU - Tests knowledge across 57 subjects including science, humanities, math and more. [Dataset](https://github.com/hendrycks/test)
170
 
171
- ## Potential Known Risks for Usage
 
172
 
173
- The model was trained on data that contains toxic language, unsafe content, and societal biases originally crawled from the internet. Therefore, the model may amplify those biases and return toxic responses especially when prompted with toxic prompts. The model may generate answers that may be inaccurate, omit key information, or include irrelevant or redundant text producing socially unacceptable or undesirable text, even if the prompt itself does not include anything explicitly offensive.
174
 
175
- The model demonstrates weakness to indirect prompt injection via some encodings, including Base16, Hex/ASCII, and Braille, though is more resilient than other similar models to injections using the more common Base64 vector.
 
 
 
 
176
 
177
- ## Inference
178
- - Engine: NeMo
179
- - Test Hardware NVIDIA H100-80GB
180
 
181
- ## Ethical Considerations
182
- 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.
183
 
184
- For more detailed information on ethical considerations for this model, please see the Responsible Use Guide available at http://nvidia.com/nemotron-responsible-use.
185
 
186
  Please report security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).
187
-
 
1
  ---
2
  library_name: transformers
3
  license: other
4
+ license_name: nvidia-open-model-license
5
  license_link: >-
6
+ https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-open-model-license/
7
  pipeline_tag: text-generation
8
  tags:
9
  - nvidia
10
  - pytorch
11
  ---
12
 
13
+ # OpenCodeReasoning-Distill-Qwen-7B-Instruct
14
 
15
  ## Model Overview
16
 
17
+ Llama-3.1-Nemotron-Ultra-253B-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 *reference model*). It is a reasoning model that is post trained for reasoning, human chat preferences, and tasks, such as RAG and tool calling. The model supports a context length of 128K tokens. This model fits on a single 8xH100 node for inference.
18
 
19
+ 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.
20
 
21
+ The model underwent a multi-phase post-training process to enhance both its reasoning and non-reasoning capabilities. This includes a supervised fine-tuning stage for Math, Code, Reasoning, Chat, and Tool Calling as well as multiple reinforcement learning (RL) stages using Group Relative Policy Optimization (GRPO) algorithms for reasoning, chat, and instruction-following.
22
+
23
+ This model is ready for commercial use.
24
 
 
 
 
 
25
 
26
  ## License/Terms of Use
27
 
28
+ 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 Qwen.
29
 
30
  **Model Developer:** NVIDIA
31
 
32
+ **Model Dates:** Trained between February 2025 and March 2025
 
 
 
 
 
 
 
 
 
33
 
 
34
 
35
+ ### Use Case:
36
+ Developers designing AI-powered code generation applications. Also suitable for typical instruction-following tasks.
37
 
38
  ## Release Date:
39
 
40
+ 2025-04-21
41
 
42
  ## References
43
 
44
+ - [\[2504.01943\] OpenCodeReasoning: Advancing Data Distillation for Competitive Coding](https://arxiv.org/abs/2504.01943)
45
 
46
  ## Model Architecture
47
+ - Architecture Type: Dense decoder-only Transformer model
48
+ - Network Architecture: Qwen
49
 
50
+ **This model was developed based on Qwen2.5-7B-Instruct <br>
51
+ ** This model has 7B of model parameters. <br>
52
 
53
+ ## Intended use
 
 
 
 
54
 
55
+ OpenCodeReasoning-Distill-Qwen-7B-Instruct is a competitive code generation focused reasoning and chat model intended to be used in English.
 
 
 
56
 
57
+ ## Input
58
+ - **Input Type:** Text
59
+ - **Input Format:** String
60
+ - **Input Parameters:** One-Dimensional (1D)
61
+ - **Other Properties Related to Input:** Context length up to 32,768 tokens
62
 
63
+ ## Output
64
+ - **Output Type:** Text
65
+ - **Output Format:** String
66
+ - **Output Parameters:** One-Dimensional (1D)
67
+ - **Other Properties Related to Output:** Context length up to 32,768 tokens
68
 
69
+ ## Software Integration
70
+ - **Runtime Engine:** Transformers
71
+ - **Recommended Hardware Microarchitecture Compatibility:**
72
+ - NVIDIA Hopper
73
+ - NVIDIA Ampere
74
+ - **Preferred Operating System(s):** Linux
75
 
76
+ ## Model Version
77
+ 1.0 (4/21/2025)
78
 
79
+ ## Quick Start and Usage Recommendations:
80
 
81
+ We recommend setting temperature to \`0.6\`, and Top P to \`0.95\` for inference on LiveCodeBench.
82
 
83
+ ### Use It with Transformers
84
+ See the snippet below for usage with [Hugging Face Transformers](https://huggingface.co/docs/transformers/main/en/index) library. Please see the example below.
 
 
 
 
 
85
 
86
+ We recommend using the *transformers* package with version 4.48.3.
87
+ Example:
88
 
89
+ ```py
90
+ import torch
91
+ import transformers
92
+
93
+ model_id = "nvidia/OpenCodeReasoning-Distill-Qwen-7B-Instruct"
94
+ model_kwargs = {"torch_dtype": torch.bfloat16, "trust_remote_code": True, "device_map": "auto"}
95
+ tokenizer = transformers.AutoTokenizer.from_pretrained(model_id)
96
+ tokenizer.pad_token_id = tokenizer.eos_token_id
97
+
98
+ pipeline = transformers.pipeline(
99
+ "text-generation",
100
+ model=model_id,
101
+ tokenizer=tokenizer,
102
+ max_new_tokens=32768,
103
+ temperature=0.6,
104
+ top_p=0.95,
105
+ **model_kwargs
106
+ )
107
+
108
+ print(pipeline([{"role": "user", "content": "Solve x*(sin(x)+2)=0"}]))
109
  ```
110
 
111
+ ## Training and Evaluation Datasets
112
 
113
+ ## Training Datasets
114
 
115
+ This model is trained using [OpenCodeReasoning](https://huggingface.co/datasets/nvidia/OpenCodeReasoning) dataset.
116
 
117
+ **Data Collection for Training Datasets:**
 
118
 
119
+ - Hybrid: Automated, Human, Synthetic
 
120
 
121
+ **Data Labeling for Training Datasets:**
122
 
123
+ - Hybrid: Automated, Human, Synthetic
124
 
125
+ ## Evaluation Datasets
 
126
 
127
+ We used the datasets listed in the next section to evaluate Llama-3.1-Nemotron-Ultra-253B-v1.
 
 
 
 
 
 
 
128
 
129
+ Data Collection for Evaluation Datasets:
 
 
 
130
 
131
+ - Hybrid: Human/Synthetic
132
 
133
+ Data Labeling for Evaluation Datasets:
 
 
134
 
135
+ - Hybrid: Human/Synthetic/Automatic
 
 
136
 
 
137
 
138
+ ## Evaluation Results
139
 
140
+ ### LiveCodeBench (20240801-20250201)
 
 
141
 
142
+ | Models | Pass@1 |
143
+ |--------------|------------|
144
+ | R1-Distill-Qwen-7B | 37.6 |
145
+ | OpenCodeReasoning-Distill-Qwen-7B-Instruct | 51.3 |
146
 
147
+ User Prompt Template (without starter code):
148
 
149
+ ````
150
+ "You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
151
 
152
+ Question: {prompt}
153
 
154
+ Read the inputs from stdin solve the problem and write the answer to stdout (do not directly test on the sample inputs). Enclose your code within delimiters as follows. Ensure that when the python program runs, it reads the inputs, runs the algorithm and writes output to STDOUT.
155
+ ```python
156
+ # YOUR CODE HERE
157
+ ```
158
+ ````
159
 
160
+ User Prompt Template (with starter code):
 
 
161
 
162
+ ````
163
+ You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
164
 
165
+ Question: {prompt}
166
 
167
+ You will use the following starter code to write the solution to the problem and enclose your code within delimiters.
168
+ ```python
169
+ {starter_code}
170
+ ```
171
+ ````
172
 
173
+ ## Ethical Considerations:
 
 
174
 
175
+ 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.
 
176
 
177
+ For more detailed information on ethical considerations for this model, please see the Model Card++ [Explainability](./EXPLAINABILITY.md), [Bias](./BIAS.md), [Safety & Security](./SAFETY_and_SECURITY.md), and [Privacy](./PRIVACY.md) Subcards.
178
 
179
  Please report security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).