Skip to content

fix(backends): drop the stale MPS warning from generate_from_raw - #1740

Merged
planetf1 merged 1 commit into
generative-computing:mainfrom
planetf1:fix/1739-mps-warning
Oct 19, 2026
Merged

planetf1 merged 1 commit into
generative-computing:mainfrom
planetf1:fix/1739-mps-warning

Conversation

@planetf1

Copy link
Copy Markdown
Contributor

Pull Request

Issue

Fixes #1739

Description

Removes the stale MPS warning and its TODO from LocalHFBackend._generate_from_raw. Eight lines, pure log-statement deletion, no behaviour change.

Why:

  • The SDPA bug behind the warning (MPS SDPA returns NaN when attention mask blocks all rows pytorch/pytorch#156707) was fixed in torch 2.9.0, released 2025-10-15 (commit 194539e9c). mellea[hf]'s torch floor is 2.10 via granite-switch, so no installable stack can carry the bug.
  • The warning fired on every raw generation on MPS, batch or not, and linked a PyTorch PR that displays as closed and unmerged because PyTorch's mergebot committed the fix straight to main.
  • Its prescribed check ("ensure all ModelOutputThunks have non-empty values") fails legitimately via first-token EOS on any device, so it mislabelled healthy output as suspect.

Full history, reproducer, and the rationale for why non-empty validation stays a caller concern are in #1739.

Testing

  • Tests added to the respective file if code was changed
  • New code has 100% coverage if code was added
  • Ensure existing tests and github automation passes (a maintainer will kick off the github automation when the rest of the PR is populated)

No new tests: no test or doc references the warning (searched test/ and docs/), and the change is a pure deletion. Verified locally: ruff format and lint clean, codespell clean, and an empirical repro on MPS with mellea built from this branch shows the warning gone and batch outputs identical to pre-change runs, including the legitimate empty row. mypy was skipped in the local worktree (no synced env); CI covers it.

Attribution

  • AI coding assistants used

Adding a new component, requirement, sampling strategy, or tool?

If your PR adds or modifies one of the types below, check the matching box. A checklist of type-specific review items will be posted as a comment.

  • Component
  • Requirement
  • Sampling Strategy
  • Tool

The SDPA bug behind the warning (pytorch/pytorch#156707) was fixed in
torch 2.9.0, released 2025-10-15, and mellea[hf]'s torch floor is 2.10
via granite-switch, so every installation mellea can resolve has carried
the fix since before the warning was added. The warning still fired on
every raw generation on MPS, linked a PyTorch PR that displays as closed
and unmerged, and told users to verify non-empty outputs, which
first-token EOS legitimately fails on any device. It was log noise that
sent people chasing NaNs that no longer exist.

Closes generative-computing#1739

Assisted-by: Pi
Signed-off-by: Nigel Jones <[email protected]>
@github-actions github-actions Bot added the bug Something isn't working label Oct 16, 2026
@planetf1
planetf1 marked this pull request as ready for review October 16, 2026 09:31
@planetf1
planetf1 requested a review from a team as a code owner October 16, 2026 09:31
@planetf1
planetf1 added this pull request to the merge queue Oct 19, 2026
Merged via the queue into generative-computing:main with commit a0a17a0 Oct 19, 2026
13 checks passed
@planetf1
planetf1 deleted the fix/1739-mps-warning branch October 19, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Retire the MPS generate_from_raw warning: the PyTorch bug it references was fixed in torch 2.9.0

2 participants