Repository navigation
Studio: recommend a Hub GGUF quant that fits the Mac's Metal budget - #15848
Conversation
|
Reached Codex review convergence at NilayYadav#914 on 4f6ca77. |
|
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
|
…#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.
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.
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.
Before and after (merge base vs this PR, simulated 24 GB Mac)
Two separate Studio installs (merge base
2d4ac1cb2and this PR), each loaded with the same/api/systemanswer 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).Quant menu: main lists BF16 first with every quant marked as fitting; this PR leads with the quants inside the Metal budget.