Skip to content

Added warnings for users attempting to use MPS with Torch 2.8#1271

Open
jlarson4 wants to merge 1 commit intodevfrom
bug/generate-issue-torchc-2.8
Open

Added warnings for users attempting to use MPS with Torch 2.8#1271
jlarson4 wants to merge 1 commit intodevfrom
bug/generate-issue-torchc-2.8

Conversation

@jlarson4
Copy link
Copy Markdown
Collaborator

Description

Added an explicit warning when MPS users attempt to run TransformerLens with Torch 2.8.0, it has a known MPS bug that produces silently incorrect results (torch.nn.functional.linear on non-contiguous tensors). This corrupts generate() output and attention computations.

I did not do anything directly to processing to resolve this on our end in any way, this is an upstream issue & has been resolved as of Torch 2.9.0. This warning will alert anyone running on older dependencies to upgrade.

Fixes #1062

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have not rewritten tests relating to key interfaces which would affect backward compatibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant