aien-train
AIEN training programme: language-model history, GB10 constraints and the route to training on the project engine. Plans and runnable checks are distinguished.
Brought by drakestapleton
aien-train / streams / math-training / gsm8k_to_jsonl.py
| 1 | # One-time conversion of the locally cached GSM8K arrow files to JSONL (pyarrow lives only in another venv). |
| 2 | import json, sys, pyarrow as pa |
| 3 | src, dst = sys.argv[1], sys.argv[2] |
| 4 | with pa.memory_map(src) as f: |
| 5 | t = pa.ipc.open_stream(f).read_all() |
| 6 | with open(dst, "w") as o: |
| 7 | for q, a in zip(t.column("question").to_pylist(), t.column("answer").to_pylist()): |
| 8 | o.write(json.dumps({"question": q, "answer": a}) + "\n") |
| 9 | print(dst, t.num_rows) |