Highgroundbkk Muennighoff commited on
Commit
da7ce98
·
0 Parent(s):

Duplicate from bigcode/humanevalpack

Browse files

Co-authored-by: Niklas Muennighoff <Muennighoff@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
12
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
13
+ *.model filter=lfs diff=lfs merge=lfs -text
14
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
15
+ *.npy filter=lfs diff=lfs merge=lfs -text
16
+ *.npz filter=lfs diff=lfs merge=lfs -text
17
+ *.onnx filter=lfs diff=lfs merge=lfs -text
18
+ *.ot filter=lfs diff=lfs merge=lfs -text
19
+ *.parquet filter=lfs diff=lfs merge=lfs -text
20
+ *.pb filter=lfs diff=lfs merge=lfs -text
21
+ *.pickle filter=lfs diff=lfs merge=lfs -text
22
+ *.pkl filter=lfs diff=lfs merge=lfs -text
23
+ *.pt filter=lfs diff=lfs merge=lfs -text
24
+ *.pth filter=lfs diff=lfs merge=lfs -text
25
+ *.rar filter=lfs diff=lfs merge=lfs -text
26
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
27
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ # Audio files - uncompressed
37
+ *.pcm filter=lfs diff=lfs merge=lfs -text
38
+ *.sam filter=lfs diff=lfs merge=lfs -text
39
+ *.raw filter=lfs diff=lfs merge=lfs -text
40
+ # Audio files - compressed
41
+ *.aac filter=lfs diff=lfs merge=lfs -text
42
+ *.flac filter=lfs diff=lfs merge=lfs -text
43
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
44
+ *.ogg filter=lfs diff=lfs merge=lfs -text
45
+ *.wav filter=lfs diff=lfs merge=lfs -text
46
+ # Image files - uncompressed
47
+ *.bmp filter=lfs diff=lfs merge=lfs -text
48
+ *.gif filter=lfs diff=lfs merge=lfs -text
49
+ *.png filter=lfs diff=lfs merge=lfs -text
50
+ *.tiff filter=lfs diff=lfs merge=lfs -text
51
+ # Image files - compressed
52
+ *.jpg filter=lfs diff=lfs merge=lfs -text
53
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
54
+ *.webp filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,398 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ pretty_name: HumanEvalPack
4
+ language_creators:
5
+ - expert-generated
6
+ multilinguality:
7
+ - multilingual
8
+ language:
9
+ - code
10
+ tags:
11
+ - code
12
+ dataset_info:
13
+ - config_name: cpp
14
+ features:
15
+ - name: task_id
16
+ dtype: string
17
+ - name: prompt
18
+ dtype: string
19
+ - name: declaration
20
+ dtype: string
21
+ - name: canonical_solution
22
+ dtype: string
23
+ - name: buggy_solution
24
+ dtype: string
25
+ - name: bug_type
26
+ dtype: string
27
+ - name: failure_symptoms
28
+ dtype: string
29
+ - name: entry_point
30
+ dtype: string
31
+ - name: import
32
+ dtype: string
33
+ - name: test_setup
34
+ dtype: string
35
+ - name: test
36
+ dtype: string
37
+ - name: example_test
38
+ dtype: string
39
+ - name: signature
40
+ dtype: string
41
+ - name: docstring
42
+ dtype: string
43
+ - name: instruction
44
+ dtype: string
45
+ splits:
46
+ - name: test
47
+ num_bytes: 469111
48
+ num_examples: 164
49
+ download_size: 193981
50
+ dataset_size: 469111
51
+ - config_name: go
52
+ features:
53
+ - name: task_id
54
+ dtype: string
55
+ - name: prompt
56
+ dtype: string
57
+ - name: declaration
58
+ dtype: string
59
+ - name: canonical_solution
60
+ dtype: string
61
+ - name: buggy_solution
62
+ dtype: string
63
+ - name: bug_type
64
+ dtype: string
65
+ - name: failure_symptoms
66
+ dtype: string
67
+ - name: entry_point
68
+ dtype: string
69
+ - name: import
70
+ dtype: string
71
+ - name: test_setup
72
+ dtype: string
73
+ - name: test
74
+ dtype: string
75
+ - name: example_test
76
+ dtype: string
77
+ - name: signature
78
+ dtype: string
79
+ - name: docstring
80
+ dtype: string
81
+ - name: instruction
82
+ dtype: string
83
+ splits:
84
+ - name: test
85
+ num_bytes: 463234
86
+ num_examples: 164
87
+ download_size: 198394
88
+ dataset_size: 463234
89
+ - config_name: java
90
+ features:
91
+ - name: task_id
92
+ dtype: string
93
+ - name: prompt
94
+ dtype: string
95
+ - name: declaration
96
+ dtype: string
97
+ - name: canonical_solution
98
+ dtype: string
99
+ - name: buggy_solution
100
+ dtype: string
101
+ - name: bug_type
102
+ dtype: string
103
+ - name: failure_symptoms
104
+ dtype: string
105
+ - name: entry_point
106
+ dtype: string
107
+ - name: import
108
+ dtype: string
109
+ - name: test_setup
110
+ dtype: string
111
+ - name: test
112
+ dtype: string
113
+ - name: example_test
114
+ dtype: string
115
+ - name: signature
116
+ dtype: string
117
+ - name: docstring
118
+ dtype: string
119
+ - name: instruction
120
+ dtype: string
121
+ splits:
122
+ - name: test
123
+ num_bytes: 589440
124
+ num_examples: 164
125
+ download_size: 210440
126
+ dataset_size: 589440
127
+ - config_name: js
128
+ features:
129
+ - name: task_id
130
+ dtype: string
131
+ - name: prompt
132
+ dtype: string
133
+ - name: declaration
134
+ dtype: string
135
+ - name: canonical_solution
136
+ dtype: string
137
+ - name: buggy_solution
138
+ dtype: string
139
+ - name: bug_type
140
+ dtype: string
141
+ - name: failure_symptoms
142
+ dtype: string
143
+ - name: entry_point
144
+ dtype: string
145
+ - name: import
146
+ dtype: string
147
+ - name: test_setup
148
+ dtype: string
149
+ - name: test
150
+ dtype: string
151
+ - name: example_test
152
+ dtype: string
153
+ - name: signature
154
+ dtype: string
155
+ - name: docstring
156
+ dtype: string
157
+ - name: instruction
158
+ dtype: string
159
+ splits:
160
+ - name: test
161
+ num_bytes: 435189
162
+ num_examples: 164
163
+ download_size: 194044
164
+ dataset_size: 435189
165
+ - config_name: python
166
+ features:
167
+ - name: task_id
168
+ dtype: string
169
+ - name: prompt
170
+ dtype: string
171
+ - name: declaration
172
+ dtype: string
173
+ - name: canonical_solution
174
+ dtype: string
175
+ - name: buggy_solution
176
+ dtype: string
177
+ - name: bug_type
178
+ dtype: string
179
+ - name: failure_symptoms
180
+ dtype: string
181
+ - name: entry_point
182
+ dtype: string
183
+ - name: import
184
+ dtype: string
185
+ - name: test_setup
186
+ dtype: string
187
+ - name: test
188
+ dtype: string
189
+ - name: example_test
190
+ dtype: string
191
+ - name: signature
192
+ dtype: string
193
+ - name: docstring
194
+ dtype: string
195
+ - name: instruction
196
+ dtype: string
197
+ splits:
198
+ - name: test
199
+ num_bytes: 423013
200
+ num_examples: 164
201
+ download_size: 191279
202
+ dataset_size: 423013
203
+ - config_name: rust
204
+ features:
205
+ - name: task_id
206
+ dtype: string
207
+ - name: prompt
208
+ dtype: string
209
+ - name: declaration
210
+ dtype: string
211
+ - name: canonical_solution
212
+ dtype: string
213
+ - name: buggy_solution
214
+ dtype: string
215
+ - name: bug_type
216
+ dtype: string
217
+ - name: failure_symptoms
218
+ dtype: string
219
+ - name: entry_point
220
+ dtype: string
221
+ - name: import
222
+ dtype: string
223
+ - name: test_setup
224
+ dtype: string
225
+ - name: test
226
+ dtype: string
227
+ - name: example_test
228
+ dtype: string
229
+ - name: signature
230
+ dtype: string
231
+ - name: docstring
232
+ dtype: string
233
+ - name: instruction
234
+ dtype: string
235
+ splits:
236
+ - name: test
237
+ num_bytes: 450539
238
+ num_examples: 164
239
+ download_size: 168464
240
+ dataset_size: 450539
241
+ configs:
242
+ - config_name: cpp
243
+ data_files:
244
+ - split: test
245
+ path: cpp/test-*
246
+ - config_name: go
247
+ data_files:
248
+ - split: test
249
+ path: go/test-*
250
+ - config_name: java
251
+ data_files:
252
+ - split: test
253
+ path: java/test-*
254
+ - config_name: js
255
+ data_files:
256
+ - split: test
257
+ path: js/test-*
258
+ - config_name: python
259
+ data_files:
260
+ - split: test
261
+ path: python/test-*
262
+ default: true
263
+ - config_name: rust
264
+ data_files:
265
+ - split: test
266
+ path: rust/test-*
267
+ ---
268
+
269
+ ![Octopack](https://github.com/bigcode-project/octopack/blob/31f3320f098703c7910e43492c39366eeea68d83/banner.png?raw=true)
270
+
271
+ # Dataset Card for HumanEvalPack
272
+
273
+ ## Table of Contents
274
+ - [Table of Contents](#table-of-contents)
275
+ - [Dataset Description](#dataset-description)
276
+ - [Dataset Summary](#dataset-summary)
277
+ - [Languages](#languages)
278
+ - [Dataset Structure](#dataset-structure)
279
+ - [Data Instances](#data-instances)
280
+ - [Data Fields](#data-fields)
281
+ - [Data Splits](#data-splits)
282
+ - [Dataset Creation](#dataset-creation)
283
+ - [Curation Rationale](#curation-rationale)
284
+ - [Source Data](#source-data)
285
+ - [Annotations](#annotations)
286
+ - [Additional Information](#additional-information)
287
+ - [Licensing Information](#licensing-information)
288
+ - [Citation Information](#citation-information)
289
+ - [Contributions](#contributions)
290
+
291
+ ## Dataset Description
292
+
293
+ - **Repository:** https://github.com/bigcode-project/octopack
294
+ - **Paper:** [OctoPack: Instruction Tuning Code Large Language Models](https://arxiv.org/abs/2308.07124)
295
+ - **Point of Contact:** [Niklas Muennighoff](mailto:n.muennighoff@gmail.com)
296
+
297
+ ### Dataset Summary
298
+
299
+ > HumanEvalPack is an extension of OpenAI's HumanEval to cover 6 total languages across 3 tasks. The Python split is exactly the same as OpenAI's Python HumanEval. The other splits are translated by humans (similar to HumanEval-X but with additional cleaning, see [here](https://github.com/bigcode-project/octopack/tree/main/evaluation/create/humaneval-x#modifications-muennighoff)). Refer to the [OctoPack paper](https://arxiv.org/abs/2308.07124) for more details.
300
+ >
301
+ - **Languages:** Python, JavaScript, Java, Go, C++, Rust
302
+ - **OctoPack🐙🎒:**
303
+
304
+ <table>
305
+ <tr>
306
+ <th>Data</t>
307
+ <td><a href=https://huggingface.co/datasets/bigcode/commitpack>CommitPack</a></td>
308
+ <td>4TB of GitHub commits across 350 programming languages</td>
309
+ </tr>
310
+ <tr>
311
+ <th></t>
312
+ <td><a href=https://huggingface.co/datasets/bigcode/commitpackft>CommitPackFT</a></td>
313
+ <td>Filtered version of CommitPack for high-quality commit messages that resemble instructions</td>
314
+ </tr>
315
+ <tr>
316
+ <th>Model</t>
317
+ <td><a href=https://huggingface.co/bigcode/octocoder>OctoCoder</a></td>
318
+ <td>StarCoder (16B parameters) instruction tuned on CommitPackFT + OASST</td>
319
+ </tr>
320
+ <tr>
321
+ <th></t>
322
+ <td><a href=https://huggingface.co/bigcode/octogeex>OctoGeeX</a></td>
323
+ <td>CodeGeeX2 (6B parameters) instruction tuned on CommitPackFT + OASST</td>
324
+ </tr>
325
+ <tr>
326
+ <th>Evaluation</t>
327
+ <td><a href=https://huggingface.co/datasets/bigcode/humanevalpack>HumanEvalPack</a></td>
328
+ <td>Extension of OpenAI's HumanEval to cover 3 scenarios across 6 languages</td>
329
+ </tr>
330
+ </table>
331
+
332
+ ## Usage
333
+
334
+ ```python
335
+ # pip install -q datasets
336
+ from datasets import load_dataset
337
+ # Languages: "python", "js", "java", "go", "cpp", "rust"
338
+ ds = load_dataset("bigcode/humanevalpack", "python")["test"]
339
+ ds[0]
340
+ ```
341
+
342
+ ## Dataset Structure
343
+
344
+
345
+ ### Data Instances
346
+
347
+
348
+ An example looks as follows:
349
+
350
+ ```json
351
+ {
352
+ "task_id": "Python/0",
353
+ "prompt": "from typing import List\n\n\ndef has_close_elements(numbers: List[float], threshold: float) -> bool:\n \"\"\" Check if in given list of numbers, are any two numbers closer to each other than\n given threshold.\n >>> has_close_elements([1.0, 2.0, 3.0], 0.5)\n False\n >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)\n True\n \"\"\"\n",
354
+ "declaration": "from typing import List\n\n\ndef has_close_elements(numbers: List[float], threshold: float) -> bool:\n",
355
+ "canonical_solution": " for idx, elem in enumerate(numbers):\n for idx2, elem2 in enumerate(numbers):\n if idx != idx2:\n distance = abs(elem - elem2)\n if distance < threshold:\n return True\n\n return False\n",
356
+ "buggy_solution": " for idx, elem in enumerate(numbers):\n for idx2, elem2 in enumerate(numbers):\n if idx != idx2:\n distance = elem - elem2\n if distance < threshold:\n return True\n\n return False\n",
357
+ "bug_type": "missing logic",
358
+ "failure_symptoms": "incorrect output",
359
+ "entry_point": "has_close_elements",
360
+ "import": ""
361
+ "test_setup": ""
362
+ "test": "\n\n\n\n\ndef check(has_close_elements):\n assert has_close_elements([1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3) == True\n assert has_close_elements([1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.05) == False\n assert has_close_elements([1.0, 2.0, 5.9, 4.0, 5.0], 0.95) == True\n assert has_close_elements([1.0, 2.0, 5.9, 4.0, 5.0], 0.8) == False\n assert has_close_elements([1.0, 2.0, 3.0, 4.0, 5.0, 2.0], 0.1) == True\n assert has_close_elements([1.1, 2.2, 3.1, 4.1, 5.1], 1.0) == True\n assert has_close_elements([1.1, 2.2, 3.1, 4.1, 5.1], 0.5) == False\n\ncheck(has_close_elements)",
363
+ "example_test": "def check(has_close_elements):\n assert has_close_elements([1.0, 2.0, 3.0], 0.5) == False\n assert has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) == True\ncheck(has_close_elements)\n",
364
+ "signature": "has_close_elements(numbers: List[float], threshold: float) -> bool",
365
+ "docstring": "Check if in given list of numbers, are any two numbers closer to each other than\ngiven threshold.\n>>> has_close_elements([1.0, 2.0, 3.0], 0.5)\nFalse\n>>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)\nTrue",
366
+ "instruction": "Write a Python function `has_close_elements(numbers: List[float], threshold: float) -> bool` to solve the following problem:\nCheck if in given list of numbers, are any two numbers closer to each other than\ngiven threshold.\n>>> has_close_elements([1.0, 2.0, 3.0], 0.5)\nFalse\n>>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)\nTrue"
367
+ }
368
+ ```
369
+
370
+ ### Data Fields
371
+
372
+ The data fields are the same among all splits:
373
+ - `task_id`: Indicates the language (Python/JavaScript/Java/Go/C++/Rust) and task id (from 0 to 163) of the problem
374
+ - `prompt`: the prompt for models relying on code continuation
375
+ - `declaration`: the declaration of the function (same as prompt but without the docstring)
376
+ - `canonical_solution`: the correct solution passing all unit tests for the problem
377
+ - `buggy_solution`: same as `canonical_solution` but with a subtle human-written bug causing the unit tests to fail
378
+ - `bug_type`: the type of the bug in `buggy_solution` (one of [`missing logic`, `excess logic`, `value misuse`, `operator misuse`, `variable misuse`, `function misuse`])
379
+ - `failure_symptoms`: the problem the bug causes (one of [`incorrect output`, `stackoverflow`, `infinite loop`])
380
+ - `entry_point`: the name of the function
381
+ - `import`: imports necessary for the solution (only present for Go)
382
+ - `test_setup`: imports necessary for the test execution (only present for Go)
383
+ - `test`: the unit tests for the problem
384
+ - `example_test`: additional unit tests different from `test` that could be e.g. provided to the model (these are not used in the paper)
385
+ - `signature`: the signature of the function
386
+ - `docstring`: the docstring describing the problem
387
+ - `instruction`: an instruction for HumanEvalSynthesize in the form `Write a {language_name} function {signature} to solve the following problem:\n{docstring}`
388
+
389
+ ## Citation Information
390
+
391
+ ```bibtex
392
+ @article{muennighoff2023octopack,
393
+ title={OctoPack: Instruction Tuning Code Large Language Models},
394
+ author={Niklas Muennighoff and Qian Liu and Armel Zebaze and Qinkai Zheng and Binyuan Hui and Terry Yue Zhuo and Swayam Singh and Xiangru Tang and Leandro von Werra and Shayne Longpre},
395
+ journal={arXiv preprint arXiv:2308.07124},
396
+ year={2023}
397
+ }
398
+ ```
cpp/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fd2eed15063bf883952fb3b0a23a372eeaa9b9e58932a496667a0c2595145779
3
+ size 193981
go/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5cbb0e8152b5c9d2b595a1fa9d540c87cde7a306e9fc7f63febe24825bc20c74
3
+ size 198394
java/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0be942d715894e3b350149f1cde6593e95eda495aa4bd1750f09428c0b3e3e9c
3
+ size 210440
js/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:52d6aada9ff62c22ba139aaa64431cca461fbca3cb0625521a988ffeef250855
3
+ size 194044
python/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ed5f15d789156e21222bfcd556c425a39042355c84ae1e8b058abd6a3d7f8075
3
+ size 191279
rust/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:02570ed6a11d8801d26a9aae0db87cdc0fc6f4a7eb68adb3a9e37fb4f752da57
3
+ size 168464