InternVL icon indicating copy to clipboard operation
InternVL copied to clipboard

[Feature] InternVL2‑26B的output_attentions参数设置失败,如果设置为True,要返回attn_weights的话应怎么修改代码

Open zhly0 opened this issue 6 months ago • 0 comments

Motivation

您好, 我想返回 InternVL2‑26B的output_attentions,但是使用transformer推理时,发现,在模型自带的代码里面,不论外面设置output_attentions为True或者False,modeling_internlm2.py代码里面都将其人工设定为False,导致无法返回attn_weights,如果要返回有效的attn_weights,应该怎么修改代码? 感谢。

Related resources

No response

Additional context

No response

zhly0 avatar Aug 09 '24 02:08 zhly0