diff --git a/docs/superpowers/specs/2026-04-01-imf-attnres-policy-design.md b/docs/superpowers/specs/2026-04-01-imf-attnres-policy-design.md index dbdde92..eea9e7b 100644 --- a/docs/superpowers/specs/2026-04-01-imf-attnres-policy-design.md +++ b/docs/superpowers/specs/2026-04-01-imf-attnres-policy-design.md @@ -181,6 +181,20 @@ RoboIMI 现有 batch 中的 `action_is_pad` 仍要保留支持;如果存在 pa ## Compatibility Decisions +## Initial Config Defaults To Preserve + +为避免迁移时语义漂移,首版 IMF 配置默认值明确固定为: + +- `backbone_type: attnres_full` +- `n_head: 1` +- `n_kv_head: 1` +- `n_cond_layers: 0` +- `time_as_cond: true` +- `causal_attn: false` +- `num_inference_steps: 1` + +这些默认值与 external `185ed659` 的 IMF-AttnRes 使用方式保持一致;后续调参可以覆盖,但首版迁移必须先以该语义跑通。 + ### Reuse From RoboIMI 保留: @@ -232,7 +246,7 @@ RoboIMI 现有 batch 中的 `action_is_pad` 仍要保留支持;如果存在 pa ### Risk 1: JVP 在 CUDA 注意力内核上不稳定 -缓解:沿用 external repo 的策略,在 JVP 路径上切换到 math SDP kernel,必要时 fallback 到 `torch.autograd.functional.jvp`。 +缓解:沿用 external repo 的策略,在 JVP 路径上切换到 math SDP kernel,必要时 fallback 到 `torch.autograd.functional.jvp`。同时,JVP 的切线构造与 `u, du_dt` 计算流程必须严格对齐 external source,不在本次迁移中自行改写其数学语义。 ### Risk 2: Optimizer 参数分组遗漏新模块