Studio: show the AMD NPU by default again, with a clearer setup notice by danielhanchen · Pull Request #14524 · unslothai/unsloth · GitHub
Skip to content

Studio: show the AMD NPU by default again, with a clearer setup notice - #14524

Open
danielhanchen wants to merge 7 commits into
mainfrom
studio-npu-default-on
Open

danielhanchen wants to merge 7 commits into
mainfrom
studio-npu-default-on

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Since 2026.10.7 the NPU section is gone from the model picker and the Hub on every Ryzen AI machine, including installs that were already chatting on the NPU. #13797 put it behind UNSLOTH_STUDIO_ENABLE_NPU=1, so /api/npu/status reports supported: false on an XDNA2 NPU unless that variable is set, and nothing in the app says so.

This brings the NPU back by default and makes the first-run notice clearer.

Changes

Backend and CLI

  • An XDNA2 NPU is shown again with the variable unset. UNSLOTH_STUDIO_ENABLE_NPU=0 (or false, no, off) still hides it, and NPU loads, the runtime start and unsloth run / unsloth chat with an NPU id are refused with a message naming the variable.
  • XDNA1 stays unsupported, as before.

Setup notice (model picker NPU section and the Hub NPU list)

  • Before the NPU is enabled, the notice is a short card: "This PC has an AMD Ryzen AI NPU", one sentence saying the NPU runs its own builds of models such as Qwen and Gemma alongside the GPU models, and "One-time setup: downloads about 47 MB and checks the NPU driver." next to the Enable NPU button. The wording reads the same in the model picker and in the Hub.
  • Once enabled, the picker shows one line: "These models run on the AMD NPU, not on the GPU."
  • The runtime names are gone from the notice. The "Powered by FastFlowLM and Lemonade" credit line was already removed in Studio: improve AMD NPU discovery, CLI support, and chat feedback #13797 and stays removed.
  • Errors, the driver setup link, Try again and Start NPU runtime behave as before.

Testing

  • studio/backend/tests/test_npu_detect.py, test_npu_backend.py, test_npu_chat_route.py, test_flm_files.py and unsloth_cli/tests/test_npu_cli.py pass. The detection test now covers unset, empty, 1, 0, false and Off; on main the unset and empty cases fail, since main hides the NPU there.
  • test_export_npu_q4nx.py::test_missing_converter_deps_fail_before_installing fails on main too and is unrelated.
  • Frontend type check is clean and the NPU frontend tests pass.

Screenshots

Two isolated installs, main (ab26545) and this branch. This build host has no NPU, so both Studios were started with the backend's Linux PCI probe reporting a Strix Halo XDNA2 NPU; the gate, /api/npu/status and the frontend are each side's own code. Nothing was enabled or downloaded.

Model picker, Recommended tab, NPU section opened, with UNSLOTH_STUDIO_ENABLE_NPU unset. Main shows no NPU section at all; this branch shows it with the new card:

NPU section with the variable unset, before vs after

The same with UNSLOTH_STUDIO_ENABLE_NPU=1 on both sides, so main's notice is visible too. The runtime names are gone, and the card says what the NPU is for and what Enable does:

NPU setup notice, before vs after

@danielhanchen danielhanchen self-assigned this Oct 21, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

@chatgpt-codex-connector

Copy link
Copy Markdown

The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 81b3e72e55

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +19 to +22
{setUp ? (
<p className="text-muted-foreground">
These models run on the AMD NPU, separately from the GPU models below.
</p>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Render the ready-state notice in the Hub

The new ready-state copy can never appear in the Hub: NpuCatalogList.body() renders NpuSetupNotice only while catalog.ready is false, whereas this branch requires ready && status.runtime_installed. After setup succeeds, the Hub jumps directly to its spinner or model rows and omits the new NPU/GPU separation explanation; include the notice on the Hub's ready path as well.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Main renders no NPU notice in the Hub once the runtime is ready either, so this is not a change from this PR; leaving the Hub's ready state as it is.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 378bfab71b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 21, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 21, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 21, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 21, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 53ea70d266

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 53ea70d266

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

This branch has not been deployed

No deployments
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