Datasets:

Modalities:
Text
Formats:
parquet
Languages:
English
ArXiv:
Libraries:
Datasets
pandas
License:

Convert dataset to Parquet

#3
by albertvillanova HF staff - opened
README.md CHANGED
@@ -34,7 +34,7 @@ dataset_info:
34
  - name: test
35
  num_bytes: 713732
36
  num_examples: 1319
37
- download_size: 4915944
38
  dataset_size: 4676934
39
  - config_name: socratic
40
  features:
@@ -49,8 +49,21 @@ dataset_info:
49
  - name: test
50
  num_bytes: 936859
51
  num_examples: 1319
52
- download_size: 6374717
53
  dataset_size: 6134967
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  ---
55
 
56
  # Dataset Card for GSM8K
 
34
  - name: test
35
  num_bytes: 713732
36
  num_examples: 1319
37
+ download_size: 2725633
38
  dataset_size: 4676934
39
  - config_name: socratic
40
  features:
 
49
  - name: test
50
  num_bytes: 936859
51
  num_examples: 1319
52
+ download_size: 3164254
53
  dataset_size: 6134967
54
+ configs:
55
+ - config_name: main
56
+ data_files:
57
+ - split: train
58
+ path: main/train-*
59
+ - split: test
60
+ path: main/test-*
61
+ - config_name: socratic
62
+ data_files:
63
+ - split: train
64
+ path: socratic/train-*
65
+ - split: test
66
+ path: socratic/test-*
67
  ---
68
 
69
  # Dataset Card for GSM8K
dataset_infos.json DELETED
@@ -1 +0,0 @@
1
- {"main": {"description": "GSM8K (Grade School Math 8K) is a dataset of 8.5K high quality\nlinguistically diverse grade school math word problems. The\ndataset was created to support the task of question answering\non basic mathematical problems that require multi-step reasoning.\n", "citation": "@misc{cobbe2021training,\n title={Training Verifiers to Solve Math Word Problems},\n author={Karl Cobbe and Vineet Kosaraju and Mohammad Bavarian and Jacob Hilton and Reiichiro Nakano and Christopher Hesse and John Schulman},\n year={2021},\n eprint={2110.14168},\n archivePrefix={arXiv},\n primaryClass={cs.LG}\n}\n", "homepage": "https://openai.com/blog/grade-school-math", "license": "MIT", "features": {"question": {"dtype": "string", "id": null, "_type": "Value"}, "answer": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "gsm8k", "config_name": "main", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 3963202, "num_examples": 7473, "dataset_name": "gsm8k"}, "test": {"name": "test", "num_bytes": 713732, "num_examples": 1319, "dataset_name": "gsm8k"}}, "download_checksums": {"https://raw.githubusercontent.com/openai/grade-school-math/master/grade_school_math/data/train.jsonl": {"num_bytes": 4166206, "checksum": "17f347dc51477c50d4efb83959dbb7c56297aba886e5544ee2aaed3024813465"}, "https://raw.githubusercontent.com/openai/grade-school-math/master/grade_school_math/data/test.jsonl": {"num_bytes": 749738, "checksum": "3730d312f6e3440559ace48831e51066acaca737f6eabec99bccb9e4b3c39d14"}}, "download_size": 4915944, "post_processing_size": null, "dataset_size": 4676934, "size_in_bytes": 9592878}, "socratic": {"description": "GSM8K (Grade School Math 8K) is a dataset of 8.5K high quality\nlinguistically diverse grade school math word problems. The\ndataset was created to support the task of question answering\non basic mathematical problems that require multi-step reasoning.\n", "citation": "@misc{cobbe2021training,\n title={Training Verifiers to Solve Math Word Problems},\n author={Karl Cobbe and Vineet Kosaraju and Mohammad Bavarian and Jacob Hilton and Reiichiro Nakano and Christopher Hesse and John Schulman},\n year={2021},\n eprint={2110.14168},\n archivePrefix={arXiv},\n primaryClass={cs.LG}\n}\n", "homepage": "https://openai.com/blog/grade-school-math", "license": "MIT", "features": {"question": {"dtype": "string", "id": null, "_type": "Value"}, "answer": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "gsm8k", "config_name": "socratic", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 5198108, "num_examples": 7473, "dataset_name": "gsm8k"}, "test": {"name": "test", "num_bytes": 936859, "num_examples": 1319, "dataset_name": "gsm8k"}}, "download_checksums": {"https://raw.githubusercontent.com/openai/grade-school-math/master/grade_school_math/data/train_socratic.jsonl": {"num_bytes": 5401739, "checksum": "153d86551187cfd64ef7afb59bfd0ef75cea3ae9388e7ad31e43920b6dd77872"}, "https://raw.githubusercontent.com/openai/grade-school-math/master/grade_school_math/data/test_socratic.jsonl": {"num_bytes": 972978, "checksum": "c96673362fa7a699f4836a9b6474a067448f95fe58064727501ee63ba4c3fdb6"}}, "download_size": 6374717, "post_processing_size": null, "dataset_size": 6134967, "size_in_bytes": 12509684}}
 
 
gsm8k.py DELETED
@@ -1,135 +0,0 @@
1
- # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
- """Grade School Math 8k dataset."""
15
-
16
- import json
17
- import textwrap
18
-
19
- import datasets
20
-
21
-
22
- _CITATION = """\
23
- @misc{cobbe2021training,
24
- title={Training Verifiers to Solve Math Word Problems},
25
- author={Karl Cobbe and Vineet Kosaraju and Mohammad Bavarian and Jacob Hilton and Reiichiro Nakano and Christopher Hesse and John Schulman},
26
- year={2021},
27
- eprint={2110.14168},
28
- archivePrefix={arXiv},
29
- primaryClass={cs.LG}
30
- }
31
- """
32
-
33
- _DESCRIPTION = """\
34
- GSM8K (Grade School Math 8K) is a dataset of 8.5K high quality
35
- linguistically diverse grade school math word problems. The
36
- dataset was created to support the task of question answering
37
- on basic mathematical problems that require multi-step reasoning.
38
- """
39
-
40
- _HOMEPAGE = "https://openai.com/blog/grade-school-math"
41
-
42
- _LICENSE = "MIT"
43
-
44
- _BASE_URL = "https://raw.githubusercontent.com/openai/grade-school-math/master/grade_school_math/data/"
45
-
46
-
47
- class Gsm8kConfig(datasets.BuilderConfig):
48
- """BuilderConfig for GSM8K."""
49
-
50
- def __init__(self, urls, **kwargs):
51
- """BuilderConfig for GSM8K.
52
-
53
- Args:
54
- urls: *dict[string]*, the urls for each split of the GSM8k set.
55
- """
56
- super().__init__(version=datasets.Version("1.1.0"), **kwargs)
57
- self.urls = urls
58
-
59
-
60
- class Gsm8k(datasets.GeneratorBasedBuilder):
61
- """Grade School Math 8k (GSM8K)"""
62
-
63
- BUILDER_CONFIGS = [
64
- Gsm8kConfig(
65
- name="main",
66
- description=textwrap.dedent(
67
- """
68
- It is segmented into 7.5K training problems and 1K test problems.
69
- These problems take between 2 and 8 steps to solve, and solutions
70
- primarily involve performing a sequence of elementary calculations
71
- using basic arithmetic operations (+ - / *) to reach the final
72
- answer. A bright middle school student should be able to solve
73
- every problem.
74
- """,
75
- ),
76
- urls={
77
- "train": _BASE_URL + "train.jsonl",
78
- "test": _BASE_URL + "test.jsonl",
79
- },
80
- ),
81
- Gsm8kConfig(
82
- name="socratic",
83
- description=textwrap.dedent(
84
- """
85
- Additionally, there is a modified solution format that injects
86
- automatically generated "Socratic subquestions" before each step.
87
- """
88
- ),
89
- urls={
90
- "train": _BASE_URL + "train_socratic.jsonl",
91
- "test": _BASE_URL + "test_socratic.jsonl",
92
- },
93
- ),
94
- ]
95
-
96
- def _info(self):
97
- features = datasets.Features(
98
- {
99
- "question": datasets.Value("string"),
100
- "answer": datasets.Value("string"),
101
- }
102
- )
103
- return datasets.DatasetInfo(
104
- description=_DESCRIPTION,
105
- features=features,
106
- homepage=_HOMEPAGE,
107
- license=_LICENSE,
108
- citation=_CITATION,
109
- )
110
-
111
- def _split_generators(self, dl_manager):
112
- data_dir = dl_manager.download_and_extract(self.config.urls)
113
- return [
114
- datasets.SplitGenerator(
115
- name=datasets.Split.TRAIN,
116
- gen_kwargs={
117
- "filepath": data_dir["train"],
118
- },
119
- ),
120
- datasets.SplitGenerator(
121
- name=datasets.Split.TEST,
122
- gen_kwargs={
123
- "filepath": data_dir["test"],
124
- },
125
- ),
126
- ]
127
-
128
- def _generate_examples(self, filepath):
129
- with open(filepath, encoding="utf-8") as f:
130
- for key, row in enumerate(f):
131
- data = json.loads(row)
132
- yield key, {
133
- "question": data["question"],
134
- "answer": data["answer"],
135
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
main/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ee7b8da9e381df27b9e3f7758a159ab2bdaa4dbaa910546cbbc47e0cb44e4f59
3
+ size 419088
main/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea82612ea9582142387730c793eb67d3b12849002bc0b7fa6f8efafa7351419d
3
+ size 2306545
socratic/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:477dba7028204b465491b8f346ec774262ccd77147d942a0881e94cc6da7c99e
3
+ size 486995
socratic/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:54eb5fd2105a9126ac6410541b2e9dbe0199701258957c9af02d9ed675c90378
3
+ size 2677259