allenai / reward-bench

RewardBench: the first evaluation tool for reward models.
https://huggingface.co/spaces/allenai/reward-bench
Apache License 2.0
440 stars 52 forks source link

Add attn_implementation support #170

Closed chrisliu298 closed 2 months ago

chrisliu298 commented 2 months ago

This PR adds the attn_implementation arg mentioned in #169 to allow users to choose between sdpa, eager, and flash_attention_2. If attn_implementation is not specified, it falls back to the original behavior, which uses either sdpa or eager, depending on the PyTorch version.