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.

Studio: add an opt-in Settings switch to hide models that do not fit (#13814)

Daniel Hanffa8fc3b9e85
diff --git a/studio/frontend/scripts/check-bundle-budget.ts b/studio/frontend/scripts/check-bundle-budget.ts
index 6e839c40715..05cbdc581bf 100644
--- a/studio/frontend/scripts/check-bundle-budget.ts
+++ b/studio/frontend/scripts/check-bundle-budget.ts
@@ -130,8 +130,11 @@ export const BUDGET = {
// Word list numbering through the default style and basedOn (#13755) adds 228 B raw / 39 B transfer to the
// eager attachment reader (6,770,962 -> 6,771,190 B raw, 2,035,676 -> 2,035,715 B transfer against 7ae1a5386,
// one machine and build, Node 24, chunk count unchanged at 95). Raised by that growth.
- transferBytes: 2_035_744,
- rawBytes: 6_771_261,
+ // The "Only show models that fit" Settings row adds 289 B raw / 77 B transfer (6,771,372 -> 6,771,661 B raw,
+ // 2,035,798 -> 2,035,875 B transfer against 52a3fbefe, 95 chunks, identical under Node 22.22.2 and 24). Main
+ // already measured 111 B raw / 54 B transfer over the previous limits, so they are set to the measured build.
+ transferBytes: 2_035_875,
+ rawBytes: 6_771_661,
};
// The chunk count is reported but not budgeted. Splitting a page out of the entry raises it while lowering the
diff --git a/studio/frontend/src/features/settings/settings-search.ts b/studio/frontend/src/features/settings/settings-search.ts
index c2899553d0f..667824637ee 100644
--- a/studio/frontend/src/features/settings/settings-search.ts
+++ b/studio/frontend/src/features/settings/settings-search.ts
@@ -122,6 +122,7 @@ export const SETTINGS_SEARCH_INDEX: Record<SettingsTab, TranslationKey[]> = {
"settings.chat.library.label",
"settings.chat.groups.display.title",
"settings.chat.modelSelection.title",
+ "settings.chat.modelSelection.fitOnDeviceOnly",
"settings.chat.currentDate.label",
"settings.general.autoTitleNewChats",
"settings.chat.projectAttachments",
diff --git a/studio/frontend/src/features/settings/tabs/chat-tab.tsx b/studio/frontend/src/features/settings/tabs/chat-tab.tsx
index 7f1161f4bbf..4187b5c8130 100644
--- a/studio/frontend/src/features/settings/tabs/chat-tab.tsx
+++ b/studio/frontend/src/features/settings/tabs/chat-tab.tsx
@@ -328,6 +328,10 @@ export function ChatTab() {
const setShowMemoryBar = useChatRuntimeStore(
(state) => state.setShowMemoryBar,
);
+ const fitOnDeviceOnly = useChatRuntimeStore((state) => state.fitOnDeviceOnly);
+ const setFitOnDeviceOnly = useChatRuntimeStore(
+ (state) => state.setFitOnDeviceOnly,
+ );
const showModelDisclaimer = useChatPreferencesStore(
(state) => state.showModelDisclaimer,
);
@@ -808,6 +812,18 @@ export function ChatTab() {
onCheckedChange={setShowAllQuantizations}
/>
</SettingsRow>
+ <SettingsRow
+ label={t("settings.chat.modelSelection.fitOnDeviceOnly")}
+ description={t(
+ "settings.chat.modelSelection.fitOnDeviceOnlyDescription",
+ )}
+ >
+ <Switch
+ aria-label={t("settings.chat.modelSelection.fitOnDeviceOnly")}
+ checked={fitOnDeviceOnly}
+ onCheckedChange={setFitOnDeviceOnly}
+ />
+ </SettingsRow>
</SettingsSection>
diff --git a/studio/frontend/src/i18n/locales/ar.ts b/studio/frontend/src/i18n/locales/ar.ts
index 987aebaa277..0cbc4b97c95 100644
--- a/studio/frontend/src/i18n/locales/ar.ts
+++ b/studio/frontend/src/i18n/locales/ar.ts
@@ -2593,6 +2593,9 @@ export const ar = {
showMemoryBar: "إظهار شريط استخدام VRAM",
showMemoryBarDescription:
"يعرض أسفل صف كل نموذج تم تنزيله الاستخدام التقديري لذاكرة VRAM: الأوزان، وذاكرة KV المؤقتة عند طول السياق الذي سيُحمَّل به، وأي حجز لمسودة فك التشفير التخميني.",
+ fitOnDeviceOnly: "إظهار النماذج المناسبة فقط",
+ fitOnDeviceOnlyDescription:
+ "إخفاء النماذج الأكبر من ذاكرة GPU وذاكرة RAM في هذا الجهاز في منتقي النماذج وفي Hub. تبقى النماذج المُنزَّلة ظاهرة.",
},
menu: {
title: "قائمة المحادثة",
diff --git a/studio/frontend/src/i18n/locales/de.ts b/studio/frontend/src/i18n/locales/de.ts
index fbc62e00c70..b119ca12655 100644
--- a/studio/frontend/src/i18n/locales/de.ts
+++ b/studio/frontend/src/i18n/locales/de.ts
@@ -2633,6 +2633,9 @@ export const de = {
showMemoryBar: "VRAM-Auslastungsbalken anzeigen",
showMemoryBarDescription:
"Zeigt unter jeder Zeile eines heruntergeladenen Modells den geschätzten VRAM-Bedarf: Gewichte, KV-Cache bei der Kontextlänge, mit der das Modell geladen wird, und eine eventuelle Reserve für spekulatives Decoding.",
+ fitOnDeviceOnly: "Nur passende Modelle anzeigen",
+ fitOnDeviceOnlyDescription:
+ "Blendet in der Modellauswahl und im Hub Modelle aus, die für den GPU-Speicher und RAM dieses Geräts zu groß sind. Heruntergeladene Modelle bleiben sichtbar.",
},
menu: {
title: "Chatmenü",
diff --git a/studio/frontend/src/i18n/locales/en.ts b/studio/frontend/src/i18n/locales/en.ts
index 7bddb832a6b..7182fcfa6a5 100644
--- a/studio/frontend/src/i18n/locales/en.ts
+++ b/studio/frontend/src/i18n/locales/en.ts
@@ -2642,6 +2642,9 @@ export const en = {
showMemoryBar: "VRAM usage bar",
showMemoryBarDescription:
"Show estimated VRAM for model weights, context, and speculative decoding.",
+ fitOnDeviceOnly: "Only show models that fit",
+ fitOnDeviceOnlyDescription:
+ "Hide models too large for this device's GPU memory and RAM in the model picker and Hub. Downloaded models stay visible.",
},
menu: {
title: "Chat menu",
diff --git a/studio/frontend/src/i18n/locales/es.ts b/studio/frontend/src/i18n/locales/es.ts
index b97653a32aa..a458cc26e94 100644
--- a/studio/frontend/src/i18n/locales/es.ts
+++ b/studio/frontend/src/i18n/locales/es.ts
@@ -2624,6 +2624,9 @@ export const es = {
showMemoryBar: "Mostrar barra de uso de VRAM",
showMemoryBarDescription:
"Muestra debajo de la fila de cada modelo descargado su uso estimado de VRAM: pesos, caché KV con la longitud de contexto con la que se cargará y cualquier reserva de borrador especulativo.",
+ fitOnDeviceOnly: "Mostrar solo modelos que caben",
+ fitOnDeviceOnlyDescription:
+ "Oculta en el selector de modelos y en el Hub los modelos demasiado grandes para la memoria de GPU y la RAM de este dispositivo. Los modelos descargados siguen visibles.",
},
menu: {
title: "Menú del chat",
diff --git a/studio/frontend/src/i18n/locales/fr.ts b/studio/frontend/src/i18n/locales/fr.ts
index 9697bf5b119..bc7d0c18aaf 100644
--- a/studio/frontend/src/i18n/locales/fr.ts
+++ b/studio/frontend/src/i18n/locales/fr.ts
@@ -2630,6 +2630,9 @@ export const fr = {
showMemoryBar: "Afficher la barre d’utilisation de la VRAM",
showMemoryBarDescription:
"Affiche sous la ligne de chaque modèle téléchargé son utilisation estimée de la VRAM : poids, cache KV à la longueur de contexte avec laquelle il sera chargé, et toute réserve de brouillon spéculatif.",
+ fitOnDeviceOnly: "Afficher uniquement les modèles compatibles",
+ fitOnDeviceOnlyDescription:
+ "Masque dans le sélecteur de modèles et le Hub les modèles trop volumineux pour la mémoire GPU et la RAM de cet appareil. Les modèles téléchargés restent visibles.",
},
menu: {
title: "Menu du chat",
diff --git a/studio/frontend/src/i18n/locales/he.ts b/studio/frontend/src/i18n/locales/he.ts
index 48b144d5aeb..71a59fdaf0c 100644
--- a/studio/frontend/src/i18n/locales/he.ts
+++ b/studio/frontend/src/i18n/locales/he.ts
@@ -2707,6 +2707,9 @@ export const he = {
showMemoryBar: "הצג סרגל שימוש ב-VRAM",
showMemoryBarDescription:
"הצג את ה-VRAM המוערך עבור משקולות המודל, ההקשר ופענוח ספקולטיבי.",
+ fitOnDeviceOnly: "הצג רק מודלים שמתאימים",
+ fitOnDeviceOnlyDescription:
+ "הסתר בבורר המודלים וב-Hub מודלים גדולים מדי לזיכרון ה-GPU וה-RAM של מכשיר זה. מודלים שהורדו נשארים גלויים.",
},
menu: {
title: "תפריט צ'אט",
diff --git a/studio/frontend/src/i18n/locales/hi.ts b/studio/frontend/src/i18n/locales/hi.ts
index fcee5cb4195..9ebb326cd94 100644
--- a/studio/frontend/src/i18n/locales/hi.ts
+++ b/studio/frontend/src/i18n/locales/hi.ts
@@ -2602,6 +2602,9 @@ export const hi = {
showMemoryBar: "VRAM उपयोग बार दिखाएँ",
showMemoryBarDescription:
"हर डाउनलोड किए गए मॉडल की पंक्ति के नीचे उसका अनुमानित VRAM उपयोग दिखाएँ: वेट्स, जिस कॉन्टेक्स्ट लंबाई पर वह लोड होगा उस पर KV कैश, और स्पेकुलेटिव ड्राफ़्ट के लिए आरक्षित मेमोरी।",
+ fitOnDeviceOnly: "केवल फ़िट होने वाले मॉडल दिखाएँ",
+ fitOnDeviceOnlyDescription:
+ "मॉडल पिकर और Hub में उन मॉडलों को छिपाएँ जो इस डिवाइस की GPU मेमोरी और RAM के लिए बहुत बड़े हैं। डाउनलोड किए गए मॉडल दिखते रहेंगे।",
},
menu: {
title: "चैट मेन्यू",
diff --git a/studio/frontend/src/i18n/locales/it.ts b/studio/frontend/src/i18n/locales/it.ts
index 4cd80cba6b0..f5be5f92d6b 100644
--- a/studio/frontend/src/i18n/locales/it.ts
+++ b/studio/frontend/src/i18n/locales/it.ts
@@ -2538,6 +2538,9 @@ export const it = {
showMemoryBar: "Mostra la barra di utilizzo della VRAM",
showMemoryBarDescription:
"Mostra sotto la riga di ogni modello scaricato il consumo stimato di VRAM: pesi, cache KV alla lunghezza di contesto con cui verrà caricato ed eventuale riserva per il draft speculativo.",
+ fitOnDeviceOnly: "Mostra solo i modelli compatibili",
+ fitOnDeviceOnlyDescription:
+ "Nasconde nel selettore dei modelli e nell'Hub i modelli troppo grandi per la memoria GPU e la RAM di questo dispositivo. I modelli scaricati restano visibili.",
},
menu: {
title: "Menu della chat",
diff --git a/studio/frontend/src/i18n/locales/ja.ts b/studio/frontend/src/i18n/locales/ja.ts
index 5bab4ba05e0..373fa77193a 100644
--- a/studio/frontend/src/i18n/locales/ja.ts
+++ b/studio/frontend/src/i18n/locales/ja.ts
@@ -2576,6 +2576,9 @@ export const ja = {
showMemoryBar: "VRAM 使用量バーを表示",
showMemoryBarDescription:
"ダウンロード済みモデルの行の下に、推定 VRAM 使用量を表示します。内訳は重み、実際に読み込まれるコンテキスト長での KV キャッシュ、および投機的デコードの下書き用に確保される領域です。",
+ fitOnDeviceOnly: "収まるモデルのみ表示",
+ fitOnDeviceOnlyDescription:
+ "このデバイスの GPU メモリと RAM に収まらないモデルを、モデル選択と Hub で非表示にします。ダウンロード済みのモデルは引き続き表示されます。",
},
menu: {
title: "チャットメニュー",
diff --git a/studio/frontend/src/i18n/locales/ko.ts b/studio/frontend/src/i18n/locales/ko.ts
index 819e10666a0..f65253e0086 100644
--- a/studio/frontend/src/i18n/locales/ko.ts
+++ b/studio/frontend/src/i18n/locales/ko.ts
@@ -2584,6 +2584,9 @@ export const ko = {
showMemoryBar: "VRAM 사용량 막대 표시",
showMemoryBarDescription:
"다운로드한 모델의 행 아래에 예상 VRAM 사용량을 표시합니다. 가중치, 실제로 로드될 컨텍스트 길이 기준 KV 캐시, 그리고 추측 디코딩 초안용 예약 공간으로 나뉩니다.",
+ fitOnDeviceOnly: "맞는 모델만 표시",
+ fitOnDeviceOnlyDescription:
+ "이 기기의 GPU 메모리와 RAM보다 큰 모델을 모델 선택기와 Hub에서 숨깁니다. 다운로드한 모델은 계속 표시됩니다.",
},
menu: {
title: "채팅 메뉴",
diff --git a/studio/frontend/src/i18n/locales/pt-br.ts b/studio/frontend/src/i18n/locales/pt-br.ts
index 1e858a8bca8..e89617733e5 100644
--- a/studio/frontend/src/i18n/locales/pt-br.ts
+++ b/studio/frontend/src/i18n/locales/pt-br.ts
@@ -2611,6 +2611,9 @@ export const ptBR = {
showMemoryBar: "Mostrar barra de uso de VRAM",
showMemoryBarDescription:
"Mostra abaixo da linha de cada modelo baixado o uso estimado de VRAM: pesos, cache KV no comprimento de contexto com que será carregado e qualquer reserva de rascunho especulativo.",
+ fitOnDeviceOnly: "Mostrar apenas modelos que cabem",
+ fitOnDeviceOnlyDescription:
+ "Oculta no seletor de modelos e no Hub os modelos grandes demais para a memória da GPU e a RAM deste dispositivo. Os modelos baixados continuam visíveis.",
},
menu: {
title: "Menu do chat",
diff --git a/studio/frontend/src/i18n/locales/ru.ts b/studio/frontend/src/i18n/locales/ru.ts
index 007c0853320..75fa5b554b9 100644
--- a/studio/frontend/src/i18n/locales/ru.ts
+++ b/studio/frontend/src/i18n/locales/ru.ts
@@ -2608,6 +2608,9 @@ export const ru = {
showMemoryBar: "Показывать шкалу использования VRAM",
showMemoryBarDescription:
"Показывает под строкой каждой скачанной модели её ожидаемое потребление VRAM: веса, KV-кеш при той длине контекста, с которой модель будет загружена, и резерв для спекулятивного черновика.",
+ fitOnDeviceOnly: "Показывать только подходящие модели",
+ fitOnDeviceOnlyDescription:
+ "Скрывает в выборе моделей и в Hub модели, которые слишком велики для памяти GPU и RAM этого устройства. Скачанные модели остаются видимыми.",
},
menu: {
title: "Меню чата",
diff --git a/studio/frontend/src/i18n/locales/sv.ts b/studio/frontend/src/i18n/locales/sv.ts
index 03f628e1077..bfbd0a3b98e 100644
--- a/studio/frontend/src/i18n/locales/sv.ts
+++ b/studio/frontend/src/i18n/locales/sv.ts
@@ -2791,6 +2791,9 @@ export const sv = {
showMemoryBar: "Stapel för VRAM-användning",
showMemoryBarDescription:
"Visa uppskattat VRAM för modellvikter, kontext och spekulativ avkodning.",
+ fitOnDeviceOnly: "Visa bara modeller som får plats",
+ fitOnDeviceOnlyDescription:
+ "Döljer modeller som är för stora för enhetens GPU-minne och RAM i modellväljaren och Hub. Hämtade modeller visas fortfarande.",
},
menu: {
title: "Chattmeny",
diff --git a/studio/frontend/src/i18n/locales/zh-CN.ts b/studio/frontend/src/i18n/locales/zh-CN.ts
index 5e37941459b..071e16a7b43 100644
--- a/studio/frontend/src/i18n/locales/zh-CN.ts
+++ b/studio/frontend/src/i18n/locales/zh-CN.ts
@@ -2552,6 +2552,9 @@ export const zhCN = {
showMemoryBar: "显示显存占用条",
showMemoryBarDescription:
"在每个已下载模型的行下方显示预计显存占用:权重、按实际加载的上下文长度计算的 KV 缓存,以及推测解码草稿所需的预留。",
+ fitOnDeviceOnly: "仅显示可运行的模型",
+ fitOnDeviceOnlyDescription:
+ "在模型选择器和 Hub 中隐藏超出本设备显存和内存容量的模型。已下载的模型仍会显示。",
},
menu: {
title: "聊天菜单",
diff --git a/studio/frontend/tests/fit-on-device-setting.test.ts b/studio/frontend/tests/fit-on-device-setting.test.ts
new file mode 100644
index 00000000000..0aca94f5745
--- /dev/null
+++ b/studio/frontend/tests/fit-on-device-setting.test.ts
@@ -0,0 +1,84 @@
+// 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 { hfModelFitsDevice } from "../src/features/model-picker/components/model-selector/recommended-fit.ts";
+import { readSrcAsync } from "./helpers/kit.ts";
+
+const [chatTab, store, pickers, hubPage, settingsSearch] = await Promise.all([
+ readSrcAsync("features/settings/tabs/chat-tab.tsx"),
+ readSrcAsync("features/chat/stores/chat-runtime-store.ts"),
+ readSrcAsync("features/model-picker/components/model-selector/pickers.tsx"),
+ readSrcAsync("features/hub/hub-page.tsx"),
+ readSrcAsync("features/settings/settings-search.ts"),
+]);
+
+const GB = 1024 ** 3;
+
+test("Settings exposes the same fit toggle the picker and Hub read", () => {
+ assert.match(
+ chatTab,
+ /useChatRuntimeStore\(\(state\) => state\.fitOnDeviceOnly\)/,
+ );
+ assert.match(
+ chatTab,
+ /checked=\{fitOnDeviceOnly\}\s*onCheckedChange=\{setFitOnDeviceOnly\}/,
+ );
+ assert.match(
+ chatTab,
+ /aria-label=\{t\("settings\.chat\.modelSelection\.fitOnDeviceOnly"\)\}/,
+ );
+ assert.ok(
+ settingsSearch.includes('"settings.chat.modelSelection.fitOnDeviceOnly"'),
+ );
+});
+
+test("the fit filter stays opt-in", () => {
+ assert.match(
+ store,
+ /fitOnDeviceOnly: loadBool\(MODELS_FIT_ON_DEVICE_ONLY_KEY, false\)/,
+ );
+});
+
+test("with the setting off no list pays for a fit check", () => {
+ // Every gate tests the flag first, so `||` never reaches the fit predicate when it is off.
+ const gates = [...pickers.matchAll(/!fitOnDeviceOnly \|\|/g)].length;
+ assert.ok(gates >= 2, `picker search gates: ${gates}`);
+ assert.match(pickers, /!deviceFiltered \|\| fits\(r\)/);
+ const hubGates = [...hubPage.matchAll(/!fitOnDeviceOnly \|\|/g)].length;
+ assert.ok(hubGates >= 2, `hub gates: ${hubGates}`);
+});
+
+test("a model is hidden only when it exceeds GPU memory plus RAM", () => {
+ const gpu = { memoryTotalGb: 8, systemRamAvailableGb: 32, budgetKnown: true };
+ assert.equal(
+ hfModelFitsDevice(
+ { id: "unsloth/a-GGUF", isGguf: true, estimatedSizeBytes: 4 * GB },
+ gpu,
+ ),
+ true,
+ );
+ assert.equal(
+ hfModelFitsDevice(
+ { id: "unsloth/b-GGUF", isGguf: true, estimatedSizeBytes: 14 * GB },
+ gpu,
+ ),
+ true,
+ );
+ assert.equal(
+ hfModelFitsDevice(
+ { id: "unsloth/c-GGUF", isGguf: true, estimatedSizeBytes: 40 * GB },
+ gpu,
+ ),
+ false,
+ );
+ assert.equal(
+ hfModelFitsDevice(
+ { id: "unsloth/c-GGUF", isGguf: true, estimatedSizeBytes: 40 * GB },
+ { memoryTotalGb: 0, systemRamAvailableGb: 0 },
+ ),
+ true,
+ );
+});