Skip to content

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.

Model picker: lay the rows out in columns (#7770)

Michael Han5d9c7bf8f8a5
diff --git a/studio/frontend/src/features/hub/catalog/models-catalog-rows.tsx b/studio/frontend/src/features/hub/catalog/models-catalog-rows.tsx
index 38c8661d7df..c393bec0da8 100644
--- a/studio/frontend/src/features/hub/catalog/models-catalog-rows.tsx
+++ b/studio/frontend/src/features/hub/catalog/models-catalog-rows.tsx
@@ -744,7 +744,7 @@ export const InventoryRow = memo(function InventoryRow({
deletableRepoId || settingsAction ? (
<ModelRowMenu
ariaLabel={`More options for ${deletableRepoId ?? rowModelId}`}
- buttonClassName="pointer-events-auto hub-modal-pe-guard p-2 opacity-0 transition-opacity group-hover/row:opacity-100 focus-visible:opacity-100 data-[state=open]:opacity-100 [@media(pointer:coarse)]:opacity-100"
+ buttonClassName="pointer-events-auto hub-modal-pe-guard size-8 opacity-0 transition-opacity group-hover/row:opacity-100 focus-visible:opacity-100 data-[state=open]:opacity-100 [@media(pointer:coarse)]:opacity-100"
iconClassName="size-4"
settings={settingsAction}
pin={
diff --git a/studio/frontend/src/features/model-picker/components/model-selector/model-delete-action.tsx b/studio/frontend/src/features/model-picker/components/model-selector/model-delete-action.tsx
index 09bb43abdc6..1931a703d39 100644
--- a/studio/frontend/src/features/model-picker/components/model-selector/model-delete-action.tsx
+++ b/studio/frontend/src/features/model-picker/components/model-selector/model-delete-action.tsx
@@ -62,7 +62,8 @@ export function ModelDeleteAction({
aria-label={ariaLabel}
disabled={disabled}
className={cn(
- "shrink-0 rounded-md p-1.5 text-muted-foreground/60 transition-colors hover:bg-destructive/10 hover:text-destructive",
+ // Fixed box, matching the gear and dots menu it sits beside.
+ "flex size-5 shrink-0 items-center justify-center rounded-md text-muted-foreground/60 transition-colors hover:bg-destructive/10 hover:text-destructive",
disabled &&
"cursor-not-allowed opacity-40 hover:bg-transparent hover:text-muted-foreground/60",
buttonClassName,
diff --git a/studio/frontend/src/features/model-picker/components/model-selector/model-load-settings-action.tsx b/studio/frontend/src/features/model-picker/components/model-selector/model-load-settings-action.tsx
index bbef42063f1..7138be61788 100644
--- a/studio/frontend/src/features/model-picker/components/model-selector/model-load-settings-action.tsx
+++ b/studio/frontend/src/features/model-picker/components/model-selector/model-load-settings-action.tsx
@@ -30,10 +30,13 @@ export function ModelLoadSettingsAction({
}}
aria-label={ariaLabel}
className={cn(
- "shrink-0 rounded-md p-1 text-muted-foreground/60 transition-colors hover:bg-black/5 hover:text-foreground dark:hover:bg-white/10",
+ // Fixed box, not padding around the glyph, so this and the dots
+ // menu hover as one size. Callers can still size it up.
+ "flex size-5 shrink-0 items-center justify-center rounded-md text-muted-foreground/60 transition-colors hover:bg-black/5 hover:text-foreground dark:hover:bg-white/10",
className,
)}
>
+ {/* A size down from the dots: the gear fills its whole box. */}
<HugeiconsIcon
icon={Settings02Icon}
strokeWidth={1.75}
diff --git a/studio/frontend/src/features/model-picker/components/model-selector/model-row-menu.tsx b/studio/frontend/src/features/model-picker/components/model-selector/model-row-menu.tsx
index e2d86abb4c4..9de27f98f48 100644
--- a/studio/frontend/src/features/model-picker/components/model-selector/model-row-menu.tsx
+++ b/studio/frontend/src/features/model-picker/components/model-selector/model-row-menu.tsx
@@ -182,7 +182,8 @@ export function ModelRowMenu({
onClick={(e) => e.stopPropagation()}
aria-label={ariaLabel}
className={cn(
- "shrink-0 rounded-md p-1 text-muted-foreground/60 transition-colors hover:bg-black/5 hover:text-foreground dark:hover:bg-white/10",
+ // Fixed box, matching ModelLoadSettingsAction beside it.
+ "flex size-5 shrink-0 items-center justify-center rounded-md text-muted-foreground/60 transition-colors hover:bg-black/5 hover:text-foreground dark:hover:bg-white/10",
buttonClassName,
)}
>
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.tsx
index 8648e51ca71..8b424db9089 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
@@ -125,7 +125,12 @@ import {
modelIdsMatchForPicker,
soleQuantRowState,
} from "./row-identity";
-import { parseMetaTokens, splitRepoLabel } from "./row-meta";
+import {
+ type FormatTone,
+ isUnslothOwner,
+ parseMetaTokens,
+ splitRepoLabel,
+} from "./row-meta";
import {
type SoleQuantEntry,
type SoleQuantTarget,
@@ -384,7 +389,8 @@ function formatBytes(bytes: number): string {
value /= 1000;
i += 1;
}
- return `${value.toFixed(value < 10 ? 1 : 0)} ${units[i]}`;
+ // No space: "145MB" reads as one value beside the quant chip.
+ return `${value.toFixed(value < 10 ? 1 : 0)}${units[i]}`;
}
// Small icon badges for what a model can do (vision / reasoning / audio).
@@ -410,6 +416,136 @@ function CapabilityIcons({ caps }: { caps: ModelCapabilities }) {
);
}
+/** "This model reads images", from the GGUF metadata (On Device rows). */
+function VisionBadge() {
+ return (
+ <Tooltip delayDuration={0}>
+ <TooltipTrigger asChild={true}>
+ <span
+ aria-label="Vision"
+ className="flex h-[18px] shrink-0 items-center justify-center rounded-md border border-border/60 px-1.5 text-indigo-700 dark:text-indigo-300"
+ >
+ <HugeiconsIcon icon={ViewIcon} className="size-3" strokeWidth={1.8} />
+ </span>
+ </TooltipTrigger>
+ <TooltipContent side="top" className="tooltip-compact">
+ This model can process image inputs
+ </TooltipContent>
+ </Tooltip>
+ );
+}
+
+/** Parameter count chip ("27B"). */
+function ParamChip({ label }: { label: string }) {
+ return (
+ <span className="whitespace-nowrap rounded-md border border-border/60 px-1.5 py-px text-ui-10 font-medium text-muted-foreground tabular-nums">
+ {label}
+ </span>
+ );
+}
+
+// Format colours: gguf blue, mlx amber, safetensors/checkpoint pink, adapter.
+const FORMAT_TONE_DOT: Record<FormatTone, string> = {
+ gguf: "bg-format-gguf",
+ mlx: "bg-format-mlx",
+ checkpoint: "bg-format-checkpoint",
+ adapter: "bg-format-adapter",
+};
+
+/** Format as a coloured dot ahead of the name, named on hover. A word like
+ * "Safetensors" is wide enough to shove the rest of the row around. */
+function FormatTag({ tone, label }: { tone: FormatTone; label: string }) {
+ return (
+ <Tooltip delayDuration={0}>
+ <TooltipTrigger asChild={true}>
+ {/* Hit area, so hovering the dot is not a pixel hunt. */}
+ <span
+ aria-label={label}
+ className="flex size-[14px] shrink-0 items-center justify-center"
+ >
+ <span
+ aria-hidden="true"
+ className={cn("size-[5px] rounded-full", FORMAT_TONE_DOT[tone])}
+ />
+ </span>
+ </TooltipTrigger>
+ <TooltipContent side="top" className="tooltip-compact">
+ {label}
+ </TooltipContent>
+ </Tooltip>
+ );
+}
+
+/** "Already on disk", shown on Hub rows that are also downloaded. */
+function DownloadedBadge() {
+ return (
+ <span
+ title="Already downloaded"
+ aria-label="Already downloaded"
+ className="flex h-[18px] shrink-0 items-center justify-center rounded-md border border-status-success/40 px-1.5 text-status-success"
+ >
+ <HugeiconsIcon
+ icon={Download01Icon}
+ className="size-3"
+ strokeWidth={1.8}
+ />
+ </span>
+ );
+}
+
+/** VRAM verdict for Hub rows: over budget, or a tight fit. */
+function VramBadge({ status }: { status?: VramFitStatus | null }) {
+ if (status === "exceeds") {
+ return (
+ <span className="whitespace-nowrap text-ui-9 font-medium !text-red-700 !bg-red-50 dark:!text-red-300 dark:!bg-red-500/15 px-1.5 py-0.5 rounded">
+ OOM
+ </span>
+ );
+ }
+ if (status === "tight") {
+ return (
+ <span className="whitespace-nowrap text-ui-9 font-medium !text-amber-400">
+ TIGHT
+ </span>
+ );
+ }
+ return null;
+}
+
+const SIZE_PARTS_RE = /^(~?)([\d.]+)\s*([A-Za-z]+)$/;
+
+/** A size in mono: the dot pulled in, a hair of air before the unit. */
+function SizeText({ value }: { value: string }) {
+ const parts = SIZE_PARTS_RE.exec(value);
+ if (!parts) {
+ return <>{value}</>;
+ }
+ const [, approx, digits, unit] = parts;
+ const [whole, fraction] = digits.split(".");
+ return (
+ <>
+ {approx}
+ {whole}
+ {fraction === undefined ? null : (
+ <>
+ <span className="mx-[-0.1em]">.</span>
+ {fraction}
+ </>
+ )}
+ <span className="ml-[0.14em]">{unit}</span>
+ </>
+ );
+}
+
+/** The one quant a row loads, as a compact mono chip. */
+function QuantChip({ label }: { label: string }) {
+ return (
+ <span className="inline-flex h-[18px] max-w-full items-center overflow-hidden rounded-md bg-black/[0.06] px-1 font-mono text-ui-9 text-muted-foreground dark:bg-white/[0.1]">
+ {label}
+ </span>
+ );
+}
+
function isRuntimeLoadedModel(
loadedModelId: string | undefined,
activeGgufVariant: string | null | undefined,
@@ -427,6 +563,33 @@ function isRuntimeLoadedModel(
: !hasActiveGgufVariant;
}
+// Shared row columns, so the meta lines up down the list instead of drifting
+// with each name's length. Widths are em of the slot's own text, so they
+// follow the UI font scale, and collapse below the picker's full width.
+// min-w-min means a width is the column held open, not a clamp: an outsized
+// badge grows its own slot rather than spilling over the next one.
+const META_COLUMN = {
+ // Fits "UD-Q4_K_XL"; a hard cap, so longer quants clip.
+ quant: "min-[560px]:w-[7.2em]",
+ // One capability / vision / downloaded badge.
+ badge: "min-w-min min-[560px]:w-[24px]",
+ // The "OOM" pill, wider than bare "TIGHT" (Hub rows).
+ vram: "min-w-min min-[560px]:w-[4em]",
+ // "235B" on device rows; Hub rows report "2779.5B", hence paramWide.
+ param: "min-w-min min-[560px]:w-[3.6em]",
+ paramWide: "min-w-min min-[560px]:w-[5.2em]",
+ // "536 MB".
+ size: "min-w-min min-[560px]:w-[4.2em]",
+ // The format dot that leads the row; the name lives in its tooltip.
+ format: "min-[560px]:w-[14px]",
+} as const;
+
+// One gutter for every row, gear or no gear, so the columns never shift by a
+// button. The buttons show on the hovered row, or while their menu is open;
+// the gutter stays open so nothing moves as they appear.
+const ROW_ACTIONS_CLASS =
+ "mr-0.5 flex w-[38px] shrink-0 items-center justify-end -space-x-0.5 opacity-0 transition-opacity focus-within:opacity-100 group-hover:opacity-100 group-focus-within:opacity-100 has-[[data-state=open]]:opacity-100 [@media(hover:none)]:opacity-100";
+
function ModelRow({
label,
meta,
@@ -445,6 +608,8 @@ function ModelRow({
downloaded,
showVision,
quantChip,
+ alignMeta,
+ showSize,
className,
}: {
label: string;
@@ -473,6 +638,12 @@ function ModelRow({
showVision?: boolean;
/** Grey chip beside the name, for rows that load one specific quant. */
quantChip?: string | null;
+ /** Column layout (see META_COLUMN): "device" reserves the quant chip,
+ * "hub" the download and VRAM badges those lists carry instead. */
+ alignMeta?: "device" | "hub";
+ /** Hold the size column open. Hub rows pass this on the MLX and Safetensors
+ * filters, where a repo is one download with one size. */
+ showSize?: boolean;
className?: string;
}) {
const exceeds = vramStatus === "exceeds";
@@ -488,12 +659,24 @@ function ModelRow({
: null;
const { owner, name } = splitRepoLabel(label);
+ // Drop our own owner: the list is nearly all unsloth/, so it is noise.
+ // Other owners still show, which is what tells the two apart.
+ const showOwner = !!owner && !hideOwner && !isUnslothOwner(owner);
const parsed = parseMetaTokens(meta);
// Param chip from meta, else derived from the name so GGUF rows show it too.
const paramLabel = parsed.param ?? extractParamLabel(name) ?? null;
// Use the passed-in capabilities (tag-aware) or infer from the repo name.
const caps = capabilities ?? detectCapabilities({ id: label });
const showCaps = hasAnyCapability(caps);
+ const aligned = alignMeta !== undefined;
+ // One dot per row. A second format shares the first's colour anyway, so it
+ // rides along in the tooltip instead of pushing the name out of line.
+ const formatDot = parsed.formats[0]
+ ? {
+ tone: parsed.formats[0].tone,
+ label: parsed.formats.map((f) => f.label).join(" · "),
+ }
+ : null;
const content = (
<button
@@ -514,93 +697,133 @@ function ModelRow({
)}
>
<span className="flex min-w-0 flex-1 items-baseline">
- {owner && !hideOwner ? (
+ {/* Fixed slot, so names start on one line with or without a dot. */}
+ {aligned ? (
+ <span
+ className={cn(
+ "mr-1 flex shrink-0 items-center self-center",
+ META_COLUMN.format,
+ )}
+ >
+ {formatDot ? <FormatTag {...formatDot} /> : null}
+ </span>
+ ) : formatDot ? (
+ <span className="mr-1 flex shrink-0 items-center self-center">
+ <FormatTag {...formatDot} />
+ </span>
+ ) : null}
+ {showOwner ? (
<span className="inline-flex min-w-0 max-w-[45%] shrink items-baseline text-ui-13 text-muted-foreground/90">
<span className="truncate">{owner}</span>
<span className="shrink-0 text-muted-foreground/45">/</span>
</span>
) : null}
<span className="min-w-0 flex-1 truncate">{name}</span>
- {quantChip ? (
- <span className="ml-2 shrink-0 rounded-md bg-black/[0.06] px-1.5 py-px font-mono text-ui-10 text-muted-foreground dark:bg-white/[0.1]">
- {quantChip}
- </span>
- ) : null}
- </span>
- <span className="ml-auto flex shrink-0 items-center gap-1.5">
- {showCaps && <CapabilityIcons caps={caps} />}
- {showVision && (
- <Tooltip delayDuration={0}>
- <TooltipTrigger asChild={true}>
- <span
- aria-label="Vision"
- className="flex h-[18px] shrink-0 items-center justify-center rounded-md border border-border/60 px-1.5 text-indigo-700 dark:text-indigo-300"
- >
- <HugeiconsIcon
- icon={ViewIcon}
- className="size-3"
- strokeWidth={1.8}
- />
- </span>
- </TooltipTrigger>
- <TooltipContent side="top" className="tooltip-compact">
- This model can process image inputs
- </TooltipContent>
- </Tooltip>
- )}
- {loaded && (
+ {/* Here it eats name width instead of moving the meta columns. */}
+ {aligned && loaded && (
<DotTag
tone="success"
label="Loaded"
- className="h-[18px] gap-1 rounded-md px-1.5"
+ className="ml-2 h-[18px] shrink-0 gap-1 rounded-md px-1.5"
dotClassName="size-[5px]"
/>
)}
- {downloaded && !loaded && (
+ {alignMeta === "device" ? (
<span
- title="Already downloaded"
- aria-label="Already downloaded"
- className="flex h-[18px] shrink-0 items-center justify-center rounded-md border border-border/60 px-1.5 text-muted-foreground"
+ className={cn(
+ "ml-1.5 flex shrink-0 items-center self-center text-ui-9",
+ META_COLUMN.quant,
+ )}
>
- <HugeiconsIcon
- icon={Download01Icon}
- className="size-3"
- strokeWidth={1.8}
- />
+ {quantChip ? <QuantChip label={quantChip} /> : null}
+ </span>
+ ) : quantChip ? (
+ <span className="ml-2 shrink-0 rounded-md bg-black/[0.06] px-1.5 py-px font-mono text-ui-10 text-muted-foreground dark:bg-white/[0.1]">
+ {quantChip}
</span>
+ ) : null}
+ </span>
+ <span
+ className={cn(
+ "ml-auto flex shrink-0 items-center",
+ aligned ? "gap-1" : "gap-1.5",
)}
- {vramStatus === "exceeds" && (
- <span className="text-ui-9 font-medium !text-red-700 !bg-red-50 dark:!text-red-300 dark:!bg-red-500/15 px-1.5 py-0.5 rounded">
- OOM
+ >
+ {/* Capabilities, vision and the Hub lists' "on disk" mark share one
+ column; two of them widen the slot rather than overlap. */}
+ {aligned ? (
+ <span
+ className={cn(
+ "flex shrink-0 items-center justify-center gap-1 text-ui-10",
+ META_COLUMN.badge,
+ )}
+ >
+ {showCaps && <CapabilityIcons caps={caps} />}
+ {showVision && <VisionBadge />}
+ {downloaded && !loaded ? <DownloadedBadge /> : null}
</span>
+ ) : (
+ <>
+ {showCaps && <CapabilityIcons caps={caps} />}
+ {showVision && <VisionBadge />}
+ {loaded && (
+ <DotTag
+ tone="success"
+ label="Loaded"
+ className="h-[18px] gap-1 rounded-md px-1.5"
+ dotClassName="size-[5px]"
+ />
+ )}
+ {downloaded && !loaded ? <DownloadedBadge /> : null}
+ </>
)}
- {vramStatus === "tight" && (
- <span className="text-ui-9 font-medium !text-amber-400">TIGHT</span>
+ {alignMeta === "hub" ? (
+ <span
+ className={cn(
+ "flex shrink-0 items-center justify-end text-ui-9",
+ META_COLUMN.vram,
+ )}
+ >
+ <VramBadge status={vramStatus} />
+ </span>
+ ) : (
+ <VramBadge status={vramStatus} />
)}
- {paramLabel ? (
- <span className="rounded-md border border-border/60 px-1.5 py-px text-ui-10 font-medium text-muted-foreground tabular-nums">
- {paramLabel}
+ {aligned ? (
+ <span
+ className={cn(
+ "flex shrink-0 justify-end text-ui-10",
+ alignMeta === "hub" ? META_COLUMN.paramWide : META_COLUMN.param,
+ )}
+ >
+ {paramLabel ? <ParamChip label={paramLabel} /> : null}
</span>
+ ) : paramLabel ? (
+ <ParamChip label={paramLabel} />
) : null}
{parsed.texts.map((text) => (
<span key={text} className="text-ui-10 text-muted-foreground">
{text}
</span>
))}
- {parsed.size !== undefined ? (
- <span className="text-ui-10 text-muted-foreground tabular-nums">
- {parsed.size}
+ {/* GGUF repos hold several quants of different sizes, so their rows
+ report one only once expanded, leaving the column an empty gap. */}
+ {alignMeta === "device" || showSize ? (
+ <span
+ className={cn(
+ "shrink-0 whitespace-nowrap text-right font-mono text-ui-10 text-muted-foreground tabular-nums",
+ META_COLUMN.size,
+ )}
+ >
+ {parsed.size === undefined ? null : (
+ <SizeText value={parsed.size} />
+ )}
+ </span>
+ ) : aligned ? null : parsed.size !== undefined ? (
+ <span className="font-mono text-ui-10 text-muted-foreground tabular-nums">
+ <SizeText value={parsed.size} />
</span>
) : null}
- {parsed.formats.map((f) => (
- <DotTag
- key={f.label}
- tone={f.tone}
- label={f.label}
- className="h-[18px] gap-[3px] rounded-md px-1.5"
- dotClassName="size-[5px]"
- />
- ))}
</span>
</button>
);
@@ -613,22 +836,36 @@ function ModelRow({
</span>
) : null;
+ // The dot names its format on hover only, which keyboard focus never
+ // reaches, so the row tooltip carries it too.
+ const formatLine = formatDot ? (
+ <span className="block text-ui-10 mt-1">{formatDot.label}</span>
+ ) : null;
+
const tooltipBody = vramTooltipText ? (
<>
{label}
<span className="block text-ui-10 mt-1">{vramTooltipText}</span>
+ {formatLine}
{hubUrlLine}
</>
) : tooltipText ? (
<>
{tooltipText}
+ {formatLine}
{hubUrlLine}
</>
) : hubUrl ? (
<>
<span className="block break-words">{label}</span>
+ {formatLine}
{hubUrlLine}
</>
+ ) : formatLine ? (
+ <>
+ <span className="block break-words">{label}</span>
+ {formatLine}
+ </>
) : null;
if (tooltipBody) {
@@ -1189,8 +1426,8 @@ function GgufVariantExpander({
TIGHT
</span>
)}
- <span className="text-ui-10 text-muted-foreground">
- {formatBytes(v.size_bytes)}
+ <span className="font-mono text-ui-10 text-muted-foreground tabular-nums">
+ <SizeText value={formatBytes(v.size_bytes)} />
</span>
</span>
</button>
@@ -1996,6 +2233,9 @@ export function HubModelPicker({
const [customSort, setCustomSort] = useState<LocalSortKey>("recent");
// Format filter toggle for the Unsloth listing.
const [formatFilter, setFormatFilter] = useState<FormatFilter>("all");
+ // MLX and Safetensors repos are one download, so a row can name its size.
+ const hubRowsShowSize =
+ formatFilter === "mlx" || formatFilter === "safetensors";
// Recommended suggests GGUF anywhere; on Mac also MLX and safetensors. The
// "recommended" sort also drops models too big for the device. Already-
@@ -2936,7 +3176,6 @@ export function HubModelPicker({
"pinned-quant",
pinKey(entry.repoId, entry.quant),
);
- const { owner, name } = splitRepoLabel(entry.repoId);
const isSelected =
value === entry.repoId && activeGgufVariant === entry.quant;
const isLoaded =
@@ -2945,45 +3184,31 @@ export function HubModelPicker({
ggufVariantsMatchForPicker(activeGgufVariant, entry.quant);
return (
<div key={optionKey} className={downloadedRowShellClassName(isSelected)}>
- <button
- type="button"
- {...hubModelList.getOptionProps(optionKey, isSelected)}
- onClick={() =>
- onSelect(entry.repoId, {
- source: "hub",
- isLora: false,
- ggufVariant: entry.quant,
- isDownloaded: true,
- })
- }
- className={cn(
- "flex min-w-0 flex-1 items-center gap-2 rounded-full px-2 py-1.5 text-left text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/45",
- downloadedRowButtonClassName,
- )}
- title={`${entry.repoId} (${entry.quant})`}
- >
- <span className="flex min-w-0 items-baseline">
- {owner ? (
- <span className="inline-flex min-w-0 max-w-[45%] shrink items-baseline text-ui-13 text-muted-foreground/90">
- <span className="truncate">{owner}</span>
- <span className="shrink-0 text-muted-foreground/45">/</span>
- </span>
- ) : null}
- <span className="min-w-0 truncate">{name}</span>
- </span>
- <span className="shrink-0 rounded-md bg-black/[0.06] px-1.5 py-px font-mono text-ui-10 text-muted-foreground dark:bg-white/[0.1]">
- {entry.quant}
- </span>
- {isLoaded && (
- <DotTag
- tone="success"
- label="Loaded"
- className="ml-auto h-[18px] shrink-0 gap-1 rounded-md px-1.5"
- dotClassName="size-[5px]"
- />
- )}
- </button>
- <span className="mr-1 flex shrink-0 items-center opacity-0 transition-opacity focus-within:opacity-100 group-hover:opacity-100 group-focus-within:opacity-100">
+ {/* Through ModelRow, so a pinned quant lands in the same columns as
+ the rows below it. */}
+ <div className="min-w-0 flex-1">
+ <ModelRow
+ label={entry.repoId}
+ tooltipText={`${entry.repoId} (${entry.quant})`}
+ meta="GGUF"
+ quantChip={entry.quant}
+ alignMeta="device"
+ selected={isSelected}
+ loaded={isLoaded}
+ optionProps={hubModelList.getOptionProps(optionKey, isSelected)}
+ onClick={() =>
+ onSelect(entry.repoId, {
+ source: "hub",
+ isLora: false,
+ ggufVariant: entry.quant,
+ isDownloaded: true,
+ })
+ }
+ vramStatus={null}
+ className={downloadedRowButtonClassName}
+ />
+ </div>
+ <span className={ROW_ACTIONS_CLASS}>
{onConfigure && (
<ModelLoadSettingsAction
ariaLabel={`Inference settings for ${entry.repoId} ${entry.quant}`}
@@ -3000,7 +3225,6 @@ export function HubModelPicker({
)}
<ModelRowMenu
ariaLabel={`More options for ${entry.repoId} ${entry.quant}`}
- iconClassName="size-3"
cachePath={{ repoId: entry.repoId, variant: entry.quant }}
pin={{
pinned: true,
@@ -3078,55 +3302,57 @@ export function HubModelPicker({
showVision={c.has_vision || sole.hasVision}
selected={isSelected}
loaded={rowState.loaded}
+ alignMeta="device"
optionProps={hubModelList.getOptionProps(optionKey, isSelected)}
onClick={() => onSelect(c.repo_id, selectMeta)}
vramStatus={null}
className={downloadedRowButtonClassName}
/>
</div>
- {onConfigure && (
- <ModelLoadSettingsAction
- ariaLabel={`Inference settings for ${c.repo_id} ${variant.quant}`}
- onConfigure={() => onConfigure(c.repo_id, selectMeta)}
+ <span className={ROW_ACTIONS_CLASS}>
+ {onConfigure && (
+ <ModelLoadSettingsAction
+ ariaLabel={`Inference settings for ${c.repo_id} ${variant.quant}`}
+ onConfigure={() => onConfigure(c.repo_id, selectMeta)}
+ />
+ )}
+ <ModelRowMenu
+ ariaLabel={`More options for ${c.repo_id} ${variant.quant}`}
+ cachePath={{ repoId: c.repo_id, variant: variant.quant }}
+ pin={{
+ pinned: isPinned,
+ pinLabel: "Pin to top",
+ unpinLabel: "Unpin",
+ onToggle: () => togglePinned(c.repo_id, variant.quant),
+ }}
+ del={{
+ title: "Delete cached model?",
+ description: (
+ <>
+ This will remove{" "}
+ <span className="font-medium text-foreground">
+ {c.repo_id} ({variant.quant})
+ </span>{" "}
+ from disk. You can re-download it later.
+ </>
+ ),
+ successMessage: `Deleted ${c.repo_id} ${variant.quant}`,
+ disabled: deleteDisabled,
+ onConfirm: async () => {
+ await deleteCachedModel(
+ c.repo_id,
+ variant.quant,
+ hfToken || undefined,
+ c.cache_path || undefined,
+ );
+ // The file is gone, so drop its pin too.
+ if (isPinned) togglePinned(c.repo_id, variant.quant);
+ prunePinnedQuantValidation(c.repo_id, variant.quant);
+ refreshCachedLists();
+ },
+ }}
/>
- )}
- <ModelRowMenu
- ariaLabel={`More options for ${c.repo_id} ${variant.quant}`}
- buttonClassName="mr-1"
- cachePath={{ repoId: c.repo_id, variant: variant.quant }}
- pin={{
- pinned: isPinned,
- pinLabel: "Pin to top",
- unpinLabel: "Unpin",
- onToggle: () => togglePinned(c.repo_id, variant.quant),
- }}
- del={{
- title: "Delete cached model?",
- description: (
- <>
- This will remove{" "}
- <span className="font-medium text-foreground">
- {c.repo_id} ({variant.quant})
- </span>{" "}
- from disk. You can re-download it later.
- </>
- ),
- successMessage: `Deleted ${c.repo_id} ${variant.quant}`,
- disabled: deleteDisabled,
- onConfirm: async () => {
- await deleteCachedModel(
- c.repo_id,
- variant.quant,
- hfToken || undefined,
- c.cache_path || undefined,
- );
- // The file is gone, so drop its pin too.
- if (isPinned) togglePinned(c.repo_id, variant.quant);
- prunePinnedQuantValidation(c.repo_id, variant.quant);
- refreshCachedLists();
- },
- }}
- />
+ </span>
</div>
);
};
@@ -3153,6 +3379,7 @@ export function HubModelPicker({
tooltipText={localPathTooltip(c.repo_id, c.cache_path)}
meta="GGUF"
showVision={c.has_vision ?? visionByRepo[c.repo_id]}
+ alignMeta="device"
selected={isSelected}
loaded={isRuntimeLoadedModel(
loadedModelId,
@@ -3172,7 +3399,7 @@ export function HubModelPicker({
/>
</div>
{/* Stands in for the other rows' buttons, so the tags line up. */}
- <span aria-hidden="true" className="mr-1 h-6 w-[42px] shrink-0" />
+ <span aria-hidden="true" className={cn(ROW_ACTIONS_CLASS, "h-6")} />
</div>
{expanderOpen && (
<GgufVariantExpander
@@ -3226,6 +3453,7 @@ export function HubModelPicker({
c.size_bytes,
)}`}
selected={isSelected}
+ alignMeta="device"
loaded={isRuntimeLoadedModel(
loadedModelId,
activeGgufVariant,
@@ -3245,55 +3473,58 @@ export function HubModelPicker({
className={downloadedRowButtonClassName}
/>
</div>
- {onConfigure && (
- <ModelLoadSettingsAction
- ariaLabel={`Inference settings for ${c.repo_id}`}
- onConfigure={() =>
- onConfigure(c.repo_id, {
- source: "hub",
- isLora: false,
- loadId: c.load_id,
- isDownloaded: true,
- isGguf: false,
- })
- }
- />
- )}
- <ModelRowMenu
- ariaLabel={`More options for ${c.repo_id}`}
- buttonClassName="mr-1"
- cachePath={{ repoId: c.repo_id }}
- pin={{
- pinned: pinnedSet.has(pinKey(c.repo_id)),
- pinLabel: "Pin to top",
- unpinLabel: "Unpin",
- onToggle: () => togglePinned(c.repo_id),
- }}
- del={{
- title: "Delete cached model?",
- description: (
- <>
- This will remove{" "}
- <span className="font-medium text-foreground">{c.repo_id}</span>{" "}
- from disk. You can re-download it later.
- </>
- ),
- successMessage: `Deleted ${c.repo_id}`,
- disabled: deleteDisabled,
- onConfirm: async () => {
- await deleteCachedModel(
- c.repo_id,
- undefined,
- hfToken || undefined,
- c.cache_path || undefined,
- );
- if (pinnedSet.has(pinKey(c.repo_id))) {
- togglePinned(c.repo_id);
+ <span className={ROW_ACTIONS_CLASS}>
+ {onConfigure && (
+ <ModelLoadSettingsAction
+ ariaLabel={`Inference settings for ${c.repo_id}`}
+ onConfigure={() =>
+ onConfigure(c.repo_id, {
+ source: "hub",
+ isLora: false,
+ loadId: c.load_id,
+ isDownloaded: true,
+ isGguf: false,
+ })
}
- },
- onDeleted: refreshCachedLists,
- }}
- />
+ />
+ )}
+ <ModelRowMenu
+ ariaLabel={`More options for ${c.repo_id}`}
+ cachePath={{ repoId: c.repo_id }}
+ pin={{
+ pinned: pinnedSet.has(pinKey(c.repo_id)),
+ pinLabel: "Pin to top",
+ unpinLabel: "Unpin",
+ onToggle: () => togglePinned(c.repo_id),
+ }}
+ del={{
+ title: "Delete cached model?",
+ description: (
+ <>
+ This will remove{" "}
+ <span className="font-medium text-foreground">
+ {c.repo_id}
+ </span>{" "}
+ from disk. You can re-download it later.
+ </>
+ ),
+ successMessage: `Deleted ${c.repo_id}`,
+ disabled: deleteDisabled,
+ onConfirm: async () => {
+ await deleteCachedModel(
+ c.repo_id,
+ undefined,
+ hfToken || undefined,
+ c.cache_path || undefined,
+ );
+ if (pinnedSet.has(pinKey(c.repo_id))) {
+ togglePinned(c.repo_id);
+ }
+ },
+ onDeleted: refreshCachedLists,
+ }}
+ />
+ </span>
</div>
);
};
@@ -3408,7 +3639,9 @@ export function HubModelPicker({
) : (
connectedGroups.map((group) => (
<div key={group.providerId}>
- <div className="flex items-center gap-2 px-2.5 py-1.5 text-ui-10 font-semibold uppercase tracking-wider text-muted-foreground">
+ {/* Wider than the On Device section labels: nothing
+ divides these groups but the gap. */}
+ <div className="flex items-center gap-2 px-2.5 pb-1 pt-5 text-ui-10 font-semibold uppercase tracking-wider text-muted-foreground">
<ApiProviderLogo
providerType={group.providerType}
className="size-3.5"
@@ -3572,9 +3805,9 @@ export function HubModelPicker({
</>
}
>
- {/* When other providers (LM Studio/Ollama) also show here, name
- this group "Unsloth" so the two are easy to tell apart. */}
- {sortedLmStudio.length > 0 ? "Unsloth" : "Downloaded"}
+ {/* Rows drop the unsloth/ prefix; the heading carries
+ it for the group. */}
+ Unsloth
</ListLabel>
{!downloadedCollapsed &&
unslothCachedGguf.map(renderDownloadedGgufRow)}
@@ -3893,7 +4126,7 @@ export function HubModelPicker({
);
return (
<div key={m.id}>
- <div className="flex items-center gap-0.5">
+ <div className="group flex items-center">
<div className="min-w-0 flex-1">
<ModelRow
label={m.model_id ?? m.display_name}
@@ -3937,29 +4170,32 @@ export function HubModelPicker({
}
: undefined
}
+ alignMeta="device"
vramStatus={null}
/>
</div>
- {isDirectGguf && onConfigure && (
- <ModelLoadSettingsAction
- ariaLabel={`Inference settings for ${
- m.model_id ?? m.display_name
- }`}
- onConfigure={() =>
- onConfigure(m.id, localDirectGgufMeta())
- }
- />
- )}
- {!isGguf && onConfigure && (
- <ModelLoadSettingsAction
- ariaLabel={`Inference settings for ${
- m.model_id ?? m.display_name
- }`}
- onConfigure={() =>
- onConfigure(m.id, localModelMeta())
- }
- />
- )}
+ <span className={ROW_ACTIONS_CLASS}>
+ {isDirectGguf && onConfigure && (
+ <ModelLoadSettingsAction
+ ariaLabel={`Inference settings for ${
+ m.model_id ?? m.display_name
+ }`}
+ onConfigure={() =>
+ onConfigure(m.id, localDirectGgufMeta())
+ }
+ />
+ )}
+ {!isGguf && onConfigure && (
+ <ModelLoadSettingsAction
+ ariaLabel={`Inference settings for ${
+ m.model_id ?? m.display_name
+ }`}
+ onConfigure={() =>
+ onConfigure(m.id, localModelMeta())
+ }
+ />
+ )}
+ </span>
</div>
{isGguf &&
!isDirectGguf &&
@@ -4021,7 +4257,7 @@ export function HubModelPicker({
const optionKey = makeModelOptionKey("lm-studio", m.id);
return (
<div key={m.id}>
- <div className="flex items-center gap-0.5">
+ <div className="group flex items-center">
<div className="min-w-0 flex-1">
<ModelRow
label={m.model_id ?? m.display_name}
@@ -4065,29 +4301,32 @@ export function HubModelPicker({
}
: undefined
}
+ alignMeta="device"
vramStatus={null}
/>
</div>
- {isGgufFile && onConfigure && (
- <ModelLoadSettingsAction
- ariaLabel={`Inference settings for ${
- m.model_id ?? m.display_name
- }`}
- onConfigure={() =>
- onConfigure(m.id, localDirectGgufMeta())
- }
- />
- )}
- {!isGguf && onConfigure && (
- <ModelLoadSettingsAction
- ariaLabel={`Inference settings for ${
- m.model_id ?? m.display_name
- }`}
- onConfigure={() =>
- onConfigure(m.id, localModelMeta())
- }
- />
- )}
+ <span className={ROW_ACTIONS_CLASS}>
+ {isGgufFile && onConfigure && (
+ <ModelLoadSettingsAction
+ ariaLabel={`Inference settings for ${
+ m.model_id ?? m.display_name
+ }`}
+ onConfigure={() =>
+ onConfigure(m.id, localDirectGgufMeta())
+ }
+ />
+ )}
+ {!isGguf && onConfigure && (
+ <ModelLoadSettingsAction
+ ariaLabel={`Inference settings for ${
+ m.model_id ?? m.display_name
+ }`}
+ onConfigure={() =>
+ onConfigure(m.id, localModelMeta())
+ }
+ />
+ )}
+ </span>
</div>
{isGguf && !isGgufFile && isGgufExpanded(m.id) && (
<GgufVariantExpander
@@ -4141,7 +4380,7 @@ export function HubModelPicker({
const optionKey = makeModelOptionKey("local-dir", m.id);
return (
<div key={m.id}>
- <div className="flex items-center gap-0.5">
+ <div className="group flex items-center">
<div className="min-w-0 flex-1">
<ModelRow
label={m.model_id ?? m.display_name}
@@ -4181,29 +4420,32 @@ export function HubModelPicker({
? () => focusFirstChildOption(optionKey)
: undefined
}
+ alignMeta="device"
vramStatus={null}
/>
</div>
- {isGgufFile && onConfigure && (
- <ModelLoadSettingsAction
- ariaLabel={`Inference settings for ${
- m.model_id ?? m.display_name
- }`}
- onConfigure={() =>
- onConfigure(m.id, localDirectGgufMeta())
- }
- />
- )}
- {!isGguf && onConfigure && (
- <ModelLoadSettingsAction
- ariaLabel={`Inference settings for ${
- m.model_id ?? m.display_name
- }`}
- onConfigure={() =>
- onConfigure(m.id, localModelMeta())
- }
- />
- )}
+ <span className={ROW_ACTIONS_CLASS}>
+ {isGgufFile && onConfigure && (
+ <ModelLoadSettingsAction
+ ariaLabel={`Inference settings for ${
+ m.model_id ?? m.display_name
+ }`}
+ onConfigure={() =>
+ onConfigure(m.id, localDirectGgufMeta())
+ }
+ />
+ )}
+ {!isGguf && onConfigure && (
+ <ModelLoadSettingsAction
+ ariaLabel={`Inference settings for ${
+ m.model_id ?? m.display_name
+ }`}
+ onConfigure={() =>
+ onConfigure(m.id, localModelMeta())
+ }
+ />
+ )}
+ </span>
</div>
{isGguf && !isGgufFile && isGgufExpanded(m.id) && (
<GgufVariantExpander
@@ -4260,6 +4502,8 @@ export function HubModelPicker({
<ModelRow
label={id}
hubUrl={hubRepoUrl(id)}
+ alignMeta="hub"
+ showSize={hubRowsShowSize}
hideOwner={true}
downloaded={downloadedSet.has(id.toLowerCase())}
capabilities={capsById.get(id)}
@@ -4369,6 +4613,8 @@ export function HubModelPicker({
<ModelRow
label={id}
hubUrl={hubRepoUrl(id)}
+ alignMeta="hub"
+ showSize={hubRowsShowSize}
capabilities={capsById.get(id)}
meta={
isKnownGgufRepo(id)
@@ -4481,6 +4727,8 @@ export function HubModelPicker({
<ModelRow
label={id}
hubUrl={hubRepoUrl(id)}
+ alignMeta="hub"
+ showSize={hubRowsShowSize}
capabilities={capsById.get(id)}
meta={
isSearchGguf
@@ -4690,7 +4938,7 @@ function FineTunedRows({
: tag;
return (
<div key={adapter.id}>
- <div className="flex items-center gap-0.5">
+ <div className="group flex items-center">
<div className="min-w-0 flex-1">
<ModelRow
label={adapter.name}
@@ -4731,39 +4979,42 @@ function FineTunedRows({
}
: undefined
}
+ alignMeta="device"
/>
</div>
- {canConfigure && onConfigure && (
- <ModelLoadSettingsAction
- ariaLabel={`Inference settings for ${adapter.name}`}
- onConfigure={() => onConfigure(adapter.id, selectionMeta)}
- />
- )}
- {canDelete && (
- <ModelDeleteAction
- ariaLabel={`Delete ${adapter.name}`}
- title="Delete fine-tuned model?"
- description={
- <>
- This will remove{" "}
- <span className="font-medium text-foreground">
- {adapter.name}
- </span>{" "}
- from disk. This cannot be undone.
- </>
- }
- successMessage={`Deleted ${adapter.name}`}
- disabled={deleteDisabled}
- onConfirm={() =>
- deleteFineTunedModel({
- modelPath: adapter.id,
- source: isExported ? "exported" : "training",
- exportType: adapter.exportType,
- })
- }
- onDeleted={() => onModelsChange?.({ id: adapter.id })}
- />
- )}
+ <span className={ROW_ACTIONS_CLASS}>
+ {canConfigure && onConfigure && (
+ <ModelLoadSettingsAction
+ ariaLabel={`Inference settings for ${adapter.name}`}
+ onConfigure={() => onConfigure(adapter.id, selectionMeta)}
+ />
+ )}
+ {canDelete && (
+ <ModelDeleteAction
+ ariaLabel={`Delete ${adapter.name}`}
+ title="Delete fine-tuned model?"
+ description={
+ <>
+ This will remove{" "}
+ <span className="font-medium text-foreground">
+ {adapter.name}
+ </span>{" "}
+ from disk. This cannot be undone.
+ </>
+ }
+ successMessage={`Deleted ${adapter.name}`}
+ disabled={deleteDisabled}
+ onConfirm={() =>
+ deleteFineTunedModel({
+ modelPath: adapter.id,
+ source: isExported ? "exported" : "training",
+ exportType: adapter.exportType,
+ })
+ }
+ onDeleted={() => onModelsChange?.({ id: adapter.id })}
+ />
+ )}
+ </span>
</div>
{expandedGguf === adapter.id && (
<GgufVariantExpander
diff --git a/studio/frontend/src/features/model-picker/components/model-selector/row-meta.ts b/studio/frontend/src/features/model-picker/components/model-selector/row-meta.ts
index 15a93285cb8..9e65dca6dc1 100644
--- a/studio/frontend/src/features/model-picker/components/model-selector/row-meta.ts
+++ b/studio/frontend/src/features/model-picker/components/model-selector/row-meta.ts
@@ -33,6 +33,12 @@ export function splitRepoLabel(label: string): {
return { owner: label.slice(0, slash), name: label.slice(slash + 1) };
}
+/** Our own repos. Rows drop the "unsloth/" prefix, since nearly every model
+ * listed is ours; the full repo id stays in the row tooltip. */
+export function isUnslothOwner(owner: string | null | undefined): boolean {
+ return owner?.toLowerCase() === "unsloth";
+}
+
export type MetaToken =
| { kind: "format"; label: string; tone: FormatTone }
| { kind: "size"; label: string }
diff --git a/studio/frontend/tests/model-row-owner.test.ts b/studio/frontend/tests/model-row-owner.test.ts
new file mode 100644
index 00000000000..ba6c26e0b6a
--- /dev/null
+++ b/studio/frontend/tests/model-row-owner.test.ts
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
+
+// Rows drop the "unsloth/" prefix but keep every other owner, which is what
+// tells the two apart.
+
+import assert from "node:assert/strict";
+import test from "node:test";
+import {
+ isUnslothOwner,
+ splitRepoLabel,
+} from "../src/features/model-picker/components/model-selector/row-meta.ts";
+
+test("unsloth is the owner whose prefix rows hide", () => {
+ assert.equal(
+ isUnslothOwner(splitRepoLabel("unsloth/gemma-4-26b").owner),
+ true,
+ );
+ // Case as the Hub listing returns it.
+ assert.equal(isUnslothOwner("Unsloth"), true);
+});
+
+test("other owners keep their prefix", () => {
+ assert.equal(isUnslothOwner(splitRepoLabel("Qwen/Qwen3-8B").owner), false);
+ assert.equal(isUnslothOwner("unsloth-community"), false);
+ // A bare model name has no owner to hide.
+ assert.equal(isUnslothOwner(splitRepoLabel("gemma-4-26b").owner), false);
+});