Skip to content

Studio: recommend a Hub GGUF quant that fits the Mac's Metal budget - #15848

Merged
danielhanchen merged 3 commits into
unslothai:mainfrom
NilayYadav:hub-gguf-card-ignores-metal
Oct 29, 2026
Merged

danielhanchen merged 3 commits into
unslothai:mainfrom
NilayYadav:hub-gguf-card-ignores-metal

Conversation

@NilayYadav

@NilayYadav NilayYadav commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

On a Mac, the Hub page judged GGUF quants against total memory, not against what llama.cpp can actually load into Metal right now. On a 24 GB Mac with about 10 GB free, it preselected the 16 GB BF16 file of Qwen3-8B and marked every quant "Full offload likely possible", while the chat model picker marked Q8_0 and BF16 as a tight fit for the same repo.

The Hub quant menu now uses the same Metal load budget as the chat picker, including the larger budget when loading will first free the model already in memory. That budget drives the preselected quant and the fit icon on each quant. So the Hub now recommends the largest quant that fits and marks bigger ones amber. Their tooltip says the same thing as the picker: the model may load with a shorter context or run slower on this Mac.

Nothing changes on NVIDIA, AMD, Intel or CPU machines, where this budget does not exist. Image, video and audio models keep their current fit check.

Before and after

Before and after: Hub page for unsloth/Qwen3-8B-GGUF on a 24 GB Mac. Main preselects the 16 GB BF16 file; this PR preselects Q6_K.

hub-card

Before and after: the quant menu. Main marks every quant as fitting; here the quants above the Metal budget are amber, with the chat picker's tooltip.

hub-menu

Before and after (merge base vs this PR, simulated 24 GB Mac)

Two separate Studio installs (merge base 2d4ac1cb2 and this PR), each loaded with the same /api/system answer for a 24 GB Apple Silicon Mac (MLX backend, 10 GB free, 16 GB Metal working set). This host is Linux, so the hardware is simulated; the frontend logic under test is the same on every OS.

Hub card for unsloth/Qwen3-8B-GGUF: main preselects BF16 (16 GB), this PR preselects Q6_K (6.7 GB).

hub-card-before-after

Quant menu: main lists BF16 first with every quant marked as fitting; this PR leads with the quants inside the Metal budget.

hub-menu-before-after

@NilayYadav NilayYadav self-assigned this Oct 28, 2026
@NilayYadav

Copy link
Copy Markdown
Collaborator Author

Reached Codex review convergence at NilayYadav#914 on 4f6ca77.

@danielhanchen

Copy link
Copy Markdown
Member

Review record for #15848, carried over from the mirror it was reviewed on: danielhanchen/unsloth-staging-review#606.

Findings are quoted as posted and attributed to the account that posted them. The reactions shown are the triage recorded on the mirror; none were re-applied here. Commits are named as the mirror's, with this PR's equivalent where one was found.

Round 1: reviewed mirror de897264d9 (this PR's b7dee1f02)

chatgpt-codex-connector[bot] (on the mirror)

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

Reviewed commit: de897264d9

No triage reaction was recorded on the mirror

Verdict

The round converged at mirror de897264d9 (this PR's b7dee1f02).

This is the review as it stood at that commit. Anything pushed to this PR afterwards was not part of it.

danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 29, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 29, 2026
danielhanchen added a commit to NilayYadav/unsloth that referenced this pull request Oct 29, 2026
danielhanchen added a commit to NilayYadav/unsloth that referenced this pull request Oct 29, 2026
@danielhanchen
danielhanchen merged commit 0f51e21 into unslothai:main Oct 29, 2026
41 of 42 checks passed
danielhanchen added a commit that referenced this pull request Oct 30, 2026
…#16082)

`Frontend unit tests` is red on main. All four cases in
`studio/frontend/tests/hub-gguf-card-unified-budget.test.ts` fail (seen
on #16077's run):

```
not ok - the Hub GGUF card recommends a quant inside the Mac's Metal load budget
  error: 'no stub for import "@/lib/folder-icons" in .../src/features/hub/catalog/gguf-download-card.tsx'
```

#15958 moved the card's folder glyph to `@/lib/folder-icons` and added
that stub to the other `loadWithStubs` tests. This test, from #15848 and
merged the same day, was not in that sweep. The card is correct; the
test's stub map was one module behind. This adds `"@/lib/folder-icons":
anyExport` next to the other icon stubs.

## Verification

- `node --test tests/hub-gguf-card-unified-budget.test.ts`: 4 failed on
main, 4 passed here.
- The full frontend suite on main fails only these four.
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