Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Sep 10, 2025. It is now read-only.
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Slimming down torchchat: Replace replace_attention_with_custom_sdpa_attention() with ET's implementation #1058

Open
Labels
ExecuTorchIssues related to ExecuTorch installation, export, or build. Mobile uses separate tags enhancementNew feature or request good first issueGood for newcomers triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
@Jack-Khuu

Description

🚀 The feature, motivation and pitch

First surfaced in #1057, the replace_attention_with_custom_sdpa_attention function, used when exporting models in torchchat, can be replaced with the equivalent API provided in the Excecutorch https://github.com/pytorch/executorch/blob/main/examples/models/llama2/source_transformation/sdpa.py

Task: Swap the torchchat implementation with that of ExecuTorch's. Delete the then defunct code from torchchat

Alternatives

No response

Additional context

No response

RFC (Optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    ExecuTorchIssues related to ExecuTorch installation, export, or build. Mobile uses separate tags enhancementNew feature or request good first issueGood for newcomers triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /