research: preregister AttnRes forward training study
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
# Round 08 Grok Headless 对抗审阅与处置
|
||||
|
||||
审阅日期:2026-07-30
|
||||
审阅会话:`019fb1ce-7ffa-70e3-b860-c4a31a4c6621`
|
||||
身份:**外部模型的只读方法学审稿,不是论文证据源**
|
||||
|
||||
## 1. 调用边界
|
||||
|
||||
Grok CLI 使用 single/headless + plan permission 读取:
|
||||
|
||||
- `research/K3_ATTNRES_FORWARD_TRAINING_SCOPING.md`
|
||||
- `research/K3_ATTNRES_FORWARD_TRAINING_PROTOCOL.md`
|
||||
- `experiments/k3/attnres_forward/manifest.json`
|
||||
- Round 04 / 05 父 runners
|
||||
|
||||
关闭 web search、禁止 subagents;它没有修改文件,也没有运行训练。
|
||||
|
||||
## 2. Blocking findings 与处置
|
||||
|
||||
| finding | 风险 | 处置 |
|
||||
|---|---|---|
|
||||
| `mean` 与父 `softmax+einsum` 的 FP32 归约顺序不保证 byte-exact | step-0 会假失败 | **采纳**:选中路径改成参数无关 constant-zero logits,并复用同一 `softmax+einsum` kernel |
|
||||
| pairing 要求了父 JSON 不存在的 initial full hash,并把 GPU 名写成 exact | 科学身份正确却因 metadata 失败 | **采纳**:只 hard-gate 初始化、数据、拓扑、optimizer 与确定性/autocast 合同 |
|
||||
| replay 只排除三个字段,path 会制造假差异 | exact replay 假失败 | **采纳**:冻结 scientific canonical payload 与 path normalization |
|
||||
| wrapper 若把新 protocol ID 写入 `window_start` salt,会静默换数据 | 历史逐 seed 配对失效 | **采纳**:父 salt 只由父 manifest/runner 管,新 ID 只进 wrapper output |
|
||||
| 主判定没有在协议正文再写 final-only | analyzer 可能误读六 checkpoints | **采纳**:主 attenuation 与 BPC 只读 step 8,000 |
|
||||
| spike layer numbering 未 machine-readable 固定 | 可能整体平移一层 | **采纳**:manifest 新增 `spike_layers_1based`,协议钉死 Python index = layer−1 |
|
||||
|
||||
## 3. Non-blocking findings 与处置
|
||||
|
||||
全部采纳:
|
||||
|
||||
- selected 参数留在 AdamW param groups,但因 graph 不可达而没有 state entry,不能写成
|
||||
“训练了但没动”;
|
||||
- group 6 / 7 indices 与 source counts 经独立复算正确;
|
||||
- reference 统一称 historical paired reference;
|
||||
- layers 26–28 位于 contrast 分母 `R`,必须拆报 `mean(S)` / `mean(R)`;
|
||||
- `I67` 明确是三次独立训练之间的 log residual;
|
||||
- missing / non-finite / structural error 统一 `contract_failed`,不能冒充科学失败;
|
||||
- wrapper 禁止改变 FP32 residual、AdamW grouping、parent salt 与 empty-selector path。
|
||||
|
||||
## 4. 算术复核
|
||||
|
||||
```text
|
||||
8,000 × 32 × 256 = 65,536,000 bytes / cell
|
||||
12 formal cells = 786,432,000 bytes
|
||||
+ primary replay = 851,968,000 newly processed bytes
|
||||
historical refs = 196,608,000 bytes(不重跑)
|
||||
```
|
||||
|
||||
selector:
|
||||
|
||||
```text
|
||||
group 6 = 40..47; source N = 6,7,7,7,7,7,7,7
|
||||
group 7 = 48..55; source N = 7,8,8,8,8,8,8,8
|
||||
group 7 MLP = 49,51,53,55
|
||||
groups 6+7 = 40..55
|
||||
```
|
||||
|
||||
主 attenuation 为 `3 seeds × {contrast, peak} = 6` cells;quality 为三个
|
||||
per-seed BPC gates 加一个 mean gate,共 4 项。两者合取,且只读 final step。
|
||||
|
||||
## 5. 复核结论
|
||||
|
||||
Grok 判断研究身份、矩阵、source counts 与主公式骨架可以保留;主要风险来自浮点
|
||||
arithmetic identity、wrapper salt、over-exact metadata 与层号歧义。以上项目已在任何
|
||||
正式输出出现前全部修订,manifest 状态随后改为 `frozen-before-model-output`。
|
||||
|
||||
审稿意见不会进入实验结果、论文事实或官网证据等级;它只用于结果前强化协议。
|
||||
@@ -0,0 +1,387 @@
|
||||
# K3 Attention Residuals 训练期前向干预协议
|
||||
|
||||
协议 ID:`llm-atlas-k3-attnres-forward-training-v1`
|
||||
冻结日期:2026-07-30
|
||||
协议状态:**结果前预注册 frozen;任何语义变更必须更换 protocol ID**
|
||||
父协议:`llm-atlas-k3-attnres-gradient-scale-v1`
|
||||
|
||||
## 0. 研究身份
|
||||
|
||||
这是 Round 07 定向线索之后的训练期架构消融。选中 depth mixer 在每一次 train / eval /
|
||||
diagnostic forward 都用 source states 的算术平均,完全绕过该 mixer 的
|
||||
`query + key_norm + softmax` 路径。
|
||||
|
||||
允许回答:
|
||||
|
||||
1. 固定 groups 6+7 的 uniform forward 训练变体,能否在不触发预注册 BPC 失败护栏时,
|
||||
material 地降低最终固定 activation-gradient spike?
|
||||
2. group 6、group 7 与 joint 的训练轨迹呈现什么非加性关系?
|
||||
3. Round 07 指向的 group 7 MLP-only 路径能否独立产生 material response?
|
||||
|
||||
不允许回答:
|
||||
|
||||
- 真实 Kimi K3 2.8T checkpoint 的梯度或训练动力学;
|
||||
- 论文 Figure 5(c) 未公开 telemetry 的复现;
|
||||
- “forward effect” 与 natural backward/update effect 的分离;
|
||||
- selected query/key 参数如果继续训练会怎样;
|
||||
- 三 seed 外的总体显著性、置信区间或 p-value;
|
||||
- 下游能力保持、通用质量等价或最优 AttnRes 设计;
|
||||
- 单组 effects 的可加性、Shapley value、方差贡献或因果交互;
|
||||
- 与 Round 07 value-coefficient intervention 同构的“纯 forward”因果复制;
|
||||
- K3 `A_log` 的官方修复裁决。
|
||||
|
||||
## 1. 冻结训练与数据合同
|
||||
|
||||
| 字段 | 固定值 |
|
||||
|---|---|
|
||||
| architecture | Block AttnRes |
|
||||
| Transformer depth | 32 |
|
||||
| aggregation groups | 8 |
|
||||
| blocks / group | 4 |
|
||||
| depth / output mixers | 64 / 1 |
|
||||
| width / heads / FFN | 192 / 6 / 768 |
|
||||
| context / vocabulary | 256 / byte-256 |
|
||||
| seeds | 2026073001 / 2026073002 / 2026073003 |
|
||||
| steps / batch | 8,000 / 32 |
|
||||
| target bytes / new formal cell | 65,536,000 |
|
||||
| optimizer | AdamW |
|
||||
| peak / min LR | 3e-4 / 3e-5 |
|
||||
| warmup | 400 |
|
||||
| weight decay | 0.1 for ndim ≥ 2 |
|
||||
| betas / epsilon | 0.9, 0.95 / 1e-8 |
|
||||
| clip | global norm 1.0 |
|
||||
| forward | CUDA BF16 autocast |
|
||||
| residual accumulation | explicit FP32 |
|
||||
| validation | fixed 64 × 256-byte windows |
|
||||
| diagnostic | fixed 16 × 256-byte windows |
|
||||
| checkpoints | 0 / 100 / 500 / 2,000 / 4,000 / 8,000 |
|
||||
| concurrency | at most two independent processes |
|
||||
|
||||
训练输入 schedule **逐 step 复用父协议**。`window_start` 使用父
|
||||
`llm-atlas-k3-attnres-gradient-scale-v1` 的 salt;新 protocol ID 只写入 wrapper output
|
||||
和 study manifest,绝不能进入 `round04.PROTOCOL_ID` 或训练窗口散列。父 manifest
|
||||
负责 bytes / windows / schedule,新 manifest 只负责 variants / selector / thresholds。
|
||||
每个 variant / seed 的初始化、optimizer input、validation 与 diagnostic tensors 必须
|
||||
exact 相同。
|
||||
|
||||
runner 必须继承 Round 05 `GradientLanguageModel` 的 explicit FP32 Block residual
|
||||
accumulation;不得退回 Round 04 的旧累加路径。
|
||||
|
||||
新正式处理量:
|
||||
|
||||
```text
|
||||
4 variants × 3 seeds × 65,536,000 = 786,432,000 target bytes
|
||||
1 primary replay 65,536,000 target bytes
|
||||
total newly processed 851,968,000 target bytes
|
||||
historical learned reference 196,608,000 target bytes(不重跑)
|
||||
```
|
||||
|
||||
每格必须使用全新 Python process。最多并行两个;不能共享 model、optimizer、RNG、
|
||||
CUDA graph 或 output file。
|
||||
|
||||
## 2. 冻结正式矩阵
|
||||
|
||||
正式 variants:
|
||||
|
||||
| variant | exact selected depth indices | layers / branch |
|
||||
|---|---|---|
|
||||
| `uniform_group_6_forward` | 40–47 | 21–24 / both |
|
||||
| `uniform_group_7_forward` | 48–55 | 25–28 / both |
|
||||
| `uniform_groups_6_7_forward` | 40–55 | 21–28 / both |
|
||||
| `uniform_group_7_mlp_forward` | 49, 51, 53, 55 | 25–28 / MLP |
|
||||
|
||||
`learned_reference` 只允许 smoke,不进入新正式矩阵。output mixer index 64 永远 learned。
|
||||
|
||||
正式运行 12 格;另从初始化 replay:
|
||||
|
||||
```text
|
||||
replay / uniform_groups_6_7_forward / seed 2026073001
|
||||
```
|
||||
|
||||
## 3. 唯一 selector 与 forward 语义
|
||||
|
||||
runner 必须只有一个 machine-readable selector:
|
||||
|
||||
```text
|
||||
selected(variant, depth_mixer_index) -> bool
|
||||
```
|
||||
|
||||
不得把四个 variant 分叉成四份 model forward。
|
||||
|
||||
对未选中 depth mixer 和 output mixer,逐调用父 `DepthMixer.forward`。对选中 mixer,
|
||||
为了让初始化负控制复用相同浮点归约顺序,使用参数无关的零 logits,但仍走父
|
||||
`softmax + einsum` 数值 kernel:
|
||||
|
||||
```text
|
||||
values = stack(sources, dim=0)
|
||||
logits = zeros([N, batch, tokens], dtype=FP32)
|
||||
weights = softmax(logits, dim=0)
|
||||
output = einsum("nbt,nbtd->btd", weights, values.float()).to(values.dtype)
|
||||
```
|
||||
|
||||
capture summary 必须仍使用父 schema:
|
||||
|
||||
```text
|
||||
mean_weights = [1 / N] × N
|
||||
entropy_mean = ln(N)
|
||||
sources = N
|
||||
```
|
||||
|
||||
选中路径不得调用 `query`、`key_norm` 或 source-dependent logits,也不得用
|
||||
stop-gradient trick 让这些参数看似参与。这里保留的 softmax 只把常数零 logits 变成
|
||||
`1/N`,目的是与父路径保持同一 arithmetic kernel;它没有可训练参数。自然结果是选中
|
||||
mixer 的 `query` 和 `key_norm.weight`:
|
||||
|
||||
- gradient hook call count 必须为 0;
|
||||
- optimizer state entry 必须不存在;
|
||||
- final tensor 必须与 initial tensor byte-exact。
|
||||
|
||||
所有未选中 depth mixer 和 output mixer 的两个参数都必须有正的 gradient hook call
|
||||
count;这只证明图可达,不要求它们的梯度非零或最终 tensor 一定变化。hook census
|
||||
从 model 构造后开始,覆盖所有 training backward 与 diagnostic backward;eval
|
||||
forward 不计 hook。selected 参数允许保留在原 AdamW param groups,但 state entry 必须
|
||||
不存在,不能表述为“训练了但没有移动”。
|
||||
|
||||
## 4. 结果前实现闸门
|
||||
|
||||
### 4.1 empty-selector 父等价
|
||||
|
||||
`learned_reference` smoke 必须直接走父 forward,不得走常数 uniform 分支;它与父
|
||||
Round 05 runner 在相同 seed / 20 steps 下必须:
|
||||
|
||||
- initial/final model hashes exact;
|
||||
- final optimizer hash exact;
|
||||
- evaluations、diagnostics 与 training history exact;
|
||||
- gradient gate exact;
|
||||
- input tensor hashes exact。
|
||||
|
||||
允许不同字段只限 protocol wrapper identity、study-manifest wrapper、timing、规范化
|
||||
后的 manifest path、output path 与 self-hash。AdamW 参数分组必须保持父语义;
|
||||
empty-selector 不能删除任何 mixer 参数。
|
||||
|
||||
### 4.2 step-0 identity negative control
|
||||
|
||||
父模型所有 depth mixer query 初始化为 0,因此 learned softmax 在 step 0 是 exact
|
||||
uniform。选中分支用同 dtype 的 constant-zero logits 和同一个
|
||||
`softmax + einsum` kernel。四个 variant 与 learned reference 在固定 input 上必须:
|
||||
|
||||
- logits byte-exact;
|
||||
- CE byte-exact;
|
||||
- activation-gradient spectrum byte-exact;
|
||||
- validation metrics byte-exact;
|
||||
- selected capture weights 等于 `1/N`,max absolute error `≤ 1e-12`;
|
||||
- 若任何跨 variant byte-exact 比较失败,hard-fail;不得在结果后改成容差 gate。
|
||||
|
||||
这个负控制只约束初始化;训练开始后 forward 必须允许分化。
|
||||
|
||||
### 4.3 selector census
|
||||
|
||||
每个 forward 的 64 个 depth index 必须各访问一次,output 访问一次且保持 learned。
|
||||
每个 variant 的 selected set 必须与第 2 节 exact。group 内 source counts 必须满足:
|
||||
|
||||
```text
|
||||
group 6: index 40 has N=6; indices 41..47 have N=7
|
||||
group 7: index 48 has N=7; indices 49..55 have N=8
|
||||
```
|
||||
|
||||
推导前提是 `completed` 含 embedding,且每 8 个 depth mixer 才把 `partial` 聚合为一个
|
||||
completed group。
|
||||
|
||||
正式 output 保存 exact selected indices、实际 visit census、source counts 与
|
||||
uniform-weight max error。任何漏访、重访、越界或 output 被选中都失败。
|
||||
|
||||
### 4.4 数据、有限性与梯度尺度
|
||||
|
||||
- 父 manifest、train/validation/diagnostic bytes 与 schedule hashes exact;
|
||||
- step 0 / 1 / 7,999 optimizer input gate hashes exact;
|
||||
- loss、logits、所有主 activation gradients 全部 finite;
|
||||
- global clip 后每一步都执行 optimizer update,不允许 skip;
|
||||
- smoke 的 diagnostic loss `×2` 时,每层 activation-gradient RMS 比值在
|
||||
`2 ± 1e-5`,normalized spectrum max delta `≤ 1e-6`。
|
||||
|
||||
## 5. 历史 reference 配对合同
|
||||
|
||||
reference 固定为:
|
||||
|
||||
```text
|
||||
experiments/k3/attnres_gradient/results/raw/
|
||||
formal-depth-32-block-seed-{seed}.json
|
||||
```
|
||||
|
||||
analyzer 的 pairing hard gates:
|
||||
|
||||
- `protocol_id = llm-atlas-k3-attnres-gradient-scale-v1`;
|
||||
- formal / block / depth 32 / 8,000 steps / batch 32;
|
||||
- seed exact;
|
||||
- initial public 与 mixer hashes 跟对应新 variant exact;
|
||||
- formal schedule、validation tensor、diagnostic tensor 和三个 input gate hashes exact;
|
||||
- model topology、optimizer hyperparameters、CUBLAS workspace、deterministic flags 与
|
||||
autocast 语义 exact。
|
||||
|
||||
以下字段明确**不参与 pairing equality**:
|
||||
|
||||
- 所有 final hashes、evaluations、diagnostics、training history 与 gradient gate;
|
||||
- timing、run kind、self-hash、output path 与 manifest path 字符串;
|
||||
- GPU 名称、driver / CUDA / torch version 的 minor 差异。
|
||||
|
||||
环境完整记录;若数值栈变化,aggregate 给出 metadata warning,但只要上述确定性与
|
||||
autocast 合同相同就不将其误判为 pairing failure。父 JSON 没有 initial full-state 字段,
|
||||
不得假定它存在;public ∪ mixer 的完整性只用结构/元素 census 自洽。
|
||||
|
||||
reference 是历史配对基线,不得写成同期随机对照。若任何合同不等,整轮 aggregate
|
||||
失败,而不是降级为“近似比较”。
|
||||
|
||||
## 6. 固定主对象与公式
|
||||
|
||||
每个 diagnostic checkpoint 从:
|
||||
|
||||
```text
|
||||
activation_grad_rms_by_block = [g1, ..., g32]
|
||||
layer_id ∈ {1,...,32}
|
||||
g[layer_id] = activation_grad_rms_by_block[layer_id - 1]
|
||||
S = {21,22,23,24,25} # 1-based
|
||||
R = {1,...,32} \ S
|
||||
```
|
||||
|
||||
计算:
|
||||
|
||||
```text
|
||||
C = mean(g[S]) / mean(g[R]) # spike contrast
|
||||
P = max(g) / mean(g) # peak normalized
|
||||
```
|
||||
|
||||
所有 `g`、`C`、`P` 必须 finite 且严格大于 `1e-30`。groups 6+7 还改写落在 `R`
|
||||
中的 layers 26–28,所以 analyzer 同时报告 `mean(g[S])` 与 `mean(g[R])`,但不把它们
|
||||
加入主 status。
|
||||
|
||||
对同 seed reference `X_ref` 与 variant `X_v`:
|
||||
|
||||
```text
|
||||
D_X(v) = (X_ref - X_v) / X_ref
|
||||
```
|
||||
|
||||
`D>0` 表示 attenuation,`D<0` 表示 amplification。不得取绝对值,不得更换分母。
|
||||
|
||||
## 7. 预注册判定
|
||||
|
||||
### 7.1 主判定
|
||||
|
||||
`uniform_groups_6_7_forward` 的主 attenuation gate **只读取 step=8,000**:
|
||||
|
||||
```text
|
||||
D_C >= 0.20 AND D_P >= 0.20
|
||||
for all 3 seeds
|
||||
```
|
||||
|
||||
质量 gate 也只读取 `evaluations[step=8000].bits_per_byte`:
|
||||
|
||||
```text
|
||||
delta_bpc(seed) = final_bpc_variant - final_bpc_reference
|
||||
delta_bpc(seed) <= 0.05 for all 3 seeds
|
||||
mean(delta_bpc) <= 0.03
|
||||
```
|
||||
|
||||
只有 attenuation 6/6 与 quality 4/4 同时通过,正式 status 才是:
|
||||
|
||||
```text
|
||||
forward_training_attenuation_established_within_reduced_protocol
|
||||
```
|
||||
|
||||
否则按失败位置使用:
|
||||
|
||||
```text
|
||||
attenuation_not_established
|
||||
quality_guard_failed
|
||||
attenuation_and_quality_failed
|
||||
```
|
||||
|
||||
不能用次级变体补救主判定。任何 step 8,000 缺失/重复、数组长度错误、hash 不配对、
|
||||
selector / reachability 失败、`g/C/P/BPC/D/log` 缺失或非 finite 都是
|
||||
`contract_failed` 并让 analyzer non-zero exit;不能把结构失败包装成上面的科学状态。
|
||||
|
||||
### 7.2 次级 material response
|
||||
|
||||
group 6、group 7、group 7 MLP-only 各自使用同一 `20% / 3-seed / 2-metric` attenuation
|
||||
threshold 和同一 quality guard,分别报告:
|
||||
|
||||
```text
|
||||
secondary_material_response / secondary_response_not_established
|
||||
```
|
||||
|
||||
它们不改变主 status,也不升级成 localization。
|
||||
|
||||
### 7.3 BPC 护栏的解释
|
||||
|
||||
`+0.05 per seed / +0.03 mean` 是预注册的 catastrophic-degradation screen:
|
||||
|
||||
- 失败说明不能把 spike 下降当成健康训练的证据;
|
||||
- 通过不说明能力、校准或下游任务等价;
|
||||
- BPC 改善也不说明总体架构更优。
|
||||
|
||||
## 8. 非加性交互与轨迹
|
||||
|
||||
对 `X ∈ {C,P}`、每个 seed、每个 checkpoint:
|
||||
|
||||
```text
|
||||
E6 = ln(X_ref / X_group6)
|
||||
E7 = ln(X_ref / X_group7)
|
||||
E67 = ln(X_ref / X_groups6+7)
|
||||
I67 = E67 - E6 - E7
|
||||
```
|
||||
|
||||
保存 `E6/E7/E67/I67` 原值、对应 `D_C/D_P` 和三 seed mean/range。没有通过阈值、
|
||||
p-value 或 CI。它是三套独立训练在相同 checkpoint 的跨-run log residual;
|
||||
`I67` 不能写成可加贡献、独立作用、Shapley value 或因果 interaction estimate。
|
||||
|
||||
同时全量保存:
|
||||
|
||||
- 六 checkpoints 的 32-layer raw / normalized spectra;
|
||||
- peak layer、top-five layers;
|
||||
- validation BPC 与 train-loss trajectory;
|
||||
- selected/unselected mixer weight summaries;
|
||||
- selected-parameter reachability audit;
|
||||
- per-cell timing 与显存(不进入数值结论)。
|
||||
|
||||
## 9. replay 与 analyzer 合同
|
||||
|
||||
primary seed-1 replay 使用 analyzer 定义的 scientific canonical payload。先删除:
|
||||
|
||||
```text
|
||||
run_kind
|
||||
timing
|
||||
canonical_sha256_without_self
|
||||
manifest.path
|
||||
study_manifest.path
|
||||
```
|
||||
|
||||
再比较以下固定字段 exact:protocol / variant / architecture / depth / seed / steps / batch /
|
||||
target bytes、manifest scientific hashes、model、optimizer、initial/final hashes、
|
||||
evaluations、diagnostics、training history、selector 与 reachability audits,以及
|
||||
environment 中 deterministic / autocast scientific subset。GPU/版本 metadata 保留在
|
||||
两份文件中单独展示,不进入 canonical equality。
|
||||
|
||||
所有主指标、阈值、status、interaction map 与 compact website artifact 只能由单一
|
||||
`experiments/k3/attnres_forward/analyze.py` 生成。网站不能在 TypeScript 中重新计算
|
||||
另一套结论。
|
||||
|
||||
analyzer 在任何结构、hash、selector、reachability、finite、reference pairing、
|
||||
replay 或 threshold contract 失败时必须 non-zero exit,不得输出部分通过结论。
|
||||
|
||||
## 10. 报告语言红线
|
||||
|
||||
允许:
|
||||
|
||||
- “在这个固定缩小模型与训练协议内,局部 uniform-forward 变体……”
|
||||
- “selected mixer 参数在此架构消融中结构性不可达……”
|
||||
- “joint log effect 呈现正/负 interaction residual……”
|
||||
|
||||
禁止:
|
||||
|
||||
- “证明 K3 的训练尖峰来自 group 6/7”
|
||||
- “只改变 forward,所以这是纯 forward 因果效应”
|
||||
- “BPC gate 通过,所以能力不受影响”
|
||||
- “interaction residual 是两个 group 的真实贡献”
|
||||
- “contrast 下降证明尖峰层本身下降”(未同时检查 `S` / `R` 分拆)
|
||||
- “step-0 exact 说明训练期始终与 learned forward 恒等”
|
||||
- “复现了 K3 Figure 5(c)”
|
||||
- “已经验证官方 2.8T checkpoint”
|
||||
@@ -0,0 +1,195 @@
|
||||
# K3 Attention Residuals 训练期前向干预:Round 08 前置定位
|
||||
|
||||
研究日期:2026-07-30
|
||||
阶段身份:**Round 07 后的定向 scoping,不是 Round 08 结果**
|
||||
上游协议:`llm-atlas-k3-attnres-local-path-v1`
|
||||
|
||||
## 1. 为什么还需要一次训练期实验
|
||||
|
||||
Round 06 / 07 都保持 learned forward 完全不变,只在固定 diagnostic 的 backward 中
|
||||
替换 source value coefficients。它们回答的是:
|
||||
|
||||
- 全部 65 个 mixer 的 uniform value backward 能不能压低固定尖峰;
|
||||
- group 6 / 7 的 16 个 depth mixer 在 learned 背景上是否足以复现全局下降;
|
||||
- 从 all-uniform 背景恢复这些 mixer 是否能反向恢复尖峰。
|
||||
|
||||
Round 07 的正式结论是:
|
||||
|
||||
```text
|
||||
groups 6+7 sufficiency:6 / 6 seed×metric cells 通过
|
||||
groups 6+7 restoration:3 / 6 cells 通过
|
||||
formal status:one_sided_evidence_localization_not_established
|
||||
```
|
||||
|
||||
这已经足以排除“局部 mask 完全没有反应”,但还不能回答:
|
||||
|
||||
> 如果训练的每一次 forward 都真的把这段 depth routing 改成算术平均,模型会怎样适应?
|
||||
|
||||
Round 08 把 intervention 放进 optimizer path。它不再追求 forward-identical,而是让
|
||||
选中 mixer 的输出在训练、验证与诊断中始终为所有 source states 的等权平均。
|
||||
|
||||
## 2. 这不是“只改变 forward”
|
||||
|
||||
选中 mixer 的 learned 路径原本是:
|
||||
|
||||
```text
|
||||
keys = RMSNorm(sources)
|
||||
logits = query · keys
|
||||
weights = softmax(logits over source-depth)
|
||||
output = Σ weights_i × source_i
|
||||
```
|
||||
|
||||
Round 08 的选中路径是:
|
||||
|
||||
```text
|
||||
output = (1 / N) × Σ source_i
|
||||
```
|
||||
|
||||
因此 intervention 同时改变:
|
||||
|
||||
1. forward 的 branch input;
|
||||
2. 由新 forward 自然产生的 source gradients;
|
||||
3. 下游 activation、loss 与所有后续 optimizer updates;
|
||||
4. 选中 mixer 的参数可达性:`query` 与 `key_norm.weight` 不参与图,不得到梯度。
|
||||
|
||||
这是一项**训练期架构消融**,不是“只改变 forward、不改变 backward”的可分离因果实验。
|
||||
结果不能被翻译成 query/key 路径的纯因果效应。
|
||||
|
||||
## 3. 为什么只选四个新变体
|
||||
|
||||
固定 depth-32 / Block AttnRes 拓扑:
|
||||
|
||||
| scope | layers | 0-based depth mixer indices | count |
|
||||
|---|---:|---:|---:|
|
||||
| group 6 | 21–24 | 40–47 | 8 |
|
||||
| group 7 | 25–28 | 48–55 | 8 |
|
||||
| groups 6+7 | 21–28 | 40–55 | 16 |
|
||||
| group 7 MLP | 25–28 | 49, 51, 53, 55 | 4 |
|
||||
|
||||
四个新训练变体固定为:
|
||||
|
||||
1. `uniform_group_6_forward`
|
||||
2. `uniform_group_7_forward`
|
||||
3. `uniform_groups_6_7_forward`(主变体)
|
||||
4. `uniform_group_7_mlp_forward`
|
||||
|
||||
选择依据不是 Round 08 结果:
|
||||
|
||||
- joint 6+7 是 Round 07 的固定主 scope;
|
||||
- 单 group 6 / 7 用来构成交互图;
|
||||
- group 7 MLP-only 是 Round 07 的 branch-level 次级线索;
|
||||
- output mixer 保持 learned,避免把 local depth intervention 扩成全局 readout 改写。
|
||||
|
||||
不加入 attention-only、output-only、all-depth 或 all-65,是为了把本轮正式算力集中在
|
||||
“局部训练适应”而不是重新展开 14-mode backward census。
|
||||
|
||||
## 4. 冻结参考,而不是重新挑基线
|
||||
|
||||
paired learned reference 复用 Round 05 已公开的三个:
|
||||
|
||||
```text
|
||||
formal / depth-32 / block / seeds 2026073001..3
|
||||
```
|
||||
|
||||
它们与新变体使用相同:
|
||||
|
||||
- 初始化过程;
|
||||
- 8,000-step deterministic byte schedule;
|
||||
- 64 validation windows;
|
||||
- 16 diagnostic windows;
|
||||
- optimizer、LR schedule、BF16 forward 和 FP32 residual accumulation;
|
||||
- 六个 diagnostic checkpoints。
|
||||
|
||||
runner 的 `learned_reference` smoke mode 必须逐字段复现父 runner 数值。正式 analyzer
|
||||
还必须验证新旧 cell 的 initial public/mixer hashes、输入 gate tensor hashes、
|
||||
validation tensor hash、diagnostic tensor hash 与 deterministic / autocast 数值合同。
|
||||
GPU 名称、驱动 minor 与 timing 只记录,不作为配对 hard gate。
|
||||
|
||||
复用参考的意义是避免为已冻结、可复现的三格再消耗 196,608,000 target bytes。报告必须
|
||||
把它写成**历史配对参考**,不能写成同期随机对照。
|
||||
|
||||
## 5. 主问题与质量护栏
|
||||
|
||||
主对象沿用 Round 05–07,并且主判定只读取最终 step 8,000:
|
||||
|
||||
```text
|
||||
step = 8,000
|
||||
position = post-MLP Transformer-block output
|
||||
reduction = activation-gradient element RMS
|
||||
S = layers 21–25
|
||||
R = other 27 layers
|
||||
C = mean(g[S]) / mean(g[R])
|
||||
P = max(g) / mean(g)
|
||||
```
|
||||
|
||||
对变体 `v` 和同 seed learned reference:
|
||||
|
||||
```text
|
||||
D_X(v) = (X_ref - X_v) / X_ref
|
||||
```
|
||||
|
||||
主变体 `uniform_groups_6_7_forward` 只有在:
|
||||
|
||||
- `C` 与 `P` 的 `D_X ≥ 0.20`;
|
||||
- 三个 seed 的六个 cell 全部通过;
|
||||
- 每个 seed 的 final validation BPC 相对 reference 不劣化超过 `+0.05`;
|
||||
- 三 seed mean BPC delta 不超过 `+0.03`;
|
||||
|
||||
时才得到 “forward-training attenuation established within reduced protocol”。
|
||||
|
||||
质量阈值在结果前固定。它不是“能力保持”的通用标准,只用于阻止把明显训练失败造成的
|
||||
梯度塌缩计成正结果。即使通过,也不能推出下游能力等价。
|
||||
|
||||
## 6. 非加性局部交互图
|
||||
|
||||
对每个 seed、checkpoint 和指标:
|
||||
|
||||
```text
|
||||
E6 = ln(X_ref / X_group6)
|
||||
E7 = ln(X_ref / X_group7)
|
||||
E67 = ln(X_ref / X_groups6+7)
|
||||
I67 = E67 - E6 - E7
|
||||
```
|
||||
|
||||
- `I67 > 0`:joint log attenuation 大于两个 single effects 的和;
|
||||
- `I67 < 0`:joint log attenuation 小于两个 single effects 的和;
|
||||
- `I67 = 0`:只是在这个定义下恰好 log-additive。
|
||||
|
||||
`I67` 没有预注册显著性阈值,不是 Shapley value、方差分解、独立性检验或因果交互估计。
|
||||
三个 effect 来自三套独立训练,它只是跨 run 的 log-attenuation residual。它的用途是把
|
||||
训练轨迹中的补偿/放大关系画清楚,而不是制造一个新的“通过/失败”结论。
|
||||
|
||||
groups 6+7 覆盖 layers 21–28,而固定尖峰窗只到 layer 25;layers 26–28 落在 `R`。
|
||||
所以 `C` 的变化可能同时来自 `S` 下降与 `R` 上升。正式结果必须把两者拆开报告,不能把
|
||||
contrast 下降单独翻译成“尖峰层被关闭”。
|
||||
|
||||
## 7. 真实 K3 checkpoint 的同期边界
|
||||
|
||||
截至本轮预检,官方 Kimi-K3 Hugging Face main 仍停在 revision
|
||||
`9f62e4e9fffbd0a83ddd60e1c209d828994b3569`,remote code 仍按 96 heads 初始化
|
||||
`A_log`,公开 checkpoint header 仍为 `[128]`。社区 PR #144 / #150 仍是两个未合并、
|
||||
语义不同的候选修复;没有官方裁决。
|
||||
|
||||
所以本轮不下载约 1.56 TB 权重,不声称对真实 K3 forward 做了验证。缩小实验只继承
|
||||
Block AttnRes 的拓扑动机,不是 K3 checkpoint 的数值替身。
|
||||
|
||||
一手状态页:
|
||||
|
||||
- [Kimi-K3 official main](https://huggingface.co/moonshotai/Kimi-K3/tree/main)
|
||||
- [main `modeling_kimi_linear.py`](https://huggingface.co/moonshotai/Kimi-K3/blob/main/modeling_kimi_linear.py)
|
||||
- [community PR #144](https://huggingface.co/moonshotai/Kimi-K3/discussions/144)
|
||||
- [community PR #150](https://huggingface.co/moonshotai/Kimi-K3/discussions/150)
|
||||
|
||||
## 8. 本轮可证伪交付
|
||||
|
||||
Round 08 将在查看正式结果前完成:
|
||||
|
||||
1. 冻结协议与 machine-readable manifest;
|
||||
2. 实现一个 selector,而不是四份分叉 forward;
|
||||
3. 通过 empty-selector 父等价、step-0 uniform identity、selector census、参数不可达性、
|
||||
loss-scale 与输入 hash 闸门;
|
||||
4. 运行 4 variants × 3 seeds × 8,000 steps;
|
||||
5. 从初始化 replay 主变体 seed 2026073001;
|
||||
6. 由单一 analyzer 生成主判定、质量闸门、轨迹与非加性交互;
|
||||
7. 独立审阅机器可读结果;
|
||||
8. 以五视图交互实验接入网站、开源并发布。
|
||||
Reference in New Issue
Block a user