计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
combined_kd_objective【效率与协作】Combine supervised, output distillation, and RAIL intermediate losses with validated RAIL-KD lambda weights.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when constructing a RAIL-KD training or proxy recovery objective. It preserves the paper's equation (4): the student minimizes a weighted sum of supervised task loss, output-logit knowledge distillation loss, and the randomized intermediate representation loss. Do not use this skill as a replacement for computing the RAIL representation loss itself.
ce_loss: finite scalar for supervised cross-entropy/task loss.kd_loss: finite scalar for output prediction distillation.rail_loss: finite scalar from RAIL-KDl or RAIL-KDc.lambdas: three non-negative weights (lambda1, lambda2, lambda3) that sum to one.Run:
python scripts/kd_objective.py --ce 0.4 --kd 0.3 --rail 0.2 --lambdas 0.2 0.3 0.5
python -m pytest tests
This skill computes scalar composition only. Production training code still needs a differentiable implementation for framework tensors, but the same validation and contribution reporting should be preserved.