1、参考MixFormer的vis-attn即可。使用hook钩子出attn矩阵(一般是dropout层)。
2、稍微改改vis_attn_maps代码即可

最后修改:2025 年 01 月 07 日
如果觉得我的文章对你有用,请随意赞赏