Skip to content

Unsloth Studio / Desktop: model picker org filters get their own row, filter Discover and On Device, and can be chosen in Settings - #18108

Draft
LeoBorcherding wants to merge 25 commits into
unslothai:mainfrom
LeoBorcherding:leo-picker-org-row
Draft

LeoBorcherding wants to merge 25 commits into
unslothai:mainfrom
LeoBorcherding:leo-picker-org-row

Conversation

@LeoBorcherding

@LeoBorcherding LeoBorcherding commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

The org tabs (Google, Meta, Qwen, ...) used to sit in the same row as Favorites / Discover / On Device / Cloud, and they only listed models already on the device. They're now on/off filters (aria-pressed) that narrow whichever of Discover or On Device is open. By default they sit in the tab bar after a divider, where the org tabs were. A setting drops them to their own row under the sources.

What changed

  • Shown on Discover and On Device only, not on Favorites or Cloud. Drag reorders the filters. When their own row overflows, it scrolls sideways on a mouse wheel and fades its clipped ends. Changing the org cancels an unresolved Discover pick and resets the keyboard highlight, the same as a tab change. Discover auto-paging counts only the rows the filter keeps.

  • Filtering is strict. A row's org comes from the repo itself, never from a fine-tune's base model:

    1. The repo owner's own org comes first (google/gemma-* and google/flan-t5-small are Google). A short alias list covers orgs whose Hugging Face name differs (ibm-granite, CohereLabs, HuggingFaceTB, MiniMaxAI).
    2. Then the provider list's own Hugging Face accounts, and Unsloth re-uploads by model family.
    3. NPU rows use their repo owner, which is FastFlowLM by default.

    So bartowski/gemma-* or a local LoRA of Gemma never lists under Google. A row's logo still follows its base model, as before.

  • Choose organizations (Settings > Chat > Model selection, off by default). Off, the picker suggests orgs as it does today: any org with 3+ models on device. On, every known org is a toggle and the picker shows exactly the ones picked. The setting is saved as unsloth_chat_picker_orgs.

  • Organizations in the tab bar (same section, on by default). Turned off, the filters move out of the source tab bar onto their own row under the sources. Both placements render the same buttons. The setting is saved as unsloth_chat_picker_orgs_in_tab_bar.

  • New orgs: FastFlowLM and AMD. Their logos come from their Hugging Face org avatars, redrawn as marks in the theme colour so they stay readable at tab size.

Both settings are cleared by the settings reset and have strings in all 25 locales. This includes what was #18109.

Configurations

Unsloth Studio (web) on macOS (Apple M5), headless Chromium at 1280x800, models from the Mac's Hugging Face cache. Picked orgs: Qwen, Google, NVIDIA, AMD and FastFlowLM. Before is main f3f977904c. Every configuration shot is at 774d083, this head (main merged in). This Mac has no NPU and no AMD or FastFlowLM models, so those two filters show but have nothing to list here.

configuration screenshot
Before (main): Qwen is a fifth source tab, On Device only, and Google has no tab
Default: suggested orgs (Google and Qwen, 3+ on device) in the tab bar
Settings: Choose organizations on, five picked; Organizations in the tab bar on (default)
Tab bar, On Device: exactly the five picked, after a divider
Tab bar, On Device, Qwen pressed
Tab bar, Discover, Google pressed
Favorites: no org filters
Settings: Organizations in the tab bar off
Own row, On Device
Own row, On Device, Google pressed: unsloth/gemma-* plus google/flan-t5-small
Own row, Discover, NVIDIA pressed

Tests

  • filterByOrg, orgFilterApplies and ownerOrgId cover the attribution cases.
  • Source checks cover both placements, the wheel and fades, NPU attribution, the FastFlowLM and AMD entries, the store defaults, and the settings and reset wiring.
  • At 774d083: typecheck passes, the frontend suite passes, and i18n:check:strict is clean.

Before / after (merge base 3a6bc50da7 vs head 333fa1f22f, two isolated Studio installs, headless Chromium)

Six Qwen-owned repos (Qwen/* and unsloth/Qwen*) plus two controls (HuggingFaceTB/SmolLM2-135M-Instruct, trl-internal-testing/tiny-Qwen3ForCausalLM) on device in both homes.

On Device, Qwen pressed: main shows Qwen as a fifth source tab with only the 3 unsloth/ re-uploads; this PR puts Qwen on its own row and keeps all 6 Qwen repos, dropping both controls.
On Device, Qwen

Discover, Qwen pressed: this PR narrows Discover to Qwen-owned repos; main has no org filter on Discover.
Discover, Qwen

Choose organizations = Google, Qwen: exactly those two chips.
Picked orgs

Settings: the new switch, on, with the org toggles below it.
Settings

Staging CI (Studio regression journeys, base vs head): ubuntu NO_REGRESSION, windows-latest NO_REGRESSION, macos-15 NO_REGRESSION (re-run after the first macOS runner was never acquired). The only intended Settings change is the new Choose organizations row.

Studio UI regression check

Base 3a6bc50da vs head 333fa1f22. Functional: NO_REGRESSION, UI coverage 84%, 8 visual change(s), 5 text-only change(s). Only steps whose screenshots differ are shown.

crawl/r_images
Facts: inventory: {'before': ['link:Unsloth home', 'button:Search', 'button:Close sidebar', 'button:New chat', 'button:Model hub', 'button:Library', 'button:Images', 'button:Create', 'button:Edit', 'button:Transform', 'button:Inpaint', 'button:Extend', 'button:Upscale', 'button:Reference', 'button:More', 'button:Projects', 'button:New project', 'button:Organize projects', 'button:Recents', 'button:Organize chats', 'button:Unsloth account menu', 'button:Settings', 'separator:Resize or collapse sidebar', 'separator:Resize settings panel', 'button:Select image model', 'tab:Create', 'tab:Train', 'button:Use via API', 'button:Video', 'button:Manage image generation presets', 'button:Negative prompt', 'button:More info', 'combobox:Aspect ratio', 'button:Flip width and height', 'button:Width presets', 'button:Height presets', 'button:Advanced'], 'after': ['link:Unsloth home', 'button:Search', 'button:Close sidebar', 'button:New chat', 'button:Model hub', 'button:Library', 'button:Images', 'button:Create', 'button:Edit', 'button:Transform', 'button:Inpaint', 'button:Extend', 'button:Upscale', 'button:Reference', 'button:More', 'button:Projects', 'button:New project', 'button:Organize projects', 'button:Recents', 'button:Organize chats', 'button:Unsloth account menu', 'button:Settings', 'separator:Resize or collapse sidebar', 'separator:Resize settings panel', 'button:Select image model', 'tab:Create', 'tab:Train', 'button:Use via API', 'button:Video', 'button:Negative prompt', 'button:More info', 'combobox:Aspect ratio', 'button:Flip width and height', 'button:Width presets', 'button:Height presets', 'button:Advanced']}
crawl/r_images

desktop/s02_backend_ready
desktop/s02_backend_ready

desktop/s03_route_chat
desktop/s03_route_chat

desktop/s05_route_images
desktop/s05_route_images

desktop/s06_route_studio
desktop/s06_route_studio

desktop/s08_settings
desktop/s08_settings

desktop/s09_update_banner
desktop/s09_update_banner

desktop/s10_ipc
desktop/s10_ipc

Step Text / structure change
settings/s05_tab_chat {'removed': [], 'added': ['Choose organizations', 'Pick which organizations get a filter in the model picker, instead of the ones it suggests from your models.'
settings/s20_toggle_persist {'removed': [], 'added': ['Choose organizations', 'Pick which organizations get a filter in the model picker, instead of the ones it suggests from your models.'
settings/s21_reload_persisted {'removed': [], 'added': ['Choose organizations', 'Pick which organizations get a filter in the model picker, instead of the ones it suggests from your models.'
crawl/r_hub
crawl/r_projects

@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-19T03:13:37.023606Z faf98e8 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[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@LeoBorcherding LeoBorcherding changed the title Unsloth Studio / Desktop: model picker org filters get their own row and filter both Discover and On Device Unsloth Studio / Desktop: model picker org filters get their own row, filter Discover and On Device, and can be chosen in Settings Nov 17, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 3f2ef2488a

ℹ️ 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
#	studio/frontend/tests/composer-model-picker.test.ts
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 18, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 18, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 18, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 18, 2026
@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: 2ca4dcf7dd

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

isFavorite,
hubAnswered ? (row) => row.kind === "hub" : undefined,
),
orgFilterApplies(viewed) ? orgFilter : null,

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 Count organization-filtered results when auto-paging Discover

When an org has few or no Discover matches, this filter leaves the paging sentinel visible, but useHubInfiniteScroll still receives the unfiltered hubResults.length as resultCount. Each unrelated page therefore triggers resolveInfiniteScrollProgress's visible-results branch and resets the 40-fetch safety cap, so selecting that org can automatically drain the entire unscoped Hub listing and accumulate its hidden results without scrolling. Pass the organization-filtered visible count to the paging hook, or scope the Hub request by org, so nonmatching pages cannot continually reset the cap.

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 333fa1f: under an org filter the paging hook now counts only the Hub rows the filter shows, and the reset key includes the org, so hidden pages no longer reset the fetch cap.

LeoBorcherding and others added 2 commits November 18, 2026 09:53
…ker-org-row

# Conflicts:
#	studio/frontend/src/components/assistant-ui/composer-model-picker/picker-model.ts
#	studio/frontend/tests/composer-model-picker.test.ts
@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. Keep them coming!

Reviewed commit: 333fa1f22f

ℹ️ 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 added a commit that referenced this pull request Nov 18, 2026
## Summary

The whole-tree "Duplicate definitions" step in Lint CI fails on main:

```
duplicate definitions (1):
  unsloth/kernels/dequant_cache.py:740: _ is defined twice (def at line 721, def here)
```

Every PR's source lint job inherits this (for example the staging runs
for #17742 and #18108, both on current main).

## Cause

#18285 registers fake (meta) kernels for its two custom ops with the
idiom the torch.library docs use:

```python
@torch.library.register_fake("unsloth::nf4_cached_matmul", lib = _LIB)
def _(X, W, ...): ...

@torch.library.register_fake("unsloth::nf4_cached_addmm_", lib = _LIB)
def _(out, X, W, ...): ...
```

That code is correct. The decorator keeps a reference to each function,
and the name `_` is never read back, so neither copy is dead.
`lint_duplicate_definitions.py` exists to catch a second copy that
silently replaces the first, which is not what happens here. The lint is
too broad for this case.

## Fix

In `scripts/lint_duplicate_definitions.py`, a `def _` that has at least
one decorator binds nothing. This covers `register_fake`,
`singledispatch`'s `@f.register def _`, and similar registration hooks.
The exemption is deliberately narrow:

- An undecorated `def _` defined twice is still a finding.
- Any other decorated name defined twice is still a finding.

Two self-test cases pin both sides. The docstring's list of carve-outs
documents it.

## Verification

- `--self-test`: 65 cases pass. With the exemption removed, the new
decorated `_` case fails (`self-test FAILED (1 case(s))`).
- Whole tree (`unsloth unsloth_cli studio scripts tests cli.py
unsloth-cli.py`): `clean: 6105 file(s) checked`. On main the only
finding was the one above, so the exemption hides nothing else.
- `tests/test_lint_duplicate_definitions.py`: 12 passed. ruff is clean.
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 18, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 18, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 18, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 18, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 18, 2026
@LeoBorcherding

Copy link
Copy Markdown
Collaborator Author

Pushed 989b6ed.

  • FastFlowLM is now an org you can pick under Settings > Chat > Choose organizations. Its logo is the FastFlowLM Hugging Face avatar, redrawn as a thicker mark in the theme colour so it stays readable at tab size. NPU rows, which have no Hub id, get their org from the repo owner (npuMarkOwner, FastFlowLM by default). That covers both downloaded rows and download offers, so the FastFlowLM filter lists them.
  • rowOrg checks the repo owner's own org first (google/gemma-* and google/flan-t5-small go under Google), then falls back to the logo map's owner list and Unsloth re-uploads. It parses each row once, and the org tabs look their maker up by id instead of re-deriving it.
  • Tidy-ups: imports are re-sorted, and the picker-orgs setter sits next to the settings it belongs with in the store and the Settings tab.
  • Merged the branch's newer head: org changes reset picks, fades refresh, and Discover auto-paging counts filtered rows.

Typecheck and the frontend suite pass (16706 tests).

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 989b6eda27

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

@LeoBorcherding

Copy link
Copy Markdown
Collaborator Author

Pushed faf98e8.

  • New setting, Organizations in the tab bar (Settings > Chat > Model selection, off by default). When it's on, the org filters sit in the source tab bar after a divider, as they used to, instead of on their own row. Both placements render the same buttons, so filtering and drag work the same either way. The setting is saved as unsloth_chat_picker_orgs_in_tab_bar, the settings reset clears it, and it has strings in all 25 locales.
  • AMD can now be picked as an org. It uses the arrow from AMD's Hugging Face avatar as a mark in the theme colour, and NPU rows from amd/* repos file under AMD.

Typecheck, the frontend suite and i18n:check:strict all pass.

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: faf98e83cf

ℹ️ 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
#	studio/frontend/src/features/chat/stores/chat-runtime-store.ts
#	studio/frontend/src/features/settings/tabs/chat-tab.tsx
@LeoBorcherding
LeoBorcherding marked this pull request as draft November 23, 2026 20:00

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants