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
Unsloth Studio (AMD/Windows): show an iGPU's own memory on Settings > About, not the system RAM it can borrow (#14317)
Leo Borcherdingf7b147dd1054
diff --git a/studio/backend/main.py b/studio/backend/main.pyindex f904ff9a2f8..a536a789d17 100644--- a/studio/backend/main.py+++ b/studio/backend/main.py@@ -3091,7 +3091,14 @@ def get_hardware_info(# "5,3") would mislabel by array index.devices = get_backend_visible_gpu_info().get("devices", [])body["gpus"] = [- {"name": d.get("name"), "vram_total_gb": d.get("memory_total_gb")}+ {+ "name": d.get("name"),+ "vram_total_gb": d.get("memory_total_gb"),+ # An iGPU's total is mostly borrowed system RAM; the About tab shows only its own carve-out.+ "shared_memory": d.get("shared_memory") is True,+ "unified_memory": d.get("unified_memory") is True,+ "shared_memory_host_backed_gb": d.get("shared_memory_host_backed_gb"),+ }for d in sorted(devices, key = lambda d: d.get("visible_ordinal", 0))]body["llama_cpp"] = get_installed_llama_version()diff --git a/studio/frontend/scripts/check-bundle-budget.ts b/studio/frontend/scripts/check-bundle-budget.tsindex 338763af0a1..2fdd1f676a4 100644--- a/studio/frontend/scripts/check-bundle-budget.ts+++ b/studio/frontend/scripts/check-bundle-budget.ts@@ -299,8 +299,10 @@ export const BUDGET = {// 2,060,319 -> 2,060,524 B transfer against 26e246d407, one machine and build, Node 24, 96 chunks): the// first-run checkbox lives in the eager startup screen and the Train hint in the eager sidebar. Raised by that.// Explicit browser download names retain the prior startup margin.- transferBytes: 2_062_292,- rawBytes: 6_847_855,+ // The About tab's iGPU memory row (#14317): merged with main at ca0252968 the build measures 6,848,044 B raw /+ // 2,062,332 B transfer (Node 24, 96 chunks). Raised to that plus the same 160 B raw / 189 B transfer margin.+ transferBytes: 2_062_521,+ rawBytes: 6_848_204,};// The chunk count is reported but not budgeted. Splitting a page out of the entry raises it while lowering thediff --git a/studio/frontend/src/features/settings/tabs/about-tab.tsx b/studio/frontend/src/features/settings/tabs/about-tab.tsxindex 6e32d647da6..5c52d9a341a 100644--- a/studio/frontend/src/features/settings/tabs/about-tab.tsx+++ b/studio/frontend/src/features/settings/tabs/about-tab.tsx@@ -6,6 +6,7 @@ import { Button } from "@/components/ui/button";import { usePlatformStore } from "@/config/env";import { getAuthToken } from "@/features/auth";import { removeTrainingUnloadGuard } from "@/features/training";+import { hardwareGpuMemoryGb } from "@/hooks/gpu-vram";import { type HardwareInfo, useHardwareInfo } from "@/hooks/use-hardware-info";import { type TranslationKey, useT } from "@/i18n";import { apiUrl, isTauri } from "@/lib/api-base";@@ -92,6 +93,19 @@ function acceleratorRuntimes(hw: HardwareInfo): RuntimeRow[] {return rows;}+function aboutGpuMemoryText(+ gpu: HardwareInfo["gpus"][number],+ t: ReturnType<typeof useT>,+): string {+ const memory = hardwareGpuMemoryGb(gpu);+ if (!memory) return "";+ const gpuMemoryGb =+ memory.gb < 1 ? memory.gb.toFixed(1) : Math.round(memory.gb);+ return memory.integrated+ ? ` · ${gpuMemoryGb} GiB (${t("settings.about.gpuIntegrated")})`+ : ` · ${gpuMemoryGb} GiB`;+}+export function AboutTab() {const t = useT();const deviceType = usePlatformStore((s) => s.deviceType);@@ -191,9 +205,7 @@ export function AboutTab() {><code className="font-mono text-xs text-muted-foreground">{gpu.name ?? "—"}- {gpu.vramTotalGb != null- ? ` · ${Math.round(gpu.vramTotalGb)} GiB`- : ""}+ {aboutGpuMemoryText(gpu, t)}</code></SettingsRow>))}diff --git a/studio/frontend/src/hooks/gpu-vram.ts b/studio/frontend/src/hooks/gpu-vram.tsindex 83b5c6bf34f..0f595ba77f1 100644--- a/studio/frontend/src/hooks/gpu-vram.ts+++ b/studio/frontend/src/hooks/gpu-vram.ts@@ -113,6 +113,27 @@ export function deviceSharedMemorySplitGb(return totals.shared > 0 ? totals : null;}+/** About-tab memory for a hardware row: an iGPU's own carve-out, else its whole total (borrowable RAM is not VRAM). */+export function hardwareGpuMemoryGb(gpu: {+ vramTotalGb: number | null;+ sharedMemory?: boolean;+ unifiedMemory?: boolean;+ sharedMemoryHostBackedGb?: number | null;+}): { gb: number; integrated: boolean } | null {+ if (gpu.vramTotalGb == null) return null;+ const integrated = gpu.sharedMemory === true || gpu.unifiedMemory === true;+ const split = deviceSharedMemorySplitGb({+ memory_total_gb: gpu.vramTotalGb,+ shared_memory: gpu.sharedMemory === true,+ unified_memory: gpu.unifiedMemory === true,+ shared_memory_host_backed_gb: gpu.sharedMemoryHostBackedGb ?? null,+ });+ return {+ gb: split && split.dedicated > 0 ? split.dedicated : gpu.vramTotalGb,+ integrated,+ };+}+export function gpuSharedHostMemoryGb(devices: MemoryTotalDevice[]): number {return gpuMemoryTotalsGb(devices).shared;}diff --git a/studio/frontend/src/hooks/use-hardware-info.ts b/studio/frontend/src/hooks/use-hardware-info.tsindex 30669df4379..d4cbf44e144 100644--- a/studio/frontend/src/hooks/use-hardware-info.ts+++ b/studio/frontend/src/hooks/use-hardware-info.ts@@ -7,11 +7,17 @@ import { useEffect, useState } from "react";export interface GpuDevice {name: string | null;vramTotalGb: number | null;+ sharedMemory?: boolean;+ unifiedMemory?: boolean;+ sharedMemoryHostBackedGb?: number | null;}interface ApiGpu {name?: string | null;vram_total_gb?: number | null;+ shared_memory?: boolean;+ unified_memory?: boolean;+ shared_memory_host_backed_gb?: number | null;}export interface HardwareInfo {@@ -115,6 +121,9 @@ async function fetchOnce(): Promise<HardwareInfo> {? data.gpus.map((g: ApiGpu) => ({name: g?.name ?? null,vramTotalGb: g?.vram_total_gb ?? null,+ sharedMemory: g?.shared_memory === true,+ unifiedMemory: g?.unified_memory === true,+ sharedMemoryHostBackedGb: g?.shared_memory_host_backed_gb ?? null,})): [],torch: data?.versions?.torch ?? null,diff --git a/studio/frontend/src/i18n/locales/ar.ts b/studio/frontend/src/i18n/locales/ar.tsindex 296440e3ee3..01e1c664108 100644--- a/studio/frontend/src/i18n/locales/ar.ts+++ b/studio/frontend/src/i18n/locales/ar.ts@@ -3204,6 +3204,7 @@ export const ar = {audioCppVersion: "إصدار audio.cpp",hardware: "الأجهزة",gpu: "GPU",+ gpuIntegrated: "مدمجة",cuda: "CUDA",rocm: "ROCm",xpu: "XPU",diff --git a/studio/frontend/src/i18n/locales/de.ts b/studio/frontend/src/i18n/locales/de.tsindex 58653929917..768c99c44b1 100644--- a/studio/frontend/src/i18n/locales/de.ts+++ b/studio/frontend/src/i18n/locales/de.ts@@ -3251,6 +3251,7 @@ export const de = {audioCppVersion: "audio.cpp-Version",hardware: "Hardware",gpu: "GPU",+ gpuIntegrated: "integriert",cuda: "CUDA",rocm: "ROCm",xpu: "XPU",diff --git a/studio/frontend/src/i18n/locales/en.ts b/studio/frontend/src/i18n/locales/en.tsindex 7749dc3882e..15c673c0872 100644--- a/studio/frontend/src/i18n/locales/en.ts+++ b/studio/frontend/src/i18n/locales/en.ts@@ -3261,6 +3261,7 @@ export const en = {audioCppVersion: "audio.cpp Version",hardware: "Hardware",gpu: "GPU",+ gpuIntegrated: "integrated",cuda: "CUDA",rocm: "ROCm",xpu: "XPU",diff --git a/studio/frontend/src/i18n/locales/es.ts b/studio/frontend/src/i18n/locales/es.tsindex 984b005e3a8..02b470d2691 100644--- a/studio/frontend/src/i18n/locales/es.ts+++ b/studio/frontend/src/i18n/locales/es.ts@@ -3245,6 +3245,7 @@ export const es = {audioCppVersion: "Versión de audio.cpp",hardware: "Hardware",gpu: "GPU",+ gpuIntegrated: "integrada",cuda: "CUDA",rocm: "ROCm",xpu: "XPU",diff --git a/studio/frontend/src/i18n/locales/fr.ts b/studio/frontend/src/i18n/locales/fr.tsindex 524d1c956cb..ac7760977b3 100644--- a/studio/frontend/src/i18n/locales/fr.ts+++ b/studio/frontend/src/i18n/locales/fr.ts@@ -3253,6 +3253,7 @@ export const fr = {audioCppVersion: "Version d'audio.cpp",hardware: "Matériel",gpu: "GPU",+ gpuIntegrated: "intégrée",cuda: "CUDA",rocm: "ROCm",xpu: "XPU",diff --git a/studio/frontend/src/i18n/locales/he.ts b/studio/frontend/src/i18n/locales/he.tsindex 2f9f8f3b6bf..fc3faf6b102 100644--- a/studio/frontend/src/i18n/locales/he.ts+++ b/studio/frontend/src/i18n/locales/he.ts@@ -3327,6 +3327,7 @@ export const he = {audioCppVersion: "גרסת audio.cpp",hardware: "חומרה",gpu: "GPU",+ gpuIntegrated: "משולב",cuda: "CUDA",rocm: "ROCm",xpu: "XPU",diff --git a/studio/frontend/src/i18n/locales/hi.ts b/studio/frontend/src/i18n/locales/hi.tsindex 6b2968d041c..72626388edd 100644--- a/studio/frontend/src/i18n/locales/hi.ts+++ b/studio/frontend/src/i18n/locales/hi.ts@@ -3213,6 +3213,7 @@ export const hi = {audioCppVersion: "audio.cpp संस्करण",hardware: "हार्डवेयर",gpu: "GPU",+ gpuIntegrated: "इंटीग्रेटेड",cuda: "CUDA",rocm: "ROCm",xpu: "XPU",diff --git a/studio/frontend/src/i18n/locales/it.ts b/studio/frontend/src/i18n/locales/it.tsindex 0936ddddcf3..71553f6c064 100644--- a/studio/frontend/src/i18n/locales/it.ts+++ b/studio/frontend/src/i18n/locales/it.ts@@ -3156,6 +3156,7 @@ export const it = {audioCppVersion: "Versione di audio.cpp",hardware: "Hardware",gpu: "GPU",+ gpuIntegrated: "integrata",cuda: "CUDA",rocm: "ROCm",xpu: "XPU",diff --git a/studio/frontend/src/i18n/locales/ja.ts b/studio/frontend/src/i18n/locales/ja.tsindex 2b0a1e74864..92c964ca606 100644--- a/studio/frontend/src/i18n/locales/ja.ts+++ b/studio/frontend/src/i18n/locales/ja.ts@@ -3173,6 +3173,7 @@ export const ja = {audioCppVersion: "audio.cpp バージョン",hardware: "ハードウェア",gpu: "GPU",+ gpuIntegrated: "内蔵",cuda: "CUDA",rocm: "ROCm",xpu: "XPU",diff --git a/studio/frontend/src/i18n/locales/ko.ts b/studio/frontend/src/i18n/locales/ko.tsindex c4bd58a8a84..b09a107e517 100644--- a/studio/frontend/src/i18n/locales/ko.ts+++ b/studio/frontend/src/i18n/locales/ko.ts@@ -3192,6 +3192,7 @@ export const ko = {audioCppVersion: "audio.cpp 버전",hardware: "하드웨어",gpu: "GPU",+ gpuIntegrated: "내장",cuda: "CUDA",rocm: "ROCm",xpu: "XPU",diff --git a/studio/frontend/src/i18n/locales/pt-br.ts b/studio/frontend/src/i18n/locales/pt-br.tsindex eb1be25b469..e0ea80c2811 100644--- a/studio/frontend/src/i18n/locales/pt-br.ts+++ b/studio/frontend/src/i18n/locales/pt-br.ts@@ -3224,6 +3224,7 @@ export const ptBR = {audioCppVersion: "Versão do audio.cpp",hardware: "Hardware",gpu: "GPU",+ gpuIntegrated: "integrada",cuda: "CUDA",rocm: "ROCm",xpu: "XPU",diff --git a/studio/frontend/src/i18n/locales/ru.ts b/studio/frontend/src/i18n/locales/ru.tsindex 111b9c4bd25..58a6c93f304 100644--- a/studio/frontend/src/i18n/locales/ru.ts+++ b/studio/frontend/src/i18n/locales/ru.ts@@ -3221,6 +3221,7 @@ export const ru = {audioCppVersion: "Версия audio.cpp",hardware: "Оборудование",gpu: "GPU",+ gpuIntegrated: "встроенная",cuda: "CUDA",rocm: "ROCm",xpu: "XPU",diff --git a/studio/frontend/src/i18n/locales/sv.ts b/studio/frontend/src/i18n/locales/sv.tsindex 05f305d8552..b51987f541f 100644--- a/studio/frontend/src/i18n/locales/sv.ts+++ b/studio/frontend/src/i18n/locales/sv.ts@@ -3431,6 +3431,7 @@ export const sv = {audioCppVersion: "audio.cpp-version",hardware: "Maskinvara",gpu: "GPU",+ gpuIntegrated: "integrerad",cuda: "CUDA",rocm: "ROCm",xpu: "XPU",diff --git a/studio/frontend/src/i18n/locales/zh-CN.ts b/studio/frontend/src/i18n/locales/zh-CN.tsindex c90ea69a7f7..b4b0729b390 100644--- a/studio/frontend/src/i18n/locales/zh-CN.ts+++ b/studio/frontend/src/i18n/locales/zh-CN.ts@@ -3150,6 +3150,7 @@ export const zhCN = {audioCppVersion: "audio.cpp 版本",hardware: "硬件",gpu: "GPU",+ gpuIntegrated: "集成",cuda: "CUDA",rocm: "ROCm",xpu: "XPU",diff --git a/studio/frontend/tests/about-igpu-shared-memory.test.ts b/studio/frontend/tests/about-igpu-shared-memory.test.tsnew file mode 100644index 00000000000..6ccf8dcff20--- /dev/null+++ b/studio/frontend/tests/about-igpu-shared-memory.test.ts@@ -0,0 +1,75 @@+// 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 { readFileSync } from "node:fs";+import { test } from "node:test";++import { hardwareGpuMemoryGb } from "../src/hooks/gpu-vram.ts";++// /api/system/hardware rows from 2x Radeon AI PRO R9700 + a Ryzen 9 9950X iGPU on Windows ROCm.+const r9700 = {+ vramTotalGb: 31.86,+ sharedMemory: false,+ unifiedMemory: false,+ sharedMemoryHostBackedGb: null,+};+const igpu = {+ vramTotalGb: 36.23,+ sharedMemory: true,+ unifiedMemory: true,+ sharedMemoryHostBackedGb: 34.26,+};++test("a Windows ROCm iGPU shows its own carve-out, not the system RAM it can borrow", () => {+ const memory = hardwareGpuMemoryGb(igpu);+ assert.ok(memory);+ assert.equal(Math.round(memory.gb), 2);+ assert.equal(memory.integrated, true);+});++test("a discrete card shows its full VRAM and is not marked integrated", () => {+ assert.deepEqual(hardwareGpuMemoryGb(r9700), {+ gb: 31.86,+ integrated: false,+ });+});++test("an integrated GPU with no carve-out of its own keeps its whole total", () => {+ const gb10 = {+ vramTotalGb: 119.7,+ sharedMemory: true,+ unifiedMemory: true,+ sharedMemoryHostBackedGb: 119.7,+ };+ assert.deepEqual(hardwareGpuMemoryGb(gb10), { gb: 119.7, integrated: true });+});++test("a row from an older backend without the memory flags keeps the plain total", () => {+ assert.deepEqual(hardwareGpuMemoryGb({ vramTotalGb: 36.23 }), {+ gb: 36.23,+ integrated: false,+ });+});++test("an unknown total shows nothing", () => {+ assert.equal(hardwareGpuMemoryGb({ ...igpu, vramTotalGb: null }), null);+});++test("the hardware route forwards the memory flags", () => {+ const main = readFileSync(+ new URL("../../backend/main.py", import.meta.url),+ "utf8",+ );+ const route = main.slice(main.indexOf('@app.get("/api/system/hardware")'));+ for (const key of [+ "shared_memory",+ "unified_memory",+ "shared_memory_host_backed_gb",+ ]) {+ assert.match(+ route.slice(0, route.indexOf("return body")),+ new RegExp(`"${key}"`),+ );+ }+});diff --git a/studio/frontend/tests/vram-total-gib-suffix.test.ts b/studio/frontend/tests/vram-total-gib-suffix.test.tsindex 109a0c78f1f..c8e6c31c3ce 100644--- a/studio/frontend/tests/vram-total-gib-suffix.test.ts+++ b/studio/frontend/tests/vram-total-gib-suffix.test.ts@@ -29,7 +29,7 @@ const RENDERERS = [// `[^`$]*` keeps the match inside one literal segment, so an unrelated "GB"// later in the file cannot be paired with an earlier total.-const SUFFIXED = /\$\{[^}]*(?:memoryTotalGb|vramTotalGb|systemRamTotalGb)[^}]*\}[^`$]*?\b(GiB|GB)\b/g;+const SUFFIXED = /\$\{[^}]*(?:memoryTotalGb|vramTotalGb|systemRamTotalGb|gpuMemoryGb)[^}]*\}[^`$]*?\b(GiB|GB)\b/g;test("VRAM and RAM totals are labelled GiB, not GB", () => {const offenders: string[] = [];