{{ message }}
Repository navigation
Studio: improve AMD NPU discovery, CLI support, and chat feedback - #13797
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Member
Author
danielhanchen
pushed a commit
to danielhanchen/unsloth-staging-2
that referenced
this pull request
Oct 15, 2026
danielhanchen
pushed a commit
to danielhanchen/unsloth-staging-2
that referenced
this pull request
Oct 15, 2026
danielhanchen
pushed a commit
to danielhanchen/unsloth-staging-2
that referenced
this pull request
Oct 15, 2026
# Conflicts: # unsloth_cli/commands/start.py # unsloth_cli/commands/studio.py
# Conflicts: # studio/backend/routes/inference.py # studio/backend/tests/test_openai_auto_switch.py
for more information, see https://pre-commit.ci
# Conflicts: # studio/backend/routes/inference.py
for more information, see https://pre-commit.ci
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Chat on the AMD Ryzen AI NPU works once a user finds it. On a Strix Halo machine, though, the NPU section in the model picker would not open from its heading, the CLI could not use NPU models, and one common failure showed a blank reply. This fixes those gaps.
Changes
Chat
stopinstead oflength. API clients now getlengthtoo.CLI
unsloth run --model qwen3-0.6b-FLM(orlemonade:<id>) enables the NPU runtime, downloads the model, and serves it. Before, the id was parsed as a GGUF repo. For NPU models, the banner shows only the chat example.unsloth chat qwen3-0.6b-FLMchats through a running Studio. Without one, it says how to start it instead of crashing.unsloth startexplains that coding agents need a GGUF model instead of looking the id up on Hugging Face.API
/v1/messageswith an NPU model loaded explains that NPU models serve/v1/chat/completionsonly. Before, it said "No GGUF model loaded"."\n\n\n"as content.Limits
Screenshots
Model picker after clicking the "NPU" heading (two isolated installs, NPU responses mocked):
A reply whose reasoning fills a 2048-token context, on the Strix Halo machine:
Verification
On AMD Ryzen AI MAX+ 395 machines, main (A) and this branch (B) were installed from source on Linux and on Windows, and both ran the same steps:
/v1/messageswith NPU loadedunsloth run --model qwen3-0.6b-FLMunsloth chat qwen3-0.6b-FLMOn B, with switching on, requests the NPU model cannot serve were refused without unloading anything (Linux and Windows). On Linux, with a GGUF reply streaming on the iGPU, a request naming the NPU model waited for the reply to finish before loading.
New backend and CLI tests fail without these fixes. The related backend, CLI and frontend suites show no new failures, and the type check is clean.
Before / after (merge base 5e927b0 vs head f39640f)
Two isolated Studio installs, one per commit. The NPU API is mocked in the browser, as in the screenshots above.
Clicking the "NPU" heading text in the model picker. Before, the section stays folded. After, it opens:
The NPU section opened. The setup text is plainer, and the "Powered by FastFlowLM ... and Lemonade" line is gone. It is also gone from the Hub's NPU list:
Every collapsible section opens from its label, not only from the chevron. Here, "Other models" on the On Device tab:
Follow-up changes
active_kv_tokens.total_tokenscame up 3 short when thinking was off, because the empty think block counts four context tokens as one generated token, so the context-window notice did not show.UNSLOTH_STUDIO_ENABLE_NPU=1to use it. Without the flag, an XDNA2 NPU reportssupported: false, so the picker and Hub show no NPU section, and NPU loads, the runtime start, andunsloth run/unsloth chatwith an NPU id are refused with a message naming the flag. The screenshots above were taken with the NPU on.