Slayer1B-1.09-Instruct-26.11: weights, card, notes, training code, manifests and results (history squashed; training data not published)
6071ec5 Download training/code/package_teacher.py from SlayerLab/Slayer1B-1.09-Instruct-26.11: direct link, hf CLI and curl.
- Browser
- Download file 5.19 kB
-
https://huggingface.co/SlayerLab/Slayer1B-1.09-Instruct-26.11/resolve/main/training/code/package_teacher.py
- Command line
-
hf download hf://SlayerLab/Slayer1B-1.09-Instruct-26.11/training/code/package_teacher.py
-
curl -L -o package_teacher.py https://huggingface.co/SlayerLab/Slayer1B-1.09-Instruct-26.11/resolve/main/training/code/package_teacher.py
5.19 kB
| """Package the Qwen3-8B teacher output (teacher.py shards) as a dataset folder: one parquet per task, manifest, card. | |
| python package_teacher.py <teacher output dir> | |
| """ | |
| import collections | |
| import glob | |
| import hashlib | |
| import json | |
| import sys | |
| from pathlib import Path | |
| import pyarrow as pa | |
| import pyarrow.parquet as pq | |
| root = Path(sys.argv[1]) | |
| raw = root / "data" | |
| out = root / "parquet" | |
| out.mkdir(exist_ok=True) | |
| by = collections.defaultdict(list) | |
| for p in sorted(glob.glob(str(raw / "*.s*.jsonl"))): | |
| task = Path(p).name.split(".")[0] | |
| for line in open(p, encoding="utf-8"): | |
| r = json.loads(line) | |
| extra = {k: v for k, v in r.items() if k not in ("id", "task", "lang", "messages", "teacher", "source", "source_license")} | |
| by[task].append({"id": r["id"], "task": task, "language": r["lang"], "messages": json.dumps(r["messages"], ensure_ascii=False), | |
| "n_turns": len(r["messages"]), "teacher": r["teacher"], "source": r["source"], "source_license": r["source_license"], | |
| "meta": json.dumps(extra, ensure_ascii=False)}) | |
| stats, files = {}, {} | |
| for task, rows in sorted(by.items()): | |
| seen, uniq = set(), [] | |
| for r in rows: | |
| if r["id"] not in seen: | |
| seen.add(r["id"]) | |
| uniq.append(r) | |
| p = out / f"{task}.parquet" | |
| pq.write_table(pa.Table.from_pylist(uniq), p, compression="zstd") | |
| files[p.name] = hashlib.sha256(p.read_bytes()).hexdigest() | |
| stats[task] = {"rows": len(uniq), "languages": dict(collections.Counter(r["language"] for r in uniq)), | |
| "sources": dict(collections.Counter(r["source"] for r in uniq))} | |
| (root / "manifest.json").write_text(json.dumps({"stats": stats, "files": files}, indent=1, ensure_ascii=False), encoding="utf-8") | |
| rows_md = "\n".join(f"| `{t}` | {s['rows']:,} | {', '.join(f'{k}: {v:,}' for k, v in s['languages'].items())} |" for t, s in stats.items()) | |
| card = f"""--- | |
| license: other | |
| license_name: mixed-per-row | |
| language: [pl, en] | |
| pretty_name: Slayer teacher data (Qwen3-8B, PL+EN) | |
| tags: [synthetic, math, sft, polish] | |
| configs: | |
| """ + "".join(f"- config_name: {t}\n data_files: parquet/{t}.parquet\n" for t in stats) + f"""--- | |
| # Slayer teacher data (Qwen3-8B, PL + EN) | |
| **Private working dataset.** Synthetic SFT conversations generated on 2026-11-25 for the Slayer1B-1.09 SFT experiment E3 | |
| (math-heavy mix). Teacher: `Qwen/Qwen3-8B` @ `b968826d9c` (Apache-2.0), non-thinking mode, vLLM, 8 × RTX 5090. | |
| No Claude, GPT or Gemini output is used anywhere. Generator code: `teacher.py` in the Slayer SFT workspace. | |
| | Task | Rows | Languages | | |
| |---|---:|---| | |
| {rows_md} | |
| ## What each task is | |
| - `math_en`: GSM8K train (MIT), AQuA-RAT train (Apache-2.0), MATH train levels 1-3 (MIT). Short step-by-step solution ending with | |
| `Answer: ...`; **kept only when the final answer matches the dataset's answer key**. | |
| - `math_pl`: the same problems translated into Polish by the teacher, solved in Polish (`Odpowiedź: ...`), same key check. | |
| - `math_aug`: new grade-school word problems (PL with Polish settings, and EN) written by the teacher from GSM8K seeds, solved | |
| twice at temperature 0.7, kept only if both answers agree and are whole numbers (self-consistency, no external key). | |
| - `know`: single-turn general-knowledge, advice and explanation conversations; questions written by the teacher across 60 PL / 50 EN | |
| topics × 14 styles (facts, why/how, comparisons, advice, ELI5, steps, definitions, typos, personal situations, trick questions, small talk, ideas). | |
| - `multiturn`: 2-4 user turns; the teacher plays the user with a follow-up move each turn (detail, example, simpler, disagree, | |
| summarise, related question, own situation, refer back, thanks + next, plan, topic switch, casual chat style) and the assistant. | |
| - `safety`: prompts from Aegis 2.0 train (CC-BY-4.0; half translated to Polish). The teacher re-judges every prompt Aegis labels | |
| unsafe; only prompts it also judges harmful get a short refusal with a safe alternative (`meta.refused`), the rest get a normal answer. | |
| Contains harmful requests as user turns, by design. | |
| - `instruct`: verifiable format constraints (exactly N items, one word, yes/no, N bullet lines, at most two sentences, translation); | |
| kept only when the reply passes the programmatic check. | |
| - `humor`: short jokes, funny names, rhymes, puns (PL + EN). Quality of the Polish jokes is modest. | |
| ## Columns | |
| `id`, `task`, `language`, `messages` (JSON list of {{role, content}}), `n_turns`, `teacher`, `source`, `source_license`, `meta` (JSON). | |
| ## Licence and caveats | |
| Each row records its source and the source licence (`source_license`); rows written entirely by the teacher are marked as | |
| teacher output (Qwen3 is Apache-2.0 with no conditions on outputs). Derived math rows follow the licence of the source problem set. | |
| Knowledge answers are unverified model output and contain factual errors, especially in Polish; math rows are checked only on | |
| the final answer, not on every step. Not decontaminated here: the SFT build decontaminates against the eval suites before training. | |
| """ | |
| (root / "README.md").write_text(card, encoding="utf-8") | |
| print(json.dumps(stats, indent=1, ensure_ascii=False)) | |