Datasets:
Publish gsm8k in Lance format
#1
by tsmithv11 - opened
- .gitattributes +8 -0
- LICENSE +21 -0
- README.md +77 -0
- data/main/test.lance/_indices/48b567f1-c6b0-491d-b158-5f81efc3630e/auxiliary.idx +3 -0
- data/main/test.lance/_indices/48b567f1-c6b0-491d-b158-5f81efc3630e/index.idx +0 -0
- data/main/test.lance/_transactions/0-9e24bd8e-6ec6-4f56-b8ba-962291e8a0e8.txn +0 -0
- data/main/test.lance/_transactions/1-16abea54-4d01-46fa-bad9-bb795763256f.txn +0 -0
- data/main/test.lance/_versions/18446744073709551613.manifest +0 -0
- data/main/test.lance/_versions/18446744073709551614.manifest +0 -0
- data/main/test.lance/_versions/latest_version_hint.json +1 -0
- data/main/test.lance/data/100001111001001000000001ca8ec441d9a9210078f2815e8c.lance +3 -0
- data/main/train.lance/_indices/6cb5156e-6943-4c5f-a5df-62eff4f31616/auxiliary.idx +3 -0
- data/main/train.lance/_indices/6cb5156e-6943-4c5f-a5df-62eff4f31616/index.idx +0 -0
- data/main/train.lance/_transactions/0-71778d84-8567-47ff-9eb8-f1250efb4d85.txn +0 -0
- data/main/train.lance/_transactions/1-3cda720e-0629-42d6-b46c-fb93553b2c47.txn +0 -0
- data/main/train.lance/_versions/18446744073709551613.manifest +0 -0
- data/main/train.lance/_versions/18446744073709551614.manifest +0 -0
- data/main/train.lance/_versions/latest_version_hint.json +1 -0
- data/main/train.lance/data/110100110100010011101100dc6e694648991528e1e4468762.lance +3 -0
- data/socratic/test.lance/_indices/3aaf54e0-ea11-49c1-b9c4-5acc9b503b1e/auxiliary.idx +3 -0
- data/socratic/test.lance/_indices/3aaf54e0-ea11-49c1-b9c4-5acc9b503b1e/index.idx +0 -0
- data/socratic/test.lance/_transactions/0-2ed65f26-41cd-420f-aa0d-502cab733604.txn +0 -0
- data/socratic/test.lance/_transactions/1-056f9ac8-e32f-4629-b2b5-093cafc2480d.txn +0 -0
- data/socratic/test.lance/_versions/18446744073709551613.manifest +0 -0
- data/socratic/test.lance/_versions/18446744073709551614.manifest +0 -0
- data/socratic/test.lance/_versions/latest_version_hint.json +1 -0
- data/socratic/test.lance/data/0010001010110001110010016a07cf4042970044336cc45208.lance +3 -0
- data/socratic/train.lance/_indices/5ce96c0d-a372-4bf9-8e29-982353efb7c8/auxiliary.idx +3 -0
- data/socratic/train.lance/_indices/5ce96c0d-a372-4bf9-8e29-982353efb7c8/index.idx +0 -0
- data/socratic/train.lance/_transactions/0-21eecb46-4eb3-4d32-9e71-e0a1948e3b0d.txn +0 -0
- data/socratic/train.lance/_transactions/1-0db8a177-1ec1-41e2-ad0b-c20915cb0e68.txn +0 -0
- data/socratic/train.lance/_versions/18446744073709551613.manifest +0 -0
- data/socratic/train.lance/_versions/18446744073709551614.manifest +0 -0
- data/socratic/train.lance/_versions/latest_version_hint.json +1 -0
- data/socratic/train.lance/data/01010111100110001101110002e703411699c51ecd9c5332ea.lance +3 -0
- meta/info.json +35 -0
- source/README.md +226 -0
- source/eval.yaml +34 -0
- viewer/main/test.parquet +3 -0
- viewer/main/train.parquet +3 -0
- viewer/socratic/test.parquet +3 -0
- viewer/socratic/train.parquet +3 -0
.gitattributes
CHANGED
|
@@ -58,3 +58,11 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
data/main/test.lance/_indices/48b567f1-c6b0-491d-b158-5f81efc3630e/auxiliary.idx filter=lfs diff=lfs merge=lfs -text
|
| 62 |
+
data/main/test.lance/data/100001111001001000000001ca8ec441d9a9210078f2815e8c.lance filter=lfs diff=lfs merge=lfs -text
|
| 63 |
+
data/main/train.lance/_indices/6cb5156e-6943-4c5f-a5df-62eff4f31616/auxiliary.idx filter=lfs diff=lfs merge=lfs -text
|
| 64 |
+
data/main/train.lance/data/110100110100010011101100dc6e694648991528e1e4468762.lance filter=lfs diff=lfs merge=lfs -text
|
| 65 |
+
data/socratic/test.lance/_indices/3aaf54e0-ea11-49c1-b9c4-5acc9b503b1e/auxiliary.idx filter=lfs diff=lfs merge=lfs -text
|
| 66 |
+
data/socratic/test.lance/data/0010001010110001110010016a07cf4042970044336cc45208.lance filter=lfs diff=lfs merge=lfs -text
|
| 67 |
+
data/socratic/train.lance/_indices/5ce96c0d-a372-4bf9-8e29-982353efb7c8/auxiliary.idx filter=lfs diff=lfs merge=lfs -text
|
| 68 |
+
data/socratic/train.lance/data/01010111100110001101110002e703411699c51ecd9c5332ea.lance filter=lfs diff=lfs merge=lfs -text
|
LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2021 OpenAI
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
README.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pretty_name: GSM8K in Lance
|
| 3 |
+
license: mit
|
| 4 |
+
language:
|
| 5 |
+
- en
|
| 6 |
+
task_categories:
|
| 7 |
+
- question-answering
|
| 8 |
+
- text-retrieval
|
| 9 |
+
tags:
|
| 10 |
+
- lance
|
| 11 |
+
- mathematics
|
| 12 |
+
- information-retrieval
|
| 13 |
+
arxiv: 2110.14168
|
| 14 |
+
configs:
|
| 15 |
+
- config_name: main
|
| 16 |
+
default: true
|
| 17 |
+
data_files:
|
| 18 |
+
- split: train
|
| 19 |
+
path: viewer/main/train.parquet
|
| 20 |
+
- split: test
|
| 21 |
+
path: viewer/main/test.parquet
|
| 22 |
+
- config_name: socratic
|
| 23 |
+
data_files:
|
| 24 |
+
- split: train
|
| 25 |
+
path: viewer/socratic/train.parquet
|
| 26 |
+
- split: test
|
| 27 |
+
path: viewer/socratic/test.parquet
|
| 28 |
+
---
|
| 29 |
+
|
| 30 |
+
# GSM8K in Lance
|
| 31 |
+
|
| 32 |
+
Find English arithmetic word problems by their question text and retrieve the original worked solutions by split and row number. The release keeps the `main` and `socratic` configurations, including each configuration's original question and answer strings, split membership, and row order. [Pinned OpenAI source](https://huggingface.co/datasets/openai/gsm8k/tree/740312add88f781978c0658806c59bc2815b9866)
|
| 33 |
+
|
| 34 |
+
## Data and splits
|
| 35 |
+
|
| 36 |
+
| Configuration | Train | Test | Lance path |
|
| 37 |
+
|---|---:|---:|---|
|
| 38 |
+
| `main` | 7,473 | 1,319 | `data/main/<split>.lance` |
|
| 39 |
+
| `socratic` | 7,473 | 1,319 | `data/socratic/<split>.lance` |
|
| 40 |
+
|
| 41 |
+
Each table has the original `question` and `answer` columns, a zero-based `source_row` within that configuration and split, and a `question_embedding` vector. The conversion checked all 17,584 rows against the source Parquet. The Data Studio preview uses byte-identical copies of those Parquet files in `viewer/`. [Open Data Studio](https://huggingface.co/datasets/lance-format/gsm8k-lance/viewer/main/train) · [Table counts and preview checksums](meta/info.json)
|
| 42 |
+
|
| 43 |
+
## Embeddings and search
|
| 44 |
+
|
| 45 |
+
The conversion generated embeddings from the English `question` using `sentence-transformers/static-retrieval-mrl-en-v1` at revision `f60985c706f192d45d218078e49e5a8b6f15283a`. This retrieval encoder uses the same input format for a problem and a query. Vectors are L2-normalized `float32`, truncated to 256 dimensions using the model's Matryoshka representation. Every split has a cosine `IVF_FLAT` index. [Pinned encoder](https://huggingface.co/sentence-transformers/static-retrieval-mrl-en-v1/tree/f60985c706f192d45d218078e49e5a8b6f15283a)
|
| 46 |
+
|
| 47 |
+
Install the search dependencies and run the example to find five related training problems. Scores are cosine similarities, with higher values first. The printed `source_row` identifies each result within `main/train`.
|
| 48 |
+
|
| 49 |
+
```bash
|
| 50 |
+
pip install pylance==14.0.3 sentence-transformers==6.3.0
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
```python
|
| 54 |
+
import lance
|
| 55 |
+
from sentence_transformers import SentenceTransformer
|
| 56 |
+
|
| 57 |
+
encoder = SentenceTransformer(
|
| 58 |
+
"sentence-transformers/static-retrieval-mrl-en-v1",
|
| 59 |
+
revision="f60985c706f192d45d218078e49e5a8b6f15283a",
|
| 60 |
+
device="cpu",
|
| 61 |
+
truncate_dim=256,
|
| 62 |
+
)
|
| 63 |
+
query = "How much change should a shopper get after paying for apples by the pound?"
|
| 64 |
+
vector = encoder.encode(query, normalize_embeddings=True)
|
| 65 |
+
problems = lance.dataset("hf://datasets/lance-format/gsm8k-lance/data/main/train.lance")
|
| 66 |
+
hits = problems.to_table(
|
| 67 |
+
columns=["source_row", "question", "_distance"],
|
| 68 |
+
nearest={"column": "question_embedding", "q": vector, "k": 5, "metric": "cosine"},
|
| 69 |
+
).to_pylist()
|
| 70 |
+
for hit in hits:
|
| 71 |
+
score = 1.0 - hit["_distance"]
|
| 72 |
+
print(f"{score:.4f}\tmain/train/{hit['source_row']}\t{hit['question']}")
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
## Source, license, and changes
|
| 76 |
+
|
| 77 |
+
GSM8K was created by OpenAI and published with Karl Cobbe and coauthors' *Training Verifiers to Solve Math Word Problems*. The source dataset is distributed under the MIT license, copyright 2021 OpenAI. The conversion adds a row identifier, embeddings, and Lance indices. The original card and evaluation configuration are included in `source/`. [Paper](https://arxiv.org/abs/2110.14168) · [OpenAI source project](https://github.com/openai/grade-school-math) · [MIT license](LICENSE)
|
data/main/test.lance/_indices/48b567f1-c6b0-491d-b158-5f81efc3630e/auxiliary.idx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a88010300102a1a12d6fc01abeda293c0741fd3a32ea49558cb44a1569337287
|
| 3 |
+
size 1354047
|
data/main/test.lance/_indices/48b567f1-c6b0-491d-b158-5f81efc3630e/index.idx
ADDED
|
Binary file (1.36 kB). View file
|
|
|
data/main/test.lance/_transactions/0-9e24bd8e-6ec6-4f56-b8ba-962291e8a0e8.txn
ADDED
|
Binary file (301 Bytes). View file
|
|
|
data/main/test.lance/_transactions/1-16abea54-4d01-46fa-bad9-bb795763256f.txn
ADDED
|
Binary file (388 Bytes). View file
|
|
|
data/main/test.lance/_versions/18446744073709551613.manifest
ADDED
|
Binary file (1.12 kB). View file
|
|
|
data/main/test.lance/_versions/18446744073709551614.manifest
ADDED
|
Binary file (680 Bytes). View file
|
|
|
data/main/test.lance/_versions/latest_version_hint.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":2}
|
data/main/test.lance/data/100001111001001000000001ca8ec441d9a9210078f2815e8c.lance
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a1ca8a9ce1a24fce9ddf3c66cc41bcc0a74e6939a3fe023eaba8c3283613e4d9
|
| 3 |
+
size 1784068
|
data/main/train.lance/_indices/6cb5156e-6943-4c5f-a5df-62eff4f31616/auxiliary.idx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5abc52daea867e5fbdb5c54780518c9c339ee9cc2b83883fc99d6e4ba1ce528c
|
| 3 |
+
size 7665536
|
data/main/train.lance/_indices/6cb5156e-6943-4c5f-a5df-62eff4f31616/index.idx
ADDED
|
Binary file (1.36 kB). View file
|
|
|
data/main/train.lance/_transactions/0-71778d84-8567-47ff-9eb8-f1250efb4d85.txn
ADDED
|
Binary file (302 Bytes). View file
|
|
|
data/main/train.lance/_transactions/1-3cda720e-0629-42d6-b46c-fb93553b2c47.txn
ADDED
|
Binary file (389 Bytes). View file
|
|
|
data/main/train.lance/_versions/18446744073709551613.manifest
ADDED
|
Binary file (1.12 kB). View file
|
|
|
data/main/train.lance/_versions/18446744073709551614.manifest
ADDED
|
Binary file (682 Bytes). View file
|
|
|
data/main/train.lance/_versions/latest_version_hint.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":2}
|
data/main/train.lance/data/110100110100010011101100dc6e694648991528e1e4468762.lance
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7869ee6768208186de6802ebd7ba14751aa65a34f1e934c36b941b3a2991827c
|
| 3 |
+
size 10060234
|
data/socratic/test.lance/_indices/3aaf54e0-ea11-49c1-b9c4-5acc9b503b1e/auxiliary.idx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1568ae7780981b12af3048e6d625611cc4ab6910d28415dc2284822890b0b155
|
| 3 |
+
size 1354047
|
data/socratic/test.lance/_indices/3aaf54e0-ea11-49c1-b9c4-5acc9b503b1e/index.idx
ADDED
|
Binary file (1.36 kB). View file
|
|
|
data/socratic/test.lance/_transactions/0-2ed65f26-41cd-420f-aa0d-502cab733604.txn
ADDED
|
Binary file (301 Bytes). View file
|
|
|
data/socratic/test.lance/_transactions/1-056f9ac8-e32f-4629-b2b5-093cafc2480d.txn
ADDED
|
Binary file (388 Bytes). View file
|
|
|
data/socratic/test.lance/_versions/18446744073709551613.manifest
ADDED
|
Binary file (1.12 kB). View file
|
|
|
data/socratic/test.lance/_versions/18446744073709551614.manifest
ADDED
|
Binary file (680 Bytes). View file
|
|
|
data/socratic/test.lance/_versions/latest_version_hint.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":2}
|
data/socratic/test.lance/data/0010001010110001110010016a07cf4042970044336cc45208.lance
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e2d29901ff3ce19c92c697abece4c720047132ddf20441bea84799b221f3cba9
|
| 3 |
+
size 1908804
|
data/socratic/train.lance/_indices/5ce96c0d-a372-4bf9-8e29-982353efb7c8/auxiliary.idx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d12a5a861347585d497811852a4508086ca7869e5c2a872fc15246cb1e8dc5a2
|
| 3 |
+
size 7665536
|
data/socratic/train.lance/_indices/5ce96c0d-a372-4bf9-8e29-982353efb7c8/index.idx
ADDED
|
Binary file (1.36 kB). View file
|
|
|
data/socratic/train.lance/_transactions/0-21eecb46-4eb3-4d32-9e71-e0a1948e3b0d.txn
ADDED
|
Binary file (302 Bytes). View file
|
|
|
data/socratic/train.lance/_transactions/1-0db8a177-1ec1-41e2-ad0b-c20915cb0e68.txn
ADDED
|
Binary file (389 Bytes). View file
|
|
|
data/socratic/train.lance/_versions/18446744073709551613.manifest
ADDED
|
Binary file (1.12 kB). View file
|
|
|
data/socratic/train.lance/_versions/18446744073709551614.manifest
ADDED
|
Binary file (682 Bytes). View file
|
|
|
data/socratic/train.lance/_versions/latest_version_hint.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":2}
|
data/socratic/train.lance/data/01010111100110001101110002e703411699c51ecd9c5332ea.lance
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b3a0b7775fdfcb514ea1019b1aa78993dbdfc49276573d9c256b6681dabecd36
|
| 3 |
+
size 10714058
|
meta/info.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_dataset": "openai/gsm8k",
|
| 3 |
+
"source_revision": "740312add88f781978c0658806c59bc2815b9866",
|
| 4 |
+
"model": "sentence-transformers/static-retrieval-mrl-en-v1",
|
| 5 |
+
"model_revision": "f60985c706f192d45d218078e49e5a8b6f15283a",
|
| 6 |
+
"dimensions": 256,
|
| 7 |
+
"metric": "cosine",
|
| 8 |
+
"embedded_field": "question",
|
| 9 |
+
"tables": {
|
| 10 |
+
"main/train": {
|
| 11 |
+
"rows": 7473,
|
| 12 |
+
"path": "data/main/train.lance",
|
| 13 |
+
"indexed_rows": 7473,
|
| 14 |
+
"source_parquet_sha256": "ea82612ea9582142387730c793eb67d3b12849002bc0b7fa6f8efafa7351419d"
|
| 15 |
+
},
|
| 16 |
+
"main/test": {
|
| 17 |
+
"rows": 1319,
|
| 18 |
+
"path": "data/main/test.lance",
|
| 19 |
+
"indexed_rows": 1319,
|
| 20 |
+
"source_parquet_sha256": "ee7b8da9e381df27b9e3f7758a159ab2bdaa4dbaa910546cbbc47e0cb44e4f59"
|
| 21 |
+
},
|
| 22 |
+
"socratic/train": {
|
| 23 |
+
"rows": 7473,
|
| 24 |
+
"path": "data/socratic/train.lance",
|
| 25 |
+
"indexed_rows": 7473,
|
| 26 |
+
"source_parquet_sha256": "54eb5fd2105a9126ac6410541b2e9dbe0199701258957c9af02d9ed675c90378"
|
| 27 |
+
},
|
| 28 |
+
"socratic/test": {
|
| 29 |
+
"rows": 1319,
|
| 30 |
+
"path": "data/socratic/test.lance",
|
| 31 |
+
"indexed_rows": 1319,
|
| 32 |
+
"source_parquet_sha256": "477dba7028204b465491b8f346ec774262ccd77147d942a0881e94cc6da7c99e"
|
| 33 |
+
}
|
| 34 |
+
}
|
| 35 |
+
}
|
source/README.md
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
annotations_creators:
|
| 3 |
+
- crowdsourced
|
| 4 |
+
language_creators:
|
| 5 |
+
- crowdsourced
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
license:
|
| 9 |
+
- mit
|
| 10 |
+
multilinguality:
|
| 11 |
+
- monolingual
|
| 12 |
+
size_categories:
|
| 13 |
+
- 1K<n<10K
|
| 14 |
+
source_datasets:
|
| 15 |
+
- original
|
| 16 |
+
task_categories:
|
| 17 |
+
- text-generation
|
| 18 |
+
task_ids: []
|
| 19 |
+
paperswithcode_id: gsm8k
|
| 20 |
+
pretty_name: Grade School Math 8K
|
| 21 |
+
tags:
|
| 22 |
+
- math-word-problems
|
| 23 |
+
dataset_info:
|
| 24 |
+
- config_name: main
|
| 25 |
+
features:
|
| 26 |
+
- name: question
|
| 27 |
+
dtype: string
|
| 28 |
+
- name: answer
|
| 29 |
+
dtype: string
|
| 30 |
+
splits:
|
| 31 |
+
- name: train
|
| 32 |
+
num_bytes: 3963202
|
| 33 |
+
num_examples: 7473
|
| 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:
|
| 41 |
+
- name: question
|
| 42 |
+
dtype: string
|
| 43 |
+
- name: answer
|
| 44 |
+
dtype: string
|
| 45 |
+
splits:
|
| 46 |
+
- name: train
|
| 47 |
+
num_bytes: 5198108
|
| 48 |
+
num_examples: 7473
|
| 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
|
| 70 |
+
|
| 71 |
+
## Table of Contents
|
| 72 |
+
- [Dataset Description](#dataset-description)
|
| 73 |
+
- [Dataset Summary](#dataset-summary)
|
| 74 |
+
- [Supported Tasks](#supported-tasks-and-leaderboards)
|
| 75 |
+
- [Languages](#languages)
|
| 76 |
+
- [Dataset Structure](#dataset-structure)
|
| 77 |
+
- [Data Instances](#data-instances)
|
| 78 |
+
- [Data Fields](#data-instances)
|
| 79 |
+
- [Data Splits](#data-instances)
|
| 80 |
+
- [Dataset Creation](#dataset-creation)
|
| 81 |
+
- [Curation Rationale](#curation-rationale)
|
| 82 |
+
- [Source Data](#source-data)
|
| 83 |
+
- [Annotations](#annotations)
|
| 84 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
| 85 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
| 86 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
| 87 |
+
- [Discussion of Biases](#discussion-of-biases)
|
| 88 |
+
- [Other Known Limitations](#other-known-limitations)
|
| 89 |
+
- [Additional Information](#additional-information)
|
| 90 |
+
- [Dataset Curators](#dataset-curators)
|
| 91 |
+
- [Licensing Information](#licensing-information)
|
| 92 |
+
- [Citation Information](#citation-information)
|
| 93 |
+
|
| 94 |
+
## Dataset Description
|
| 95 |
+
|
| 96 |
+
- **Homepage:** https://openai.com/blog/grade-school-math/
|
| 97 |
+
- **Repository:** https://github.com/openai/grade-school-math
|
| 98 |
+
- **Paper:** https://arxiv.org/abs/2110.14168
|
| 99 |
+
- **Leaderboard:** [Needs More Information]
|
| 100 |
+
- **Point of Contact:** [Needs More Information]
|
| 101 |
+
|
| 102 |
+
### Dataset Summary
|
| 103 |
+
|
| 104 |
+
GSM8K (Grade School Math 8K) is a dataset of 8.5K high quality linguistically diverse grade school math word problems. The dataset was created to support the task of question answering on basic mathematical problems that require multi-step reasoning.
|
| 105 |
+
- These problems take between 2 and 8 steps to solve.
|
| 106 |
+
- Solutions primarily involve performing a sequence of elementary calculations using basic arithmetic operations (+ − ×÷) to reach the final answer.
|
| 107 |
+
- A bright middle school student should be able to solve every problem: from the paper, "Problems require no concepts beyond the level of early Algebra, and the vast majority of problems can be solved without explicitly defining a variable."
|
| 108 |
+
- Solutions are provided in natural language, as opposed to pure math expressions. From the paper: "We believe this is the most generally useful data format, and we expect it to shed light on the properties of large language models’ internal monologues""
|
| 109 |
+
|
| 110 |
+
### Supported Tasks and Leaderboards
|
| 111 |
+
|
| 112 |
+
This dataset is generally used to test logic and math in language modelling.
|
| 113 |
+
It has been used for many benchmarks, including the [LLM Leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard).
|
| 114 |
+
|
| 115 |
+
### Languages
|
| 116 |
+
|
| 117 |
+
The text in the dataset is in English. The associated BCP-47 code is `en`.
|
| 118 |
+
|
| 119 |
+
## Dataset Structure
|
| 120 |
+
|
| 121 |
+
### Data Instances
|
| 122 |
+
|
| 123 |
+
For the `main` configuration, each instance contains a string for the grade-school level math question and a string for the corresponding answer with multiple steps of reasoning and calculator annotations (explained [here](https://github.com/openai/grade-school-math#calculation-annotations)).
|
| 124 |
+
|
| 125 |
+
|
| 126 |
+
```python
|
| 127 |
+
{
|
| 128 |
+
'question': 'Natalia sold clips to 48 of her friends in April, and then she sold half as many clips in May. How many clips did Natalia sell altogether in April and May?',
|
| 129 |
+
'answer': 'Natalia sold 48/2 = <<48/2=24>>24 clips in May.\nNatalia sold 48+24 = <<48+24=72>>72 clips altogether in April and May.\n#### 72',
|
| 130 |
+
}
|
| 131 |
+
```
|
| 132 |
+
|
| 133 |
+
For the `socratic` configuration, each instance contains a string for a grade-school level math question, a string for the corresponding answer with multiple steps of reasoning, calculator annotations (explained [here](https://github.com/openai/grade-school-math#calculation-annotations)), and *Socratic sub-questions*.
|
| 134 |
+
|
| 135 |
+
```python
|
| 136 |
+
{
|
| 137 |
+
'question': 'Natalia sold clips to 48 of her friends in April, and then she sold half as many clips in May. How many clips did Natalia sell altogether in April and May?',
|
| 138 |
+
'answer': 'How many clips did Natalia sell in May? ** Natalia sold 48/2 = <<48/2=24>>24 clips in May.\nHow many clips did Natalia sell altogether in April and May? ** Natalia sold 48+24 = <<48+24=72>>72 clips altogether in April and May.\n#### 72',
|
| 139 |
+
}
|
| 140 |
+
```
|
| 141 |
+
|
| 142 |
+
### Data Fields
|
| 143 |
+
|
| 144 |
+
The data fields are the same among `main` and `socratic` configurations and their individual splits.
|
| 145 |
+
|
| 146 |
+
- question: The question string to a grade school math problem.
|
| 147 |
+
|
| 148 |
+
- answer: The full solution string to the `question`. It contains multiple steps of reasoning with calculator annotations and the final numeric solution.
|
| 149 |
+
|
| 150 |
+
### Data Splits
|
| 151 |
+
|
| 152 |
+
| name |train|validation|
|
| 153 |
+
|--------|----:|---------:|
|
| 154 |
+
|main | 7473| 1319|
|
| 155 |
+
|socratic| 7473| 1319|
|
| 156 |
+
|
| 157 |
+
## Dataset Creation
|
| 158 |
+
|
| 159 |
+
### Curation Rationale
|
| 160 |
+
|
| 161 |
+
[Needs More Information]
|
| 162 |
+
|
| 163 |
+
### Source Data
|
| 164 |
+
|
| 165 |
+
#### Initial Data Collection and Normalization
|
| 166 |
+
|
| 167 |
+
From the paper, appendix A:
|
| 168 |
+
|
| 169 |
+
> We initially collected a starting set of a thousand problems and natural language solutions by hiring freelance contractors on Upwork (upwork.com). We then worked with Surge AI (surgehq.ai), an NLP data labeling platform, to scale up our data collection. After collecting the full dataset, we asked workers to re-solve all problems, with no workers re-solving problems they originally wrote. We checked whether their final answers agreed with the original solutions, and any problems that produced disagreements were either repaired or discarded. We then performed another round of agreement checks on a smaller subset of problems, finding that 1.7% of problems still produce disagreements among contractors. We estimate this to be the fraction of problems that contain breaking errors or ambiguities. It is possible that a larger percentage of problems contain subtle errors.
|
| 170 |
+
|
| 171 |
+
#### Who are the source language producers?
|
| 172 |
+
|
| 173 |
+
[Needs More Information]
|
| 174 |
+
|
| 175 |
+
### Annotations
|
| 176 |
+
|
| 177 |
+
#### Annotation process
|
| 178 |
+
|
| 179 |
+
[Needs More Information]
|
| 180 |
+
|
| 181 |
+
#### Who are the annotators?
|
| 182 |
+
|
| 183 |
+
Surge AI (surgehq.ai)
|
| 184 |
+
|
| 185 |
+
### Personal and Sensitive Information
|
| 186 |
+
|
| 187 |
+
[Needs More Information]
|
| 188 |
+
|
| 189 |
+
## Considerations for Using the Data
|
| 190 |
+
|
| 191 |
+
### Social Impact of Dataset
|
| 192 |
+
|
| 193 |
+
[Needs More Information]
|
| 194 |
+
|
| 195 |
+
### Discussion of Biases
|
| 196 |
+
|
| 197 |
+
[Needs More Information]
|
| 198 |
+
|
| 199 |
+
### Other Known Limitations
|
| 200 |
+
|
| 201 |
+
[Needs More Information]
|
| 202 |
+
|
| 203 |
+
## Additional Information
|
| 204 |
+
|
| 205 |
+
### Dataset Curators
|
| 206 |
+
|
| 207 |
+
[Needs More Information]
|
| 208 |
+
|
| 209 |
+
### Licensing Information
|
| 210 |
+
|
| 211 |
+
The GSM8K dataset is licensed under the [MIT License](https://opensource.org/licenses/MIT).
|
| 212 |
+
|
| 213 |
+
### Citation Information
|
| 214 |
+
|
| 215 |
+
```bibtex
|
| 216 |
+
@article{cobbe2021gsm8k,
|
| 217 |
+
title={Training Verifiers to Solve Math Word Problems},
|
| 218 |
+
author={Cobbe, Karl and Kosaraju, Vineet and Bavarian, Mohammad and Chen, Mark and Jun, Heewoo and Kaiser, Lukasz and Plappert, Matthias and Tworek, Jerry and Hilton, Jacob and Nakano, Reiichiro and Hesse, Christopher and Schulman, John},
|
| 219 |
+
journal={arXiv preprint arXiv:2110.14168},
|
| 220 |
+
year={2021}
|
| 221 |
+
}
|
| 222 |
+
```
|
| 223 |
+
|
| 224 |
+
### Contributions
|
| 225 |
+
|
| 226 |
+
Thanks to [@jon-tow](https://github.com/jon-tow) for adding this dataset.
|
source/eval.yaml
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# yaml file for compatibility with inspect-ai
|
| 2 |
+
|
| 3 |
+
name: GSM8K
|
| 4 |
+
description: >
|
| 5 |
+
GSM8K is a dataset of 8,000+ high-quality, single-step arithmetic word problems.
|
| 6 |
+
evaluation_framework: inspect-ai
|
| 7 |
+
|
| 8 |
+
tasks:
|
| 9 |
+
- id: gsm8k
|
| 10 |
+
config: main
|
| 11 |
+
split: test
|
| 12 |
+
|
| 13 |
+
epochs: 4
|
| 14 |
+
epoch_reducer: pass_at_1
|
| 15 |
+
|
| 16 |
+
field_spec:
|
| 17 |
+
input: question
|
| 18 |
+
target: answer
|
| 19 |
+
|
| 20 |
+
solvers:
|
| 21 |
+
- name: prompt_template
|
| 22 |
+
args:
|
| 23 |
+
template: >
|
| 24 |
+
Solve the following math problem efficiently and clearly. The last line
|
| 25 |
+
of your response should be of the following format: 'Therefore, the final
|
| 26 |
+
answer is: $\\boxed{ANSWER}$. I hope it is correct' (without quotes)
|
| 27 |
+
where ANSWER is just the final number or expression that solves the
|
| 28 |
+
problem. Think step by step before answering.
|
| 29 |
+
|
| 30 |
+
{prompt}
|
| 31 |
+
- name: generate
|
| 32 |
+
|
| 33 |
+
scorers:
|
| 34 |
+
- name: model_graded_fact
|
viewer/main/test.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ee7b8da9e381df27b9e3f7758a159ab2bdaa4dbaa910546cbbc47e0cb44e4f59
|
| 3 |
+
size 419088
|
viewer/main/train.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ea82612ea9582142387730c793eb67d3b12849002bc0b7fa6f8efafa7351419d
|
| 3 |
+
size 2306545
|
viewer/socratic/test.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:477dba7028204b465491b8f346ec774262ccd77147d942a0881e94cc6da7c99e
|
| 3 |
+
size 486995
|
viewer/socratic/train.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:54eb5fd2105a9126ac6410541b2e9dbe0199701258957c9af02d9ed675c90378
|
| 3 |
+
size 2677259
|