CLI Reference¶
All commands available through the palingenesis entry point.
Commands¶
train¶
The main training command. Usually launched via torchrun for proper distributed setup.
Equivalent to:
distill¶
On-policy distillation: the student samples with its current weights, each prompt's teacher scores those exact tokens, and the student is pulled toward the teacher's distribution (full-vocabulary reverse KL for a teacher sharing the student's vocabulary, byte-aligned chunks across different tokenizers). Rollouts come from the trainer's own generate or from vLLM (rollout.backend); teachers run in-process or on a vLLM server; several teachers can each take their own prompt sources. Overrides: --section.option value, and --teachers.<name>.option / --sources.<name>.option for the named mappings.
pgs distill --config configs/distill_math.yaml # Qwen3-1.7B -> Qwen3-0.6B, vLLM rollouts
pgs distill --config configs/distill_xtok.yaml # teacher with another tokenizer
pgs distill --config configs/distill_multi.yaml # one teacher per prompt source
pgs distill --config configs/distill_math.yaml --train.learning_rate 1e-6 --teachers.qwen3_1_7b.backend vllm
See the On-Policy Distillation guide.
distill-score¶
Annotate a multiple-choice pool with its teacher's own answers (teacher_answer, teacher_correct) so you can filter or reweight before training — pure KL distills the teacher's errors too. One batched forward per row, no generation. Scores the first mcqa source (or --source NAME) with that source's teacher; accepts the same overrides as distill.
autopilot¶
Zero-config autonomous training. Profiles hardware, sweeps LR, trains to completion.
prepare¶
Score, filter, and select training data by difficulty. Dumps parquet (default) or jsonl, plus a prepared_meta.json provenance manifest.
Reads the same YAML as training — scoring model, dataset, and the preprocess: section all come from one file, and the usual --section.field overrides apply:
pgs prepare --config configs/qwen35_4b/a100_80gb.yaml
pgs prepare --config cfg.yaml --preprocess.budget 5000 --preprocess.strategy curriculum
Afterwards, training consumes the output automatically:
See the Data Preparation guide for the full workflow.
prepare-multi¶
Multi-source preparation with per-source scoring.
diagnose¶
Run pre/post-training health checks.
inspect¶
Show tokenization and masking for sample data.
validate¶
Validate masking correctness across many samples.
profile¶
Memory for a config: parameters, optimizer states and gradients exactly, activations roughly. --measure runs two real optimizer steps on the GPU and reports the true peak.
monitor¶
Check status of a running training from its log file.
loss¶
Analyze a training loss curve.
version¶
Show installed versions.