Update README.md
Browse files
README.md
CHANGED
@@ -13,190 +13,197 @@ tags:
|
|
13 |
pipeline_tag: text-generation
|
14 |
---
|
15 |
|
16 |
-
#
|
17 |
|
18 |
-
|
19 |
-
OpenCodeReasoning-Nemotron-32B is a large language model (LLM) which is a derivative of Qwen2.5-32B-Instruct (AKA the reference model). It is a reasoning model that is post-trained for reasoning for code generation. The model supports a context length of 32K tokens. <br>
|
20 |
|
21 |
-
This
|
22 |
-
|
23 |
-

|
24 |
|
|
|
25 |
|
26 |
-
|
27 |
|
28 |
-
|
29 |
|
30 |
-
| Model | LiveCodeBench Avg. | CodeContest All |
|
31 |
-
|------------------------|--------------------|-----------------|
|
32 |
-
| DeepSeek-R1 | 65.6 | 26.2 |
|
33 |
-
| QwQ-32B | 61.3 | 20.2 |
|
34 |
-
| | | |
|
35 |
-
| **Distilled 7B+ Models** | | |
|
36 |
-
| | | |
|
37 |
-
| Bespoke-Stratos-7B | 14.7 | 2.0 |
|
38 |
-
| OpenThinker-7B | 25.5 | 5.0 |
|
39 |
-
| R1-Distill-Qwen-7B | 38.0 | 11.1 |
|
40 |
-
| OlympicCoder-7B | 40.9 | 10.6 |
|
41 |
-
| **OCR-Qwen-7B** | **48.5** | **16.3** |
|
42 |
-
| **OCR-Qwen-7B-Instruct** | **51.3** | **18.1** |
|
43 |
-
| | | |
|
44 |
-
| **Distilled 14B+ Models**| | |
|
45 |
-
| | | |
|
46 |
-
| R1-Distill-Qwen-14B | 51.3 | 17.6 |
|
47 |
-
| **OCR-Qwen-14B** | **57.7** | **22.6** |
|
48 |
-
| **OCR-Qwen-14B-Instruct**| **59.4** | **23.6** |
|
49 |
-
| | | |
|
50 |
-
| **Distilled 32B+ Models**| | |
|
51 |
-
| | | |
|
52 |
-
| Bespoke-Stratos-32B | 30.1 | 6.3 |
|
53 |
-
| OpenThinker-32B | 54.1 | 16.4 |
|
54 |
-
| R1-Distill-Qwen-32B | 58.1 | 18.3 |
|
55 |
-
| OlympicCoder-32B | 57.4 | 18.0 |
|
56 |
-
| **OCR-Qwen-32B** | **61.8** | **24.6** |
|
57 |
-
| **OCR-Qwen-32B-Instruct**| **61.7** | **24.4** |
|
58 |
-
|
59 |
-
## Reproducing our results
|
60 |
-
|
61 |
-
* [Models](https://huggingface.co/collections/nvidia/opencodereasoning-2-68168f37cd7c6beb1e3f92e7)
|
62 |
-
* [Dataset](https://huggingface.co/datasets/nvidia/OpenCodeReasoning)
|
63 |
-
* [Paper](https://arxiv.org/abs/2504.01943)
|
64 |
-
|
65 |
-
|
66 |
-
## How to use the models?
|
67 |
-
|
68 |
-
To run inference on coding problems:
|
69 |
|
70 |
-
````python
|
71 |
-
import transformers
|
72 |
-
import torch
|
73 |
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
)
|
82 |
|
83 |
-
|
84 |
|
85 |
-
|
86 |
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
```
|
91 |
|
92 |
-
|
93 |
-
"""
|
94 |
|
95 |
-
|
96 |
-
{
|
97 |
-
"role": "user",
|
98 |
-
"content": prompt.format(user="Write a program to calculate the sum of the first $N$ fibonacci numbers")},
|
99 |
-
]
|
100 |
|
101 |
-
|
102 |
-
messages,
|
103 |
-
max_new_tokens=32768,
|
104 |
-
)
|
105 |
-
print(outputs[0]["generated_text"][-1]['content'])
|
106 |
|
107 |
-
|
108 |
|
|
|
109 |
|
|
|
110 |
|
111 |
-
|
112 |
|
113 |
-
|
114 |
-
```
|
115 |
-
@article{ahmad2025opencodereasoning,
|
116 |
-
title={OpenCodeReasoning: Advancing Data Distillation for Competitive Coding},
|
117 |
-
author={Wasi Uddin Ahmad, Sean Narenthiran, Somshubra Majumdar, Aleksander Ficek, Siddhartha Jain, Jocelyn Huang, Vahid Noroozi, Boris Ginsburg},
|
118 |
-
year={2025},
|
119 |
-
eprint={2504.01943},
|
120 |
-
archivePrefix={arXiv},
|
121 |
-
primaryClass={cs.CL},
|
122 |
-
url={https://arxiv.org/abs/2504.01943},
|
123 |
-
}
|
124 |
-
```
|
125 |
-
|
126 |
-
## Additional Information
|
127 |
-
|
128 |
-
## Model Architecture: <br>
|
129 |
-
Architecture Type: Dense decoder-only Transformer model
|
130 |
-
Network Architecture: Qwen-32B-Instruct
|
131 |
-
<br>
|
132 |
-
**This model was developed based on Qwen2.5-32B-Instruct and has 32B model parameters. <br>**
|
133 |
-
**OpenCodeReasoning-Nemotron-32B was developed based on Qwen2.5-32B-Instruct and has 32B model parameters. <br>**
|
134 |
-
|
135 |
-
## Input: <br>
|
136 |
-
**Input Type(s):** Text <br>
|
137 |
-
**Input Format(s):** String <br>
|
138 |
-
**Input Parameters:** One-Dimensional (1D) <br>
|
139 |
-
**Other Properties Related to Input:** Context length up to 32,768 tokens <br>
|
140 |
|
141 |
-
|
142 |
-
**Output Type(s):** Text <br>
|
143 |
-
**Output Format:** String <br>
|
144 |
-
**Output Parameters:** One-Dimensional (1D) <br>
|
145 |
-
**Other Properties Related to Output:** Context length up to 32,768 tokens <br>
|
146 |
|
147 |
-
|
148 |
|
149 |
-
|
150 |
-
* Runtime Engine: NeMo 2.3.0 <br>
|
151 |
-
* Recommended Hardware Microarchitecture Compatibility: <br>
|
152 |
-
NVIDIA Ampere <br>
|
153 |
-
NVIDIA Hopper <br>
|
154 |
-
* Preferred/Supported Operating System(s): Linux <br>
|
155 |
|
156 |
-
##
|
157 |
-
1.0 (4/25/2025) <br>
|
158 |
-
OpenCodeReasoning-Nemotron-7B<br>
|
159 |
-
OpenCodeReasoning-Nemotron-14B<br>
|
160 |
-
OpenCodeReasoning-Nemotron-32B<br>
|
161 |
-
OpenCodeReasoning-Nemotron-32B-IOI<br>
|
162 |
|
|
|
163 |
|
164 |
-
|
165 |
|
166 |
-
|
167 |
|
168 |
-
|
169 |
|
170 |
-
|
171 |
-
Labeling Method: Hybrid: Automated, Human, Synthetic <br>
|
172 |
-
Properties: 736k samples from OpenCodeReasoning (https://huggingface.co/datasets/nvidia/OpenCodeReasoning)
|
173 |
|
174 |
-
##
|
175 |
-
We used the datasets listed in the next section to evaluate OpenCodeReasoning-Nemotron-32B. <br>
|
176 |
-
**Data Collection Method: Hybrid: Automated, Human, Synthetic <br>**
|
177 |
-
**Labeling Method: Hybrid: Automated, Human, Synthetic <br>**
|
178 |
|
179 |
-
|
180 |
-
GOVERNING TERMS: Use of this model is governed by [Apache 2.0](https://huggingface.co/nvidia/OpenCode-Nemotron-2-7B/blob/main/LICENSE).
|
181 |
|
182 |
-
|
183 |
-
Global<br>
|
184 |
|
185 |
-
|
186 |
-
This model is intended for developers and researchers building LLMs. <br>
|
187 |
|
188 |
-
###
|
189 |
-
Huggingface [04/25/2025] via https://huggingface.co/nvidia/OpenCodeReasoning-Nemotron-32B/ <br>
|
190 |
|
191 |
-
|
192 |
-
[2504.01943] OpenCodeReasoning: Advancing Data Distillation for Competitive Coding
|
193 |
-
<br>
|
194 |
|
195 |
-
|
196 |
-
**Engine:** vLLM <br>
|
197 |
-
**Test Hardware** NVIDIA H100-80GB <br>
|
198 |
|
199 |
-
|
200 |
-
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.
|
201 |
|
202 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
pipeline_tag: text-generation
|
14 |
---
|
15 |
|
16 |
+
# Model Card for Model ID
|
17 |
|
18 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
|
|
19 |
|
20 |
+
This modelcard aims to be a base template for new models. It has been generated using [this raw template](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/templates/modelcard_template.md?plain=1).
|
|
|
|
|
21 |
|
22 |
+
## Model Details
|
23 |
|
24 |
+
### Model Description
|
25 |
|
26 |
+
<!-- Provide a longer summary of what this model is. -->
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
|
|
|
|
|
|
29 |
|
30 |
+
- **Developed by:** [More Information Needed]
|
31 |
+
- **Funded by [optional]:** [More Information Needed]
|
32 |
+
- **Shared by [optional]:** [More Information Needed]
|
33 |
+
- **Model type:** [More Information Needed]
|
34 |
+
- **Language(s) (NLP):** [More Information Needed]
|
35 |
+
- **License:** [More Information Needed]
|
36 |
+
- **Finetuned from model [optional]:** [More Information Needed]
|
|
|
37 |
|
38 |
+
### Model Sources [optional]
|
39 |
|
40 |
+
<!-- Provide the basic links for the model. -->
|
41 |
|
42 |
+
- **Repository:** [More Information Needed]
|
43 |
+
- **Paper [optional]:** [More Information Needed]
|
44 |
+
- **Demo [optional]:** [More Information Needed]
|
|
|
45 |
|
46 |
+
## Uses
|
|
|
47 |
|
48 |
+
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
|
|
|
|
|
|
|
|
49 |
|
50 |
+
### Direct Use
|
|
|
|
|
|
|
|
|
51 |
|
52 |
+
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
53 |
|
54 |
+
[More Information Needed]
|
55 |
|
56 |
+
### Downstream Use [optional]
|
57 |
|
58 |
+
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
59 |
|
60 |
+
[More Information Needed]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
|
62 |
+
### Out-of-Scope Use
|
|
|
|
|
|
|
|
|
63 |
|
64 |
+
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
65 |
|
66 |
+
[More Information Needed]
|
|
|
|
|
|
|
|
|
|
|
67 |
|
68 |
+
## Bias, Risks, and Limitations
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
+
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
71 |
|
72 |
+
[More Information Needed]
|
73 |
|
74 |
+
### Recommendations
|
75 |
|
76 |
+
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
77 |
|
78 |
+
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
|
|
|
|
79 |
|
80 |
+
## How to Get Started with the Model
|
|
|
|
|
|
|
81 |
|
82 |
+
Use the code below to get started with the model.
|
|
|
83 |
|
84 |
+
[More Information Needed]
|
|
|
85 |
|
86 |
+
## Training Details
|
|
|
87 |
|
88 |
+
### Training Data
|
|
|
89 |
|
90 |
+
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
|
|
|
|
91 |
|
92 |
+
[More Information Needed]
|
|
|
|
|
93 |
|
94 |
+
### Training Procedure
|
|
|
95 |
|
96 |
+
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
97 |
+
|
98 |
+
#### Preprocessing [optional]
|
99 |
+
|
100 |
+
[More Information Needed]
|
101 |
+
|
102 |
+
|
103 |
+
#### Training Hyperparameters
|
104 |
+
|
105 |
+
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
106 |
+
|
107 |
+
#### Speeds, Sizes, Times [optional]
|
108 |
+
|
109 |
+
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
110 |
+
|
111 |
+
[More Information Needed]
|
112 |
+
|
113 |
+
## Evaluation
|
114 |
+
|
115 |
+
<!-- This section describes the evaluation protocols and provides the results. -->
|
116 |
+
|
117 |
+
### Testing Data, Factors & Metrics
|
118 |
+
|
119 |
+
#### Testing Data
|
120 |
+
|
121 |
+
<!-- This should link to a Dataset Card if possible. -->
|
122 |
+
|
123 |
+
[More Information Needed]
|
124 |
+
|
125 |
+
#### Factors
|
126 |
+
|
127 |
+
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
128 |
+
|
129 |
+
[More Information Needed]
|
130 |
+
|
131 |
+
#### Metrics
|
132 |
+
|
133 |
+
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
134 |
+
|
135 |
+
[More Information Needed]
|
136 |
+
|
137 |
+
### Results
|
138 |
+
|
139 |
+
[More Information Needed]
|
140 |
+
|
141 |
+
#### Summary
|
142 |
+
|
143 |
+
|
144 |
+
|
145 |
+
## Model Examination [optional]
|
146 |
+
|
147 |
+
<!-- Relevant interpretability work for the model goes here -->
|
148 |
+
|
149 |
+
[More Information Needed]
|
150 |
+
|
151 |
+
## Environmental Impact
|
152 |
+
|
153 |
+
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
154 |
+
|
155 |
+
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
156 |
+
|
157 |
+
- **Hardware Type:** [More Information Needed]
|
158 |
+
- **Hours used:** [More Information Needed]
|
159 |
+
- **Cloud Provider:** [More Information Needed]
|
160 |
+
- **Compute Region:** [More Information Needed]
|
161 |
+
- **Carbon Emitted:** [More Information Needed]
|
162 |
+
|
163 |
+
## Technical Specifications [optional]
|
164 |
+
|
165 |
+
### Model Architecture and Objective
|
166 |
+
|
167 |
+
[More Information Needed]
|
168 |
+
|
169 |
+
### Compute Infrastructure
|
170 |
+
|
171 |
+
[More Information Needed]
|
172 |
+
|
173 |
+
#### Hardware
|
174 |
+
|
175 |
+
[More Information Needed]
|
176 |
+
|
177 |
+
#### Software
|
178 |
+
|
179 |
+
[More Information Needed]
|
180 |
+
|
181 |
+
## Citation [optional]
|
182 |
+
|
183 |
+
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
184 |
+
|
185 |
+
**BibTeX:**
|
186 |
+
|
187 |
+
[More Information Needed]
|
188 |
+
|
189 |
+
**APA:**
|
190 |
+
|
191 |
+
[More Information Needed]
|
192 |
+
|
193 |
+
## Glossary [optional]
|
194 |
+
|
195 |
+
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
196 |
+
|
197 |
+
[More Information Needed]
|
198 |
+
|
199 |
+
## More Information [optional]
|
200 |
+
|
201 |
+
[More Information Needed]
|
202 |
+
|
203 |
+
## Model Card Authors [optional]
|
204 |
+
|
205 |
+
[More Information Needed]
|
206 |
+
|
207 |
+
## Model Card Contact
|
208 |
+
|
209 |
+
[More Information Needed]
|