Q-Align
Q-Align copied to clipboard
when try to use flash_attention_v2, not find `_prepare_4d_causal_attention_mask_for_sdpa`
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?
I find the function in the file : https://huggingface.co/q-future/one-align/blob/main/modeling_attn_mask_utils.py.
https://huggingface.co/q-future/one-align/blob/main/modeling_attn_mask_utils.py
did u solve this problem?