refactor: 工厂 kwargs 过滤及组件参数清理

- BaseFactory.create() 按 __init__ 签名过滤多余 kwargs
- 移除 GQA/MLA/MLP/DeepSeekMoE 中多余的 **kwargs
- MLP/DeepSeekMoE 参数名统一为 dim_ffn
- scheduler max_seq_len 增加 None 显式判断
- 默认 max_prompt_len 提升至 2048
This commit is contained in:
2026-05-16 16:47:41 +08:00
parent 0ba8c70ce1
commit 48a53121ba
4 changed files with 33 additions and 12 deletions
-2
View File
@@ -40,7 +40,6 @@ class GQA(nn.Module):
norm_eps: float,
use_gated_attention: bool,
layer_id: int,
**kwargs,
):
super().__init__()
assert dim % n_heads == 0
@@ -123,7 +122,6 @@ class MLA(nn.Module):
norm_eps: float,
use_gated_attention: bool,
layer_id: int,
**kwargs,
):
super().__init__()
self.dim = dim