transformers
ca358790 - Use mlp_layer_types for AXK1 so the MoE layer layout honours moe_layer_freq (#49518)

Commit
40 days ago
Use mlp_layer_types for AXK1 so the MoE layer layout honours moe_layer_freq (#49518) * Declare AXK1 routing config fields so configs that omit them still expose them Add `moe_layer_freq`, `scoring_func` and `topk_method` to `AXK1Config` with defaults matching the official checkpoint, validate the supported values, and honour `moe_layer_freq` when choosing MoE layers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Use mlp_layer_types for AXK1 instead of moe_layer_freq Drop the `scoring_func` / `topk_method` config fields, which the modeling code doesn't read, and replace `first_k_dense_replace` / `moe_layer_freq` with `mlp_layer_types`, derived from the legacy kwargs when not provided (as AXK2 does). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nits Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> --------- Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Author
Parents
Loading