Update README.md
Browse files
README.md
CHANGED
@@ -19,3 +19,23 @@ configs:
|
|
19 |
- split: train
|
20 |
path: data/train-*
|
21 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
- split: train
|
20 |
path: data/train-*
|
21 |
---
|
22 |
+
|
23 |
+
To reproduce
|
24 |
+
```python
|
25 |
+
from datasets import load_dataset, Dataset
|
26 |
+
from tqdm import tqdm
|
27 |
+
|
28 |
+
ds = load_dataset("allenai/RLVR-GSM")
|
29 |
+
|
30 |
+
out = []
|
31 |
+
for item in tqdm(ds["train"]):
|
32 |
+
text = item['messages'][0]['content']
|
33 |
+
text = text.split("\n\nQuestion:")[-1].strip()
|
34 |
+
out.append({
|
35 |
+
"type": "math",
|
36 |
+
"question": text,
|
37 |
+
'answer': item['ground_truth']
|
38 |
+
})
|
39 |
+
|
40 |
+
ds = Dataset.from_list(out)
|
41 |
+
```
|