FMInference/H2O

关于softmax和mask顺序的问题

0x00-pl opened this issue · 0 comments

tmp_attn_index = nn.functional.softmax(attn_weights[:,token_index,:], dim=-1, dtype=torch.float32).to(dtype_attn_weights)

在统计softmax这一步 是不是应该先mask再做softmax