Skip to content

Commit

Permalink
暂时注释xlmroberta中的attention加速
Browse files Browse the repository at this point in the history
  • Loading branch information
黄宇扬 committed Sep 25, 2024
1 parent c9ae3fa commit 5912fd3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/models/xlmroberta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ namespace fastllm {
PermuteSelf(k, {0, 2, 1, 3});
PermuteSelf(v, {0, 2, 1, 3});

if (bsz == 1) {
if (false) {
// TODO: 这里使用的AttentionMask不是因果Mask,无法直接调用Attention函数
// 后续需要修改AttentionMask使得可以直接调用Attention函数
q.Reshape({-1, q.dims[2], q.dims[3]});
k.Reshape({-1, k.dims[2], k.dims[3]});
v.Reshape({-1, v.dims[2], v.dims[3]});
Expand Down

0 comments on commit 5912fd3

Please sign in to comment.