ELPA
Overview
This skill does not train toy adapters. It triggers real sub-model training commands from your own training codebases and then builds ELPA routing/weights from real validation errors.
Default model pool is intentionally larger than 4 and can be expanded freely.
Workflow
- 1. Prepare a training config JSON (see
assets/elpa_train_template.json). - Dry-run the command plan to verify all sub-model commands.
- Execute real sub-model training when resources are available.
- Prepare validation error inputs per model.
- Build ELPA ensemble policy JSON from those errors.
1) Prepare Config
Create a config based on assets/elpa_train_template.json.
- - Put your real training entrypoints in each model
train_cmd. - Keep each model tagged as
online or offline. - Add as many models as needed; ELPA is not limited to 4.
2) Dry-Run Plan (No Training)
CODEBLOCK0
This prints and records the commands that would run, without training.
3) Execute Real Training
CODEBLOCK1
Use this only in an environment that has the required ML dependencies and hardware.
4) Build ELPA Integration Policy
After each sub-model produces validation errors, run:
CODEBLOCK2
The output includes:
- -
scores for each model from validation errors - INLINECODE6 and INLINECODE7
- INLINECODE8 and INLINECODE9
- ELPA control fields (
beta, dirty_interval, amplitude_window, mutant_epsilon)
Model Scaling
To support more models, append model blocks in your config with:
- - unique INLINECODE14
- INLINECODE15 as
online or INLINECODE17 - real INLINECODE18
No script changes are needed for adding models.
Files
- -
scripts/elpa_orchestrator.py: real sub-model training command planner/executor - INLINECODE20 : ELPA score/weight builder from validation errors
- INLINECODE21 : >4-model real training template
- INLINECODE22 : ELPA integration template
- INLINECODE23 : config field reference and placeholders
ELPA
概述
本技能不训练玩具适配器。它从您自己的训练代码库触发真实的子模型训练命令,然后基于真实的验证误差构建ELPA路由/权重。
默认模型池有意设置为大于4个,并且可以自由扩展。
工作流程
- 1. 准备训练配置JSON(参见 assets/elpatraintemplate.json)。
- 对命令计划进行预运行,以验证所有子模型命令。
- 在资源可用时执行真实的子模型训练。
- 为每个模型准备验证误差输入。
- 根据这些误差构建ELPA集成策略JSON。
1) 准备配置
基于 assets/elpatraintemplate.json 创建配置。
- - 在每个模型的 train_cmd 中放入您真实的训练入口点。
- 将每个模型标记为 online 或 offline。
- 根据需要添加任意数量的模型;ELPA不限于4个。
2) 预运行计划(不进行训练)
bash
python3 scripts/elpa_orchestrator.py \
--config assets/elpatraintemplate.json \
--run-dir .runtime/elpa_run \
--manifest-out .runtime/elparun/trainmanifest.json
此命令将打印并记录将要运行的命令,但不进行训练。
3) 执行真实训练
bash
python3 scripts/elpa_orchestrator.py \
--config /path/to/yourtrainconfig.json \
--run-dir .runtime/elpa_run \
--manifest-out .runtime/elparun/trainmanifest.json \
--execute
仅在具备所需机器学习依赖和硬件的环境中使用此命令。
4) 构建ELPA集成策略
在每个子模型产生验证误差后,运行:
bash
python3 scripts/elpa_integrator.py \
--config /path/to/yourintegrateconfig.json \
--output .runtime/elparun/elpapolicy.json
输出包括:
- - 每个模型基于验证误差的 scores
- onlineweights 和 offlineweights
- bestonlinemodel 和 bestofflinemodel
- ELPA控制字段(beta、dirtyinterval、amplitudewindow、mutant_epsilon)
模型扩展
要支持更多模型,请在配置中追加模型块,包含:
- - 唯一的 name
- group 为 online 或 offline
- 真实的 train_cmd
添加模型无需修改脚本。
文件
- - scripts/elpaorchestrator.py:真实子模型训练命令规划器/执行器
- scripts/elpaintegrator.py:基于验证误差的ELPA分数/权重构建器
- assets/elpatraintemplate.json:>4个模型的真实训练模板
- assets/elpaintegratetemplate.json:ELPA集成模板
- references/config-schema.md:配置字段参考和占位符