Q-Align icon indicating copy to clipboard operation
Q-Align copied to clipboard

when try to use flash_attention_v2, not find `_prepare_4d_causal_attention_mask_for_sdpa`

Open dongdk opened this issue 1 year ago • 2 comments

after installing the flash_attn and run the scorer.py script, meet the problem:

NameError: name '_prepare_4d_causal_attention_mask_for_sdpa' is not defined. Did you mean: '_prepare_4d_causal_attention_mask'?

any idea to solve it?

dongdk avatar Nov 06 '24 07:11 dongdk

I find the function in the file : https://huggingface.co/q-future/one-align/blob/main/modeling_attn_mask_utils.py.

Nancywsn avatar Dec 26 '24 06:12 Nancywsn

https://huggingface.co/q-future/one-align/blob/main/modeling_attn_mask_utils.py

did u solve this problem?

MengHao666 avatar Jul 01 '25 07:07 MengHao666