Open
Description
The HuggingFaceNmEngine
class sets output_attentions=True
when calling the generate
method on the model. This is not compatible with the SDPA attention implementation, so Huggingface reverts to using the default eager implementation. The class outputs the attentions so that they can be used to infer the alignment. A config option should be added to the class that allows the caller to disable inferring alignment from attention. This will allow Huggingface to use the SDPA attention implementation when it is configured.