Skip to content

Studio: searching a model maker in the Model hub lists Unsloth's uploads of its models - #13998

Merged
shimmyshimmer merged 3 commits into
mainfrom
studio-hub-uploader-search
Oct 16, 2026
Merged

shimmyshimmer merged 3 commits into
mainfrom
studio-hub-uploader-search

Conversation

@shimmyshimmer

Copy link
Copy Markdown
Member

What changed

Searching the Model hub for a model maker now lists Unsloth's uploads of that maker's models first, then the maker's own Hub org uploads, then the usual search results without duplicates.

Before, searching "meta" returned only repos with "meta" in their id (meta-llama and meta-models uploads), none of Unsloth's Muse Spark, Muse Glimmer or Llama uploads, and "alibaba" found nothing from Qwen at all.

  • Which makers: any provider in the avatar registry (provider-logos.ts), matched on the whole query against its id, display name, Hub orgs and a few common names (meta, facebook, alibaba, zai, z.ai, zhipu, google, deepmind, deepseek, moonshot, mistral, xai, and so on). Exact names only, so "metal" or "gem" match nothing, and an owner/repo query keeps its existing pinned-publisher behaviour.
  • Which Unsloth uploads: exactly the ones the Hub shows with that maker's avatar. The maker's repo prefixes become Hub searches inside the unsloth org (terms already covered by a shorter one are skipped), and each hit is kept only if resolveOwnerProviderLogo maps it to that maker.
  • Maker org uploads: the maker's Hub orgs (Qwen for alibaba, zai-org for zai, meta-models / meta-llama / facebook for meta, ...) follow the Unsloth uploads, outside Unsloth-only scope.
  • Both groups follow the chosen sort. Searching an uploader by name (for example bartowski) already worked through the Hub's own search and is unchanged.

Verification

  • npm run typecheck, npm run build, full npm test (all pass). New tests/hub-provider-search.test.ts covers query matching, search terms, org lookup and both search paths.
  • Isolated Studio, Model hub search:
    • "meta": Muse-Spark-Open-816B-A42B-GGUF, Muse-Glimmer-30B-GGUF, then Unsloth's Llama uploads
    • "alibaba": Unsloth's Qwen uploads (Qwen3.8-27B-GGUF, Qwen-Image-2.1-Turbo-GGUF, ...)
    • "zai": Unsloth's GLM uploads; "google": Unsloth's Gemma uploads

Not tested here

ModelScope listings were not exercised from this host.

@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 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-10-16T12:08:13.940188Z 5a93edc 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 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: df44f30cb5

ℹ️ 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 +564 to +570
for (const group of [pool, own]) {
for (const model of rankListing([...group.values()], opts.sortBy, opts.sortDirection)) {
const name = (model as { name?: string }).name;
if (!name || shown.has(name)) continue;
shown.add(name);
primeFromListing(name, opts.accessToken, model);
yield model;

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 Bound provider prefetch before filtered pagination

When a provider search is combined with a client-side filter that rejects these priority groups—for example, selecting only Personal uploaders after searching for Meta—this loop emits every prefetched Unsloth and official-organization model before reaching inner. If the combined pools exceed pullBatch's 192-row scan limit, the first page contains no results and the user must manually load additional pages to reach matching personal uploads. mergedModelIterator avoids this starvation by applying filterPriority and stopping after 40 rejected priority rows; the provider groups need an equivalent filter/rejection bound rather than yielding up to 100 rows per term and organization unconditionally.

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 5a93edc: the maker groups now pass through filterPriority and give way to the search's own results after UNSLOTH_FILTER_REJECT_LIMIT rejections, as the Unsloth pass in mergedModelIterator does.

...(opts.accessToken ? { credentials: { accessToken: opts.accessToken } } : {}),
})) {
items.push(model);
if (items.length >= PROVIDER_POOL) break;

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 Preserve provider results beyond the first pool

When a provider family or official organization has more than 100 matching models, this break closes that listing and permanently discards its remaining pages. The later inner iterator searches the user's original alias, so searches such as alibaba generally cannot recover Qwen-named Unsloth uploads or additional Qwen/* models that fell outside these first 100 rows; pagination can therefore finish without ever exposing valid provider results. Keep the listing tail available for later pages, or otherwise merge it after the priority prefix instead of truncating it.

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 5a93edc: the first 100 rows of each listing are ranked, and the rest of every listing now follows in its own order instead of being dropped.

}
}
const own = new Map<string, FreshRankable>();
for (const model of (await orgLists).flat()) {

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 Yield Unsloth results before awaiting organization searches

In the default all-uploaders scope, this await blocks the first result until every official-organization listing completes, even though those rows are intentionally ordered after the already-fetched Unsloth pool and are ranked as a separate group. A slow Meta organization request, for example, can therefore hold back all available Unsloth matches until its 15-second request timeout expires; build and yield the Unsloth group first, then await orgLists before emitting the organization group.

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 5a93edc: the org listings start alongside the Unsloth ones but are awaited only after the Unsloth group has been yielded.

@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

shimmyshimmer pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 16, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 5a93edcb09

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

@shimmyshimmer
shimmyshimmer merged commit d4e005e into main Oct 16, 2026
@shimmyshimmer
shimmyshimmer deleted the studio-hub-uploader-search branch October 16, 2026 12:14
danielhanchen added a commit that referenced this pull request Oct 16, 2026
## Summary

`Frontend build + bundle sanity` is red on main again (for example on
#13986, based on a1d4daa): `over the startup budget: transfer 1997.6
KB > 1996.8 KB, raw 6641.9 KB > 6639.0 KB`.

Measured commit by commit (one machine and build, Node 24, `rm -rf dist`
before each build, 95 chunks throughout):

| commit | raw B | transfer B |
|---|---|---|
| 4ebc263~1 | 6,798,138 | 2,044,534 |
| 4ebc263 (#13999) | 6,798,175 | 2,044,556 |
| bcf7c81 (#13993) | 6,798,217 | 2,044,592 |
| d4e005e (#13998) | 6,801,255 | 2,045,592 |

Nearly all of it is #13998 (searching a model maker in the Model hub
lists Unsloth's uploads of its models): +3,038 B raw / +1,000 B
transfer. Its owner-to-uploads search was added to
`use-hub-model-search`, a hook the startup screen already loads, so
there is no separate module to lazy-load without restructuring that
hook.

## Change

The budget is raised by the growth (3,117 B raw / 1,058 B transfer),
keeping main's margin, with the per-commit numbers recorded beside the
limits as in the earlier raises.

## Testing

- `npm run build && npm run bundle:check` on main with this change:
within budget (0.2 KB transfer, 0.2 KB raw to spare). Without it: over
by the amounts above.
- `tests/bundle-budget-cli.test.ts` and
`tests/bundle-budget-closure.test.ts`: 43 passed.
- `prettier --check scripts/check-bundle-budget.ts`: clean.
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