Document completed Slayer1B 1.10 and publish its part 2 training code
Browse filesFiles changed (4)
- README.md+134-69
- code/README.md+15-7
- code/pack_110d.pyAdded+299
- code/start_110d.pyAdded+217
14 unmodified lines151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798997 unmodified lines10710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014 unmodified lines# Slayer1B 1.10**Training in progress.** This run started on 27 November 2026 at 14:28 UTC and is expected to finish around05:00 UTC on 28 November. The weights will be added here when it ends, together with the evaluation of everycheckpoint. Until then this page describes the data, the recipe, the code and the results measured so far.A compact **Polish–English base language model**. Slayer1B 1.10 continues the final weights of[Slayer1B 1.09](https://huggingface.co/SlayerLab/Slayer1B-1.09) (update 95,000) on about 10 billion tokens: 72.6%general text and scientific papers, plus code, mathematics, reading comprehension, tool calls and logic.- **No non-commercial data:** no data source carries non-commercial or research-only terms.Five datasets used in the earlier variant [Slayer1B 1.10b-NC](https://huggingface.co/SlayerLab/Slayer1B-1.10b-NC)were removed (see Training data).- **Know before you load:** this is a **base model**, not a chat assistant. It has no chat template and has notbeen instruction-tuned.## Model details| Property | Specification ||---|---|| Checkpoint | Base model; continued pretraining from Slayer1B 1.09 (update 95,000) || Parameters | 1.07B || Languages | Polish and English || Context length | 4,096 tokens || Vocabulary | 32,768 tokens (tokenizer v6, as in Slayer1B 1.08 and 1.09) || Architecture | 20-layer decoder-only Transformer, width 2,048, 16 heads; SwiGLU, RMSNorm, RoPE, QK normalization, value residuals || License | Apache-2.0 |## Results so farPaired comparison on the same questions: the latest measured checkpoint of this run (update 2,859, about 3 billiontokens, 30% of the run) against the starting point, Slayer1B 1.09 update 95,000. Zero-shot multiple choice in percent;GSM8K 5-shot with a strict answer match. Significance: McNemar test on paired answers, Holm correction across all29 metric rows of our evaluation panel (the table shows the main ones).| Benchmark | Metric | n | 1.09 (update 95,000) | 1.10 (update 2,859) | change (points) | after Holm correction ||---|---|---:|---:|---:|---:|---|| Belebele-PL, answer letter permuted | acc | 900 | 24.78 | 28.31 | +3.53 | **significant** || BoolQ | acc_norm | 3270 | 63.55 | 66.57 | +3.03 | **significant** || MBPP | pass@1 | 257 | 0.00 | 3.89 | +3.89 | **significant** || HumanEval | pass@1 | 164 | 0.00 | 3.05 | +3.05 | not significant || ARC-Challenge | acc_norm | 1172 | 35.84 | 38.48 | +2.65 | not significant || GSM8K | strict match | 1319 | 0.61 | 1.59 | +0.99 | not significant || MMLU-PL | acc | 14042 | 25.00 | 25.86 | +0.85 | not significant || HellaSwag | acc_norm | 10042 | 56.13 | 56.12 | −0.01 | not significant || HellaSwag | acc | 10042 | 43.50 | 42.78 | −0.72 | **significant (decline)** || HellaSwag-PL | acc_norm | 10042 | 49.42 | 49.40 | −0.02 | not significant || ARC-Easy-PL | acc | 2376 | 50.21 | 49.87 | −0.34 | not significant || WinoGrande | acc | 1267 | 57.46 | 56.43 | −1.03 | not significant || OpenBookQA | acc_norm | 500 | 37.60 | 35.80 | −1.80 | not significant || PIQA | acc_norm | 1838 | 72.96 | 71.87 | −1.09 | not significant || MultiBLiMP-PL | acc | 3272 | 98.38 | 98.20 | −0.18 | not significant |How to read this: Polish reading comprehension (Belebele), BoolQ and code (MBPP) improved significantly; the first twowere already up at update 1,906, and code has risen at every checkpoint (HumanEval 0 → 3 → 5 → 5 solved tasks, MBPP0 → 5 → 7 → 10 at updates 953, 1,906 and 2,859). English HellaSwag declined slightly in raw accuracy, while itsstandard length-normalized score did not change; we keep watching English commonsense benchmarks.Code is scored by running each task's tests in an isolated sandbox. An earlier version of our evaluation script gave0% for every model because of a prompt-formatting error; the numbers above come from the corrected script, and 1.09indeed solves none of these tasks. Results for every checkpoint appear on[Track](https://track.fabryka.ai/run/8f40100b-93b7-588b-9cdc-12ee6f1e0a70) as they are measured, next to thetraining loss.## Training| | ||---|---|| Start | Slayer1B 1.09 weights (update 95,000), fresh optimizer || Length | 9,530 updates of 1,048,576 tokens each (about 10 billion tokens), in ten equal data slots || Schedule | Muon lr 0.02 + AdamW lr 6e-4, 200-update warmup, then constant; weight decay 0.1, gradient clipping 1.0 || Hardware | 8 × NVIDIA RTX PRO 6000, BF16 || Throughput | about 192,000 tokens per second, about 225,000 from update 2,859 (see Code) |<img src="plots/slayer1b-110-clean-workflow.png" alt="Slayer1B 1.10 from data to evaluation, with the checks between steps" width="100%">## Training dataAbout 10 billion tokens: 70% English and 30% Polish, the same ratio in every slot.<img src="plots/slayer1b-110-clean-data-mix.png" alt="Slayer1B 1.10 data mix" width="100%">| Component | Share | What it is ||---|---:|---|7 unmodified lines| Tool calls | 3.13% | Nemotron-Agentic v1 and Toucan: call a declared tool with JSON arguments, use the result, or decline to call || Logic | 2.83% | logic puzzles and multi-step deduction tasks |Reading-comprehension examples are shown four times; everything else once. A full list of sources with theirlicenses will be added to [Slayer1B-Dataset](https://huggingface.co/datasets/SlayerLab/Slayer1B-Dataset) togetherwith the weights.**Removed against 1.10b-NC:** ReClor and DREAM (non-commercial licenses), xLAM (research-only), When2Call (builtfrom xLAM) and WikiReading Recycled (no license stated).**Checks before training.** The exact training data was compared with the test sets of the benchmarks above andwith our held-out tool-calling test set; overlapping documents were removed, and the final data has no overlap.Some public tool-call datasets contain copies of 14 questions from the BFCL function-calling benchmark; theconversations that contain them are not in the training data (checked by searching the training data itself).**Known imperfection.** 18 web pages in the mathematics data contain an e-mail address that the page's author wrotein an obfuscated form (for example "name [at] domain"); our filter did not catch this form, and these pages were notremoved in this run.## CodeThe exact training code is in [`code/`](code/), with SHA-256 checksums: the trainer, both launchers of this run andthe data packer. At update 2,859 the launcher was switched to a faster setting (activation recomputation off,checkpoint every 400 updates instead of 200); on one GPU the loss matched to the fourth decimal with both settings.## Limitations- Not instruction-tuned: do not expect reliable chat, instruction following or structured output.- Short context: 4,096 tokens.- Generated content can be inaccurate, biased, offensive or personal.- Results above compare two checkpoints of one run; they are descriptive, not a controlled experiment that isolatesthe effect of any single data source.**Authors:** Arkadiusz Słota, Anna Sieczka, Piotr Styła, Aleksander Ogrodzki, Paweł Puzio, Marcin Kuśmierski, Kacper Wikieł. **Funded by Fabryka AI.**14 unmodified lines151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411427 unmodified lines15015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420514 unmodified lines# Slayer1B 1.10**Training finished on 29 November 2026 at update 21,450.** The weights of every checkpoint, including the finalone, are in [Slayer1B-1.10-checkpoints](https://huggingface.co/SlayerLab/Slayer1B-1.10-checkpoints). This repositoryholds the description, the training code and the plots; it contains no weights, so loading this repository id doesnot download a model (see [How to load](#how-to-load)).A compact **Polish–English base language model**. Slayer1B 1.10 continues the final weights of[Slayer1B 1.09](https://huggingface.co/SlayerLab/Slayer1B-1.09) (update 95,000) in two parts on one update axis:- **Part 1**, updates 1–9,530 (27–28 November): about 10 billion tokens of general text and scientific papers, pluscode, mathematics, reading comprehension, tool calls and logic.- **Part 2**, updates 9,531–21,450 (28–29 November): 12.5 billion trained positions, 70% English and 30% Polish, witha large share of mathematics and scientific text, started from the update-9,530 weights.- **Licence scope of the data:** for part 1, we removed five sources of the earlier[Slayer1B 1.10b-NC](https://huggingface.co/SlayerLab/Slayer1B-1.10b-NC) mixture with non-commercial, research-only,derivative or undocumented terms (see Training data). For part 2, source pins and licence evidence will be publishedin [Slayer1B-Dataset](https://huggingface.co/datasets/SlayerLab/Slayer1B-Dataset).- **Know before you load:** this is a **base model**, not a chat assistant. It has no chat template and has not beeninstruction-tuned.## Model details| Property | Specification ||---|---|| Checkpoint | Base model; continued pretraining from Slayer1B 1.09 (update 95,000) || Parameters | 1.07B (1,073,912,851) || Languages | Polish and English || Context length | 4,096 tokens || Vocabulary | 32,768 tokens (tokenizer v6, as in Slayer1B 1.08 and 1.09); id 0 is end-of-text || Architecture | 20-layer decoder-only Transformer, width 2,048, 16 heads; SwiGLU, RMSNorm, RoPE, QK normalization, value residuals || License | Apache-2.0 |## How to loadThe final weights are the folder `step-21450` of the[checkpoints repository](https://huggingface.co/SlayerLab/Slayer1B-1.10-checkpoints/tree/0d58660fa0e0e3498ad1f615f7a60f632cdd3698/step-21450)(revision `0d58660fa0e0e3498ad1f615f7a60f632cdd3698`; `model.safetensors` SHA-256`30af25a46303786c7cfb185bb5ec25facc536690bbfcec32ccc1879870f52d24`). Each step folder is a complete package with`model.safetensors` (float32), `config.json`, `tokenizer.json`, `load_slayer.py`, the model code and `SHA256SUMS`.Check the files with `sha256sum -c SHA256SUMS` inside the folder, then run from the folder that contains`step-21450`:```pythonimport sys; sys.path.insert(0, "step-21450")import torch, load_slayerfrom tokenizers import Tokenizermodel = load_slayer.load("step-21450") # float32, eval mode, CPUtok = Tokenizer.from_file("step-21450/tokenizer.json")ids = torch.tensor([tok.encode("Stolica Polski to").ids])logits, _ = model(ids)```In part 2, `config.json` records the update counted from the start of part 2 (`step-21450` has `"step": 11920`).## ResultsPaired comparison on the same questions: the final checkpoint (update 21,450) against the starting point, Slayer1B 1.09update 95,000, and against the end of part 1 (update 9,530). Zero-shot multiple choice in percent; GSM8K 5-shot with astrict answer match; code is scored by running each task's tests in an isolated sandbox. Significance: McNemar test onpaired answers, Holm correction across all 29 metric rows of our evaluation panel (the table shows the main ones).**↑ / ↓** = significantly higher / lower after correction, **–** = no significant difference.| Benchmark | Metric | n | 1.09 (95,000) | 1.10 (9,530) | 1.10 final (21,450) | final vs 1.09 | final vs 9,530 ||---|---|---:|---:|---:|---:|:---:|:---:|| HumanEval | tasks solved | 164 | 0 | 14 | 18 | ↑ | – || MBPP | tasks solved | 257 | 0 | 31 | 47 | ↑ | – || GSM8K | problems solved | 1319 | 8 | 31 | 35 | ↑ | – || BoolQ | acc | 3270 | 62.51 | 68.53 | 64.68 | – | ↓ || HellaSwag | acc_norm | 10042 | 56.13 | 55.64 | 54.34 | ↓ | ↓ || MMLU-PL | acc (answer letter) | 14042 | 25.00 | 26.99 | 25.25 | – | ↓ || Belebele-PL | acc, answer letter permuted | 900 | 24.78 | 26.81 | 24.78 | – | ↓ || ARC-Challenge | acc_norm | 1172 | 35.84 | 39.08 | 36.26 | – | – || ARC-Challenge | acc | 1172 | 33.70 | 35.24 | 31.31 | – | ↓ || MMLU-PL | answer completion | 14042 | 26.99 | 28.15 | 27.55 | – | – || HellaSwag-PL | acc_norm | 10042 | 49.42 | 49.75 | 49.16 | – | – || ARC-Easy-PL | acc | 2376 | 50.21 | 52.06 | 50.76 | – | – || WinoGrande | acc | 1267 | 57.46 | 58.09 | 55.96 | – | – || PIQA | acc_norm | 1838 | 72.96 | 71.44 | 71.00 | – | – || OpenBookQA | acc_norm | 500 | 37.60 | 35.00 | 36.60 | – | – || MultiBLiMP-PL | acc | 3272 | 98.38 | 97.80 | 98.26 | – | – |How to read this. Against the 1.09 start, the final checkpoint solves code tasks that 1.09 could not (HumanEval 18of 164, MBPP 47 of 257) and more GSM8K problems (35 against 8 of 1,319); HellaSwag is lower. Against the end of part 1,BoolQ, HellaSwag, MMLU-PL by answer letter, Belebele-PL with the letter permuted and ARC-Challenge plain accuracy arelower, and no score is significantly higher: MBPP 47 is the highest value in the run but not significant againstupdate 9,530 (Holm-adjusted 0.27). Outside the table, BoolQ length-normalized accuracy is lower against both referencepoints and HellaSwag-PL plain accuracy against the 1.09 start. Part 2 therefore shows no confirmed gain on thesebenchmarks over part 1. We have not tested the cause.**Tool calling.** Part 2 has no dedicated tool-call training blocks. On our held-out conversations (greedy decoding,reference history given, each step measured separately; not an end-to-end task result), the final checkpoint against9,530: calls a tool when one is needed 340 → 81 of 389, starts a direct answer when no tool is needed 113 → 50 of 255;with the call header given, correct function name 367 → 152 of 389; uses the tool result 373 → 362 of 387. All ninemeasured rows are significantly lower after Holm correction across those rows. At checkpoint 14,298 the model stillcalled a tool in 350 of 389 cases. The measurement does not isolate the cause.Scores for every measured checkpoint are on the [Slayer1B catalogue](https://huggingface.co/spaces/SlayerLab/Slayer1B)("1.10 checkpoint by checkpoint"), with EvalPlus and CRUXEval-O where they were measured and a comparison withBielik 1.5B at checkpoint 14,298; training loss is on [Track](https://track.fabryka.ai/run/8f40100b-93b7-588b-9cdc-12ee6f1e0a70).## Training| | Part 1 | Part 2 ||---|---|---|| Start | Slayer1B 1.09 weights (update 95,000), fresh optimizer | weights of update 9,530, fresh optimizer || Updates | 1–9,530, ten data slots of 953 | 9,531–21,450, ten data slots of 1,192 || Tokens | about 10 billion | 12,499,025,920 (11,920 × 1,048,576) || Schedule | Muon lr 0.02 + AdamW lr 6e-4, 200-update warmup, then constant | the same, constant to the end (no learning-rate decay) || Hardware | 8 × NVIDIA RTX PRO 6000, BF16 | 8 × NVIDIA RTX PRO 6000, BF16 || Wall-clock | started 27 Nov 14:28 UTC, finished 28 Nov | 28 Nov 08:43 – 29 Nov 01:37 UTC (16 h 54 min, including a 6-minute stop for a disk problem); about 205,000 tokens per second on average |Each update is 1,048,576 tokens. Neither part ends with a learning-rate decay.<img src="plots/slayer1b-110-clean-workflow.png" alt="Slayer1B 1.10 part 1 from data to evaluation, with the checks between steps" width="100%">## Training data### Part 1 (updates 1–9,530)About 10 billion tokens: 70% English and 30% Polish, the same ratio in every slot.<img src="plots/slayer1b-110-clean-data-mix.png" alt="Slayer1B 1.10 part 1 data mix" width="100%">| Component | Share | What it is ||---|---:|---|7 unmodified lines| Tool calls | 3.13% | Nemotron-Agentic v1 and Toucan: call a declared tool with JSON arguments, use the result, or decline to call || Logic | 2.83% | logic puzzles and multi-step deduction tasks |Reading-comprehension examples are shown four times; everything else once.**Removed against 1.10b-NC:** ReClor and DREAM (non-commercial licenses), xLAM (research-only), When2Call (builtfrom xLAM) and WikiReading Recycled (no license stated).**Checks before training.** The exact training data was compared with the test sets of the benchmarks above and withour held-out tool-calling test set; overlapping documents were removed, and the final data has no overlap. Some publictool-call datasets contain copies of 14 questions from the BFCL function-calling benchmark; the conversations thatcontain them are not in the training data (checked by searching the training data itself).**Known imperfection.** 18 web pages in the mathematics data contain an e-mail address that the page's author wrote inan obfuscated form (for example "name [at] domain"); our filter did not catch this form, and these pages were notremoved in this run.### Part 2 (updates 9,531–21,450)Three different counts describe part 2: a built pool of about 14.203 billion positions before packing (table below),12,499,108,398 positions packed into the ten training slots, and 12,499,025,920 positions trained (11,920 updates ×1,048,576). The 70% English / 30% Polish split applies to the packed training data, not to the pool.| Component | Billion positions in the built pool | What it is ||---|---:|---|| English mathematics and science | 5.32 | arXiv papers 1.909, StackExchange 1.278, FineMath 1.259, further mathematics 0.610, other 0.259 || Polish web and papers | 5.07 | FineWeb-2 Polish 4.98, Biblioteka Nauki 0.090 || FineWeb-Edu | 2.859 | educational English web text || Code | 0.954 | Stack-Edu code |Part 2 has **no dedicated tool-call or reading-comprehension blocks**; web text can still contain such content. Thepre-training checks described for part 1 are documented for part 1 only. The full list of part-2 sources withrevisions, licences and licence evidence will be published in[Slayer1B-Dataset](https://huggingface.co/datasets/SlayerLab/Slayer1B-Dataset). Exposure counts include repeatedexposures and are not counts of globally unique documents.## CodeThe exact training code is in [`code/`](code/), with SHA-256 checksums: the trainer, the launchers and the datapacker. At update 2,859 the part-1 launcher was switched to a faster setting (activation recomputation off,checkpoint every 400 updates instead of 200); on one GPU the loss matched to the fourth decimal with both settings.Part 2 used the same trainer file (`train_gpt_ref_r24_3.py`, SHA-256 `592ac055…`) with its own launcher`start_110d.py` (constant learning rate 6e-4 without decay, ten slots of 1,192 updates, start from the weights of update9,530 with a fresh optimizer) and packer `pack_110d.py`. To load the published weights, use the model definition shippedwith the checkpoints; it computes the same forward pass as the trainer.## Limitations- Not instruction-tuned: do not expect reliable chat, instruction following or structured output.- Short context: 4,096 tokens.- Generated content can be inaccurate, biased, offensive or personal.- Results compare checkpoints of one run with its starting points; they are descriptive, not a controlled experimentthat isolates the effect of any single data source or of the learning-rate schedule.**Authors:** Arkadiusz Słota, Anna Sieczka, Piotr Styła, Aleksander Ogrodzki, Paweł Puzio, Marcin Kuśmierski, Kacper Wikieł. **Funded by Fabryka AI.**
1234567891011121314151617181910 unmodified lines30313233343536373839# Training codeThe exact files that trained Slayer1B 1.10b-NC and the clean Slayer1B 1.10 run (in progress on 27–28 November 2026).Each file below is byte-identical to the copy that ran on the training machine; check it with `sha256sum`.| File | SHA-256 | Used by ||---|---|---|| `train_gpt_ref_r24_3.py` | `592ac0552bff64c489aa1036143e94d591f29a19d55aa2f13ecccbafc0bd01a8` | the trainer, both runs || `start_110_base.py` | `f7a7b319c5df0f8ce4a84ae0ab23b5032aac450cbdf5b80c20116ac03e5efd50` | launcher of [1.10b-NC](https://huggingface.co/SlayerLab/Slayer1B-1.10b-NC) (the earlier, non-commercial variant) || `start_110c_v1.py` | `640739f865a4db4369b0a1385e9aef6ad30248b4755aebcb4610a45a1c1f4f6f` | launcher of clean 1.10, updates 0 to 2,859 || `start_110c.py` | `ff3eff4d0eb9be7df915f338ef4880be2242782f3cccb72802cc2a7072f9eb7b` | launcher of clean 1.10, from update 2,859 || `pack_110c.py` | `171563b544ed07a88650427f0b924089e81a8e1594dfdd2c3f0ff64315eb52b9` | builds the clean 1.10 training package from approved data blocks |## How the pieces fit- The **launcher** checks the SHA-256 of the trainer, the tokenizer, the starting weights (Slayer1B 1.09, update 95,000)and the data package, then runs the trainer once per data slot on 8 GPUs and keeps a permanent copy of the checkpointat the end of every slot. All training settings (learning rate, batch, optimizer, schedule) are written in thelauncher's trainer command, so the launcher file is the full recipe.10 unmodified linesrecomputation (`--act-ckpt`) switched off and the rolling checkpoint written every 400 updates instead of every 200.Both change speed only, not the computation: on one GPU the loss matched to the fourth decimal with recomputation onand off, and training throughput on 8 GPUs rose from about 192 to about 225 thousand tokens per second.## LicenseThe code in this folder is released under Apache-2.0, like the trainer published with Slayer1B-1.09. Parts adaptedfrom other projects are credited in the trainer's header (Muon from modded-nanogpt; several optional architectureoptions adapted from kurcontko/Tiny-Chick-10M, Apache-2.0). The model weights in this repository remain underCC BY-NC 4.0.12345678910111213141516171819202110 unmodified lines32333435363738394041424344454647# Training codeThe exact files that trained Slayer1B 1.10b-NC and the clean Slayer1B 1.10 run (finished on 29 November 2026).Each file below is byte-identical to the copy that ran on the training machine; check it with `sha256sum`.| File | SHA-256 | Used by ||---|---|---|| `train_gpt_ref_r24_3.py` | `592ac0552bff64c489aa1036143e94d591f29a19d55aa2f13ecccbafc0bd01a8` | the trainer, both runs and both parts of clean 1.10 || `start_110_base.py` | `f7a7b319c5df0f8ce4a84ae0ab23b5032aac450cbdf5b80c20116ac03e5efd50` | launcher of [1.10b-NC](https://huggingface.co/SlayerLab/Slayer1B-1.10b-NC) (the earlier, non-commercial variant) || `start_110c_v1.py` | `640739f865a4db4369b0a1385e9aef6ad30248b4755aebcb4610a45a1c1f4f6f` | launcher of clean 1.10, updates 0 to 2,859 || `start_110c.py` | `ff3eff4d0eb9be7df915f338ef4880be2242782f3cccb72802cc2a7072f9eb7b` | launcher of clean 1.10, updates 2,859 to 9,530 || `pack_110c.py` | `171563b544ed07a88650427f0b924089e81a8e1594dfdd2c3f0ff64315eb52b9` | builds the training package of clean 1.10 part 1 from approved data blocks || `start_110d.py` | `f5e97b112214d4b2c374e43657dd4587eda979b61d3344410e4da38ed32cd898` | launcher of clean 1.10 part 2, updates 9,531 to 21,450 || `pack_110d.py` | `3c304d179d921ec704cde3c32c6a58257ca518a5b49db9ac0059158b29c640fe` | builds the training package of clean 1.10 part 2 |## How the pieces fit- The **launcher** checks the SHA-256 of the trainer, the tokenizer, the starting weights (part 1: Slayer1B 1.09, update 95,000; part 2: clean 1.10, update 9,530)and the data package, then runs the trainer once per data slot on 8 GPUs and keeps a permanent copy of the checkpointat the end of every slot. All training settings (learning rate, batch, optimizer, schedule) are written in thelauncher's trainer command, so the launcher file is the full recipe.10 unmodified linesrecomputation (`--act-ckpt`) switched off and the rolling checkpoint written every 400 updates instead of every 200.Both change speed only, not the computation: on one GPU the loss matched to the fourth decimal with recomputation onand off, and training throughput on 8 GPUs rose from about 192 to about 225 thousand tokens per second.- **Clean 1.10 part 1 → part 2, at update 9,530**: new launcher `start_110d.py` and packer `pack_110d.py`, same trainer.Part 2 starts from the weights of update 9,530 with a fresh optimizer (`--init-from`; `--resume` is used only tocontinue inside part 2 after an interruption) and keeps the learning rate constant at 6e-4 without decay, in ten slotsof 1,192 updates. The packer adds per-component epochs and per-language base shares. The docstring at the top of`start_110d.py` was carried over from the part-1 launcher; the pinned constants and the trainer command below it arewhat ran.## LicenseThe code in this folder is released under Apache-2.0, like the trainer published with Slayer1B-1.09. Parts adaptedfrom other projects are credited in the trainer's header (Muon from modded-nanogpt; several optional architectureoptions adapted from kurcontko/Tiny-Chick-10M, Apache-2.0). The weights of clean Slayer1B 1.10 are released underApache-2.0 (see the model card); the earlier variant 1.10b-NC keeps CC BY-NC 4.0.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299#!/usr/bin/env python3"""Pack independently approved v6 document streams into the ten slots of clean Base 1.10.
Differences from pack_110_base.py: roles code and logic; per-component task epochs ("epochs", 1-4);base pools may carry "base_weight" (share of each slot's base fill within its language) and"max_unique_positions" (capacity cap); the specialist unique budget comes from the manifest("task_unique_cap") instead of a fixed fraction of the token cap."""import argparsefrom collections import Counterfrom hashlib import sha256import heapqimport jsonfrom pathlib import Pathimport tempfile
import numpy as np
import start_110d as launch
ROLES = {"reading", "tools", "math", "code", "logic", "base"}MAX_EPOCHS = 4LANGS = ("EN", "PL")
class Pool: def __init__(self, root, row): self.role, self.lang = row["role"], row["language"] self.name = row["name"] if self.role not in ROLES or self.lang not in LANGS or not self.name: raise ValueError("invalid component name, role or language") self.reason = row.get("reason") if not isinstance(self.reason, str) or not self.reason.strip(): raise ValueError(f"missing selection reason: {self.name}") tokens, index = root / row["bin"], root / row["index"] self.pin = row["bin_sha256"] launch.require_hash(tokens, self.pin) launch.require_hash(index, row["index_sha256"]) if tokens.stat().st_size % 2 or index.stat().st_size % 8: raise ValueError(f"unaligned binary or index: {self.name}") self.ends = np.memmap(index, dtype="<u8", mode="r") self.tokens = np.memmap(tokens, dtype="<u2", mode="r") self.total = int(self.ends[-1]) if not 0 < self.ends[0] <= self.total == self.tokens.size or np.any(self.ends[1:] <= self.ends[:-1]): raise ValueError(f"invalid document ends: {self.name}") for start in range(0, self.ends.size, 65536): if np.any(self.tokens[self.ends[start:start + 65536] - 1] != 0): raise ValueError(f"document does not end with EOT=0: {self.name}") self.cursor = 0 self.limit = len(self.ends) if "max_unique_positions" in row: budget = row["max_unique_positions"] if type(budget) is not int or budget < 1: raise ValueError(f"invalid unique budget: {self.name}") self.limit = int(np.searchsorted(self.ends, np.uint64(min(budget, self.total)), side="right")) self.epochs = row.get("epochs") self.weight = row.get("base_weight") if self.role == "base": if self.epochs is not None: raise ValueError(f"base pools are read once: {self.name}") if self.weight is not None and (type(self.weight) is not int or self.weight < 1): raise ValueError(f"invalid base weight: {self.name}") else: if self.weight is not None: raise ValueError(f"base_weight is only for base pools: {self.name}") if self.epochs is not None and (type(self.epochs) is not int or not 1 <= self.epochs <= MAX_EPOCHS): raise ValueError(f"epochs must be 1-{MAX_EPOCHS}: {self.name}")
def offset(self, row): return int(self.ends[row - 1]) if row else 0
@property def remaining(self): return self.offset(self.limit) - self.offset(self.cursor)
def take(self, minimum): start = self.cursor if minimum: until = self.offset(start) + minimum self.cursor = min(self.limit, int(np.searchsorted(self.ends, np.uint64(until))) + 1) return start, self.cursor
def task_cut(src, target, per_epoch): if not target: return 0 epoch, remainder = divmod(target, per_epoch) local = int(np.searchsorted(src.ends[:src.limit], np.uint64(remainder))) + 1 if remainder else 0 return epoch * src.limit + local
def plan(pools, task_epochs=1, max_tool_share_bp=None, task_unique_cap=None): minimum = (launch.SLOT_STEPS * launch.BATCH + 1) * launch.BLOCK en = minimum * 7 // 10 target = {"EN": en, "PL": minimum - en} if type(task_epochs) is not int or task_epochs not in (1, 2): raise ValueError("task_epochs must be 1 or 2") specialists = [src for src in pools if src.role != "base"] for src in specialists: if src.epochs is None: src.epochs = task_epochs if (max_tool_share_bp is not None or any(src.epochs > 1 for src in specialists)) and ( type(max_tool_share_bp) is not int or not 1 <= max_tool_share_bp <= 10000 ): raise ValueError("an explicit max_tool_share_bp is required for repeated task epochs") specialist_tokens = sum(src.offset(src.limit) for src in specialists) if task_unique_cap is None: unique_cap = launch.FIRST_TRAIN_TOKEN_CAP // (5 * task_epochs) elif type(task_unique_cap) is int and 0 < task_unique_cap < launch.FIRST_TRAIN_TOKEN_CAP: unique_cap = task_unique_cap else: raise ValueError("invalid task_unique_cap") if specialist_tokens > unique_cap: for src in specialists: quota = src.offset(src.limit) * unique_cap // specialist_tokens src.limit = int(np.searchsorted(src.ends[:src.limit], np.uint64(quota), side="right")) unique_tasks = sum(src.offset(src.limit) for src in specialists) unique_tools = sum(src.offset(src.limit) for src in specialists if src.role == "tools") if max_tool_share_bp is not None and unique_tools * 10000 > unique_tasks * max_tool_share_bp: raise ValueError("selected sources exceed the tool share cap; lower their unique budgets") present_roles = {src.role for src in pools} slots = [] for step in range(1, launch.SLOTS + 1): spans, counts = [], Counter()
def add(src, lo, hi, epoch): if lo < hi: spans.append((src, lo, hi, epoch)) counts[src.lang] += src.offset(hi) - src.offset(lo)
for src in specialists: per_epoch = src.offset(src.limit) if not per_epoch: continue total = per_epoch * src.epochs lo = task_cut(src, total * (step - 1) // launch.SLOTS, per_epoch) hi = task_cut(src, total * step // launch.SLOTS, per_epoch) while lo < hi: epoch, start = divmod(lo, src.limit) end = min(src.limit, start + hi - lo) add(src, start, end, epoch + 1) lo += end - start for language in LANGS: need = target[language] - counts[language] plain = [src for src in pools if src.role == "base" and src.lang == language] capacity = sum(src.remaining for src in plain) if not 0 <= need <= capacity: raise ValueError(f"slot {step}: {language} needs {need} base tokens, has {capacity}") # Weighted fill keeping whole documents; a pool without base_weight weighs what it has left. weights = [(src, src.weight if src.weight is not None else src.remaining) for src in plain if src.remaining] left = sum(w for _, w in weights) for src, w in weights: if need and left: want = min(src.remaining, (need * w + left - 1) // left) add(src, *src.take(want), 1) need = max(0, target[language] - counts[language]) left -= w if need: for src in plain: if need and src.remaining: add(src, *src.take(need), 1) need = max(0, target[language] - counts[language]) if need: raise ValueError(f"slot {step}: {language} base fill short by {need}") if {src.role for src, _, _, _ in spans} != present_roles: raise ValueError(f"slot {step} does not contain every role present in the inputs") # transza 2 has no reading blocks (reading already at 4 epochs in 1.10); the PL-reading-per-slot rule does not apply. slots.append(spans) for src in specialists: src.cursor = src.limit return slots
def interleave(spans): # Merge document-aligned runs by relative progress through each source span. # Even a small specialist block is spread through the slot, not appended. pending = []
def schedule(i, lo): src, begin, end, _ = spans[i] first, last = src.offset(begin), src.offset(end) goal = src.offset(lo) + max(1, (last - first) // 4096) hi = min(end, int(np.searchsorted(src.ends, np.uint64(goal))) + 1) heapq.heappush(pending, ((src.offset(hi) - first) / (last - first), i, lo, hi))
for i, (_, start, _, _) in enumerate(spans): schedule(i, start) while pending: _, i, lo, hi = heapq.heappop(pending) src, _, end, _ = spans[i] yield memoryview(src.tokens[src.offset(lo):src.offset(hi)]).cast("B") if hi < end: schedule(i, hi)
def assemble(manifest, receipt_sha, output): launch.require_hash(manifest, receipt_sha) if output.exists(): raise FileExistsError(output) spec = json.loads(manifest.read_bytes()) if spec["tokenizer_sha256"] != launch.TOK_SHA: raise ValueError("approved inputs do not use the pinned v6 tokenizer") root = manifest.parent validation = (root / spec["validation"]["path"]).read_bytes() val_sha = sha256(validation).hexdigest() if val_sha != spec["validation"]["sha256"] or len(validation) % 2 or len(validation) < 2 * (launch.BLOCK + 2): raise ValueError("validation pin or geometry does not match") pools = [Pool(root, row) for row in spec["components"]] if len({p.name for p in pools}) != len(pools) or len({p.pin for p in pools}) != len(pools) or val_sha in {p.pin for p in pools}: raise ValueError("duplicate component name or train/validation bytes") epochs, tool_cap = spec.get("task_epochs", 1), spec.get("max_tool_share_bp") slots = plan(pools, epochs, tool_cap, spec.get("task_unique_cap")) planned_tokens = sum(src.offset(hi) - src.offset(lo) for spans in slots for src, lo, hi, _ in spans) if planned_tokens > launch.FIRST_TRAIN_TOKEN_CAP: raise ValueError("whole-document slot boundaries exceed the token cap") queue = {"steps_per_shard": launch.SLOT_STEPS, "shards": {}, "rotations": []} report = {"approved_inputs_sha256": receipt_sha, "task_epochs": epochs, "max_tool_share_bp": tool_cap, "task_unique_cap": spec.get("task_unique_cap"), "slots": {}} by_component, by_language, by_role = Counter(), Counter(), Counter() train_hash, pos = sha256(), 0 with tempfile.TemporaryDirectory(dir=output.parent) as tmp: stage = Path(tmp) / "packed" stage.mkdir() with (stage / "train.bin").open("wb") as train: for i, spans in enumerate(slots, 1): name, lo, slot_hash = f"slot{i:02d}", pos, sha256() for buf in interleave(spans): train.write(buf) train_hash.update(buf) slot_hash.update(buf) pos += buf.nbytes // 2 queue["shards"][name] = {"lo": lo, "hi": pos, "sha256": slot_hash.hexdigest()} queue["rotations"].append([name]) report["slots"][name] = per_slot = {} for p, a, b, epoch in spans: tokens = p.offset(b) - p.offset(a) entry = per_slot.setdefault(p.name, {"role": p.role, "language": p.lang, "ranges": [], "tokens": 0}) entry["ranges"].append({"epoch": epoch, "documents": [a, b]}) entry["tokens"] += tokens by_component[p.name] += tokens by_language[p.lang] += tokens by_role[p.role] += tokens launch.validate_queue(queue, pos) def share(tokens): return {"tokens": tokens, "percent": 100 * tokens / pos}
if by_component.total() != pos: raise ValueError("component totals do not match train.bin") for p in pools: if by_component[p.name] != p.offset(p.cursor) * (1 if p.role == "base" else p.epochs): raise ValueError(f"exposure accounting disagrees with selected documents: {p.name}") report["composition"] = { "basis": "positions in train.bin including EOT and slot buffer, not sampled training targets", "tokens": pos, "task_unique_positions": sum(p.offset(p.cursor) for p in pools if p.role != "base"), "task_exposure_positions": pos - by_role["base"], "by_component": { p.name: {**share(by_component[p.name]), "unique_positions": p.offset(p.cursor), "role": p.role, "language": p.lang, "reason": p.reason, "epochs": 1 if p.role == "base" else p.epochs, "base_weight": p.weight} for p in pools if by_component[p.name] }, "by_language": {k: share(v) for k, v in sorted(by_language.items())}, "by_role": {k: share(v) for k, v in sorted(by_role.items())}, } (stage / "val.bin").write_bytes(validation) queue_bytes = (json.dumps(queue, indent=2) + "\n").encode("ascii") (stage / "queue.json").write_bytes(queue_bytes) sums = f"{train_hash.hexdigest()} train.bin\n{val_sha} val.bin\n{sha256(queue_bytes).hexdigest()} queue.json\n".encode("ascii") (stage / "SHA256SUMS").write_bytes(sums) # Task repetitions in this tranche use only the selected prefix; defer each unused tail once. deferred = {"approved_inputs_sha256": receipt_sha, "first_train_sha256": train_hash.hexdigest(), "components": [{**row, "documents": [p.cursor, len(p.ends)], "token_range": [p.offset(p.cursor), p.total]} for row, p in zip(spec["components"], pools, strict=True) if p.cursor < len(p.ends)]} deferred_bytes = (json.dumps(deferred, indent=2, ensure_ascii=False) + "\n").encode("utf-8") (stage / "deferred.json").write_bytes(deferred_bytes) report["deferred_sha256"] = sha256(deferred_bytes).hexdigest() (stage / "assembly.json").write_text(json.dumps(report, indent=2) + "\n", encoding="utf-8") stage.rename(output) print(f"PACKED tokens={pos} SHA256SUMS={sha256(sums).hexdigest()} — awaiting final data acceptance", flush=True)
def main(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("approved_inputs", type=Path) parser.add_argument("approved_inputs_sha256") parser.add_argument("output", type=Path) args = parser.parse_args() try: assemble(args.approved_inputs, args.approved_inputs_sha256, args.output) except (OSError, ValueError, KeyError, TypeError) as exc: parser.exit(2, f"STOP: {exc}\n")
if __name__ == "__main__": main()123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217#!/usr/bin/env python3"""Launch clean Base 1.10 (no non-commercial data, 10 slots, 10B positions) from k95 on one Linux GPU node.This program never rents a VM.
INPUTS contains queue.json, train.bin, val.bin, tokenizer.json, wagi_95000.pt andSHA256SUMS. The approved SHA256SUMS must list exactly queue.json, train.bin andval.bin. Its SHA-256 is passed from the data handoff; code, tokenizer and k95 arepinned below. OUT must be on persistent storage. --check does not start training."""import argparsefrom hashlib import file_digestimport jsonimport osfrom pathlib import Pathimport reimport shutilimport subprocessimport sys
TRAINER_SHA = "592ac0552bff64c489aa1036143e94d591f29a19d55aa2f13ecccbafc0bd01a8"INIT_SHA = "05533b3d5c4d611eaa4bb8c61a98fed28451f8e2d876e8661fe85189d5527cac"TOK_SHA = "0640d3bd3674d7a6e59c540d945a2ad275a12e1bcaeb6007c37a90751f9815dd"RECEIPT_FILES = {"train.bin", "val.bin", "queue.json"}BLOCK, BATCH, SLOTS = 4096, 256, 10FIRST_TRAIN_TOKEN_CAP = 12_500_000_000 # EN 70% = 8.75B = 6.27B math/code + 2.48B of the 2.86B EN base (margin); PL 30% = 3.75B of 5.07B# Ten equal complete slots; each needs an extra block for the sampler's offset.SLOT_STEPS = (FIRST_TRAIN_TOKEN_CAP // (SLOTS * BLOCK) - 1) // BATCHLR_ARGS = ("--lr", "6e-4", "--min-lr", "6e-4", "--schedule", "wsd", "--decay-frac", "0")HEX = re.compile(r"[0-9a-f]{64}")ARCH = {"vocab": 32768, "block": BLOCK, "n_layer": 20, "n_embd": 2048, "n_head": 16, "norm": "rmsnorm", "norm_eps": 1e-6, "pos": "rope", "rope_theta": 500000, "ffn": "swiglu", "ffn_mult": 2.667, "attn_bias": 0, "value_residual": True, "qk_norm": True, "logit_cap": 0, "z_loss": 0}
def digest(path): with path.open("rb") as stream: return file_digest(stream, "sha256").hexdigest()
def require_hash(path, expected): if not HEX.fullmatch(expected) or digest(path) != expected: raise ValueError(f"SHA-256 mismatch: {path.name}")
def validate_queue(queue, train_tokens): if not 0 < train_tokens <= FIRST_TRAIN_TOKEN_CAP: raise ValueError("train.bin exceeds the token cap or is empty") schedule = [sid for rotation in queue["rotations"] for sid in rotation] if queue["steps_per_shard"] != SLOT_STEPS or len(schedule) != SLOTS or len(set(schedule)) != SLOTS: raise ValueError(f"queue must contain {SLOTS} distinct {SLOT_STEPS}-update slots") if set(schedule) != set(queue["shards"]): raise ValueError("queue shard IDs do not match the schedule") spans = sorted((queue["shards"][sid]["lo"], queue["shards"][sid]["hi"], sid) for sid in schedule) end = 0 for lo, hi, sid in spans: if not (lo == end < hi <= train_tokens and hi - lo >= (SLOT_STEPS * BATCH + 1) * BLOCK and HEX.fullmatch(queue["shards"][sid]["sha256"])): raise ValueError(f"invalid, overlapping, or undersized shard: {sid}") end = hi if end != train_tokens: raise ValueError("queue does not cover train.bin exactly")
def preflight(inputs, trainer, receipt_sha): receipt = inputs / "SHA256SUMS" require_hash(receipt, receipt_sha) entries = {} for line in receipt.read_text(encoding="ascii").splitlines(): sha, name = line.split(" ", 1) if name not in RECEIPT_FILES or name in entries or not HEX.fullmatch(sha): raise ValueError("invalid receipt entry") entries[name] = sha if entries.keys() != RECEIPT_FILES: raise ValueError("incomplete data receipt") require_hash(trainer, TRAINER_SHA) require_hash(inputs / "wagi_9530.pt", INIT_SHA) require_hash(inputs / "tokenizer.json", TOK_SHA) train_bytes = (inputs / "train.bin").stat().st_size val_bytes = (inputs / "val.bin").stat().st_size if train_bytes % 2 or val_bytes % 2 or val_bytes < 2 * (BLOCK + 2): raise ValueError("expected uint16 train.bin and nonempty validation windows") if train_bytes // 2 > FIRST_TRAIN_TOKEN_CAP: raise ValueError("train.bin exceeds the token cap") for name, pin in entries.items(): require_hash(inputs / name, pin) validate_queue(json.loads((inputs / "queue.json").read_bytes()), train_bytes // 2) print(f"PREFLIGHT-OK: trainer, k95, tokenizer and {SLOTS} data slots verified", flush=True)
def checkpoint_step(path): import torch c = torch.load(path, map_location="cpu", weights_only=True, mmap=True) step = c["step"] if type(step) is not int: raise ValueError("checkpoint has invalid step") return step
def checkpoint_sha(out, step): expected = None with (out / "events.jsonl").open(encoding="utf-8") as stream: for line in stream: event = json.loads(line) if event.get("kind") == "checkpoint" and event.get("updates") == step: expected = event["sha256"] if expected is None: raise ValueError("missing checkpoint event; do not advance the slot") return expected
def snapshot(out, step): ck = out / "ckpt.pt" if checkpoint_step(ck) != step: raise ValueError("checkpoint step differs from slot boundary") expected = checkpoint_sha(out, step) require_hash(ck, expected) history = out / "history" history.mkdir(exist_ok=True) # r24.2 atomically replaces ckpt.pt; a hardlink preserves these bytes without copying weights. target = history / f"ckpt_{step}.pt" try: os.link(ck, target) except FileExistsError: require_hash(target, expected) print(f"CHECKPOINT-OK update={step} sha256={expected} file={target}", flush=True)
def train(args): import fcntl
out, inputs = args.out, args.inputs out.mkdir(parents=True, exist_ok=True) with (out / "launch.lock").open("a") as lock: fcntl.flock(lock.fileno(), fcntl.LOCK_EX | fcntl.LOCK_NB) ck = out / "ckpt.pt" contract = json.dumps({"data_receipt": args.receipt_sha, "warmup": args.warmup, "trainer_sha256": TRAINER_SHA, "launcher_sha256": digest(Path(__file__))}, sort_keys=True) + "\n" marker = out / "launch.json" if marker.exists(): if marker.read_text(encoding="ascii") != contract: raise ValueError("run directory is bound to different inputs or schedule") else: if ck.exists() or (out / "events.jsonl").exists(): raise ValueError("refusing to adopt an existing run without its launch record") with marker.open("x", encoding="ascii") as stream: stream.write(contract) if checkpoint_step(inputs / "wagi_9530.pt") != 9530: raise ValueError("unexpected parent checkpoint update") step = checkpoint_step(ck) if ck.exists() else 0 if not 0 <= step <= SLOT_STEPS * SLOTS: raise ValueError("recovery checkpoint is outside this run") if step and step % SLOT_STEPS == 0: snapshot(out, step) elif step: require_hash(ck, checkpoint_sha(out, step)) for prior in range(SLOT_STEPS, step, SLOT_STEPS): if not (out / "history" / f"ckpt_{prior}.pt").is_file(): raise ValueError(f"missing preceding milestone {prior}") while step < SLOT_STEPS * SLOTS: gpu = subprocess.check_output(["nvidia-smi", "--query-gpu=name", "--format=csv,noheader"], text=True).splitlines() if len(gpu) != 8 or len(set(gpu)) != 1 or not any(kind in gpu[0] for kind in ("H200", "RTX PRO 6000")): raise ValueError("expected eight identical H200 or RTX PRO 6000 GPUs") busy = subprocess.check_output(["nvidia-smi", "--query-compute-apps=pid", "--format=csv,noheader"], text=True) if busy.strip() or shutil.disk_usage(out).free < 24 * 2**30: raise ValueError("GPU occupied or less than 24 GiB available for recovery writes") expected = (step // SLOT_STEPS + 1) * SLOT_STEPS env = {k: v for k, v in os.environ.items() if k not in {"HF_TOKEN", "HUGGING_FACE_HUB_TOKEN", "HUGGINGFACE_HUB_TOKEN", "PYTHONPATH", "CUDA_VISIBLE_DEVICES"}} env.update(HF_HUB_OFFLINE="1", HF_DATASETS_OFFLINE="1", OMP_NUM_THREADS="4", CUDA_DEVICE_ORDER="PCI_BUS_ID", PYTHONUNBUFFERED="1") if (Path.home() / ".cache/huggingface/token").exists() or (Path.home() / ".huggingface/token").exists(): raise ValueError("HF token file must not be present on the training node") arch = [] for name, value in ARCH.items(): arch.append("--" + name.replace("_", "-")) if value is not True: arch.append(str(value)) cmd = [sys.executable, "-m", "torch.distributed.run", "--standalone", "--nproc-per-node", "8", str(args.trainer), "--data-dir", str(inputs), "--out-dir", str(out), "--run-id", "slayer1b_110d", "--dtype", "uint16", "--steps", str(SLOTS * SLOT_STEPS), "--queue", str(inputs / "queue.json"), "--queue-one-slot", "--data-seed", "20261128", "--seed", "1", "--batch", str(BATCH), "--grad-accum", "8", "--loss-chunk", "1024", "--compile", "--optimizer", "muon", "--muon-lr", "0.02", "--wd", "0.1", "--grad-clip", "1.0", *LR_ARGS, "--warmup", str(args.warmup), "--log-every", "10", "--eval-every", "200", "--eval-iters", "20", "--eval-batch", "4", "--events-jsonl", str(out / "events.jsonl"), "--ckpt-every", "400", *arch] cmd += ["--resume"] if ck.exists() else ["--init-from", str(inputs / "wagi_9530.pt")] subprocess.run(cmd, check=True, env=env) snapshot(out, expected) step = expected print(f"RUN-DONE update={SLOT_STEPS * SLOTS}", flush=True)
def main(): p = argparse.ArgumentParser(description=__doc__) p.add_argument("inputs", type=lambda s: Path(s).resolve()) p.add_argument("trainer", type=lambda s: Path(s).resolve()) p.add_argument("out", type=lambda s: Path(s).resolve()) p.add_argument("receipt_sha") p.add_argument("--check", action="store_true") p.add_argument("--warmup", type=int, help="warmup steps selected after the stability probe") args = p.parse_args() if not args.check and (args.warmup is None or not 1 <= args.warmup <= 1000): p.error("training requires --warmup in [1, 1000] after the stability probe") try: preflight(args.inputs, args.trainer, args.receipt_sha) if not args.check: train(args) except (OSError, ValueError, KeyError, TypeError, subprocess.CalledProcessError) as exc: p.exit(2, f"STOP: {exc}\n")
if __name__ == "__main__": main()README.md+134-69
code/README.md+15-7
code/pack_110d.pyAdded+299
code/start_110d.pyAdded+217