HYUKI5 commited on
Commit
1bf685b
·
verified ·
1 Parent(s): ae22f7f

nvidia/OpenCodeReasoning-2@eadf53593145 を複製し、カードを日本語で書く

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +0 -1
  2. README.md +488 -0
  3. train/cpp/train-00000-of-00059.parquet +3 -0
  4. train/cpp/train-00001-of-00059.parquet +3 -0
  5. train/cpp/train-00002-of-00059.parquet +3 -0
  6. train/cpp/train-00003-of-00059.parquet +3 -0
  7. train/cpp/train-00004-of-00059.parquet +3 -0
  8. train/cpp/train-00005-of-00059.parquet +3 -0
  9. train/cpp/train-00006-of-00059.parquet +3 -0
  10. train/cpp/train-00007-of-00059.parquet +3 -0
  11. train/cpp/train-00008-of-00059.parquet +3 -0
  12. train/cpp/train-00009-of-00059.parquet +3 -0
  13. train/cpp/train-00010-of-00059.parquet +3 -0
  14. train/cpp/train-00011-of-00059.parquet +3 -0
  15. train/cpp/train-00012-of-00059.parquet +3 -0
  16. train/cpp/train-00013-of-00059.parquet +3 -0
  17. train/cpp/train-00014-of-00059.parquet +3 -0
  18. train/cpp/train-00015-of-00059.parquet +3 -0
  19. train/cpp/train-00016-of-00059.parquet +3 -0
  20. train/cpp/train-00017-of-00059.parquet +3 -0
  21. train/cpp/train-00018-of-00059.parquet +3 -0
  22. train/cpp/train-00019-of-00059.parquet +3 -0
  23. train/cpp/train-00020-of-00059.parquet +3 -0
  24. train/cpp/train-00021-of-00059.parquet +3 -0
  25. train/cpp/train-00022-of-00059.parquet +3 -0
  26. train/cpp/train-00023-of-00059.parquet +3 -0
  27. train/cpp/train-00024-of-00059.parquet +3 -0
  28. train/cpp/train-00025-of-00059.parquet +3 -0
  29. train/cpp/train-00026-of-00059.parquet +3 -0
  30. train/cpp/train-00027-of-00059.parquet +3 -0
  31. train/cpp/train-00028-of-00059.parquet +3 -0
  32. train/cpp/train-00029-of-00059.parquet +3 -0
  33. train/cpp/train-00030-of-00059.parquet +3 -0
  34. train/cpp/train-00031-of-00059.parquet +3 -0
  35. train/cpp/train-00032-of-00059.parquet +3 -0
  36. train/cpp/train-00033-of-00059.parquet +3 -0
  37. train/cpp/train-00034-of-00059.parquet +3 -0
  38. train/cpp/train-00035-of-00059.parquet +3 -0
  39. train/cpp/train-00036-of-00059.parquet +3 -0
  40. train/cpp/train-00037-of-00059.parquet +3 -0
  41. train/cpp/train-00038-of-00059.parquet +3 -0
  42. train/cpp/train-00039-of-00059.parquet +3 -0
  43. train/cpp/train-00040-of-00059.parquet +3 -0
  44. train/cpp/train-00041-of-00059.parquet +3 -0
  45. train/cpp/train-00042-of-00059.parquet +3 -0
  46. train/cpp/train-00043-of-00059.parquet +3 -0
  47. train/cpp/train-00044-of-00059.parquet +3 -0
  48. train/cpp/train-00045-of-00059.parquet +3 -0
  49. train/cpp/train-00046-of-00059.parquet +3 -0
  50. train/cpp/train-00047-of-00059.parquet +3 -0
.gitattributes CHANGED
@@ -1,6 +1,5 @@
1
  *.7z filter=lfs diff=lfs merge=lfs -text
2
  *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.avro filter=lfs diff=lfs merge=lfs -text
4
  *.bin filter=lfs diff=lfs merge=lfs -text
5
  *.bz2 filter=lfs diff=lfs merge=lfs -text
6
  *.ckpt filter=lfs diff=lfs merge=lfs -text
 
1
  *.7z filter=lfs diff=lfs merge=lfs -text
2
  *.arrow filter=lfs diff=lfs merge=lfs -text
 
3
  *.bin filter=lfs diff=lfs merge=lfs -text
4
  *.bz2 filter=lfs diff=lfs merge=lfs -text
5
  *.ckpt filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,488 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ pretty_name: nvidia/OpenCodeReasoning-2 (mirror)
4
+ source_datasets:
5
+ - nvidia/OpenCodeReasoning-2
6
+ tags:
7
+ - laya
8
+ - laya-finetune
9
+ - mirror
10
+ - domain-code
11
+ - use-permissive
12
+ - genre-instruction
13
+ - label-binary
14
+ - annot-llm
15
+ task_categories:
16
+ - text-generation
17
+ size_categories:
18
+ - 100K<n<1M
19
+ configs:
20
+ - config_name: train
21
+ data_files:
22
+ - split: python
23
+ path: train/python/train-*
24
+ - split: cpp
25
+ path: train/cpp/train-*
26
+ dataset_info:
27
+ - config_name: train
28
+ features:
29
+ - name: question
30
+ dtype: string
31
+ - name: r1_generation
32
+ dtype: string
33
+ - name: qwq_critique
34
+ dtype: string
35
+ - name: solution
36
+ dtype: string
37
+ - name: judgement
38
+ dtype: string
39
+ - name: pass_rate
40
+ dtype: string
41
+ - name: source
42
+ dtype: string
43
+ - name: license
44
+ dtype: string
45
+ - name: dataset
46
+ dtype: string
47
+ - name: split
48
+ dtype: string
49
+ - name: difficulty
50
+ dtype: string
51
+ - name: index
52
+ dtype: string
53
+ - name: id
54
+ dtype: string
55
+ - name: question_id
56
+ dtype: string
57
+ splits:
58
+ - name: python
59
+ num_bytes: 72296224095
60
+ num_examples: 1398166
61
+ - name: cpp
62
+ num_bytes: 44739645805
63
+ num_examples: 1174475
64
+ ---
65
+
66
+ # nvidia/OpenCodeReasoning-2(複製)
67
+
68
+ ## データの内容
69
+
70
+ 競技プログラミングの問題に対する Python と C++ の解答と批評のデータ。1 行が 1 つの応答で、R1 の解答 `r1_generation` とそのコード `solution`、QwQ の批評 `qwq_critique` と判定 `judgement`、通過率 `pass_rate` を持つ。問題は TACO・APPS・CodeContests・open-r1/codeforces から集め、解答は R1、批評は QwQ が生成した。問題文の `question` は空のままなので、別途取得する必要がある。
71
+
72
+ ## データの概要
73
+
74
+ | 項目 | 値 |
75
+ |---|---|
76
+ | 行数 | 約 2,164,812(1 構成・2 分割の合計) |
77
+ | 列数 | 14 |
78
+ | 容量 | 49.41 GB(ファイル 131 本) |
79
+ | ファイルの形式 | parquet 129 |
80
+ | 公開 | public |
81
+
82
+ ### 構成と分割
83
+
84
+ | 構成(config) | 分割(split)ごとの行数 | 列数 |
85
+ |---|---|---:|
86
+ | `train` | `python` 約 1,422,489、`cpp` 約 742,323 | 14 |
87
+
88
+ ### 列(構成 `train`・分割 `python`)
89
+
90
+ | 列 | 型 | 先頭の行の値 |
91
+ |---|---|---|
92
+ | `question` | `string` | `-` |
93
+ | `r1_generation` | `string` | `<think> Okay, I need to solve this problem where…` |
94
+ | `qwq_critique` | `string` | `<think> Okay, let's see. I need to check if the …` |
95
+ | `solution` | `string` | `T = int(input()) for _ in range(T): s = inpu…` |
96
+ | `judgement` | `string` | `right` |
97
+ | `pass_rate` | `string` | `0.9` |
98
+ | `source` | `string` | `codechef` |
99
+ | `license` | `string` | `apache-2.0` |
100
+ | `dataset` | `string` | `taco` |
101
+ | `split` | `string` | `train` |
102
+ | `difficulty` | `string` | `UNKNOWN_DIFFICULTY` |
103
+ | `index` | `string` | `20120` |
104
+ | `id` | `string` | `21306138af031d61bb31cd6636057168` |
105
+ | `question_id` | `string` | `c0d4209f929db2b5bf3526a47a2520b0` |
106
+
107
+ 行数と列は HF のデータセットビューアの集計(元のデータセットの現在の版で数えたもの)。全データセットの一覧は [HYUKI5/dataset-catalog](https://huggingface.co/datasets/HYUKI5/dataset-catalog) にある。
108
+
109
+ ## 複製について
110
+
111
+ [`nvidia/OpenCodeReasoning-2`](https://huggingface.co/datasets/nvidia/OpenCodeReasoning-2) をリビジョン `eadf535931451525f3e5621d0f960c240bc62fd9` の時点でそのまま複製したもの。中身は変えていない。判断モデル Laya(`convaiinnovations/laya`)の微調整に使う候補として、調査メモ(`Laya 学習用データセット調査`)に載せたデータを集めている。
112
+
113
+ ## 出典
114
+
115
+ - 元のデータセット: https://huggingface.co/datasets/nvidia/OpenCodeReasoning-2
116
+ - 複製したリビジョン: `eadf535931451525f3e5621d0f960c240bc62fd9`(2025-05-17 00:19:15+00:00)
117
+ - 元のライセンス表記: `cc-by-4.0`
118
+
119
+ ## 論文
120
+
121
+ - 元のカードに論文へのリンクは見つからなかった
122
+
123
+ ## アノテーションの方法
124
+
125
+ **データセットの作成日**
126
+
127
+ 2025 年 3 月 〜 2025 年 5 月
128
+
129
+ ## 微調整に使うときの注意
130
+
131
+ - 調査メモの台帳での区分: A(許諾型のライセンスだけで、疑義の注記が無い)。区分は記載の文言で機械的に付けたもので、法的な判定ではない。学習に入れる前に元のカードとライセンスの原文で確かめる。
132
+ - Laya の入力は 2,048 token まで(ModernBERT-large / mmBERT)。長い本文は先頭から黙って切られるので、切れる行は事前に除くか、要約・切り出しをしてから入れる。
133
+ - 分割は記事・文書単位で行い、同じ本文から作った別の問いを学習側と較正側に分けない。温度と閾値は学習に使っていない分割で別々に当てる。
134
+
135
+ ## 調査メモの記述
136
+
137
+ | メモ | 節 | ライセンス(記載) | 確認 | 注記 |
138
+ |---|---|---|---|---|
139
+ | `nvidia_nemotron.md` | 付録. 取得した nvidia 組織のデータセット全件の簡易一覧 (L378) | cc-by-4.0 | 確認済 | 確認印なし(各ファイルの凡例により確認済扱い) / 原文注記: × 数学・コード・科学・計測 |
140
+
141
+ ## 元のカード(日本語訳)
142
+
143
+ 以下は元のデータセットのカードの本文を日本語に訳したもの(機械翻訳)。訳に疑問があるときは、末尾の原文を確かめる。
144
+
145
+ ---
146
+
147
+ # OpenCodeReasoning-2: コード生成と批評における推論のための大規模データセット
148
+
149
+ ## データセットの説明
150
+
151
+ OpenCodeReasoning-2 は、コーディングのための推論ベースの合成データセットとして現時点で最大のものであり、34,799 の一意の競技プログラミング問題にわたって、Python で 1.4M、C++ で 1.1M のサンプルを含む。
152
+ OpenCodeReasoning-2 は、コード補完とコード批評の教師あり微調整(SFT)タスク向けに設計されている。
153
+
154
+ - [GitHub リポジトリ](https://github.com/NVIDIA/NeMo-Skills) - SFT の実行に使われた完全なパイプラインにアクセスできる。
155
+
156
+ このデータセットは、商用・非商用のどちらでも使える。
157
+
158
+ ## データの分布
159
+
160
+ - CodeForces の問題は http://codeforces.com に由来する。
161
+ - 問題の集合は、TACO (https://huggingface.co/datasets/BAAI/TACO)、APPS (https://huggingface.co/datasets/codeparrot/apps)、CodeContests
162
+ (https://huggingface.co/datasets/deepmind/code_contests)、open-r1/codeforces (https://huggingface.co/datasets/open-r1/codeforces) から集めた。
163
+ - CodeContests と open-r1/codeforces のテスト分割は含めていない。
164
+ - 解答の応答は R1 が、批評の応答は QwQ が生成した。
165
+
166
+ ### Python
167
+ | Source | # Question | #Sample |
168
+ |:---------------|:-----------|:-------------|
169
+ | AIZU | 2150 | 71,681 |
170
+ | AtCoder | 2080 | 64,468 |
171
+ | CodeChef | 3869 | 120,040 |
172
+ | CodeForces | 15641 | 834,523 |
173
+ | Codewars | 2506 | 79,771 |
174
+ | GeeksForGeeks | 2670 | 58,154 |
175
+ | HackerEarth | 2285 | 73,559 |
176
+ | HackerRank | 912 | 26,106 |
177
+ | Kattis | 1235 | 39,938 |
178
+ | LeetCode | 777 | 29,926 |
179
+ | 合計 | 34,125 | 1,398,166 |
180
+
181
+ ### C++
182
+ | Source | # Question | #Sample |
183
+ |:---------------|:-----------|:-------------|
184
+ | AIZU | 2067 | 35,471 |
185
+ | AtCoder | 1988 | 62,493 |
186
+ | CodeChef | 3830 | 171,882 |
187
+ | CodeForces | 11887 | 355,180 |
188
+ | Codewars | 2492 | 155,162 |
189
+ | GeeksForGeeks | 2668 | 167,610 |
190
+ | HackerEarth | 2273 | 82,765 |
191
+ | HackerRank | 903 | 43,867 |
192
+ | Kattis | 1209 | 49,699 |
193
+ | LeetCode | 775 | 50,346 |
194
+ | 合計 | 30,092 | 1,174,475 |
195
+
196
+
197
+ ## データフィールド
198
+ |Field|Type|Description|
199
+ |:---|:---|:---|
200
+ |id|string|各データインスタンスの一意の ID|
201
+ |question_id|string|各問題の一意の ID|
202
+ |question|string|入力となる競技プログラミングの問題。ここでは空のままにしている。取得方法は「使い方」の節を参照。|
203
+ |r1_generation|string|R1 の応答。|
204
+ |qwq_critique|string|QwQ の応答。|
205
+ |solution|string|R1 の応答のうちコード部分のみ。|
206
+ |judgement|string|QwQ の応答からの判定(正解・不正解)のみ。|
207
+ |pass_rate|float|[0, 1] の範囲の値、または -1(ユニットテストが不足している、または実行システムで検証できなかった)。|
208
+ |dataset|string|この問題の収集元データセットの名前(例: "apps"、"taco"、"code_contests")。|
209
+ |license|string|データセットに付随するライセンス(例: "mit"、"apache-2.0"、"cc-by-4.0")。|
210
+ |split|string|この問題の収集元データセットの分割の名前(例: "train"、"valid"、"test")。|
211
+ |source|string|競技プログラミングのプラットフォームの名前(例: CodeForces、CodeChef)。|
212
+ |difficulty|string|入力された問題の難易度ラベル。|
213
+ |index|string|APPS/TACO データセットから入力された問題を取り出すためのインデックス(train-extra 分割でのみ利用可能)。|
214
+
215
+
216
+ ## 使い方
217
+
218
+ ```
219
+ from tqdm import tqdm
220
+ from datasets import load_dataset
221
+
222
+ hf_datasets = {
223
+ "taco": load_dataset("BAAI/TACO", trust_remote_code=True),
224
+ "apps": load_dataset("codeparrot/apps", trust_remote_code=True),
225
+ "code_contests": load_dataset("deepmind/code_contests"),
226
+ "open-r1/codeforces": load_dataset("open-r1/codeforces")
227
+ }
228
+
229
+
230
+ def get_question(ds_name, split, index):
231
+ benchmark = hf_datasets[ds_name][split][int(index)]
232
+ if ds_name == "code_contests":
233
+ if not benchmark["description"]:
234
+ return None
235
+ return benchmark["description"]
236
+ elif ds_name in ["taco", "apps"]:
237
+ return benchmark["question"]
238
+ elif ds_name == "open-r1/codeforces":
239
+ if not benchmark["description"]:
240
+ return None
241
+ question = benchmark["description"]
242
+ if benchmark["input_format"]:
243
+ question += "\n\nInput\n\n" + benchmark["input_format"]
244
+ if benchmark["output_format"]:
245
+ question += "\n\nOutput\n\n" + benchmark["output_format"]
246
+ if benchmark["examples"]:
247
+ question += "\n\nExamples"
248
+ for example in benchmark["examples"]:
249
+ if "input" in example:
250
+ question += "\n\nInput\n\n" + example["input"]
251
+ if "output" in example:
252
+ question += "\n\nOutput\n\n" + example["output"]
253
+ if benchmark["note"]:
254
+ question += "\n\nNote\n\n" + benchmark["note"]
255
+ return question
256
+
257
+ return None
258
+
259
+
260
+ ocr2_dataset = load_dataset("nvidia/OpenCodeReasoning-2")
261
+ for ocr2_ds in [ocr2_dataset["python"], ocr2_dataset["cpp"]]:
262
+ for ocr2_ds_item in tqdm(ocr2_ds):
263
+ assert ocr2_ds_item["dataset"] in ["taco", "apps", "code_contests", "open-r1/codeforces"]
264
+ ds_name, ds_split, ds_index = ocr2_ds_item["dataset"], ocr2_ds_item["split"], int(ocr2_ds_item["index"])
265
+ question = get_question(ds_name, ds_split, ds_index)
266
+ assert question is not None
267
+ assert ocr2_ds_item["question"] == "-"
268
+ ocr2_ds_item["question"] = question
269
+ ```
270
+
271
+ ## データセットの所有者
272
+ NVIDIA Corporation
273
+
274
+
275
+ ## データセットの作成日
276
+ 2025 年 3 月 〜 2025 年 5 月
277
+
278
+
279
+ ## ライセンス/利用規約
280
+
281
+ 準拠条件: 準拠条件: このデータセットは、https://creativecommons.org/licenses/by/4.0/legalcode で入手できる Creative Commons Attribution 4.0 International License(CC BY 4.0)でライセンスされている。
282
+
283
+ スクリプトに関する注意: 以下のスクリプトを実行して、データセットを元のソースから取得してよい。基礎となるデータセットは、それぞれのライセンス条件に従って元のソースから入手できる。
284
+
285
+ **データの開発者:** NVIDIA
286
+
287
+ ### 用途: <br>
288
+ コード生成とコード批評に LLM を特化させるために、大規模言語モデル(LLM)を訓練する開発者。 <br>
289
+
290
+ ### 公開日: <br>
291
+ 05/15/2025 <br>
292
+
293
+
294
+ ## データのバージョン
295
+ 1.0 (05/15/2025)
296
+
297
+ ## データセットの特性
298
+
299
+ ** データ収集の方法<br>
300
+ * [ハイブリッド: 自動、合成] <br>
301
+
302
+ ** ラベリングの方法<be>
303
+ * [ハイブリッド: 自動、合成] <br>
304
+
305
+ ## 想定される用途
306
+
307
+ OpenCodeReasoning-2 データセットは、コミュニティがオープンなモデルを改善し続けるために使われることを想定している。このデータは、モデルの訓練に自由に使ってよい。**ただし、利用者が使うことを選んだデータセットごとに、そのライセンスが目的に適合するかを確かめる責任は利用者にある**。
308
+
309
+
310
+ ## 倫理上の配慮:
311
+
312
+ NVIDIA は、信頼できる AI は共有の責任であると考えており、幅広い AI 応用の開発を可能にするための方針と実践を整えている。利用者は、利用規約に従ってダウンロードまたは利用する場合、関連する業界と用途の要件をこのモデルが満たすか、また予期しない製品の誤用に対処できるかを、社内のモデルチームと確かめるべきである。
313
+
314
+ セキュリティ上の脆弱性や NVIDIA の AI に関する懸念は、[こちら](https://www.nvidia.com/en-us/support/submit-security-vulnerability/) から報告してほしい。
315
+
316
+ <details>
317
+ <summary>原文(英語)</summary>
318
+
319
+ # OpenCodeReasoning-2: A Large-scale Dataset for Reasoning in Code Generation and Critique
320
+
321
+ ## Dataset Description
322
+
323
+ OpenCodeReasoning-2 is the largest reasoning-based synthetic dataset to date for coding, comprising 1.4M samples in Python and 1.1M samples in C++ across 34,799 unique competitive programming questions.
324
+ OpenCodeReasoning-2 is designed for supervised fine-tuning (SFT) tasks of code completion and code critique.
325
+
326
+ - [Github Repo](https://github.com/NVIDIA/NeMo-Skills) - Access the complete pipeline used to perform SFT.
327
+
328
+ This dataset is ready for commercial/non-commercial use.
329
+
330
+ ## Data distribution
331
+
332
+ - The CodeForces problems are sourced from http://codeforces.com.
333
+ - The question collections are gathered from TACO (https://huggingface.co/datasets/BAAI/TACO), APPS (https://huggingface.co/datasets/codeparrot/apps), CodeContests
334
+ (https://huggingface.co/datasets/deepmind/code_contests), and open-r1/codeforces (https://huggingface.co/datasets/open-r1/codeforces).
335
+ - We do not include the test split of CodeContests and open-r1/codeforces.
336
+ - The solution responses are generated by R1 and critique responses are generated by QwQ.
337
+
338
+ ### Python
339
+ | Source | # Question | #Sample |
340
+ |:---------------|:-----------|:-------------|
341
+ | AIZU | 2150 | 71,681 |
342
+ | AtCoder | 2080 | 64,468 |
343
+ | CodeChef | 3869 | 120,040 |
344
+ | CodeForces | 15641 | 834,523 |
345
+ | Codewars | 2506 | 79,771 |
346
+ | GeeksForGeeks | 2670 | 58,154 |
347
+ | HackerEarth | 2285 | 73,559 |
348
+ | HackerRank | 912 | 26,106 |
349
+ | Kattis | 1235 | 39,938 |
350
+ | LeetCode | 777 | 29,926 |
351
+ | Total | 34,125 | 1,398,166 |
352
+
353
+ ### C++
354
+ | Source | # Question | #Sample |
355
+ |:---------------|:-----------|:-------------|
356
+ | AIZU | 2067 | 35,471 |
357
+ | AtCoder | 1988 | 62,493 |
358
+ | CodeChef | 3830 | 171,882 |
359
+ | CodeForces | 11887 | 355,180 |
360
+ | Codewars | 2492 | 155,162 |
361
+ | GeeksForGeeks | 2668 | 167,610 |
362
+ | HackerEarth | 2273 | 82,765 |
363
+ | HackerRank | 903 | 43,867 |
364
+ | Kattis | 1209 | 49,699 |
365
+ | LeetCode | 775 | 50,346 |
366
+ | Total | 30,092 | 1,174,475 |
367
+
368
+
369
+ ## Data Fields
370
+ |Field|Type|Description|
371
+ |:---|:---|:---|
372
+ |id|string|A unique id for each data instance|
373
+ |question_id|string|A unique id for each question|
374
+ |question|string|The input competitive programming question. We leave it blank. Check the how-to-use-it section to get them.|
375
+ |r1_generation|string|R1's response.|
376
+ |qwq_critique|string|QwQ's response.|
377
+ |solution|string|Only the code portion of R1's response.|
378
+ |judgement|string|Only the judgement (right/wrong) from QwQ's response.|
379
+ |pass_rate|float|Value in range [0, 1] or -1 (not enough unit tests or execution system couldn't validate).|
380
+ |dataset|string|The name of the dataset from which this question is collected from (e.g., "apps", "taco", "code_contests")|
381
+ |license|string|The license associated with the dataset (e.g., "mit", "apache-2.0", "cc-by-4.0")|
382
+ |split|string|The name of the split of the dataset from which this question is collected from (e.g., "train", "valid", "test")|
383
+ |source|string|The name of the competitive programming platform (e.g., CodeForces, CodeChef)|
384
+ |difficulty|string|A difficulty label for the input question.|
385
+ |index|string|An index to retrieve the input question from APPS/TACO dataset (only available for train-extra split).|
386
+
387
+
388
+ ## How to use it
389
+
390
+ ```
391
+ from tqdm import tqdm
392
+ from datasets import load_dataset
393
+
394
+ hf_datasets = {
395
+ "taco": load_dataset("BAAI/TACO", trust_remote_code=True),
396
+ "apps": load_dataset("codeparrot/apps", trust_remote_code=True),
397
+ "code_contests": load_dataset("deepmind/code_contests"),
398
+ "open-r1/codeforces": load_dataset("open-r1/codeforces")
399
+ }
400
+
401
+
402
+ def get_question(ds_name, split, index):
403
+ benchmark = hf_datasets[ds_name][split][int(index)]
404
+ if ds_name == "code_contests":
405
+ if not benchmark["description"]:
406
+ return None
407
+ return benchmark["description"]
408
+ elif ds_name in ["taco", "apps"]:
409
+ return benchmark["question"]
410
+ elif ds_name == "open-r1/codeforces":
411
+ if not benchmark["description"]:
412
+ return None
413
+ question = benchmark["description"]
414
+ if benchmark["input_format"]:
415
+ question += "\n\nInput\n\n" + benchmark["input_format"]
416
+ if benchmark["output_format"]:
417
+ question += "\n\nOutput\n\n" + benchmark["output_format"]
418
+ if benchmark["examples"]:
419
+ question += "\n\nExamples"
420
+ for example in benchmark["examples"]:
421
+ if "input" in example:
422
+ question += "\n\nInput\n\n" + example["input"]
423
+ if "output" in example:
424
+ question += "\n\nOutput\n\n" + example["output"]
425
+ if benchmark["note"]:
426
+ question += "\n\nNote\n\n" + benchmark["note"]
427
+ return question
428
+
429
+ return None
430
+
431
+
432
+ ocr2_dataset = load_dataset("nvidia/OpenCodeReasoning-2")
433
+ for ocr2_ds in [ocr2_dataset["python"], ocr2_dataset["cpp"]]:
434
+ for ocr2_ds_item in tqdm(ocr2_ds):
435
+ assert ocr2_ds_item["dataset"] in ["taco", "apps", "code_contests", "open-r1/codeforces"]
436
+ ds_name, ds_split, ds_index = ocr2_ds_item["dataset"], ocr2_ds_item["split"], int(ocr2_ds_item["index"])
437
+ question = get_question(ds_name, ds_split, ds_index)
438
+ assert question is not None
439
+ assert ocr2_ds_item["question"] == "-"
440
+ ocr2_ds_item["question"] = question
441
+ ```
442
+
443
+ ## Dataset Owner(s)
444
+ NVIDIA Corporation
445
+
446
+
447
+ ## Dataset Creation Date
448
+ March 2025 - May 2025
449
+
450
+
451
+ ## License/Terms of Use
452
+
453
+ GOVERNING TERMS: GOVERNING TERMS: This dataset is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0) available at https://creativecommons.org/licenses/by/4.0/legalcode.
454
+
455
+ NOTICE FOR SCRIPTS: You may run the scripts below to pull datasets from their original source. The underlying datasets are available from the original sources subject to their own license terms.
456
+
457
+ **Data Developer:** NVIDIA
458
+
459
+ ### Use Case: <br>
460
+ Developers training Large Language Models (LLMs) to specialize LLMs in code generation and code critique. <br>
461
+
462
+ ### Release Date: <br>
463
+ 05/15/2025 <br>
464
+
465
+ ## Data Version
466
+ 1.0 (05/15/2025)
467
+
468
+ ## Dataset Characterization
469
+
470
+ ** Data Collection Method<br>
471
+ * [Hybrid: Automated, Synthetic] <br>
472
+
473
+ ** Labeling Method<be>
474
+ * [Hybrid: Automated, Synthetic] <br>
475
+
476
+ ## Intended Usage
477
+
478
+ The OpenCodeReasoning-2 Dataset is intended to be used by the community to continue to improve open models. The data may be freely used to train models. **However, for
479
+ each dataset a user elects to use, the user is responsible for checking if the dataset license is fit for the intended purpose**.
480
+
481
+
482
+ ## Ethical Considerations:
483
+
484
+ 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.
485
+
486
+ Please report security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).
487
+
488
+ </details>
train/cpp/train-00000-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:007f55eb29ba98da72df27a30516de71a880d3f25b7ce875846a0891f8e15493
3
+ size 572990330
train/cpp/train-00001-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:29fd55e6c78647e7d05942a42f2d787623fb7e5d016c6b8fdd490564f6a6336d
3
+ size 455697930
train/cpp/train-00002-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f851f59ab32e377443bdcd44478218a5cb5ff7c0d0c6e38d67c7da704771c31f
3
+ size 381666101
train/cpp/train-00003-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:82e99357a573bdda53d018785c4252147fa8ecbec3dd65047a8afb0f92c7dbfc
3
+ size 382509417
train/cpp/train-00004-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5fc456f4b9c0b53537dcaf03f746479f475d4e16551b97cbfc44a1f080227fa2
3
+ size 385135300
train/cpp/train-00005-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ff76d2c1d233104ed2796d887c283555550fc11fddf9720d3ae6f9b8ca4b9dc1
3
+ size 383232805
train/cpp/train-00006-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:589f9e93f1c80a175054a6c99a0a913262b2898ed287bdd74c1a4bb05bbf07d8
3
+ size 388784472
train/cpp/train-00007-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a33c0180d3c31b849fade53fa3cc20806c18bde933a3ff6aa2e19860e9861167
3
+ size 384069067
train/cpp/train-00008-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1357d533263ce40cf9879e1e6233cdb09c9aa454eee3ea3204b7d162b38bca2b
3
+ size 382663251
train/cpp/train-00009-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a0142bd0cd00f166674836bfaa47c9c1bf19eb0649b38466e888ff8f4223102b
3
+ size 383466603
train/cpp/train-00010-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:35ed699c7cca6d3072a06d65911b955f3bde00f1aa3d77c9418afc16fc65cd53
3
+ size 382310898
train/cpp/train-00011-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a0c0b820779675c501fbd7dade0dc31609eb8c68db1eee3c20b9eb16e7cff6d1
3
+ size 383864973
train/cpp/train-00012-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1f9d11c2f9da178c52f8eb5ecf07ac7588ab36073b4d6ee28e1d67fa0ac37079
3
+ size 382447965
train/cpp/train-00013-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f0de649681529ad634a80ea0d4306e0d0ce0e7deed5f5be2cbd51b1c66df9ef4
3
+ size 372585770
train/cpp/train-00014-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:91be854de6921d60b5b437ec8ff7b78d56144830cf8803d149d4b0c1444e5fbb
3
+ size 346401652
train/cpp/train-00015-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b27bbe54e5e73e241f0024e004bfa315395befd9bd84d2314846b0f2bdbfc067
3
+ size 297590052
train/cpp/train-00016-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2f4fda47e52d7f167b8d71016f78beef7ceca0028becf81fdac46542e4d2e302
3
+ size 296492789
train/cpp/train-00017-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:00f57e7f9b2913644c2fbdfc672d88cfeabd6b7ba90db462c337ef141f151daf
3
+ size 298610234
train/cpp/train-00018-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:58ff9c22a84f41ce665d308a774cd621f267c5c615a3513cb784ff729183ac43
3
+ size 294899829
train/cpp/train-00019-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ef663127367f7e43c0335ab7edaa18b226e12aea132dfaea8ee08ce8b19151d7
3
+ size 285818586
train/cpp/train-00020-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:93cb0df5ceed1a2ae3cd191feb544aacc87bdd49ab68ca4fe10937a32683e94c
3
+ size 304451598
train/cpp/train-00021-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:033afefa18e29f468fcad6e3cc085a383162da863c0ddbb69edf1da6fb7edb25
3
+ size 297120911
train/cpp/train-00022-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:72f57a7dded79cd2216d341e7bfc4b2a4851d02cffcd2c97f7790a2b147e104d
3
+ size 295091206
train/cpp/train-00023-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0317b080f1da26563b6afebe405c335c8652529b2ae2f7ddf22899b28f315963
3
+ size 296194461
train/cpp/train-00024-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea2258578b540ff82e72f7272db2991ddb8c4cf5e20b9773f0a4952d22b2c0f3
3
+ size 300573567
train/cpp/train-00025-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e9a529dc113b7da047f2079333445e30f72bd0855f0638da57d974fd3625385c
3
+ size 298358303
train/cpp/train-00026-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2d29109394b37426c4b33c68714b7d78f496c3c7a6e8482085773a47dcd8b13e
3
+ size 300471976
train/cpp/train-00027-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:65f281f9c242e0ee43b4f2d8c383af32f310149d0a617b36c690dc30d132b3c1
3
+ size 297565570
train/cpp/train-00028-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:474e167e77c2353f6f9af62998364b53b25395b893b4fd7b3bdd0b886afb47ca
3
+ size 299473539
train/cpp/train-00029-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3388291fc96f67d991e6a59b1443b467ada16ff17ec37d3f8c4b34091a4d8143
3
+ size 299505136
train/cpp/train-00030-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:de604a1c1d38068d1081482eed4d4008dafea5b580c8be191c39cf99201df667
3
+ size 298465045
train/cpp/train-00031-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2cc01c496e71cdb1487a6dd1ee7ba2f3a6c267bbf8ddcbc785eab6cad708c00b
3
+ size 300471637
train/cpp/train-00032-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:783db1f907d105f9a896fcf08d83e5f1047f87b48a68cac319472f99a709da5c
3
+ size 297689961
train/cpp/train-00033-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b1b316bb6f2db554a638c6428906a5c55f43ea2f5c55551378c37f82cebcc4a
3
+ size 301558197
train/cpp/train-00034-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5a78e0ca66b52c5a7dffed64a3ceaf18abe7f3497c9d7b80bc789fb18b730d42
3
+ size 298575948
train/cpp/train-00035-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ddb6002c92c93d4c628a20daacfcd14b1bfea3b0cb4dd0bc58a69c9f5253be52
3
+ size 299170750
train/cpp/train-00036-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:04ed5d5479f06f080dedfc7019e629030a72afb696d9ac09511a7775d4be8563
3
+ size 297287901
train/cpp/train-00037-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e9e1a39a92db6ebf6f2ea6fb37c1267aba185801c7239c473606131a0ca691e6
3
+ size 300367029
train/cpp/train-00038-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4f56c7c25976e48a7d259708b3c24e9a3dd7a85467d4fd0307ff069bb34941af
3
+ size 298164567
train/cpp/train-00039-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:76fdbbc6f427da0033adc66584af83584bb5fdc789eb040923ad71bdf93c902a
3
+ size 299327185
train/cpp/train-00040-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f08c861800eef3557c2da8d2bb931d32288ea56426375a0320a62472569f19ba
3
+ size 299718029
train/cpp/train-00041-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:81ec0f42ad8d480542812bfbbdbc1fe485f341fd4f7895481dcae9130c4cad24
3
+ size 299056918
train/cpp/train-00042-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9b32263f170260db6781bad6eea9979cc26d39a5f6f203d13c13b3eaf6883481
3
+ size 298360024
train/cpp/train-00043-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:52b1e7812b5bfc5b4d28c94d6711b1e70b7d46a86da317914ed291ba2a4329e1
3
+ size 297591443
train/cpp/train-00044-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d8638d8d933033d90f577c789ab7ad442c14460f4861c4bb2ff5806f2a0e074f
3
+ size 298721664
train/cpp/train-00045-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a379702c35e7b8c805b2f5c9e93e41f44aaf08980b480c1616d49f12c3012419
3
+ size 297993724
train/cpp/train-00046-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6faebc4a27d378395241f6a59dbd3ae27c8718875d5a1d3424cda59f3d87a3ba
3
+ size 299430065
train/cpp/train-00047-of-00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f85d8ba1892b896026a8864776336897da0288563b25225e999f6826c2ca8757
3
+ size 298706241