Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio: Recommended Hub filter and chat picker list FP8 / NVFP4 on capable GPUs, GGUF lists every GGUF (#13240)
Michael Han15c9d53268e9
diff --git a/studio/backend/main.py b/studio/backend/main.pyindex 4b82f7c1ee4..ab2642ae9b7 100644--- a/studio/backend/main.py+++ b/studio/backend/main.py@@ -2605,6 +2605,23 @@ def _nvfp4_diffusion_enabled() -> bool:return False+def _checkpoint_quant_formats() -> list[str]:+ """FP8 / NVFP4 checkpoint formats the Hub's Recommended filter may list. Torch-free.++ Only on a CUDA backend: nvidia-smi still sees the cards under a CPU-only torch or a+ CUDA_VISIBLE_DEVICES mask that hides them all, and neither can load these checkpoints."""+ try:+ from utils.hardware import get_device+ from utils.hardware.hardware import _backend_label+ from utils.hardware.nvidia import get_checkpoint_quant_formats++ if _backend_label(get_device()) != "cuda":+ return []+ return get_checkpoint_quant_formats()+ except Exception: # noqa: BLE001 -- a capability read must never fail a status request+ return []++def _dense_quant_schemes() -> list[str]:"""The scheme ladder for ``/api/system``, a pure read of already-resolved state: the polled routemust never import torch, and the entry beside it refreshed both in one pass."""@@ -2746,6 +2763,8 @@ def get_system_info("diffusers_offload_tiers": _diffusers_offload_tiers(),# Torch-free env read, safe on this polled route."nvfp4_diffusion": _nvfp4_diffusion_enabled(),+ # Prequantized FP8 / NVFP4 LLM checkpoints this host runs natively. Additive key.+ "checkpoint_quant_formats": _checkpoint_quant_formats(),}diff --git a/studio/backend/tests/test_checkpoint_quant_formats.py b/studio/backend/tests/test_checkpoint_quant_formats.pynew file mode 100644index 00000000000..8ee52e42da5--- /dev/null+++ b/studio/backend/tests/test_checkpoint_quant_formats.py@@ -0,0 +1,83 @@+# SPDX-License-Identifier: AGPL-3.0-only+# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0++"""The Hub's Recommended filter lists FP8 / NVFP4 checkpoints only where every card runs them+natively. Hermetic: nvidia-smi is stubbed."""++from __future__ import annotations++import subprocess+import types++import pytest+from utils.hardware import nvidia+++def _smi(+ monkeypatch,+ stdout: str = "",+ returncode: int = 0,+ raises = None,+) -> list:+ calls: list = []++ def fake_run(argv, **_kwargs):+ calls.append(argv)+ if raises is not None:+ raise raises+ return types.SimpleNamespace(returncode = returncode, stdout = stdout)++ monkeypatch.setattr(nvidia.gpu_query, "run_nvidia_smi", fake_run)+ return calls+++ ("stdout", "expected"),+ [+ ("8.6\n", []), # RTX 3090+ ("8.9\n", ["fp8"]), # RTX 4090+ ("9.0\n", ["fp8"]), # H100+ ("10.0\n", ["fp8", "nvfp4"]), # B200+ ("12.0\n", ["fp8", "nvfp4"]), # RTX 5090+ ("12.0\n8.9\n", ["fp8"]), # mixed host answers for the least capable card+ ("12.0\n8.0\n", []),+ ("12.0\n[N/A]\n", []), # an unreadable card counts as none+ ("", []),+ ],+)+def test_formats_follow_the_least_capable_card(monkeypatch, stdout, expected):+ calls = _smi(monkeypatch, stdout)+ assert nvidia.get_checkpoint_quant_formats() == expected+ assert "--query-gpu=compute_cap" in calls[0]+++def test_no_nvidia_smi_or_a_failed_query_lists_nothing(monkeypatch):+ _smi(monkeypatch, raises = FileNotFoundError("nvidia-smi"))+ assert nvidia.get_checkpoint_quant_formats() == []+ _smi(monkeypatch, raises = subprocess.TimeoutExpired("nvidia-smi", 5))+ assert nvidia.get_checkpoint_quant_formats() == []+ _smi(monkeypatch, stdout = "9.0\n", returncode = 6)+ assert nvidia.get_checkpoint_quant_formats() == []+++def test_compute_cap_is_a_cached_static_query():+ assert (+ nvidia.gpu_query.classify(+ ["nvidia-smi", "--query-gpu=compute_cap", "--format=csv,noheader"]+ )+ == nvidia.gpu_query.STATIC+ )+++ ("backend", "expected"),+ [("cuda", ["fp8", "nvfp4"]), ("cpu", []), ("rocm", []), ("xpu", []), ("mlx", [])],+)+def test_system_route_reports_formats_only_on_a_cuda_backend(monkeypatch, backend, expected):+ """A CPU-only torch or a mask hiding every card still leaves nvidia-smi seeing them."""+ import main+ from utils.hardware import hardware++ _smi(monkeypatch, "12.0\n")+ monkeypatch.setattr(hardware, "_backend_label", lambda _device: backend)+ assert main._checkpoint_quant_formats() == expecteddiff --git a/studio/backend/utils/hardware/nvidia.py b/studio/backend/utils/hardware/nvidia.pyindex 5839a0606cb..ab42fb8306e 100644--- a/studio/backend/utils/hardware/nvidia.py+++ b/studio/backend/utils/hardware/nvidia.py@@ -395,6 +395,40 @@ def _linux_nvidia_procfs_gpu_count() -> int:return len(entries)+# Native tensor-core support: FP8 from Ada / Hopper (sm_89), NVFP4 from Blackwell (sm_100, sm_120).+_CHECKPOINT_QUANT_MIN_CAPABILITY = (("fp8", (8, 9)), ("nvfp4", (10, 0)))+++def get_checkpoint_quant_formats() -> list[str]:+ """Prequantized checkpoint formats every NVIDIA card runs natively (Hub Recommended filter).+ A load may land on any card, so the least capable one answers; an unreadable card counts as none."""+ try:+ result = gpu_query.run_nvidia_smi(+ [_nvidia_smi_executable(), "--query-gpu=compute_cap", "--format=csv,noheader"],+ capture_output = True,+ text = True,+ encoding = "utf-8",+ errors = "replace",+ timeout = 5,+ env = child_env_without_native_path_secret(),+ **_windows_hidden_subprocess_kwargs(),+ )+ except (OSError, subprocess.TimeoutExpired):+ return []+ if result.returncode != 0:+ return []+ capabilities: list[tuple[int, int]] = []+ for line in result.stdout.strip().splitlines():+ major, _, minor = line.strip().partition(".")+ if not (major.isdigit() and minor.isdigit()):+ return []+ capabilities.append((int(major), int(minor)))+ if not capabilities:+ return []+ floor = min(capabilities)+ return [fmt for fmt, needed in _CHECKPOINT_QUANT_MIN_CAPABILITY if floor >= needed]++def get_physical_gpu_inventory() -> dict[str, Any]:"""Every NVIDIA GPU the driver enumerates, with no visibility mask and no torch. Display-only inventory: ``index`` is nvidia-smi's own row number, a physical id and NOT something a caller may pin, because the whole point of this probe is that PyTorch cannot open these devices. A failed probe comes back as a structured unavailable result, so this never raises out of an endpoint."""rows = _query_gpu_inventory("get_physical_gpu_inventory")diff --git a/studio/frontend/src/features/hub/catalog/models-toolbar.tsx b/studio/frontend/src/features/hub/catalog/models-toolbar.tsxindex 5177c4f4421..dd6a42b4ee9 100644--- a/studio/frontend/src/features/hub/catalog/models-toolbar.tsx+++ b/studio/frontend/src/features/hub/catalog/models-toolbar.tsx@@ -20,6 +20,7 @@ import {FolderSearchIcon,Search01Icon,SlidersHorizontalIcon,+ SparklesIcon,} from "@hugeicons/core-free-icons";import { HugeiconsIcon } from "@hugeicons/react";import { memo, useLayoutEffect, useMemo, useRef, useState } from "react";@@ -143,13 +144,22 @@ export const ModelsToolbar = memo(function ModelsToolbar({const hasTrailing = Boolean(query) || (isDiscover && isLoading);const formatOptions = useMemo<HubOption<FormatMenuValue>[]>(() => {const options: HubOption<FormatMenuValue>[] = FORMAT_FILTER_OPTIONS.filter(- (option) => option.value !== "mlx" || tab === "discover",+ (option) =>+ (option.value !== "mlx" && option.value !== "recommended") ||+ tab === "discover",).map((option) => ({value: option.value,triggerLabel: option.label,label: (<><span className="flex size-3.5 shrink-0 items-center justify-center">+ {option.value === "recommended" && (+ <HugeiconsIcon+ icon={SparklesIcon}+ strokeWidth={1.75}+ className="size-3.5 text-muted-foreground"+ />+ )}{option.value === "gguf" && (<span className="size-1.5 rounded-full bg-format-gguf" />)}@@ -420,7 +430,7 @@ export const ModelsToolbar = memo(function ModelsToolbar({}}}ariaLabel="Format filter"- className={cn(triggerBase, "w-[calc(128px*var(--ui-space-scale,1))]")}+ className={cn(triggerBase, "w-[calc(144px*var(--ui-space-scale,1))]")}/>)}diff --git a/studio/frontend/src/features/hub/hub-page.tsx b/studio/frontend/src/features/hub/hub-page.tsxindex fb9cd2df260..e295c5b186c 100644--- a/studio/frontend/src/features/hub/hub-page.tsx+++ b/studio/frontend/src/features/hub/hub-page.tsx@@ -124,6 +124,7 @@ import {isUnslothFinetunable,matchesCapability,matchesFormat,+ matchesRecommended,} from "./lib/view-models";import { hfApiToken, useHfTokenStore } from "./stores/hf-token-store";import {@@ -148,9 +149,16 @@ const INVENTORY_SORT_STORAGE_KEY = "unsloth.hub.inventorySort";const OWNER_SCOPE_STORAGE_KEY = "unsloth.hub.ownerScope";const RUN_CONFIG_REFRESH_TIMEOUT_MS = 5_000;-// Iconless models (no provider logo, e.g. Ornith, Inkling) show once they clear this many likes.+// Under Recommended, iconless models (no provider logo, e.g. Ornith, Inkling) show once they clear this many likes.const MIN_ICONLESS_MODEL_LIKES = 30;+function withoutGgufTag(+ tags: readonly string[] | undefined,+): readonly string[] | undefined {+ const kept = tags?.filter((tag) => tag !== "gguf");+ return kept?.length ? kept : undefined;+}+async function waitForRunConfigRefresh(refresh: Promise<void>,signal: AbortSignal,@@ -578,7 +586,7 @@ export function ModelsPage() {);}, [urlResourceType]);const [discoverFormat, setDiscoverFormat] = useState<ModelFormatFilter>(- () => findChannel(DEFAULT_DISCOVER_CHANNEL)?.format ?? "gguf",+ () => findChannel(DEFAULT_DISCOVER_CHANNEL)?.format ?? "recommended",);const [downloadedFormat, setDownloadedFormat] =useState<ModelFormatFilter>("all");@@ -674,7 +682,7 @@ export function ModelsPage() {setSortBrowseActive(false);if (next === "models") {const preset = findChannel(DEFAULT_DISCOVER_CHANNEL);- setDiscoverFormat(preset?.format ?? "gguf");+ setDiscoverFormat(preset?.format ?? "recommended");setSortBy(preset?.sort ?? "trendingScore");setDirection("desc");}@@ -714,7 +722,7 @@ export function ModelsPage() {);const handleBackToFeed = useCallback(() => {const preset = findChannel(DEFAULT_DISCOVER_CHANNEL);- setDiscoverFormat(preset?.format ?? "gguf");+ setDiscoverFormat(preset?.format ?? "recommended");setSortBy(preset?.sort ?? "trendingScore");setDirection("desc");setCapabilityFilter("all");@@ -731,7 +739,7 @@ export function ModelsPage() {setQuery("");setCapabilityFilter("all");setDownloadedFormat("all");- setDiscoverFormat(preset?.format ?? "gguf");+ setDiscoverFormat(preset?.format ?? "recommended");setSortBy(preset?.sort ?? "trendingScore");setDirection("desc");setSortBrowseActive(false);@@ -835,18 +843,33 @@ export function ModelsPage() {: requestedSort;const effectiveDirection: HfSortDirection = isFeedMode ? "desc" : direction;// The format dropdown always filters the visible list, including the feed's "Latest" list, so- // the default (GGUF) hides fp8/safetensors and picking a format actually changes the rows.+ // the default (Recommended) hides unrunnable checkpoints and picking a format changes the rows.const effectiveDiscoverFormat: ModelFormatFilter = deferredFormatFilter;+ const checkpointQuantFormats = gpu.checkpointQuantFormats;+ // Image / video NVFP4 also needs the build's NVFP4 switch: the backend refuses *-NVFP4 diffusion repos while it is off.+ const diffusionQuantFormats = useMemo(+ () =>+ gpu.nvfp4Diffusion+ ? checkpointQuantFormats+ : checkpointQuantFormats.filter((format) => format !== "nvfp4"),+ [checkpointQuantFormats, gpu.nvfp4Diffusion],+ );+ // A GGUF-tagged channel query would never fetch the FP8 / NVFP4 rows Recommended admits here.+ const widenRecommendedChannel =+ effectiveDiscoverFormat === "recommended" &&+ checkpointQuantFormats.length > 0;const listChannel = useMemo<HfModelSearchChannel | null>(() => {if (!liveListChannel) return null;return {owner: liveListChannel.owner,- tags: liveListChannel.tags,+ tags: widenRecommendedChannel+ ? withoutGgufTag(liveListChannel.tags)+ : liveListChannel.tags,query: liveListChannel.query,idSuffix: liveListChannel.idSuffix,};- }, [liveListChannel]);+ }, [liveListChannel, widenRecommendedChannel]);const {results,@@ -981,14 +1004,23 @@ export function ModelsPage() {(row) =>!isHiddenModelId(row.id) &&!isConfiguredHiddenModelId(hiddenEmbeddingModelIds, row.id) &&- // Feed shows logo'd models, plus iconless ones above the likes threshold.- (!isFeedMode ||+ // Recommended curates browsing to logo'd models plus well-liked iconless ones; a typed+ // search and every other format show all matches.+ (effectiveDiscoverFormat !== "recommended" ||+ hasQuery ||resolveOwnerProviderLogo(row.owner, row.repo) !== null ||(row.result.likes ?? 0) >= MIN_ICONLESS_MODEL_LIKES) &&- matchesFormat(- detectResultFormat(row.result),- effectiveDiscoverFormat,- ) &&+ (effectiveDiscoverFormat === "recommended"+ ? matchesRecommended(+ row.result,+ row.capabilities.some((c) => c.key === "diffusion")+ ? diffusionQuantFormats+ : checkpointQuantFormats,+ )+ : matchesFormat(+ detectResultFormat(row.result),+ effectiveDiscoverFormat,+ )) &&matchesCapability(row.capabilities, deferredCapabilityFilter) &&(!activeChannel?.finetunableOnly || isUnslothFinetunable(row.result)) &&// Models already on disk stay visible regardless of device fit, matching the chat selector.@@ -1001,8 +1033,10 @@ export function ModelsPage() {discoverRows,hiddenEmbeddingModelIds,isDatasetMode,- isFeedMode,+ hasQuery,effectiveDiscoverFormat,+ checkpointQuantFormats,+ diffusionQuantFormats,deferredCapabilityFilter,activeChannel,fitOnDeviceOnly,@@ -1286,7 +1320,7 @@ export function ModelsPage() {setAllModelsViewState(next);writeAllModelsViewPreference(next);const preset = findChannel(DEFAULT_DISCOVER_CHANNEL);- setDiscoverFormat(preset?.format ?? "gguf");+ setDiscoverFormat(preset?.format ?? "recommended");setSortBy(preset?.sort ?? "trendingScore");setDirection("desc");setCapabilityFilter("all");@@ -1657,8 +1691,11 @@ export function ModelsPage() {deferredCapabilityFilter !== "all" ||(tab === "downloaded" && typeFilterActive)),typeFilterActive,- // A single format filter makes every row's format dot the same.- showFormatDots: isDatasetMode || deferredFormatFilter === "all",+ // A single format filter makes every row's format dot the same; Recommended mixes GGUF and checkpoints.+ showFormatDots:+ isDatasetMode ||+ deferredFormatFilter === "all" ||+ deferredFormatFilter === "recommended",};},[diff --git a/studio/frontend/src/features/hub/lib/channels.ts b/studio/frontend/src/features/hub/lib/channels.tsindex 883b79a7b2c..b3f98a08895 100644--- a/studio/frontend/src/features/hub/lib/channels.ts+++ b/studio/frontend/src/features/hub/lib/channels.ts@@ -38,7 +38,7 @@ export const CHANNEL_PRESETS: readonly ChannelPreset[] = [hint: "Most trending models published by Unsloth.",owner: "unsloth",tags: ["gguf"],- format: "gguf",+ format: "recommended",sort: "trendingScore",},{diff --git a/studio/frontend/src/features/hub/lib/format-filters.ts b/studio/frontend/src/features/hub/lib/format-filters.tsindex 4f7ca0f1d1b..b6daa35f444 100644--- a/studio/frontend/src/features/hub/lib/format-filters.ts+++ b/studio/frontend/src/features/hub/lib/format-filters.ts@@ -9,7 +9,13 @@ export type FormatFilterModelFormat =| "mlx"| "unknown";-export type FormatFilterValue = "all" | "gguf" | "checkpoint" | "mlx" | "npu";+export type FormatFilterValue =+ | "all"+ | "recommended"+ | "gguf"+ | "checkpoint"+ | "mlx"+ | "npu";export function matchesFormat(modelFormat: boolean | FormatFilterModelFormat | null | undefined,@@ -22,7 +28,10 @@ export function matchesFormat(? "gguf": "safetensors": modelFormat;- if (formatFilter === "gguf") return normalized === "gguf";+ // Recommended's FP8 / NVFP4 checkpoints need the repo id: see matchesRecommended.+ if (formatFilter === "gguf" || formatFilter === "recommended") {+ return normalized === "gguf";+ }if (formatFilter === "mlx") return normalized === "mlx";// NPU models come from Lemonade's catalog, never from a Hub repo or the disk scan.if (formatFilter === "npu") return false;@@ -44,6 +53,50 @@ export function detectResultFormat(result: {return "safetensors";}+// Strictest first: a mixed "NVFP4-FP8" checkpoint still holds NVFP4 weights and needs Blackwell.+const CHECKPOINT_QUANT_NAME: ReadonlyArray<readonly [string, RegExp]> = [+ ["nvfp4", /(?:^|[-_/.])nvfp4(?:[-_/.]|$)/i],+ ["fp8", /(?:^|[-_/.])fp8(?:[-_/.]|$)/i],+];+// A second quant token (an FP8 base re-quantized to GPTQ / IQ4 / MXFP4) means the repo is not an FP8 checkpoint.+const OTHER_QUANT_NAME =+ /(?:^|[-_/.])(?:gptq|awq|exl2|mxfp4|int4|int8|w4a16|w8a16|bnb|iq\d\w*|q\d_\w+)(?:[-_/.]|$)/i;+const OTHER_QUANT_METHOD = new Set([+ "gptq",+ "awq",+ "exl2",+ "aqlm",+ "hqq",+ "quanto",+ "bitsandbytes",+]);++/** The prequantized checkpoint format ("fp8" / "nvfp4") a non-GGUF repo ships, from its name or+ * quant config, or null. */+export function checkpointQuantFormat(result: {+ id: string;+ isGguf: boolean;+ quantMethod?: string;+}): string | null {+ if (result.isGguf || OTHER_QUANT_NAME.test(result.id)) return null;+ if (OTHER_QUANT_METHOD.has(result.quantMethod?.toLowerCase() ?? ""))+ return null;+ for (const [format, pattern] of CHECKPOINT_QUANT_NAME) {+ if (pattern.test(result.id)) return format;+ }+ return result.quantMethod?.toLowerCase() === "fp8" ? "fp8" : null;+}++/** Recommended: every GGUF, plus FP8 / NVFP4 checkpoints only where every GPU runs them natively. */+export function matchesRecommended(+ result: { id: string; isGguf: boolean; quantMethod?: string },+ checkpointQuantFormats: readonly string[],+): boolean {+ if (result.isGguf) return true;+ const format = checkpointQuantFormat(result);+ return format !== null && checkpointQuantFormats.includes(format);+}+// Inference-only quant formats Unsloth cannot fine-tune. Matched on the repo// name since the search listing often omits the quant config.const NON_FINETUNABLE_NAME =diff --git a/studio/frontend/src/features/hub/lib/view-models.ts b/studio/frontend/src/features/hub/lib/view-models.tsindex 90662121817..8a9d83e19ce 100644--- a/studio/frontend/src/features/hub/lib/view-models.ts+++ b/studio/frontend/src/features/hub/lib/view-models.ts@@ -23,6 +23,7 @@ export {detectResultFormat,isUnslothFinetunable,matchesFormat,+ matchesRecommended,} from "./format-filters";export {formatLocalUpdated,@@ -47,6 +48,7 @@ export const FORMAT_FILTER_OPTIONS: ReadonlyArray<{label: string;}> = [{ value: "all", label: "All formats" },+ { value: "recommended", label: "Recommended" },{ value: "gguf", label: "GGUF" },{ value: "checkpoint", label: "Safetensors" },{ value: "mlx", label: "MLX" },diff --git a/studio/frontend/src/features/hub/types.ts b/studio/frontend/src/features/hub/types.tsindex b52ecd40c6b..b1764511128 100644--- a/studio/frontend/src/features/hub/types.ts+++ b/studio/frontend/src/features/hub/types.ts@@ -23,7 +23,13 @@ export type ResourceTypeFilter = "models" | "datasets";export type HubModelType = "text" | "vision" | "audio" | "embeddings";-export type ModelFormatFilter = "all" | "gguf" | "checkpoint" | "mlx" | "npu";+export type ModelFormatFilter =+ | "all"+ | "recommended"+ | "gguf"+ | "checkpoint"+ | "mlx"+ | "npu";export type CapabilityFilter = "all" | CapabilityKey;diff --git a/studio/frontend/src/features/model-picker/components/model-selector/pickers.tsx b/studio/frontend/src/features/model-picker/components/model-selector/pickers.tsxindex b6d915817ff..035c57e1622 100644--- a/studio/frontend/src/features/model-picker/components/model-selector/pickers.tsx+++ b/studio/frontend/src/features/model-picker/components/model-selector/pickers.tsx@@ -228,6 +228,7 @@ import {estimateQuantBytes,hfModelFitsDevice,isMlxId,+ isCapableCheckpointQuant,isMobileVariant,isRecommendableFormat,loadScopedGpu,@@ -3057,6 +3058,20 @@ export function HubModelPicker({// The saved VRAM Budget, threaded into every fit call here. Passing it to the quant rows alone// left the parent rows and the "Fits on device" filter on the 0.97 default.const budgetFraction = useVramBudgetFraction() ?? undefined;+ // FP8 / NVFP4 checkpoints every GPU here runs natively: chat lists them past the GGUF-only rule and+ // whatever their size. Task pages keep their own formats.+ const quantFormatsKey = gpu.checkpointQuantFormats.join(",");+ const runsCheckpointQuant = useCallback(+ (r: { id: string; quantMethod?: string; isGguf?: boolean }) =>+ !task &&+ isCapableCheckpointQuant(+ r.id,+ r.quantMethod,+ quantFormatsKey ? quantFormatsKey.split(",") : [],+ r.isGguf,+ ),+ [task, quantFormatsKey],+ );// Whether THIS picker's rows load through the diffusion backend. Not `Boolean(task)`: Audio is// task-scoped but runs its GGUFs under llama.cpp / whisper.const diffusionLoad = useMemo(() => {@@ -3650,6 +3665,17 @@ export function HubModelPicker({},[deviceType, task],);+ // A capable FP8 / NVFP4 checkpoint passes the runtime gate's quant-method check (vLLM loads+ // compressed-tensors), never its pipeline check: an FP8 image model stays off the chat list.+ const chatSupportedCheckpointQuant = useCallback(+ (r: HfModelResult) =>+ isChatSupported(r) ||+ // Only compressed-tensors: the vLLM engine loads it; fbgemm / fine-grained FP8 stay refused.+ (runsCheckpointQuant(r) &&+ r.quantMethod?.toLowerCase() === "compressed-tensors" &&+ isChatSupported({ ...r, quantMethod: undefined })),+ [isChatSupported, runsCheckpointQuant],+ );const isTaskRuntimeSupported = useCallback((result: HfModelResult) => {@@ -3705,11 +3731,15 @@ export function HubModelPicker({task? isKnownGgufRepo(id) ||Boolean(catalog && artifactForRepoId(id, catalog))- : !chatOnly || isRecommendableFormat(id, isKnownGgufRepo(id), isMac),+ : !chatOnly ||+ isRecommendableFormat(id, isKnownGgufRepo(id), isMac) ||+ runsCheckpointQuant({ id }),)// Member repos would collapse into the canonical group row, but nothing renders those rows yet// and a task-scoped picker's `models` is exactly group members, so hiding them emptied it.- .filter((id) => !/-FP8[-.]|FP8-Dynamic/i.test(id));+ .filter(+ (id) => runsCheckpointQuant({ id }) || !/-FP8[-.]|FP8-Dynamic/i.test(id),+ );const gguf: string[] = [];const hub: string[] = [];for (const id of all) {@@ -3727,6 +3757,7 @@ export function HubModelPicker({task,catalog,taskCatalogSeedIds,+ runsCheckpointQuant,]);const showHfSection = debouncedQuery.trim().length > 0;@@ -3856,8 +3887,10 @@ export function HubModelPicker({isHidden: isHiddenModelId(r.id),format: formatFilter,matchesFormat: matchesFormatFilter(r.id, r.isGguf, formatFilter),- matchesTask: isChatSupported(r),- isRecommendable: isRecommendableFormat(r.id, r.isGguf, isMac),+ matchesTask: chatSupportedCheckpointQuant(r),+ isRecommendable:+ isRecommendableFormat(r.id, r.isGguf, isMac) ||+ runsCheckpointQuant(r),}));};@@ -3881,6 +3914,7 @@ export function HubModelPicker({const fits = (r: HfModelResult) =>// Downloaded models show regardless of fit.cachedIdFor(r.id) !== null ||+ runsCheckpointQuant(r) ||// The catalog's own verdict where it has one, so this list and the OOM badge cannot disagree:// hfModelFitsDevice counts RAM toward a load that never leaves the card.(catalogFit(r.id, pipelineBudget)?.fits ??@@ -3945,6 +3979,8 @@ export function HubModelPicker({communityRecommendedEnabled,communityBrowse.results,isLoadableCommunityRepo,+ runsCheckpointQuant,+ chatSupportedCheckpointQuant,]);// Per-row meta and VRAM badge from the recommended listing's own metadata, with the curated@@ -5212,6 +5248,7 @@ export function HubModelPicker({(id) =>!fitOnDeviceOnly ||cachedIdFor(id) !== null ||+ runsCheckpointQuant({ id }) ||searchRowFits({ id }),));@@ -5226,6 +5263,7 @@ export function HubModelPicker({fitOnDeviceOnly,cachedIdFor,searchRowFits,+ runsCheckpointQuant,]);// Aliases included, so a vendor hit whose mirror row is listed is not shown twice.@@ -5241,13 +5279,14 @@ export function HubModelPicker({const searchIdsFrom = useCallback((rows: readonly HfModelResult[], owned: (id: string) => boolean) =>rows- .filter(isChatSupported)+ .filter(chatSupportedCheckpointQuant).filter(isTaskRuntimeSupported).filter((r) => !rowFilter || rowFilter({ id: r.id, task: r.pipelineTag })).filter((r) =>!fitOnDeviceOnly ||cachedIdFor(r.id) !== null ||+ runsCheckpointQuant(r) ||searchRowFits(r),).map((result) => result.id)@@ -5261,9 +5300,14 @@ export function HubModelPicker({// empty Recommended view..filter((id) =>- !chatOnly || isRecommendableFormat(id, isKnownGgufRepo(id), isMac),+ !chatOnly ||+ isRecommendableFormat(id, isKnownGgufRepo(id), isMac) ||+ runsCheckpointQuant({ id }),+ )+ .filter(+ (id) =>+ runsCheckpointQuant({ id }) || !/-FP8[-.]|FP8-Dynamic/i.test(id),)- .filter((id) => !/-FP8[-.]|FP8-Dynamic/i.test(id)).filter((id) =>matchesFormatFilter(id, isKnownGgufRepo(id), formatFilter),),@@ -5271,7 +5315,7 @@ export function HubModelPicker({recommendedSet,chatOnly,isKnownGgufRepo,- isChatSupported,+ chatSupportedCheckpointQuant,isTaskRuntimeSupported,formatFilter,fitOnDeviceOnly,@@ -5280,6 +5324,7 @@ export function HubModelPicker({isMac,curatedOfferable,rowFilter,+ runsCheckpointQuant,],);diff --git a/studio/frontend/src/features/model-picker/components/model-selector/recommended-fit.ts b/studio/frontend/src/features/model-picker/components/model-selector/recommended-fit.tsindex 86417af06de..b8b030e40b8 100644--- a/studio/frontend/src/features/model-picker/components/model-selector/recommended-fit.ts+++ b/studio/frontend/src/features/model-picker/components/model-selector/recommended-fit.ts@@ -5,7 +5,11 @@// the device. No React/DOM deps so they are easy to test.import { classifyGgufFit } from "../../../../lib/gguf-fit.ts";-import { classifyMediaGgufFit, type curatedArtifactFit } from "./model-catalog.ts";+import { matchesRecommended } from "../../../hub/lib/format-filters.ts";+import {+ classifyMediaGgufFit,+ type curatedArtifactFit,+} from "./model-catalog.ts";const GGUF_SUFFIX_RE = /-GGUF(?:$|-)/i;// Mirrors the backend's _looks_like_mlx_repo: owner prefix, or a bounded mlx token in the leaf.@@ -44,6 +48,22 @@ export function isRecommendableFormat(return isMac;}+/** An FP8 / NVFP4 checkpoint (not a GGUF) this host's GPUs run natively. */+export function isCapableCheckpointQuant(+ id: string,+ quantMethod: string | undefined,+ checkpointQuantFormats: readonly string[],+ hintedIsGguf?: boolean,+): boolean {+ return (+ !isGgufId(id, hintedIsGguf) &&+ matchesRecommended(+ { id, isGguf: false, quantMethod },+ checkpointQuantFormats,+ )+ );+}+/** Format filter for the listing toggle. "safetensors" means anything that is neither GGUF nor MLX. */export type FormatFilter = "all" | "gguf" | "mlx" | "safetensors" | "npu";@@ -349,7 +369,15 @@ export function orderRecommendedRows<* Their rows interleave by position: every pinned family's first row, then every second one. */pinnedFamilies?: readonly string[];}): T[] {- const { seeds, results, keep, deviceFiltered, fits, familyOf, pinnedFamilies = [] } = opts;+ const {+ seeds,+ results,+ keep,+ deviceFiltered,+ fits,+ familyOf,+ pinnedFamilies = [],+ } = opts;const seedById = new Map(seeds.map((s) => [s.id, s]));const rows = results.filter(keep).map((row) => {const curatedSizeBytes = seedById.get(row.id)?.curatedSizeBytes;@@ -445,7 +473,11 @@ export function curatedBudget(/** Over-budget text for a curated row. When the whole-GB badge figure does not read above the* one-decimal budget (24 against 24.1), the size is rounded up and the budget down to a tenth, so* the shown size is always strictly above the shown budget. The epsilon keeps 16.7999... at 16.8. */-export function curatedBudgetText(est: number, gpuGb: number, budget: CuratedBudget): string {+export function curatedBudgetText(+ est: number,+ gpuGb: number,+ budget: CuratedBudget,+): string {const shownBudget = Number(budget.allowanceGb.toFixed(1));const wholeReadsOver = est > shownBudget;const needGb = wholeReadsOverdiff --git a/studio/frontend/src/hooks/use-gpu-info.ts b/studio/frontend/src/hooks/use-gpu-info.tsindex 9e1ecdec896..154d341f6d8 100644--- a/studio/frontend/src/hooks/use-gpu-info.ts+++ b/studio/frontend/src/hooks/use-gpu-info.ts@@ -58,6 +58,8 @@ export interface GpuInfo {denseQuantSchemes: readonly string[];/** False until system info arrives, and on backends that do not report it. */nvfp4Diffusion: boolean;+ /** Prequantized LLM checkpoint formats ("fp8", "nvfp4") this host runs natively. Empty until system info arrives. */+ checkpointQuantFormats: readonly string[];/** Group offload can stream torchao weights. Absent or false until resolved and on older backends. */quantisedStreaming?: boolean;/** Backend-reported extra Diffusers offload tiers per lower-cased repo id. Empty on older backends. */@@ -102,6 +104,7 @@ const DEFAULT_GPU: GpuInfo = {denseQuantSupported: false,denseQuantSchemes: [],nvfp4Diffusion: false,+ checkpointQuantFormats: [],quantisedStreaming: false,name: "Unknown",memoryTotalGb: 0,@@ -131,6 +134,9 @@ function toGpuInfo(denseQuantSupported: data?.dense_quant_supported === true,denseQuantSchemes: normalizeDenseQuantSchemes(data?.dense_quant_schemes),nvfp4Diffusion: data?.nvfp4_diffusion === true,+ checkpointQuantFormats: normalizeDenseQuantSchemes(+ data?.checkpoint_quant_formats,+ ),quantisedStreaming: data?.quantised_streaming === true,extraOffloadFitTiers: normalizeReportedOffloadFitTiers(data?.diffusers_offload_tiers,diff --git a/studio/frontend/src/hooks/use-system.ts b/studio/frontend/src/hooks/use-system.tsindex 12cf76e624a..6de9c606112 100644--- a/studio/frontend/src/hooks/use-system.ts+++ b/studio/frontend/src/hooks/use-system.ts@@ -61,6 +61,8 @@ export interface SystemInfoResponse {dense_quant_schemes?: string[];/** Absent on older backends, where readers treat it as off. */nvfp4_diffusion?: boolean;+ /** Prequantized LLM checkpoint formats ("fp8", "nvfp4") every card runs natively. Absent on older backends. */+ checkpoint_quant_formats?: string[];/** Whether group offload can stream torchao weights. Absent on older backends. */quantised_streaming?: boolean;/** Extra Diffusers offload fit tiers per lower-cased repo id, GiB VRAM / GiB available RAM. Absent on older backends. */diff --git a/studio/frontend/tests/dense-quant-schemes-identity.test.ts b/studio/frontend/tests/dense-quant-schemes-identity.test.tsindex 311db91e03b..c9c5c34d7ae 100644--- a/studio/frontend/tests/dense-quant-schemes-identity.test.ts+++ b/studio/frontend/tests/dense-quant-schemes-identity.test.ts@@ -45,6 +45,7 @@ function snapshot(denseQuantSupported: schemes.length > 0,denseQuantSchemes: schemes,nvfp4Diffusion: false,+ checkpointQuantFormats: ["fp8"],name: "NVIDIA GeForce RTX 4090",memoryTotalGb: 24,memorySharedGb: 0,diff --git a/studio/frontend/tests/hub-format-dot-all-formats.test.ts b/studio/frontend/tests/hub-format-dot-all-formats.test.tsindex 43f945c4bf7..976401d8808 100644--- a/studio/frontend/tests/hub-format-dot-all-formats.test.ts+++ b/studio/frontend/tests/hub-format-dot-all-formats.test.ts@@ -36,11 +36,10 @@ test("a single format filter admits one dot color, so the dot says nothing", ()}});-test("format dots show only under All formats", () => {- assert.ok(- HUB_PAGE.includes(- 'showFormatDots: isDatasetMode || deferredFormatFilter === "all"',- ),+test("format dots show only under the mixed filters, All formats and Recommended", () => {+ assert.match(+ HUB_PAGE,+ /showFormatDots:\s*isDatasetMode \|\|\s*deferredFormatFilter === "all" \|\|\s*deferredFormatFilter === "recommended",/,);assert.ok(CATALOG.includes("showFormatDots={showFormatDots}"));assert.equal(LISTS.match(/showFormatDot=\{showFormatDots\}/g)?.length, 4);diff --git a/studio/frontend/tests/hub-recommended-format.test.ts b/studio/frontend/tests/hub-recommended-format.test.tsnew file mode 100644index 00000000000..6375ad4dc2e--- /dev/null+++ b/studio/frontend/tests/hub-recommended-format.test.ts@@ -0,0 +1,143 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0++import assert from "node:assert/strict";+import test from "node:test";++import {+ checkpointQuantFormat,+ matchesFormat,+ matchesRecommended,+} from "../src/features/hub/lib/format-filters.ts";+import { readSrcAsync } from "./helpers/kit.ts";++const gguf = { id: "unsloth/Qwen3.6-27B-GGUF", isGguf: true };+const fp8 = { id: "unsloth/Qwen3.6-27B-FP8", isGguf: false };+const fp8Dynamic = {+ id: "RedHatAI/Llama-3.3-70B-Instruct-FP8-dynamic",+ isGguf: false,+};+const nvfp4 = { id: "unsloth/Qwen3.6-27B-NVFP4", isGguf: false };+const bf16 = { id: "unsloth/Qwen3.6-27B", isGguf: false };++test("checkpoint quant format comes from the repo name or the fp8 quant config", () => {+ assert.equal(checkpointQuantFormat(fp8), "fp8");+ assert.equal(checkpointQuantFormat(fp8Dynamic), "fp8");+ assert.equal(checkpointQuantFormat(nvfp4), "nvfp4");+ assert.equal(checkpointQuantFormat(bf16), null);+ assert.equal(checkpointQuantFormat({ ...bf16, quantMethod: "fp8" }), "fp8");+ // A mixed NVFP4 / FP8 checkpoint needs NVFP4 hardware.+ const mixed = {+ id: "primitive-ai/Qwen3.8-Flash-Next-mixed-NVFP4-FP8",+ isGguf: false,+ };+ assert.equal(checkpointQuantFormat(mixed), "nvfp4");+ assert.equal(matchesRecommended(mixed, ["fp8"]), false);+ assert.equal(matchesRecommended(mixed, ["fp8", "nvfp4"]), true);+ // FP8 bases re-quantized to another scheme are not FP8 checkpoints.+ for (const id of [+ "tcclaviger/Qwen3.8-Flash-Next-MXFP4-FP8-GPTQ",+ "StillDeadcode/qwen3.8-next-flash-fp8-iq4r-moe",+ "someone/Llama-FP8-AWQ",+ ]) {+ assert.equal(checkpointQuantFormat({ id, isGguf: false }), null, id);+ }+ assert.equal(checkpointQuantFormat({ ...fp8, quantMethod: "gptq" }), null);+ // A GGUF repo named after an FP8 base is still a GGUF.+ assert.equal(+ checkpointQuantFormat({ id: "unsloth/X-FP8-GGUF", isGguf: true }),+ null,+ );+});++test("Recommended lists every GGUF and only the checkpoints this GPU runs natively", () => {+ assert.equal(matchesRecommended(gguf, []), true);+ assert.equal(matchesRecommended(bf16, ["fp8", "nvfp4"]), false);+ // CPU, Mac, Ampere: no FP8 / NVFP4.+ assert.equal(matchesRecommended(fp8, []), false);+ assert.equal(matchesRecommended(nvfp4, []), false);+ // Ada / Hopper: FP8 only.+ assert.equal(matchesRecommended(fp8, ["fp8"]), true);+ assert.equal(matchesRecommended(nvfp4, ["fp8"]), false);+ // Blackwell: both.+ assert.equal(matchesRecommended(nvfp4, ["fp8", "nvfp4"]), true);+});++test("the GGUF filter stays a plain format match", () => {+ assert.equal(matchesFormat("gguf", "gguf"), true);+ assert.equal(matchesFormat("safetensors", "gguf"), false);+ assert.equal(matchesFormat("gguf", "recommended"), true);+});++test("the likes threshold only curates Recommended, and Recommended is the default", async () => {+ const page = await readSrcAsync("features/hub/hub-page.tsx");+ assert.match(+ page,+ /effectiveDiscoverFormat !== "recommended" \|\|\s*hasQuery \|\|\s*resolveOwnerProviderLogo/,+ );+ assert.doesNotMatch(page, /preset\?\.format \?\? "gguf"/);+ const channels = await readSrcAsync("features/hub/lib/channels.ts");+ assert.match(+ channels,+ /id: "unsloth-trending",[\s\S]*?format: "recommended"/,+ );+});++test("the chat picker lists FP8 / NVFP4 checkpoints the GPU runs, whatever their size", async () => {+ const { isCapableCheckpointQuant } = await import(+ "../src/features/model-picker/components/model-selector/recommended-fit.ts"+ );+ assert.equal(isCapableCheckpointQuant(fp8.id, undefined, ["fp8"]), true);+ assert.equal(isCapableCheckpointQuant(fp8.id, undefined, []), false);+ assert.equal(isCapableCheckpointQuant(nvfp4.id, undefined, ["fp8"]), false);+ assert.equal(+ isCapableCheckpointQuant("unsloth/X-FP8-GGUF", undefined, ["fp8"]),+ false,+ );+ // The listing's GGUF verdict wins over an id without a -GGUF suffix.+ assert.equal(+ isCapableCheckpointQuant("someone/Model-FP8", undefined, ["fp8"], true),+ false,+ );++ const picker = await readSrcAsync(+ "features/model-picker/components/model-selector/pickers.tsx",+ );+ // Past the runtime gate, the GGUF-only rule, the FP8 name filter and the fit filter.+ assert.match(picker, /matchesTask: chatSupportedCheckpointQuant\(r\)/);+ // Only the quant-method check is waived: an FP8 image model is still not a chat model.+ assert.match(+ picker,+ /runsCheckpointQuant\(r\) &&\s*r\.quantMethod\?\.toLowerCase\(\) === "compressed-tensors" &&\s*isChatSupported\(\{ \.\.\.r, quantMethod: undefined \}\)/,+ );+ assert.match(+ picker,+ /cachedIdFor\(r\.id\) !== null \|\|\s*runsCheckpointQuant\(r\) \|\|/,+ );+ assert.equal(+ picker.match(/runsCheckpointQuant\(\{ id \}\) \|\| !\/-FP8/g)?.length,+ 2,+ );+ // The curated-search fit gate waives size for them too.+ assert.match(+ picker,+ /cachedIdFor\(id\) !== null \|\|\s*runsCheckpointQuant\(\{ id \}\) \|\|\s*searchRowFits\(\{ id \}\)/,+ );+ // Task pages (images, audio) keep their own formats.+ assert.match(+ picker,+ /\(r: \{ id: string; quantMethod\?: string; isGguf\?: boolean \}\) =>\s*!task &&/,+ );+});++test("a capable Recommended channel query drops the GGUF-only tag", async () => {+ const page = await readSrcAsync("features/hub/hub-page.tsx");+ assert.match(+ page,+ /effectiveDiscoverFormat === "recommended" &&\s*checkpointQuantFormats\.length > 0/,+ );+ assert.match(+ page,+ /tags: widenRecommendedChannel\s*\?\s*withoutGgufTag\(liveListChannel\.tags\)\s*:\s*liveListChannel\.tags/,+ );+});diff --git a/tests/studio/test_model_picker_catalog_first_paint.py b/tests/studio/test_model_picker_catalog_first_paint.pyindex 20bf7a57b8d..62af87038c7 100644--- a/tests/studio/test_model_picker_catalog_first_paint.py+++ b/tests/studio/test_model_picker_catalog_first_paint.py@@ -9,6 +9,7 @@ memory, and the bottom spinner stayed up while pages remained rather than whileone was in flight."""+import refrom pathlib import Path@@ -37,7 +38,11 @@ def test_curated_catalog_becomes_rows_without_a_request():assert "taskCatalogFormatMatches(" in seedassert "matchesFormatFilter(id, isG, formatFilter)" in seed# The recommendable gate now runs in `keep`, over seeds and listing rows alike.- assert "isRecommendable: isRecommendableFormat(r.id, r.isGguf, isMac)," in source+ # A capable FP8 / NVFP4 checkpoint is also recommendable (runsCheckpointQuant).+ assert re.search(+ r"isRecommendable:\s*isRecommendableFormat\(r\.id, r\.isGguf, isMac\)( \|\|\s*runsCheckpointQuant\(r\))?,",+ source,+ )# Device fit reads the catalog size, not an id "<n>B" guess.assert "curatedSizeBytes: catalog ? curatedSizeBytesFor(id, catalog) : undefined," in seed