Method__init__(self, model_dim, num_heads, head_dim, latent_dim, rope_dim, dropout_p=0.0)
attention/MultiLatentAttention.py:36
Methodforward 前向传播 Args: x: 输入张量 [batch_size, seq_len, model_dim] mask: 注意力掩码 [batch_size, 1, seq_len, seq_len] 或 [1, 1, s
attention/GroupQueryAttention.py:92
Methodforward 前向传播 Args: q: 查询张量 [batch_size, num_heads, seq_len_q, head_dim] k: 键张量 [batch_size, num_heads, seq_len_k, he
attention/ScaledDotProductAttention.py:29
Methodforward 前向传播 Args: x: 输入张量 [batch_size, seq_len, model_dim] mask: 注意力掩码,用于屏蔽某些位置 [batch_size, num_heads, seq_len, se
attention/MultiLatentAttention.py:62
Methodforward 对查询和键应用旋转位置编码 Args: xq: 查询张量 [batch_size, seq_len, num_heads, head_dim] xk: 键张量 [batch_size, seq_len, num_he
position/RotaryEmbedding.py:69