挺有趣的,attention的mask可能有多种用法_transformer


如上图所示,输入的mask是attn_mask,但是与输入的seq长度不匹配时:有可能是需要mask掉prefixes。

挺有趣的,attention的mask可能有多种用法_transformer_02