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: run AutoRound checkpoints on vLLM, and tidy the engine dialog (#13405)
Daniel Han50e5b8a561d1
diff --git a/studio/backend/routes/inference.py b/studio/backend/routes/inference.pyindex 933ba6b119a..92ecffd3aab 100644--- a/studio/backend/routes/inference.py+++ b/studio/backend/routes/inference.py@@ -16914,8 +16914,11 @@ _MANAGED_ENGINE_QUANTIZATIONS = {"compressed-tensors": (),"awq": ("gptqmodel", "awq"),"gptq": ("gptqmodel", "auto_gptq"),+ "auto-round": ("auto_round",),}_OFFERED_ENGINES = ("vllm", "sglang")+# SGLang registers auto-round too, but only vLLM has been run on it (#7997).+_OFFERED_ENGINES_FOR = {"auto-round": ("vllm",)}def _managed_engine_offer(@@ -16951,7 +16954,11 @@ def _managed_engine_offer(return Noneexcept (ImportError, ValueError):pass- engines = [name for name in _OFFERED_ENGINES if supported(name, method)]+ engines = [+ name+ for name in _OFFERED_ENGINES_FOR.get(method, _OFFERED_ENGINES)+ if supported(name, method)+ ]return {"quantization": method, "engines": engines} if engines else None@@ -16982,6 +16989,9 @@ def _managed_engine_offer_for(config, hf_token) -> Optional[dict]:if support_reason(name) is not None:return Falseif gpu_platform() == "rocm":+ if method == "auto-round":+ # Unmeasured on ROCm vLLM; an explicit vLLM load still gets to try (#7997).+ return Falsetext_config = metadata.get("text_config")return rocm_loads_quantization(metadata.get("quantization_config")diff --git a/studio/backend/tests/test_managed_engine_offer.py b/studio/backend/tests/test_managed_engine_offer.pyindex 141927cd62b..17766928a4e 100644--- a/studio/backend/tests/test_managed_engine_offer.py+++ b/studio/backend/tests/test_managed_engine_offer.py@@ -64,7 +64,7 @@ def offer(@pytest.fixture(autouse = True)def _no_awq_or_gptq_packages():real = importlib.util.find_spec- missing = {"gptqmodel", "awq", "auto_gptq"}+ missing = {"gptqmodel", "awq", "auto_gptq", "auto_round"}with patch.object(importlib.util,"find_spec",@@ -95,6 +95,26 @@ def test_awq_and_gptq_stay_on_the_default_engine_once_it_can_run_them():assert offer(NVFP4) is not None+AUTOROUND = {+ "quantization_config": {"quant_method": "auto-round", "packing_format": "auto_round:auto_gptq"}+}+++def test_autoround_is_not_refused_for_an_explicit_vllm_load_on_amd():+ # Only the offer skips ROCm (unmeasured there); a user who picks vLLM still gets to try.+ from core.inference.engine_install import rocm_loads_quantization+ assert rocm_loads_quantization(AUTOROUND["quantization_config"]) is True+++def test_autoround_is_offered_vllm_only():+ # #7997: vLLM maps auto-round onto its inc method; SGLang has not been run on it.+ assert offer(AUTOROUND) == {"quantization": "auto-round", "engines": ["vllm"]}+ assert offer({"text_config": AUTOROUND})["engines"] == ["vllm"]+ assert offer(AUTOROUND, supported = lambda name, method: name == "sglang") is None+ with patch.object(importlib.util, "find_spec", return_value = object()):+ assert offer(AUTOROUND) is None++@pytest.mark.parametrize("metadata",[@@ -273,11 +293,11 @@ def test_amd_offers_only_the_checkpoints_vllms_rocm_build_loads(tmp_path):patch.object(route,"_MANAGED_ENGINE_QUANTIZATIONS",- {"compressed-tensors": (), "awq": (), "gptq": ()},+ {"compressed-tensors": (), "awq": (), "gptq": (), "auto-round": ()},),):# NVIDIA keeps every offer.- for metadata in (w8a8, fp8, nvfp4, gptq):+ for metadata in (w8a8, fp8, nvfp4, gptq, AUTOROUND):assert engines(metadata), metadataamd = {"vllm": None, "sglang": "SGLang requires an NVIDIA GPU. Use vLLM on AMD GPUs."}with (@@ -285,5 +305,5 @@ def test_amd_offers_only_the_checkpoints_vllms_rocm_build_loads(tmp_path):patch("core.inference.engine_install.support_reason", side_effect = amd.get),):assert engines(w8a8) == engines(w4a16) == engines(awq) == ["vllm"]- for metadata in (fp8, nvfp4, NVFP4, gptq):+ for metadata in (fp8, nvfp4, NVFP4, gptq, AUTOROUND):assert engines(metadata) is None, metadatadiff --git a/studio/frontend/src/features/chat/hooks/use-chat-model-runtime.ts b/studio/frontend/src/features/chat/hooks/use-chat-model-runtime.tsindex 1619ee56311..d13db614292 100644--- a/studio/frontend/src/features/chat/hooks/use-chat-model-runtime.ts+++ b/studio/frontend/src/features/chat/hooks/use-chat-model-runtime.ts@@ -2430,12 +2430,30 @@ export function useChatModelRuntime() {? validation.managed_engine_offer: null;if (engineOffer) {+ // Nothing loads until the dialog is answered; the toast must not say otherwise.+ toast(null, {+ id: toastId,+ ...modelLoadToastOptions(+ renderLoadDescription(+ "Waiting for an engine…",+ `Choose how to run ${displayName}.`,+ ),+ ),+ });const engine = await confirmManagedEngineIfNeeded(modelId,engineOffer,abortCtrl.signal,);if (abortCtrl.signal.aborted) throw new Error("Cancelled");+ if (engine) {+ toast(null, {+ id: toastId,+ ...modelLoadToastOptions(+ renderLoadDescription("Starting model…", loadingDescription),+ ),+ });+ }if (!engine) {throw new Error(`${displayName} is quantized with ${engineOffer.quantization}, which the default engine cannot run. Set Inference engine to ${engineOffer.engines[0] === "sglang" ? "SGLang" : "vLLM"} in its run settings to load it.`,diff --git a/studio/frontend/src/features/hub/catalog/model-card.tsx b/studio/frontend/src/features/hub/catalog/model-card.tsxindex 918c7100e0b..e2a9559eac4 100644--- a/studio/frontend/src/features/hub/catalog/model-card.tsx+++ b/studio/frontend/src/features/hub/catalog/model-card.tsx@@ -1,7 +1,7 @@// 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 { useVllmAvailable } from "@/features/model-picker";+import { useVllmAvailable, useVllmPlatform } from "@/features/model-picker";import {Tooltip,TooltipContent,@@ -241,6 +241,7 @@ export const ModelCard = memo(function ModelCard({onSelect: (id: string) => void;}) {const vllmAvailable = useVllmAvailable();+ const vllmPlatform = useVllmPlatform();const support = useMemo(() =>isDataset@@ -253,8 +254,9 @@ export const ModelCard = memo(function ModelCard({deviceType,quantMethod: row.result.quantMethod,vllmAvailable,+ vllmPlatform,}),- [isDataset, row.id, row.result, deviceType, vllmAvailable],+ [isDataset, row.id, row.result, deviceType, vllmAvailable, vllmPlatform],);const unsupported = support?.status === "unsupported" && !support?.supportedIn;const partial = row.isAvailableOnDevice && row.isPartialOnDevice;diff --git a/studio/frontend/src/features/hub/catalog/model-inspector.tsx b/studio/frontend/src/features/hub/catalog/model-inspector.tsxindex f894e1eca4d..3c983712f6c 100644--- a/studio/frontend/src/features/hub/catalog/model-inspector.tsx+++ b/studio/frontend/src/features/hub/catalog/model-inspector.tsx@@ -1,7 +1,7 @@// 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 { useVllmAvailable } from "@/features/model-picker";+import { useVllmAvailable, useVllmPlatform } from "@/features/model-picker";import { useHfEndpoint, useHubName } from "@/lib/hf-endpoint";import {Tooltip,@@ -511,6 +511,7 @@ export const ModelInspector = memo(function ModelInspector({const supportLibraryName = model?.libraryName;const supportQuantMethod = model?.quantMethod;const vllmAvailable = useVllmAvailable();+ const vllmPlatform = useVllmPlatform();const unslothSupport = useMemo<UnslothSupport>(() => {return classifyUnslothSupport({modelId: supportModelId,@@ -520,9 +521,11 @@ export const ModelInspector = memo(function ModelInspector({deviceType,quantMethod: supportQuantMethod,vllmAvailable,+ vllmPlatform,});}, [vllmAvailable,+ vllmPlatform,deviceType,supportLibraryName,supportModelId,diff --git a/studio/frontend/src/features/hub/catalog/models-catalog-rows.tsx b/studio/frontend/src/features/hub/catalog/models-catalog-rows.tsxindex 58d21e7e098..446966eb7c4 100644--- a/studio/frontend/src/features/hub/catalog/models-catalog-rows.tsx+++ b/studio/frontend/src/features/hub/catalog/models-catalog-rows.tsx@@ -1,7 +1,7 @@// 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 { useVllmAvailable } from "@/features/model-picker";+import { useVllmAvailable, useVllmPlatform } from "@/features/model-picker";import { isChatGgufTask, reconcileGgufPinsAfterDelete } from "@/features/model-picker/components/model-selector/reconcile-gguf-pins";import {@@ -459,6 +459,7 @@ export const DiscoverModelRow = memo(function DiscoverModelRow({onSelect: (id: string) => void;}) {const vllmAvailable = useVllmAvailable();+ const vllmPlatform = useVllmPlatform();const support = useMemo(() =>isDataset@@ -471,8 +472,9 @@ export const DiscoverModelRow = memo(function DiscoverModelRow({deviceType,quantMethod: row.result.quantMethod,vllmAvailable,+ vllmPlatform,}),- [isDataset, row.id, row.result, deviceType, vllmAvailable],+ [isDataset, row.id, row.result, deviceType, vllmAvailable, vllmPlatform],);const unsupported = support?.status === "unsupported" && !support?.supportedIn;const handleClick = useCallback(() => onSelect(row.id), [onSelect, row.id]);@@ -592,6 +594,7 @@ export const InventoryRow = memo(function InventoryRow({: (row.repoId ?? row.baseModelHubId ?? row.baseModel ?? row.loadId);const rowTagsSignature = row.tags?.join("\u0001") ?? "";const vllmAvailable = useVllmAvailable();+ const vllmPlatform = useVllmPlatform();const unsupported = useMemo(() => {if (isDataset) return false;const classified = classifyUnslothSupport({@@ -602,6 +605,7 @@ export const InventoryRow = memo(function InventoryRow({quantMethod: row.quantMethod,deviceType,vllmAvailable,+ vllmPlatform,});// Images/Video run these, so they are not unsupported to a user.return classified.status === "unsupported" && !classified.supportedIn;@@ -614,6 +618,7 @@ export const InventoryRow = memo(function InventoryRow({row.quantMethod,deviceType,vllmAvailable,+ vllmPlatform,]);const handleClick = useCallback(() => onSelect(row.id), [onSelect, row.id]);const title = row.kind === "cache" ? row.repo : row.title;diff --git a/studio/frontend/src/features/hub/catalog/models-table.tsx b/studio/frontend/src/features/hub/catalog/models-table.tsxindex 5917bba9bfa..9738262f9fa 100644--- a/studio/frontend/src/features/hub/catalog/models-table.tsx+++ b/studio/frontend/src/features/hub/catalog/models-table.tsx@@ -1,7 +1,7 @@// 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 { useVllmAvailable } from "@/features/model-picker";+import { useVllmAvailable, useVllmPlatform } from "@/features/model-picker";import { useHfEndpoint, useHubName } from "@/lib/hf-endpoint";import {DropdownMenu,@@ -574,6 +574,7 @@ function useResultRowModel(isDataset: boolean,) {const vllmAvailable = useVllmAvailable();+ const vllmPlatform = useVllmPlatform();const support = useMemo(() =>isDataset@@ -586,8 +587,9 @@ function useResultRowModel(deviceType,quantMethod: row.result.quantMethod,vllmAvailable,+ vllmPlatform,}),- [isDataset, row.id, row.result, deviceType, vllmAvailable],+ [isDataset, row.id, row.result, deviceType, vllmAvailable, vllmPlatform],);const sizeLabel = formatModelParamLabel(row.repo, row.result.totalParams);const taskLabel = isDatasetdiff --git a/studio/frontend/src/features/hub/lib/unsloth-support.ts b/studio/frontend/src/features/hub/lib/unsloth-support.tsindex a74ebe8a676..dce29724b31 100644--- a/studio/frontend/src/features/hub/lib/unsloth-support.ts+++ b/studio/frontend/src/features/hub/lib/unsloth-support.ts@@ -113,6 +113,8 @@ const UNSUPPORTED_QUANT_METHODS: Record<string, string> = {sinq: "SINQ quantization",torchao: "torchao quantization",quanto: "optimum-quanto quantization",+ // transformers writes "auto-round"; the other spellings are older AutoRound exports.+ "auto-round": "AutoRound quantization",auto_round: "AutoRound quantization",autoround: "AutoRound quantization",metal: "Metal-kernel quantization",@@ -133,7 +135,10 @@ const VLLM_QUANT_METHODS: ReadonlySet<string> = new Set(["compressed-tensors","awq","gptq",+ "auto-round",]);+// Not offered on ROCm vLLM, matching /validate: AutoRound is unmeasured there.+const VLLM_ROCM_REFUSED_QUANT_METHODS: ReadonlySet<string> = new Set(["auto-round"]);const VLLM_FORMAT_KEYS: ReadonlySet<string> = new Set(["awq", "gptq"]);// Chat only: vLLM refuses audio (_reject_unsupported_managed_kind); untagged repos count as chat.const VLLM_CHAT_TASKS: ReadonlySet<string> = new Set(["text-generation", "image-text-to-text"]);@@ -226,6 +231,7 @@ export function classifyUnslothSupport({deviceType,quantMethod,vllmAvailable = false,+ vllmPlatform,}: {modelId?: string | null;pipelineTag?: string | null;@@ -234,6 +240,7 @@ export function classifyUnslothSupport({deviceType?: string | null;quantMethod?: string | null;vllmAvailable?: boolean;+ vllmPlatform?: string | null;}): UnslothSupport {const pipeline = pipelineTag?.toLowerCase().trim() || null;const lowerTags = new Set(@@ -255,7 +262,11 @@ export function classifyUnslothSupport({if (Object.hasOwn(UNSUPPORTED_QUANT_METHODS, normalizedQuant)) {const reason = `Detected ${UNSUPPORTED_QUANT_METHODS[normalizedQuant]}.`;// vLLM excuses only the quantization; any other rejection keeps the old answer.- if (vllmRuns && VLLM_QUANT_METHODS.has(normalizedQuant)) {+ if (+ vllmRuns &&+ VLLM_QUANT_METHODS.has(normalizedQuant) &&+ !(vllmPlatform === "rocm" && VLLM_ROCM_REFUSED_QUANT_METHODS.has(normalizedQuant))+ ) {const rest = classifyUnslothSupport({ modelId, pipelineTag, tags, libraryName, deviceType, vllmAvailable });if (rest.status === "supported" || rest.supportedIn === "vllm") {return { status: "unsupported", reason, supportedIn: "vllm" };diff --git a/studio/frontend/src/features/model-picker/components/inference-engines.tsx b/studio/frontend/src/features/model-picker/components/inference-engines.tsxindex 0d8b821a29b..59376712bf6 100644--- a/studio/frontend/src/features/model-picker/components/inference-engines.tsx+++ b/studio/frontend/src/features/model-picker/components/inference-engines.tsx@@ -16,6 +16,7 @@ import { SettingsSection } from "@/features/settings/components/settings-sectionimport { useT } from "@/i18n";import { isEngineGpuDevice, useGpuDevices } from "@/hooks/use-gpu-info";import { formatGiB } from "@/lib/memory/format";+import { cn } from "@/lib/utils";import { useEffect, useRef, useState } from "react";import {type EngineStatus,@@ -40,15 +41,20 @@ const PRECISION_LABELS = [export function EngineInstall({engine,management = false,+ centered = false,onUse,}: {engine: EngineStatus;management?: boolean;+ /** The load dialog: centred, and the install prompt (size, Install and load) shown up front. */+ centered?: boolean;onUse?: () => void;}) {const t = useT();const isOwner = useIsAccountOwner();const useAfterInstall = useRef(false);+ // Off once an install starts, until it fails or stops: the next poll may not show it running yet.+ const [autoConfirm, setAutoConfirm] = useState(true);useEffect(() => {if (engine.job.state === "error" ||@@ -56,6 +62,7 @@ export function EngineInstall({engine.job.state === "waiting") {useAfterInstall.current = false;+ setAutoConfirm(true);}if (useAfterInstall.current &&@@ -70,6 +77,11 @@ export function EngineInstall({const [busy, setBusy] = useState(false);const [error, setError] = useState("");const running = engine.job.state === "running";+ const canInstall = !engine.in_use && isOwner && !engine.unsupported_reason;+ // The dialog's user already asked to load, so skip the extra "Install engine" click there.+ const showConfirm =+ confirm ||+ (centered && autoConfirm && canInstall && !engine.installed && !running);const action = async (operation: "install" | "cancel" | "remove" | "rollback",) => {@@ -78,6 +90,7 @@ export function EngineInstall({try {if (operation === "install") {useAfterInstall.current = !!onUse;+ setAutoConfirm(false);}if (operation === "cancel") {useAfterInstall.current = false;@@ -86,13 +99,14 @@ export function EngineInstall({setConfirm(false);} catch (err) {useAfterInstall.current = false;+ setAutoConfirm(true);setError(err instanceof Error ? err.message : "Engine operation failed");} finally {setBusy(false);}};return (- <div className="space-y-2 text-ui-12">+ <div className={cn("space-y-2 text-ui-12", centered && "text-center")}>{/* Settings shows these under the engine name (engineNote). */}{!management && !(isOwner || engine.installed) && (<p className="text-muted-foreground">@@ -105,7 +119,10 @@ export function EngineInstall({{running ? (<outputaria-live="polite"- className="flex items-center justify-between gap-3"+ className={cn(+ "flex items-center gap-3",+ centered ? "justify-center" : "justify-between",+ )}><span>{t("managedEngines.installing")}</span><Button@@ -118,7 +135,12 @@ export function EngineInstall({</Button></output>) : (- <div className="flex flex-wrap items-center gap-2">+ <div+ className={cn(+ "flex flex-wrap items-center gap-2",+ centered && "justify-center",+ )}+ >{engine.installed && (<span>{t("managedEngines.installed", {@@ -126,24 +148,23 @@ export function EngineInstall({})}</span>)}- {(!engine.installed || !engine.current || management) && (- <Button- size="sm"- variant="outline"- disabled={- busy || engine.in_use || !isOwner || !!engine.unsupported_reason- }- onClick={() => setConfirm(true)}- >- {engine.installed- ? t(- engine.current- ? "managedEngines.repair"- : "managedEngines.update",- )- : t("managedEngines.install")}- </Button>- )}+ {(!engine.installed || !engine.current || management) &&+ !(centered && showConfirm) && (+ <Button+ size="sm"+ variant="outline"+ disabled={busy || !canInstall}+ onClick={() => setConfirm(true)}+ >+ {engine.installed+ ? t(+ engine.current+ ? "managedEngines.repair"+ : "managedEngines.update",+ )+ : t("managedEngines.install")}+ </Button>+ )}{management && isOwner && engine.installed && (<Buttonsize="sm"@@ -169,12 +190,14 @@ export function EngineInstall({{management && engine.in_use && (<p className="text-muted-foreground">{t("managedEngines.inUse")}</p>)}- {confirm && (+ {showConfirm && (<sectionaria-label={t("managedEngines.installTitle", {engine: names[engine.engine],})}- className="space-y-3 rounded-lg border p-3"+ className={cn(+ centered ? "space-y-1 text-muted-foreground" : "space-y-3 rounded-lg border p-3",+ )}><p>{engine.download_bytes@@ -192,9 +215,9 @@ export function EngineInstall({<p>{t(wslNoticeKey(engine)!, { engine: names[engine.engine] })}</p>)}<p>{t("managedEngines.background")}</p>- <div className="flex gap-2">+ <div className={cn("flex gap-2", centered && "justify-center pt-3")}><Button- size="sm"+ size={centered ? "default" : "sm"}disabled={busy}onClick={() => void action("install")}>@@ -202,9 +225,11 @@ export function EngineInstall({? t("managedEngines.installAndLoad"): t("managedEngines.install")}</Button>- <Button size="sm" variant="ghost" onClick={() => setConfirm(false)}>- {t("common.cancel")}- </Button>+ {!centered && (+ <Button size="sm" variant="ghost" onClick={() => setConfirm(false)}>+ {t("common.cancel")}+ </Button>+ )}</div></section>)}diff --git a/studio/frontend/src/features/model-picker/components/managed-engine-offer-dialog.tsx b/studio/frontend/src/features/model-picker/components/managed-engine-offer-dialog.tsxindex b14b322e50f..b32e622644e 100644--- a/studio/frontend/src/features/model-picker/components/managed-engine-offer-dialog.tsx+++ b/studio/frontend/src/features/model-picker/components/managed-engine-offer-dialog.tsx@@ -9,9 +9,13 @@ import {AlertDialogDescription,AlertDialogFooter,AlertDialogHeader,+ AlertDialogMedia,AlertDialogTitle,} from "@/components/ui/alert-dialog";import { Spinner } from "@/components/ui/spinner";+import { cn } from "@/lib/utils";+import { CpuIcon } from "@hugeicons/core-free-icons";+import { HugeiconsIcon } from "@hugeicons/react";import { useState } from "react";import { isEngineReady } from "../api/engines";import { useManagedEngineOfferStore } from "../hooks/managed-engine-offer";@@ -23,6 +27,7 @@ const QUANTIZATION_NAMES: Record<string, string> = {"compressed-tensors": "compressed-tensors",awq: "AWQ",gptq: "GPTQ",+ "auto-round": "AutoRound",};/** Root-mounted: a Default-engine load only vLLM / SGLang can run waits here for an engine. */@@ -46,6 +51,9 @@ export function ManagedEngineOfferDialog() {if (!open && shown.length > 0) setShown([]);else if (open && ready.length === 0 && unshown.length > 0)setShown([...shown, ...unshown]);+ const visible = offered.filter(+ (engine) => ready.length === 0 || shown.includes(engine.engine),+ );const names = (offer?.engines ?? []).map((name) => ENGINE_NAMES[name]);const displayName = modelName?.split("/").pop() || "This model";const quantization =@@ -58,9 +66,16 @@ export function ManagedEngineOfferDialog() {if (!next) resolve(null);}}>- <AlertDialogContent className="max-w-lg">+ <AlertDialogContent size="sm" className="data-[size=sm]:max-w-md"><AlertDialogHeader className="min-w-0">- <AlertDialogTitle>+ <AlertDialogMedia className="size-12">+ <HugeiconsIcon+ icon={CpuIcon}+ strokeWidth={1.75}+ className="size-5 text-muted-foreground"+ />+ </AlertDialogMedia>+ <AlertDialogTitle className="min-w-0 break-words">{displayName} needs {names.join(" or ")}</AlertDialogTitle><AlertDialogDescription>@@ -70,38 +85,43 @@ export function ManagedEngineOfferDialog() {{offered.length === 0 ? (error ? (// The check keeps retrying; say why it is stuck rather than spinning silently.- <p role="alert" className="text-ui-12 text-destructive">+ <p role="alert" className="text-center text-ui-12 text-destructive">Could not check installed engines: {error}</p>) : (- <p className="flex items-center gap-2 text-ui-12 text-muted-foreground">+ <p className="flex items-center justify-center gap-2 text-ui-12 text-muted-foreground"><Spinner className="size-3.5" />Checking installed engines...</p>)- ) : (- offered- .filter(- (engine) => ready.length === 0 || shown.includes(engine.engine),- )- .map((engine) => (+ ) : visible.length === 0 ? null : (+ <div className="space-y-3">+ {visible.map((engine) => (<sectionkey={engine.engine}aria-label={ENGINE_NAMES[engine.engine]}- className="space-y-2 rounded-lg border p-3"+ // The title already names a lone engine; a choice of two needs each labelled.+ className={cn(+ "space-y-2",+ visible.length > 1 && "rounded-2xl border p-3",+ )}>- <p className="text-ui-13 font-medium">- {ENGINE_NAMES[engine.engine]}- </p>+ {visible.length > 1 && (+ <p className="text-center text-ui-13 font-medium">+ {ENGINE_NAMES[engine.engine]}+ </p>+ )}<EngineInstallengine={engine}+ centered={true}onUse={() => resolve(engine.engine)}/></section>- ))+ ))}+ </div>)}- <AlertDialogFooter>- <AlertDialogCancel>Cancel</AlertDialogCancel>+ <AlertDialogFooter className="group-data-[size=sm]/alert-dialog-content:flex sm:justify-center">+ <AlertDialogCancel variant="ghost">Cancel</AlertDialogCancel>{ready.map((engine) => (<AlertDialogActionkey={engine.engine}diff --git a/studio/frontend/src/features/model-picker/hooks/use-vllm-available.ts b/studio/frontend/src/features/model-picker/hooks/use-vllm-available.tsindex 64a4b1fd018..58ee85f64c0 100644--- a/studio/frontend/src/features/model-picker/hooks/use-vllm-available.ts+++ b/studio/frontend/src/features/model-picker/hooks/use-vllm-available.ts@@ -6,14 +6,17 @@ import { listEngines, vllmHostSupported } from "../api/engines";// One read shared by every hub row; "Checking..." (GPU probe, up to a minute) and failed reads are retried.let available = false;+// The engine's GPU platform ("cuda" / "rocm"), read with `available`: ROCm vLLM refuses some formats.+let platform: string | null = null;let started = false;let retries = 0;let latest = 0;const listeners = new Set<() => void>();-function publish(next: boolean) {- if (next === available) return;+function publish(next: boolean, nextPlatform: string | null) {+ if (next === available && nextPlatform === platform) return;available = next;+ platform = nextPlatform;for (const listener of listeners) listener();}@@ -28,8 +31,8 @@ async function refresh() {try {const engines = await listEngines();if (request !== latest) return;- publish(vllmHostSupported(engines));const vllm = engines.find((engine) => engine.engine === "vllm");+ publish(vllmHostSupported(engines), vllm?.platform ?? null);if (vllm?.unsupported_reason?.startsWith("Checking")) retry();} catch {if (request === latest) retry();@@ -63,3 +66,12 @@ export function useVllmAvailable(): boolean {() => false,);}++/** The vLLM engine's GPU platform once the host can run it, else null. */+export function useVllmPlatform(): string | null {+ return useSyncExternalStore(+ subscribe,+ () => (available ? platform : null),+ () => null,+ );+}diff --git a/studio/frontend/src/features/model-picker/index.ts b/studio/frontend/src/features/model-picker/index.tsindex 496248ce255..b33dcb6f343 100644--- a/studio/frontend/src/features/model-picker/index.ts+++ b/studio/frontend/src/features/model-picker/index.ts@@ -36,7 +36,7 @@ export {type ApiModelOverrides,} from "./api/model-overrides";export { useActiveModelConfig } from "./hooks/use-active-model-config";-export { useVllmAvailable } from "./hooks/use-vllm-available";+export { useVllmAvailable, useVllmPlatform } from "./hooks/use-vllm-available";export { ManagedEngineOfferDialog } from "./components/managed-engine-offer-dialog";export {confirmManagedEngineIfNeeded,diff --git a/studio/frontend/tests/managed-engine-offer.test.ts b/studio/frontend/tests/managed-engine-offer.test.tsindex ec63c91c542..96dfc80a41a 100644--- a/studio/frontend/tests/managed-engine-offer.test.ts+++ b/studio/frontend/tests/managed-engine-offer.test.ts@@ -95,3 +95,15 @@ test("an install started in the dialog stays mounted until it hands the load oveassert.match(dialog, /open && ready\.length === 0 && unshown\.length > 0/);assert.match(dialog, /onUse=\{\(\) => resolve\(engine\.engine\)\}/);});++test("the dialog opens on the install prompt, and the load toast waits with it", () => {+ const install = readText("../src/features/model-picker/components/inference-engines.tsx");+ // Settings keeps the two-step install; only the centred dialog skips "Install engine".+ assert.match(install, /\(centered && autoConfirm && canInstall && !engine\.installed && !running\)/);+ assert.match(install, /useAfterInstall\.current = !!onUse;\s*setAutoConfirm\(false\);/);+ const dialog = readText("../src/features/model-picker/components/managed-engine-offer-dialog.tsx");+ assert.match(dialog, /centered=\{true\}/);+ const runtime = readText("../src/features/chat/hooks/use-chat-model-runtime.ts");+ const waiting = runtime.indexOf('"Waiting for an engine…"');+ assert.ok(waiting > 0 && waiting < runtime.indexOf("await confirmManagedEngineIfNeeded("));+});diff --git a/studio/frontend/tests/unsloth-support-autoround.test.ts b/studio/frontend/tests/unsloth-support-autoround.test.tsnew file mode 100644index 00000000000..d9c40852a46--- /dev/null+++ b/studio/frontend/tests/unsloth-support-autoround.test.ts@@ -0,0 +1,55 @@+// 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 { classifyUnslothSupport } from "../src/features/hub/lib/unsloth-support.ts";++// #7997: transformers writes quant_method "auto-round" (QuantizationMethod.AUTOROUND).+const AUTOROUND = {+ modelId: "Lorbus/Qwen3.6-27B-int4-AutoRound",+ pipelineTag: "image-text-to-text",+ tags: ["transformers", "safetensors", "qwen3_5", "autoround", "int4", "auto-round", "4-bit"],+ libraryName: "transformers",+ quantMethod: "auto-round",+};++test("AutoRound checkpoints are not offered to the Default engine", () => {+ for (const deviceType of ["cuda", "rocm", "mac", "cpu"]) {+ assert.deepEqual(classifyUnslothSupport({ ...AUTOROUND, deviceType }), {+ status: "unsupported",+ reason: "Detected AutoRound quantization.",+ });+ }+ for (const quantMethod of ["auto-round", "AUTO-ROUND", "auto_round", "autoround"]) {+ assert.equal(classifyUnslothSupport({ modelId: "owner/model", quantMethod }).status, "unsupported", quantMethod);+ }+});++test("with vLLM, AutoRound is marked as vLLM-runnable", () => {+ assert.deepEqual(classifyUnslothSupport({ ...AUTOROUND, deviceType: "cuda", vllmAvailable: true }), {+ status: "unsupported",+ reason: "Detected AutoRound quantization.",+ supportedIn: "vllm",+ });+ // ROCm vLLM refuses AutoRound (rocm_loads_quantization), so the hub must not send users there.+ assert.equal(+ classifyUnslothSupport({ ...AUTOROUND, vllmAvailable: true, vllmPlatform: "rocm" }).supportedIn,+ undefined,+ );+ assert.equal(+ classifyUnslothSupport({ modelId: "o/m", quantMethod: "awq", vllmAvailable: true, vllmPlatform: "rocm" }).supportedIn,+ "vllm",+ );+ // vLLM recognises only the spelling transformers writes.+ assert.equal(+ classifyUnslothSupport({ modelId: "owner/model", quantMethod: "auto_round", vllmAvailable: true }).supportedIn,+ undefined,+ );+});++test("AutoRound GGUF exports still run through llama.cpp", () => {+ assert.equal(+ classifyUnslothSupport({ modelId: "owner/model-GGUF", tags: ["gguf"], quantMethod: "auto-round" }).status,+ "supported",+ );+});