Skip to content

Studio: update the NPU runtime, harden its pin updates, and polish the NPU UI - #16834

Merged
danielhanchen merged 9 commits into
unslothai:mainfrom
oobabooga:studio-npu-runtime-update
Nov 6, 2026
Merged

danielhanchen merged 9 commits into
unslothai:mainfrom
oobabooga:studio-npu-runtime-update

Conversation

@oobabooga

@oobabooga oobabooga commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

AMD shipped a FastFlowLM fix that Studio users never got: Studio still pinned FastFlowLM v1.0.10 and Lemonade 2026.43.3, because the daily pin update workflow cannot open its pull request in this repository. This PR does four things.

1. Update the NPU runtime

studio/lemonade_prebuilt_pins.json:

Before After
FastFlowLM v1.0.10 v1.0.12
Lemonade 2026.43.3 2026.44.1

Users get this with the next Studio release. Their first NPU use after updating upgrades the runtime in place, as on every pin change.

Lemonade stops at 2026.44.1 on purpose. The newest release, 2026.45.3, ships a Linux lemond that needs glibc 2.43 and OpenSSL 3.2, so it does not start on Ubuntu 24.04 (glibc 2.39, OpenSSL 3.0).

2. Skip pin updates that need a newer glibc

scripts/update_lemonade_pins.py is what the daily pin update workflow runs to propose new pins. It does not run on users' machines.

  • Before: it always proposed the latest release, so it was proposing Lemonade 2026.45.3, which would have broken NPU chat on Ubuntu 24.04.
  • After: it checks each newer release's Linux binaries and skips any that need a glibc newer than 2.39 (Ubuntu 24.04; FastFlowLM itself already needs 2.39). It proposes the newest release that passes and logs the skipped ones.

Hash and size checks still run first, so a bad download is still an error rather than a skip. Run against main's pins, the script now produces exactly this PR's pins file.

3. Show the runtime versions in the UI

A faint FastFlowLM v1.0.12 · Lemonade v2026.44.1 line, shown once the NPU runtime is set up, under the NPU models in the Hub and in the chat model picker (screenshots in section 4). It reads the versions field /api/npu/status already returns. #13797 removed the "Powered by" line that used to carry these versions.

pr16834_hub_npu_versions

4. List GPU models before NPU models in the chat model picker

  • Before: on the Recommended tab, an NPU group sat at the top of the list, above the Unsloth models.
  • After: the list holds only GPU models. An always-visible "NPU models" footer below it opens the picker's NPU filter, which lists the NPU models with the setup card or the version line. The footer says how many NPU models there are, how many match a search, or "Set up the AMD NPU".

The NPU group could not simply move below the Unsloth models: that list loads more models as it is scrolled, about 30 pages and 350 rows on this machine, so the group would sit around 11,000 px down. Search follows the same rule, so NPU matches no longer appear above the GPU results. The On Device tab already lists NPU models after the GPU groups and is unchanged. The Eject model button still floats over the bottom of the list, now just above the footer.

pr16834_picker_default

pr16834_picker_npu_opened

Screenshots: main (0ab3f0773d) vs this PR at 0e1f74712e (d26ae020a3 after a rebase that changed only a comment in the frontend), two fresh installs, English locale. This machine has no NPU, so /api/npu/* was mocked as a ready XDNA2 runtime reporting the versions the DevLab runs below reported.

Verification

  • On the AMD DevLab Strix Halo machines, Windows 11 and Ubuntu 24.04, with a real NPU: I enabled the NPU with main's pins, switched to this PR's pins, and the first use upgraded the runtime in place to FastFlowLM v1.0.12 and Lemonade 2026.44.1. qwen3-0.6b-FLM then downloaded, loaded and answered a chat request correctly (74 and 81 tok/s).
  • On Linux Mint 22 (glibc 2.39), Lemonade 2026.44.1 installs and runs, while 2026.45.3 fails with GLIBC_2.43 not found.
  • test_update_lemonade_pins.py, test_install_lemonade_prebuilt.py and test_npu_backend.py: 93 passed. The new tests cover the glibc fallback, a release exactly at the limit, all releases too new, candidate tags, ELF-only scanning, and hash checks running before the glibc check.
  • Frontend: the NPU and picker node tests (43 passed), npm run typecheck, and eslint on the changed files. The full node suite has 17 failures in 14 files: the two that read the picker fail the same way with main's picker files, and the other 12 do not reference the picker or NPU code.
  • In a running Studio: the picker footer before and after NPU setup, the NPU filter it opens, and the Eject model button's position with a GGUF loaded.

Not in this PR

  • The pin update workflow still cannot open its PR. That needs "Allow GitHub Actions to create and approve pull requests" under Settings > Actions > General, or a GitHub App token in lemonade-pins-update.yml (which would also run CI on its PRs).
  • d3-edge-FLM, a Decision model new in FastFlowLM 1.0.12, does not load on either DevLab machine (flm serve d3:edge exits about a second after it starts). It was not loadable before this PR either, since v1.0.10 does not have it.

Maintainer follow-up

  • scripts/update_lemonade_pins.py now checks every system library the Linux build links against, not only glibc: a release is skipped if it needs a newer GLIBC, GLIBCXX, CXXABI or OPENSSL symbol version than Ubuntu 24.04 ships (2.39, 3.4.33, 1.3.15, 3.0.9). Lemonade 2026.45.3 needs both GLIBC 2.43 and OPENSSL 3.2.0, so the OpenSSL break alone would have shipped a lemond that cannot start, even if a later build fixed glibc. Run live against main's pins, the script still produces exactly this PR's pins file and logs needs GLIBC 2.43 > 2.39, OPENSSL 3.2.0 > 3.0.9.
  • Picker: clicking the "Set up the AMD NPU" footer while a search is active now still shows the setup card, instead of an empty NPU view.
  • Real NPU runs on the AMD CI Strix Halo machines (XDNA2), Linux and Windows 11: main's pins installed and answered; this PR's pins then upgraded the same install in place on first use to FastFlowLM 1.0.12 and Lemonade 2026.44.1. qwen3-0.6b-FLM gave the same greedy reply as before, at the same decode speed (Linux 67.9 vs 67.9 tok/s, Windows 65.6 vs 65.4 tok/s).

Before (main) / after (this PR), chat model picker, /api/npu/* mocked as a ready XDNA2 runtime:

Picker default list: NPU group above the Unsloth models before, GPU models with an NPU footer after

NPU view: no runtime versions before, FastFlowLM and Lemonade versions after

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T08:30:06.584225Z 1f53195 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@oobabooga oobabooga changed the title Studio: update the NPU runtime to FastFlowLM v1.0.12 and Lemonade 2026.44.1, and show its versions in the Hub Studio: update the NPU runtime to FastFlowLM v1.0.12 and Lemonade 2026.44.1, skip pin updates that need a newer glibc, and show the runtime versions in the UI Nov 5, 2026
@oobabooga

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: c8e74f9844

ℹ️ 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 thread scripts/update_lemonade_pins.py Outdated
Comment on lines +68 to +71
_request(f"{_API}/repos/{repo}/releases?per_page=30"), timeout = _TIMEOUT_S
) as r:
return json.load(r)
releases = json.load(r)
return [r for r in releases if not r.get("draft") and not r.get("prerelease")]

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 Follow pagination when searching for compatible releases

If an upstream publishes 30 prereleases or candidate builds after a compatible stable release that is newer than the pin, that stable release falls onto page 2. This function reads only page 1 and ignores the pagination link, so update_pins() finds no eligible update and incorrectly reports that the pins are current. I reproduced this with a mocked two-page response; supplying the complete release list correctly selected the update. The previous /releases/latest lookup did not lose stable releases behind intervening prereleases. Follow pagination before concluding that no compatible update exists.

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.

Fixed in 1ef4732: fetch_stable_releases now follows the Link rel="next" pages (100 per page), so stable releases behind candidate prereleases are no longer dropped. Lemonade publishes about three candidates per stable release, so this was reachable once the pin lags. A two-page test covers it, and a live run at 30 per page returned the same 78 stable Lemonade releases over 3 pages.

@oobabooga

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 1ef4732614

ℹ️ 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".

@oobabooga oobabooga changed the title Studio: update the NPU runtime to FastFlowLM v1.0.12 and Lemonade 2026.44.1, skip pin updates that need a newer glibc, and show the runtime versions in the UI Studio: update the NPU runtime, harden its pin updates, and polish the NPU UI Nov 5, 2026
@oobabooga

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: d26ae020a3

ℹ️ 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

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@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: 7e861240aa

ℹ️ 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".

className="pointer-events-auto inline-flex items-center justify-center gap-2 rounded-full bg-popover px-3 py-2 text-ui-13 font-medium text-destructive shadow-[0_2px_8px_-2px_rgba(0,0,0,0.16)] transition-colors hover:bg-[color-mix(in_srgb,var(--foreground)_8%,var(--popover))] dark:bg-sidebar-accent dark:shadow-none dark:hover:bg-[color-mix(in_srgb,var(--foreground)_8%,var(--sidebar-accent))]"
title={ejectsAll ? "Eject all models" : "Eject model"}
data-testid="picker-npu-footer"
onClick={() => setFormatFilter("npu")}

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 Keep NPU setup reachable when opening the footer during search

On an NPU-capable machine that has not yet enabled the runtime, clicking the new footer advertising Set up the AMD NPU while a search is active preserves the query, so showHfSection stays true. useNpuCatalog supplies models: null until the runtime is ready, making npuBrowseRows empty and showNpuBrowse false. The footer then disappears without rendering NpuSetupNotice, leaving no enable/retry action until the user clears the search. Clear the query for this setup path or render the setup notice independently of matching models.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fixed in 1f53195: while the runtime is not ready, the NPU filter keeps the setup notice during a search, so the footer's setup path always lands on the enable action.

@danielhanchen

Copy link
Copy Markdown
Member

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 1f53195b5c

ℹ️ 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 Nov 6, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 6, 2026
@danielhanchen
danielhanchen merged commit 1928a2c into unslothai:main Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants