fix : 修正类型标注与统一 CLI 参数命名

- AutoRegressiveLM.forward 返回类型标注 -> Dict[str, Tensor]
- EmbeddingEncoder 移除冗余 position_ids 自动创建
- CLI 脚本模型目录参数统一为 --param_path
This commit is contained in:
2026-05-27 20:49:44 +08:00
parent 4145d35e3c
commit 2d5dc93b3d
5 changed files with 10 additions and 13 deletions
-3
View File
@@ -68,9 +68,6 @@ class EmbeddingEncoder(AutoModel):
x = self.embed_tokens(input_ids)
if position_ids is None:
position_ids = torch.arange(S, device=x.device).unsqueeze(0).expand(B, -1)
rotary_emb = self.rotary_embedding(x, position_ids)
attn_mask = process_attention_mask(x, position_ids, input_mask, is_causal=False)