Skip to content

HuggingFaceNmtEngine does not use SDPA attention implementation #201

@ddaspit

Description

@ddaspit

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions