OpenNLPLab / cosFormer

[ICLR 2022] Official implementation of cosformer-attention in cosFormer: Rethinking Softmax in Attention
Apache License 2.0
176 stars 25 forks source link

Question about space complexity #8

Closed nihaomiao closed 2 years ago

nihaomiao commented 2 years ago

Thanks very much for your interesting work! I have a question about the O(N) space complexity mentioned in your paper. I am wondering whether you can help me to figure it out.

In Eq. (11) of your paper, you compute QK^T in the denominator, which may lead to O(N^2*d) space complexity?

bests