Skip to content

Unsloth Studio: name and order the composer picker's NPU models like the Hub - #18059

Merged
danielhanchen merged 7 commits into
unslothai:mainfrom
LeoBorcherding:studio/npu-composer-picker-names
Nov 17, 2026
Merged

danielhanchen merged 7 commits into
unslothai:mainfrom
LeoBorcherding:studio/npu-composer-picker-names

Conversation

@LeoBorcherding

Copy link
Copy Markdown
Collaborator

The composer model picker's NPU section listed FastFlowLM's internal ids (d3-edge-FLM, gemma4-it-e4b-FLM, ...) in the backend's alphabetical order. The Hub's NPU list already shows Hugging Face names (Qwen3.6-35B-A3B-NPU2) in the curated order from #17513. #17610 renamed the old picker and the Hub, but the composer picker from #17517 builds its own NPU rows, so it kept the raw ids.

The picker now builds its NPU rows with the Hub's own helpers, npuRowsFor and npuDisplayName, so both lists match. Rows still load by the lemonade:<id>-FLM path, and sizes show as before. On Device's default Recent sort kept re-sorting never-loaded NPU rows by name, so device rows carry an optional rank and the sort breaks date ties by date, then rank, then name. Name and Size sorts are unchanged.

Tests. tests/composer-npu-rows.test.ts covers names, order, the -FLM load path, and the Recent sort with mixed inventories. Typecheck and the full frontend suite pass (16471 pass, 0 fail).

Screenshots. Composer picker, Discover tab, NPU section, light mint theme, with /api/npu answers mocked in the browser (the change is frontend only). The "Couldn't reach Hugging Face" banner is the mock having no Hub feed.

Before (main) After

…the Hub

The composer picker labelled NPU rows with FastFlowLM's -FLM id and kept the
backend's alphabetical order. Build them with npuDisplayName and npuRowsFor,
the same helpers the Hub's NPU list uses; the row still loads by its
lemonade: path.
NPU rows have no date, so the Recent sort's tie-break re-sorted them by
name. Ranked rows now break that tie by their curated rank first.
Comparing rank only between two ranked rows mixed rank and name ordering,
so an NPU row could land out of the Hub's order next to undated local rows.
Unranked rows now rank last, giving one (date, rank, name) key order.
@LeoBorcherding

Copy link
Copy Markdown
Collaborator Author

Codex review on the fork mirror (LeoBorcherding/unsloth#918) is clean at 89f2d46a52, this PR's head: "Didn't find any major issues."

Two earlier rounds found real issues, both fixed:

  • 4668ec9cc6: On Device's default Recent sort broke date ties by name, and NPU rows carry no date, so downloaded NPU models were still listed alphabetically. Rows now carry an optional rank, and ties break by date, then rank, then name.
  • 89f2d46a52: the rank tie-break only applied between two ranked rows, so next to undated local rows the comparator wasn't transitive and NPU rows could still come out of order. Fixed, with a test that fails on 4668ec9cc6 and passes here.

Typecheck and the full frontend suite pass (16471 pass, 0 fail).

@danielhanchen danielhanchen self-assigned this Nov 17, 2026
@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 commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T16:54:26.229743Z 9d7f7eb 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 47da4e8f0e

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

@danielhanchen

Copy link
Copy Markdown
Member

pre-commit.ci run

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 47da4e8f0e

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

# Conflicts:
#	studio/frontend/src/components/assistant-ui/composer-model-picker/composer-model-picker.tsx

[skip ci]
@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. Bravo.

Reviewed commit: 9d7f7eb07f

ℹ️ 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
danielhanchen merged commit ca164a5 into unslothai:main Nov 17, 2026
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.

2 participants