Skip to content

Optimize model structure and performance with LayerNorm updates - #5

Merged
EthanPeng-2048 merged 13 commits into
mainfrom
feature/transformer
Jul 14, 2026
Merged

EthanPeng-2048 merged 13 commits into
mainfrom
feature/transformer

Conversation

@EthanPeng-2048

Copy link
Copy Markdown
Collaborator

No description provided.

@EthanPeng-2048
EthanPeng-2048 merged commit 6b876a0 into main Jul 14, 2026
2 checks passed
@EthanPeng-2048
EthanPeng-2048 deleted the feature/transformer branch July 14, 2026 03:32
EthanPeng-2048 added a commit that referenced this pull request Nov 28, 2026
按 audit-report/ 十分片审查(P0 1 / P1 59 / P2 259)修复 include/、modules/、src/
全部条目;WeightQuant/weight_quant_name 下沉 engine/abstraction 的 precision.hpp
(子仓 7c03212),compute_layer_base 不再反向 include L3 的 model_spec.hpp(也不再
把 kvrec 拖进每个层 TU)。

- 结构:TrainingSession 双 step 抽 run_micro_step_ 骨架;RunDriver::fit → FitRun、
  TextTrainer::fit → FitState、mnist_train main(453 行) → 8 个具名静态函数、
  parse_text_train_args(435 行) → 7 个分组子例程;FeedForward 激活三选一改
  make_activation_layer 工厂;6 个复合层补 param_children();PatchEmbedding 手写
  patch 循环改 im2col/col2im(纯搬运,数值逐位不变);两个超长 backward 抽 helper。
- 错误通道:create_optimizer 裸 nullptr → Result<unique_ptr>(src 20 文件 +
  engine/tests/gpu_test.cpp 经子仓 1ba440b 适配);cli --lr-schedule 查 kLrSchedules
  真源(原手写名单漏 multistep);手写错误检查全改 EX_* 宏族。
- 测试:夹具收编 test_common.hpp(本地 CHECK 副本、snapshot_params/l1_move 五份同构、
  matrices_equal 同名异义消歧);修 fused_gpu 悬垂 span、conv2d_gradcheck 吞错假通过、
  attn 缺 batch>1(铁律 #5);已删 AOT/scan_exprs 注释扫尾、NN_* 宏名对齐 EX_*。
- 回归修复:RunDriver 拆分把 execute_step 的 Result<bool> 判成 if(!cont)(应解引用),
  --max-steps 提前停与中止语义失效——run_driver_test/text_trainer_test 当场抓住;
  另修 training_session 返回类型收窄与 text_trainer 的 -> 用法。
- 验收:Release 构建 0 error;ctest 82/82(基线 81/81 + 新增 downstream_smoke)。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant