executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
random_layer_mappingSample and audit RAIL-KD random teacher-to-student intermediate layer mappings for bounded knowledge distillation experiments.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this skill when implementing or checking the RAIL-KD layer-selection mechanism. It is appropriate for transformer distillation or proxy experiments that need to select m teacher intermediate layers from an n-layer teacher at each epoch and align them with m student layers. Do not use it for deterministic PKD/CKD mapping search or attention-over-all-layers methods.
teacher_layer_count: positive integer n.student_layer_count: positive integer m, with m <= n.seed and optional epoch: reproducibility controls.sort_indices: keep true for the paper-faithful monotonic alignment.m teacher layers.0..m-1 with the selected teacher indices.Run:
python scripts/rail_mapping.py --teacher-layers 12 --student-layers 6 --epochs 4 --seed 13
python -m pytest tests
The tests are standard-library compatible through the Distiller simple test runner.
The script only handles mapping selection and audit statistics. It does not compute hidden-state losses, logits KD, or optimizer updates. Indexing is zero-based; convert explicitly if a downstream framework reports one-based layer numbers.