Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

App: the DeepSeek card names the free disk the set needs, and the version line says "{N} GB RAM + VRAM, plus about {disk} GB of disk"

Niko12219e3fd0f73a4a
diff --git a/apps/host/src/components/NativeModels.tsx b/apps/host/src/components/NativeModels.tsx
index 1ea224728..0e267e6b0 100644
--- a/apps/host/src/components/NativeModels.tsx
+++ b/apps/host/src/components/NativeModels.tsx
@@ -209,7 +209,7 @@ export function NativeModels({ onOtherModels, onReady, onImport, onConnectEngine
{tr(expert && IMAGE_GENERATION_VISIBLE ? <><details className="native-generation"><summary>{tr("Image generation ")}<span className="muted">{tr("Optional")}</span></summary><RunImageModel library={imageLibrary} disabled={pending || !!active} onChange={() => { }}/></details></> : null)}
{tr(expert ? <section id="native-expert-settings" ref={expertSection} className="st-card native-execution"><h2 className="h4">{tr("Expert settings")}</h2>{tr(tunedNow ? <p className="small muted native-tuned-note">{tr("Showing the values of your tuning '{0}'.", [tunedNow.name])}</p> : null)}<label className="native-toggle"><span><strong>{tr("Run multiple models")}</strong><small>{tr("Loading another model keeps the others loaded.")}</small></span><button className="st-toggle" role="switch" aria-label={tr("Run multiple models")} aria-checked={multiple} onClick={() => setMultiple(v => !v)}/></label>{tr(cardsGpus.length > 1 ? <label className="input-field"><span>{tr("Layer split")}</span><input className="st-input" value={split} placeholder={tr("auto or 16,32")} onChange={e => setSplit(e.target.value)}/></label> : null)}<div className="native-field-grid"><label className="input-field"><span>{tr("Context memory")}</span><Select ariaLabel={tr("Native KV format")} value={kv} options={[{ value: 'int8', label: 'INT8' }, { value: 'q4_0', label: 'Q4' }, { value: 'k8v4', label: 'K8 / V4' }]} onChange={setKv}/></label><label className="input-field"><span>{tr("Low-RAM mode")}</span><Select ariaLabel={tr("Native low RAM mode")} value={lowRam} options={['auto', 'resident', 'mmap'].map(v => ({ value: v, label: v === 'auto' ? 'Automatic' : v === 'resident' ? 'Keep experts in RAM' : 'Read experts from disk' }))} onChange={setLowRam}/></label></div>{tr(installed ? <><NativeSettingsFile model={installed.model}/><NativeSettings model={installed.model}/></> : <p className="small muted">{tr("More engine parameters become available after preparing this version.")}</p>)}</section> : null)}
</div>
- <aside className="stack stack--lg"><PcFitCard gpuName={pcGpu?.name} ramGb={pcRam} vramGb={pcVram} inUse={keptModels.length ? { ramGb: Math.round(keptRam), vramGb: Math.round(keptVramOn(chosenCards)) } : null} fit={selectedSize ? fitOn(selectedSize, fitHardware, true, { context, kv }) : null}/><section className="st-card"><h2 className="h4">{tr("Model files")}</h2><p className="small muted">{tr("Strata prepares all shards, the draft layer and shared files. Completed downloads are reused.")}</p><code className="native-path">{installed?.dataFolder ?? native?.downloadDirectory ?? native?.installed?.data_folder ?? 'Choose an installation'}</code><Btn size="sm" variant="ghost" onClick={() => { setSettingsSection('Storage'); go('settings'); }}>{tr("Storage settings")}</Btn></section><Btn size="sm" variant="ghost" onClick={onOtherModels}>{tr("Other local models\u2026")}</Btn></aside>
+ <aside className="stack stack--lg"><PcFitCard gpuName={pcGpu?.name} ramGb={pcRam} vramGb={pcVram} diskGb={selectedSize?.multi_file ? selectedSize.disk_gb ?? selectedSize.download_gb : null} inUse={keptModels.length ? { ramGb: Math.round(keptRam), vramGb: Math.round(keptVramOn(chosenCards)) } : null} fit={selectedSize ? fitOn(selectedSize, fitHardware, true, { context, kv }) : null}/><section className="st-card"><h2 className="h4">{tr("Model files")}</h2><p className="small muted">{tr("Strata prepares all shards, the draft layer and shared files. Completed downloads are reused.")}</p><code className="native-path">{installed?.dataFolder ?? native?.downloadDirectory ?? native?.installed?.data_folder ?? 'Choose an installation'}</code><Btn size="sm" variant="ghost" onClick={() => { setSettingsSection('Storage'); go('settings'); }}>{tr("Storage settings")}</Btn></section><Btn size="sm" variant="ghost" onClick={onOtherModels}>{tr("Other local models\u2026")}</Btn></aside>
</div>
<Dialog open={!!plan} title={tr(installed?.ready ? "Apply settings and load" : "Download and prepare")} compact onClose={() => !pending && setPlan(null)} actions={<><Btn disabled={pending} onClick={() => setPlan(null)}>{tr("Cancel")}</Btn><Btn variant="primary" disabled={pending || !!plan?.plan?.disk_short} onClick={() => void download()}>{tr(installed?.ready ? "Apply & load" : "Download & load")}</Btn></>}><p><strong>{tr(plan?.plan?.title ?? selectedFamily?.title)}</strong>{tr(installed?.ready ? null : <>{tr(" \u00B7 approximately ")}{tr(plan?.plan?.download_gb ?? selectedSize?.download_gb)}{tr(" GB")}</>)}</p>{tr(plan?.drafting?.needed ? <p className="small muted">{tr("Choosing DFlash2 also downloads its drafter: about {0} GB, once. If it does not fit in graphics memory, the model uses the MTP instead.", [plan.drafting.gb])}</p> : null)}{tr(installed?.ready ? <p className="small muted">{tr("The model files are already on this computer. Nothing will be downloaded; only the settings you chose are applied.")}</p> : null)}{tr(plan?.plan?.disk_short ? <ErrorNotice message={plan.plan.disk_short}/> : null)}{tr(installed?.ready ? <p className="small muted">{tr("Any currently loaded native models will be unloaded first.")}</p> : <><p className="small muted">{tr("Existing files are checked and reused. Any currently loaded native models will be unloaded before preparing files.")}</p><p className="small muted">{tr("Your computer may feel slower while weights load. You can stop the download and resume later.")}</p></>)}{tr(selectedSize?.images ? <p className="small muted">{tr("Vision encoder files are included. Picture reading loads only when enabled.")}</p> : null)}</Dialog>
diff --git a/apps/host/src/components/PcFitCard.tsx b/apps/host/src/components/PcFitCard.tsx
index 17ca134bf..62a5e2a1e 100644
--- a/apps/host/src/components/PcFitCard.tsx
+++ b/apps/host/src/components/PcFitCard.tsx
@@ -15,7 +15,7 @@ function Meter({ label, total, use }: { label: string; total: number; use: numbe
* "This computer": the graphics memory and RAM, and what the chosen version would take of each. One plain line says whether it fits
* or how much would be read from the SSD (the n-gram table, which always sits on the SSD, is not counted).
*/
-export function PcFitCard({ gpuName, ramGb, vramGb, fit, inUse = null }: { gpuName?: string | null; ramGb: number | null; vramGb: number; fit: Fit | null; inUse?: { ramGb: number; vramGb: number } | null }) {
+export function PcFitCard({ gpuName, ramGb, vramGb, fit, inUse = null, diskGb = null }: { gpuName?: string | null; ramGb: number | null; vramGb: number; fit: Fit | null; inUse?: { ramGb: number; vramGb: number } | null; diskGb?: number | null }) {
const freeVram = Math.max(0, vramGb - (inUse?.vramGb ?? 0)), freeRam = ramGb ? Math.max(0, ramGb - (inUse?.ramGb ?? 0)) : 0;
return <section className="st-card pc-card">
<div><h2 className="h4">{tr("This computer")}</h2>
@@ -23,6 +23,7 @@ export function PcFitCard({ gpuName, ramGb, vramGb, fit, inUse = null }: { gpuNa
{tr(fit?.known && vramGb > 0 ? <Meter label="Graphics memory" total={freeVram} use={fit.vramUseGb}/> : null)}
{tr(fit?.known && ramGb ? <Meter label="RAM" total={freeRam} use={fit.ramUseGb}/> : null)}
{tr(inUse ? <p className="xs muted">{tr("Models that stay loaded use about {0} GB of RAM and {1} GB of this card’s memory.", [inUse.ramGb, inUse.vramGb])}</p> : null)}
- {tr(fit?.known ? <p className="pc-note">{tr(fit.spillGb >= 1 ? 'About {0} GB will be read from the SSD, so answers can be a little slower.' : 'Fits fully in memory.', [Math.round(fit.spillGb)])}</p> : null)}
+ {tr(diskGb ? <p className="pc-note">{tr("Needs about {0} GB of free disk space. What does not fit in memory is read from your SSD.", [Math.round(diskGb)])}</p> : null)}
+ {tr(fit?.known && (diskGb ? fit.spillGb >= 1 : true) ? <p className="pc-note">{tr(fit.spillGb >= 1 ? 'About {0} GB will be read from the SSD, so answers can be a little slower.' : 'Fits fully in memory.', [Math.round(fit.spillGb)])}</p> : null)}
</section>;
}
diff --git a/apps/host/src/components/VersionPicker.tsx b/apps/host/src/components/VersionPicker.tsx
index dd5fbd00a..5a078316b 100644
--- a/apps/host/src/components/VersionPicker.tsx
+++ b/apps/host/src/components/VersionPicker.tsx
@@ -68,7 +68,7 @@ export function VersionPicker({ versions, selectedId, hardware, onSelect, onOwnG
return <>
<button ref={trigger} type="button" className="version-trigger" aria-haspopup="menu" aria-expanded={open} aria-label={tr("Model version")} onClick={() => setOpen(v => !v)}>
<strong>{selected && !apart.has(selected.id) ? versionName(selected, true) : tr(moreLabel ?? "Choose a version")}</strong>{tr(selected && !apart.has(selected.id) && downloaded?.has(selected.id) ? <span className="version-row__have">{tr("Downloaded")}</span> : null)}
- <span className="version-trigger__need muted">{tr(fit ? `${gb(fit.memoryGb)} RAM + VRAM` : '')}</span>
+ <span className="version-trigger__need muted">{tr(fit && selected?.multi_file && selected.disk_gb ? tr("{0} RAM + VRAM, plus about {1} GB of disk", [gb(fit.memoryGb), Math.round(selected.disk_gb)]) : fit ? `${gb(fit.memoryGb)} RAM + VRAM` : '')}</span>
<Icon name="chevron" size={14} className="version-trigger__chev"/>
</button>
{tr(open ? <FloatingMenu anchor={trigger.current} title={tr("Model version")} width={620} onClose={() => setOpen(false)}>
diff --git a/apps/host/src/lib/native.ts b/apps/host/src/lib/native.ts
index e6e64bbf4..adab6e929 100644
--- a/apps/host/src/lib/native.ts
+++ b/apps/host/src/lib/native.ts
@@ -3,7 +3,7 @@ import { api } from './client';
import type { Hardware, RuntimeModels } from './types';
export interface GpuChoiceOption {key:string;cards:number[];label:string;verdict:'fits'|'tight'|'spills'|'unknown';words:string;notes:string[];recommended:boolean}
export interface GpuChoice {options:GpuChoiceOption[];recommended:string|null;ignored:{name?:string;why_ignored:string}[];cards:number}
-export interface NativeSize {/** The first engine that reads this size's files (the catalog), and whether the installed engine is older: the screen then says "needs a newer engine" and offers the update. */engine_min?:string|null;needsNewerEngine?:boolean;id:string;model:string;about:string;download_gb:number;ram_needed_gb:number;experts_gb:number;on_this_pc:string|null;installed:boolean;gpu_options?:GpuChoice|null;images?:boolean;imagesCapable?:boolean;/** DeepSeek-V4.1-Flash and the like: several big files and an engine of their own. */multi_file?:boolean}
+export interface NativeSize {/** The first engine that reads this size's files (the catalog), and whether the installed engine is older: the screen then says "needs a newer engine" and offers the update. */engine_min?:string|null;needsNewerEngine?:boolean;id:string;model:string;about:string;download_gb:number;ram_needed_gb:number;experts_gb:number;on_this_pc:string|null;installed:boolean;gpu_options?:GpuChoice|null;images?:boolean;imagesCapable?:boolean;/** DeepSeek-V4.1-Flash and the like: several big files and an engine of their own. */multi_file?:boolean;/** DeepSeek: the free disk the set needs (its download plus the pack and room to work), from the set itself. */disk_gb?:number}
export interface NativeFamily {family:string;title:string;about:string;experimental:boolean;images:boolean;sizes:NativeSize[]}
export interface NativeField {id:string;label:string;group:string;type:'number'|'boolean'|'string'|'enum'|'array';min?:number;max?:number;choices?:string[];hint?:string;supported?:boolean;forModel?:string}
export interface NativeJob {id:string;kind:string;guided?:boolean;model?:string;family?:string;state:'running'|'done'|'error'|'cancelled';startedAt:string;summary:string;error:string|null;details?:string;result:Record<string,any>|null;progress?:Record<string,any>|null}
diff --git a/apps/host/src/locales/fix-de.json b/apps/host/src/locales/fix-de.json
index f378e020d..c29c02814 100644
--- a/apps/host/src/locales/fix-de.json
+++ b/apps/host/src/locales/fix-de.json
@@ -77,5 +77,7 @@
"fx76": "Ein (empfohlen)",
"fx77": "Das ist ein sehr großes Modell. Der Download umfasst {0} GB und braucht etwa so viel freien Speicherplatz. Es läuft auf NVIDIA-RTX-Karten der Serien 30, 40 und 50, auf einer Radeon AI PRO R9700 (Linux) oder auf einem Ryzen-AI-Max-/Strix-Halo-PC (Windows); wie schnell es ist, hängt von Speicher und Grafikkarte ab (die Zeile darunter sagt, was auf diesem Computer zu erwarten ist). Was nicht in den Speicher passt, wird von deiner SSD gelesen, deshalb zählt eine NVMe-SSD.",
"fx78": "Noch nicht getestet. Ein so langer Kontext nimmt dem Modell Grafikspeicher weg, und lange Prompts werden langsam gelesen.",
- "fx79": "Aus (empfohlen)"
+ "fx79": "Aus (empfohlen)",
+ "fx80": "Braucht etwa {0} GB freien Speicherplatz. Was nicht in den Speicher passt, wird von Ihrer SSD gelesen.",
+ "fx81": "{0} RAM + VRAM, dazu etwa {1} GB Speicherplatz"
}
diff --git a/apps/host/src/locales/fix-en.json b/apps/host/src/locales/fix-en.json
index efe529626..332f7041c 100644
--- a/apps/host/src/locales/fix-en.json
+++ b/apps/host/src/locales/fix-en.json
@@ -77,5 +77,7 @@
"fx76": "On (recommended)",
"fx77": "This is a very large model. The download is {0} GB and it needs about as much free disk space. It runs on NVIDIA RTX 30, 40 and 50 cards, on a Radeon AI PRO R9700 (Linux) or on a Ryzen AI Max / Strix Halo PC (Windows); how fast it is depends on the memory and card (the line below says what to expect on this computer). What does not fit in memory is read from your SSD, so an NVMe drive matters.",
"fx78": "Not tested yet. A context this long takes graphics memory from the model and reads long prompts slowly.",
- "fx79": "Off (recommended)"
+ "fx79": "Off (recommended)",
+ "fx80": "Needs about {0} GB of free disk space. What does not fit in memory is read from your SSD.",
+ "fx81": "{0} RAM + VRAM, plus about {1} GB of disk"
}
diff --git a/apps/host/src/locales/fix-es.json b/apps/host/src/locales/fix-es.json
index 211c1988d..d2bef5343 100644
--- a/apps/host/src/locales/fix-es.json
+++ b/apps/host/src/locales/fix-es.json
@@ -77,5 +77,7 @@
"fx76": "Activado (recomendado)",
"fx77": "Es un modelo muy grande. La descarga es de {0} GB y necesita casi el mismo espacio libre en disco. Funciona con tarjetas NVIDIA RTX de las series 30, 40 y 50, con una Radeon AI PRO R9700 (Linux) o en un PC con Ryzen AI Max / Strix Halo (Windows); su velocidad depende de la memoria y de la tarjeta (la línea de abajo indica qué esperar en este equipo). Lo que no cabe en memoria se lee de tu SSD, así que importa que sea NVMe.",
"fx78": "Aún sin probar. Un contexto tan largo le quita memoria gráfica al modelo y lee los prompts largos con lentitud.",
- "fx79": "Desactivado (recomendado)"
+ "fx79": "Desactivado (recomendado)",
+ "fx80": "Necesita unos {0} GB de espacio libre en disco. Lo que no cabe en memoria se lee de tu SSD.",
+ "fx81": "{0} de RAM + VRAM, más unos {1} GB de disco"
}
diff --git a/apps/host/src/locales/fix-ja.json b/apps/host/src/locales/fix-ja.json
index 2b888a779..289316245 100644
--- a/apps/host/src/locales/fix-ja.json
+++ b/apps/host/src/locales/fix-ja.json
@@ -77,5 +77,7 @@
"fx76": "オン(推奨)",
"fx77": "とても大きなモデルです。ダウンロードは {0} GB で、ほぼ同じ大きさの空き容量が必要です。NVIDIA RTX 30・40・50 シリーズ、Radeon AI PRO R9700(Linux)、または Ryzen AI Max / Strix Halo の PC(Windows)で動きます。速さはメモリとカードによって変わります(この PC での目安は下の行に表示されます)。メモリに入らない分は SSD から読むため、NVMe ドライブが重要です。",
"fx78": "まだテストされていません。これほど長いコンテキストは、モデルが使うグラフィックスメモリを消費し、長いプロンプトの読み込みも遅くなります。",
- "fx79": "オフ(推奨)"
+ "fx79": "オフ(推奨)",
+ "fx80": "約 {0} GB の空きディスク容量が必要です。メモリに入らない分は SSD から読み込みます。",
+ "fx81": "RAM + VRAM {0}、ほかにディスク約 {1} GB"
}
diff --git a/apps/host/src/locales/fix-ko.json b/apps/host/src/locales/fix-ko.json
index befec99d1..f92b85261 100644
--- a/apps/host/src/locales/fix-ko.json
+++ b/apps/host/src/locales/fix-ko.json
@@ -77,5 +77,7 @@
"fx76": "켬(권장)",
"fx77": "매우 큰 모델입니다. 다운로드는 {0}GB이고, 거의 같은 크기의 여유 디스크 공간이 필요합니다. NVIDIA RTX 30·40·50 시리즈 카드, Radeon AI PRO R9700(Linux), 또는 Ryzen AI Max / Strix Halo PC(Windows)에서 실행됩니다. 속도는 메모리와 카드에 따라 달라집니다(아래 줄에 이 컴퓨터에서 기대할 수 있는 속도가 표시됩니다). 메모리에 들어가지 않는 부분은 SSD에서 읽으므로 NVMe 드라이브가 중요합니다.",
"fx78": "아직 테스트하지 않았습니다. 이렇게 긴 컨텍스트는 모델이 쓸 그래픽 메모리를 차지하고, 긴 프롬프트를 느리게 읽습니다.",
- "fx79": "끔(권장)"
+ "fx79": "끔(권장)",
+ "fx80": "약 {0}GB의 여유 디스크 공간이 필요합니다. 메모리에 들어가지 않는 부분은 SSD에서 읽습니다.",
+ "fx81": "RAM + VRAM {0}, 디스크 약 {1}GB 추가"
}
diff --git a/apps/host/src/locales/fix-pt.json b/apps/host/src/locales/fix-pt.json
index 3accb7ef3..eacbe2314 100644
--- a/apps/host/src/locales/fix-pt.json
+++ b/apps/host/src/locales/fix-pt.json
@@ -77,5 +77,7 @@
"fx76": "Ativado (recomendado)",
"fx77": "Este é um modelo muito grande. O download tem {0} GB e precisa de quase o mesmo espaço livre em disco. Ele roda em placas NVIDIA RTX das séries 30, 40 e 50, em uma Radeon AI PRO R9700 (Linux) ou em um PC com Ryzen AI Max / Strix Halo (Windows); a velocidade depende da memória e da placa (a linha abaixo diz o que esperar neste computador). O que não cabe na memória é lido do seu SSD, então um NVMe faz diferença.",
"fx78": "Ainda não testado. Um contexto tão longo tira memória gráfica do modelo e lê prompts longos devagar.",
- "fx79": "Desativado (recomendado)"
+ "fx79": "Desativado (recomendado)",
+ "fx80": "Precisa de cerca de {0} GB de espaço livre em disco. O que não cabe na memória é lido do seu SSD.",
+ "fx81": "{0} de RAM + VRAM, mais cerca de {1} GB de disco"
}
diff --git a/apps/host/src/locales/fix-ru.json b/apps/host/src/locales/fix-ru.json
index d21473271..5af178cf8 100644
--- a/apps/host/src/locales/fix-ru.json
+++ b/apps/host/src/locales/fix-ru.json
@@ -77,5 +77,7 @@
"fx76": "Вкл. (рекомендуется)",
"fx77": "Это очень большая модель. Загрузка — {0} ГБ, и нужно почти столько же свободного места на диске. Она работает на видеокартах NVIDIA RTX серий 30, 40 и 50, на Radeon AI PRO R9700 (Linux) или на ПК с Ryzen AI Max / Strix Halo (Windows); скорость зависит от памяти и видеокарты (строка ниже подскажет, чего ждать на этом компьютере). То, что не помещается в память, читается с вашего SSD, поэтому важен накопитель NVMe.",
"fx78": "Ещё не проверено. Такой длинный контекст отнимает у модели видеопамять, а длинные запросы читаются медленно.",
- "fx79": "Выкл. (рекомендуется)"
+ "fx79": "Выкл. (рекомендуется)",
+ "fx80": "Нужно около {0} ГБ свободного места на диске. То, что не помещается в память, читается с вашего SSD.",
+ "fx81": "{0} RAM + VRAM, плюс около {1} ГБ на диске"
}
diff --git a/apps/host/src/locales/fix-zh.json b/apps/host/src/locales/fix-zh.json
index 48b64cd11..6f6117a21 100644
--- a/apps/host/src/locales/fix-zh.json
+++ b/apps/host/src/locales/fix-zh.json
@@ -77,5 +77,7 @@
"fx76": "开启(推荐)",
"fx77": "这是一个非常大的模型。下载大小为 {0} GB,需要差不多同样大小的可用磁盘空间。它可在 NVIDIA RTX 30、40 和 50 系列显卡、Radeon AI PRO R9700(Linux)或 Ryzen AI Max / Strix Halo 电脑(Windows)上运行;速度取决于内存和显卡(下面一行会说明在这台电脑上的预期)。内存放不下的部分会从你的 SSD 读取,所以 NVMe 硬盘很重要。",
"fx78": "尚未测试。这么长的上下文会占用本该给模型使用的显存,读取长提示词也会很慢。",
- "fx79": "关闭(推荐)"
+ "fx79": "关闭(推荐)",
+ "fx80": "大约需要 {0} GB 可用磁盘空间。内存放不下的部分会从你的 SSD 读取。",
+ "fx81": "{0} 内存 + 显存,另需约 {1} GB 磁盘空间"
}
diff --git a/apps/host/tests/deepseek-card.test.mjs b/apps/host/tests/deepseek-card.test.mjs
new file mode 100644
index 000000000..58b51a7e4
--- /dev/null
+++ b/apps/host/tests/deepseek-card.test.mjs
@@ -0,0 +1,72 @@
+// The DeepSeek model card in the Models screen names the free disk the set needs (from the set itself: 2.00 and 2.25 differ), in the existing card markup,
+// and the version line says "{N} GB RAM + VRAM, plus about {disk} GB of disk". Other models keep their card.
+import test from 'node:test';
+import assert from 'node:assert/strict';
+import { build } from 'esbuild';
+import { readFileSync, mkdtempSync, writeFileSync, rmSync } from 'node:fs';
+import { tmpdir } from 'node:os';
+import { join } from 'node:path';
+import { fileURLToPath, pathToFileURL } from 'node:url';
+
+const read = rel => readFileSync(fileURLToPath(new URL(rel, import.meta.url)), 'utf8').replace(/\r\n/g, '\n');
+const stdin = { contents: "import { createElement } from 'react'; import { renderToStaticMarkup } from 'react-dom/server'; import { PcFitCard } from './src/components/PcFitCard'; export { setTranslationLanguage } from './src/lib/i18n'; export const render = props => renderToStaticMarkup(createElement(PcFitCard, props));", resolveDir: fileURLToPath(new URL('..', import.meta.url)), loader: 'ts' };
+const built = await build({ stdin, bundle: true, write: false, format: 'esm', platform: 'node', loader: { '.json': 'json', '.tsx': 'tsx' }, jsx: 'automatic', logLevel: 'silent', banner: { js: "import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);" } });
+const dir = mkdtempSync(join(tmpdir(), 'strata-card-test-'));
+writeFileSync(join(dir, 'card.mjs'), built.outputFiles[0].text); // a file, not a data: URL: the bundled react-dom/server needs require()
+const { render, setTranslationLanguage } = await import(pathToFileURL(join(dir, 'card.mjs')).href);
+rmSync(dir, { recursive: true, force: true });
+const fit = (spillGb, known = true) => ({ memoryGb: 250, vramUseGb: 10, ramUseGb: 240, spillGb, known });
+const card = props => render({ gpuName: 'RTX 5070', ramGb: 64, vramGb: 12, ...props });
+
+test('a DeepSeek card with no spill says what it needs on the disk, not just "Fits fully in memory"', () => {
+ setTranslationLanguage('en');
+ const html = card({ fit: fit(0), diskGb: 262.8 });
+ assert.match(html, /Needs about 263 GB of free disk space\. What does not fit in memory is read from your SSD\./);
+ assert.doesNotMatch(html, /Fits fully in memory/);
+ assert.match(html, /class="pc-note"/, 'the existing note markup');
+});
+
+test('the disk comes from the set: 2.00 and 2.25 say different figures', () => {
+ setTranslationLanguage('en');
+ assert.match(card({ fit: fit(0), diskGb: 262.8 }), /about 263 GB/);
+ assert.match(card({ fit: fit(0), diskGb: 279.8 }), /about 280 GB/);
+});
+
+test('a DeepSeek card that does spill keeps its spill line beside the disk line', () => {
+ setTranslationLanguage('en');
+ const html = card({ fit: fit(120), diskGb: 262.8 });
+ assert.match(html, /Needs about 263 GB of free disk space/);
+ assert.match(html, /About 120 GB will be read from the SSD, so answers can be a little slower\./);
+});
+
+test('every other model keeps its card as it was', () => {
+ setTranslationLanguage('en');
+ assert.match(card({ fit: fit(0) }), /Fits fully in memory\./);
+ assert.match(card({ fit: fit(0), diskGb: null }), /Fits fully in memory\./);
+ assert.doesNotMatch(card({ fit: fit(0) }), /free disk space/);
+ assert.match(card({ fit: fit(30) }), /About 30 GB will be read from the SSD/);
+});
+
+test('the words are in all eight languages with the same slots', () => {
+ const en = JSON.parse(read('../src/locales/fix-en.json'));
+ const ids = Object.keys(en).filter(k => /^Needs about \{0\} GB of free disk space|^\{0\} RAM \+ VRAM, plus about \{1\} GB of disk$/.test(en[k]));
+ assert.equal(ids.length, 2);
+ for (const lang of ['zh', 'ja', 'de', 'es', 'ru', 'pt', 'ko']) {
+ const cat = JSON.parse(read(`../src/locales/fix-${lang}.json`));
+ for (const id of ids) {
+ assert.ok(cat[id] && cat[id] !== en[id], `${lang} ${id} is translated`);
+ assert.deepEqual((cat[id].match(/\{\d+\}/g) ?? []).sort(), (en[id].match(/\{\d+\}/g) ?? []).sort(), `${lang} ${id} slots`);
+ }
+ }
+ setTranslationLanguage('de');
+ assert.match(card({ fit: fit(0), diskGb: 262.8 }), /Braucht etwa 263 GB freien Speicherplatz/);
+ setTranslationLanguage('en');
+});
+
+test('the Models screen passes the set\'s disk to the card, and the version line states it for DeepSeek only', () => {
+ const screen = read('../src/components/NativeModels.tsx');
+ assert.match(screen, /<PcFitCard [^>]*diskGb=\{selectedSize\?\.multi_file \? selectedSize\.disk_gb \?\? selectedSize\.download_gb : null\}/);
+ const picker = read('../src/components/VersionPicker.tsx');
+ assert.match(picker, /tr\("\{0\} RAM \+ VRAM, plus about \{1\} GB of disk", \[gb\(fit\.memoryGb\), Math\.round\(selected\.disk_gb\)\]\)/);
+ assert.match(picker, /: fit \? `\$\{gb\(fit\.memoryGb\)\} RAM \+ VRAM` : ''/, 'every other model keeps its line');
+});
diff --git a/tools/strata_mcp.py b/tools/strata_mcp.py
index 5a5eb2fef..37db14da4 100644
--- a/tools/strata_mcp.py
+++ b/tools/strata_mcp.py
@@ -1268,6 +1268,9 @@ class Strata:
# RAM + VRAM the weights need together, WITHOUT the n-gram table (that stays on the SSD): Gyro states it
# (mem_total), for the rest the experts plus ~1 GB for the dense part (Swift IQ2_XS: 35.5 + 1 = 36.5)
"mem_total": bool(d.get("mem_total")), "multi_file": bool(own and own.get("multi_file")),
+ # DeepSeek only: the free disk the set needs, from the set itself (the download: model files, n-gram table, drafter and
+ # metadata, plus the pack folder and room to work, strata_control/dsv41_fit.DISK_HEADROOM_GB): 2.00 and 2.25 differ
+ "disk_gb": self.dsv41_disk_gb(d) if own and own.get("multi_file") else None,
# the first engine that reads this size's files (setup.py "engine"); the app says "needs a newer engine"
# with the update step when the installed one is older. None: any engine that setup accepts.
"engine_min": ".".join(map(str, d["engine"])) if d.get("engine") else None,
@@ -1283,6 +1286,12 @@ class Strata:
"sizes": sizes})
return out
+ @staticmethod
+ def dsv41_disk_gb(d: dict) -> float:
+ """The free disk a DeepSeek set needs: its whole download plus the pack and room to work (the card text says "about")."""
+ from strata_control import dsv41_fit
+ return round(float(d["download_gb"]) + dsv41_fit.DISK_HEADROOM_GB, 1)
+
def dsv41_plan(self, hw, disk_free=None, only=None, model=None) -> dict:
"""strata_control/dsv41_fit.plan for this computer; `only`: the card numbers a launch names (else every card that counts)."""
from strata_control import dsv41_fit
diff --git a/tools/test_setup_dsv41.py b/tools/test_setup_dsv41.py
index cc8af0afe..e2c493806 100644
--- a/tools/test_setup_dsv41.py
+++ b/tools/test_setup_dsv41.py
@@ -315,6 +315,22 @@ class Catalog(unittest.TestCase):
small = next(f for f in s.model_table({"ram_gb": 32.0, "gpus": []}) if f["family"] == "deepseek41")
self.assertTrue(all(x["on_this_pc"].startswith("does not fit") for x in small["sizes"])) # no card
+ def test_each_set_states_the_free_disk_it_needs_from_the_set_itself(self):
+ """The app's DeepSeek card says "Needs about N GB of free disk space": N is the set's whole download plus the pack and room to work, per set."""
+ import strata_mcp as M
+ s = M.Strata(ROOT)
+ table = s.model_table({"ram_gb": 251.0, "gpus": [{**c, "usable": True} for c in FOUR], "engine_vendor": "amd"})
+ fam = next(f for f in table if f["family"] == "deepseek41")
+ for size in fam["sizes"]:
+ self.assertEqual(size["disk_gb"], round(size["download_gb"] + dsv41_fit.DISK_HEADROOM_GB, 1), size["model"])
+ by = {x["model"]: x["disk_gb"] for x in fam["sizes"]}
+ self.assertNotEqual(by["IST-DAS-2.00bpw"], by["IST-DAS-2.25bpw"], "2.00 and 2.25 do not need the same disk")
+ self.assertGreater(by["IST-DAS-2.25bpw"], by["IST-DAS-2.00bpw"])
+ self.assertGreater(by["IST-DAS-2.00bpw"], by["IST-DAS-1.75bpw"])
+ for f in table:
+ if f["family"] != "deepseek41":
+ self.assertTrue(all(x["disk_gb"] is None for x in f["sizes"]), f["family"])
+
def test_the_install_plan(self):
import strata_mcp as M
s = M.Strata(ROOT)