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: "Faster answers on 12 GB NVIDIA cards" row; DeepSeek speed-ups Off also writes DS4_DEFAULTS=026
Niko12216f1bd21e59a4
diff --git a/apps/host/server/native-settings.mjs b/apps/host/server/native-settings.mjsindex 82f93ed8c..e1ebc9544 100644--- a/apps/host/server/native-settings.mjs+++ b/apps/host/server/native-settings.mjs@@ -39,12 +39,17 @@ export const SPEED_SWITCHES=[{id:'faster_long_prompts',label:'Faster long prompts',group:'Speed',hint:'Reads very long prompts faster by approximating part of the work. Off by default: answers about long documents can miss or mix up details.',default:'off',env:{STRATA_KVA:'1'}},+ {id:'faster_12gb_nvidia',label:'Faster answers on 12 GB NVIDIA cards',group:'Speed',+ hint:'Prefers the parts of the model already on the graphics card, which makes answers much faster on 12 GB cards. Turn off if answers look worse than before.',+ default:'on',env:{STRATA_ROUTE_PRIOR:'0'}},{id:'faster_radeon_9000',label:'Faster answers on Radeon RX 9000 / AI PRO R9700',group:'Speed',hint:'Shares the work between the graphics card and the processor in a way that makes answers faster on these cards. Turn off to go back to the previous setting, which is slower.',default:'on',env:{STRATA_PCIE_FRAC_DEFAULT:'old'}},{id:'deepseek_speedups',label:'DeepSeek speed-ups',group:'Speed',hint:'Reads long prompts faster and loads the parts of the model it needs faster. Turn off if DeepSeek stops working or its answers look wrong; it then runs as in version 0.2.6.',- default:'on',env:{DS4_FAST_ATTN:'0',DS4_ATTN_SLAB:'0',DS4_COPY_PIN:'0',DS4_COPY_HUGETLB:'0',DS4_STORE_SPARE:'0',DS4_STORE_PUT:'0'}},+ default:'on',env:{DS4_DEFAULTS:'026',DS4_FAST_ATTN:'0',DS4_ATTN_SLAB:'0',DS4_COPY_PIN:'0',DS4_COPY_HUGETLB:'0',DS4_STORE_SPARE:'0',DS4_STORE_PUT:'0'},+ /* an earlier test build wrote only these six for the same state: they read as the switch being set, and go with it */+ legacy:{DS4_FAST_ATTN:'0',DS4_ATTN_SLAB:'0',DS4_COPY_PIN:'0',DS4_COPY_HUGETLB:'0',DS4_STORE_SPARE:'0',DS4_STORE_PUT:'0'}},];const GFX12=/^gfx120[01]$/i, RADEON_9000=/\b(?:RX\s*9\d{3}|AI\s*PRO\s*R97\d{2}|R97\d{2})\b/i;/**@@ -53,21 +58,29 @@ const GFX12=/^gfx120[01]$/i, RADEON_9000=/\b(?:RX\s*9\d{3}|AI\s*PRO\s*R97\d{2}|R* the Qwen3.8-Flash-Next files (the original, Swift, Coder, Unsloth, Gyro, NVFP4) have none. KVA was measured on the Flash-Next shape (48 layers, 512* experts) and the engine declines it on any other, so "Faster long prompts" is shown for a model without an "arch" only.*/+/** A discrete NVIDIA card of 13 GiB or less: the engine's rule for residency-biased routing (not an integrated chip, not a card that shares system memory). */+const smallNvidia=gpus=>(gpus??[]).some(g=>{+ if(g.usable===false||g.uma||g.integrated||(g.unified_gb??0)>0)return false;+ const vendor=String(g.vendor??'').toLowerCase();+ if(vendor!=='nvidia'&&!(vendor===''&&/nvidia|geforce|\brtx\b|\bgtx\b|quadro|tesla/i.test(String(g.name??''))))return false;+ return g.vram_gb>0&&g.vram_gb<=13;+});export function speedSwitchApplies(id,{deepseek=false,backend=null,gpus=[],arch=null}={}){if(id==='deepseek_speedups')return !!deepseek;if(deepseek)return false; // the Qwen engine's switchesif(id==='faster_long_prompts')return !arch&&(backend==='cuda'||backend==='hip');+ if(id==='faster_12gb_nvidia')return !arch&&backend==='cuda'&&smallNvidia(gpus); // the engine's routing needs the Flash-Next shape (512 experts, top-10) and a CUDA buildif(id==='faster_radeon_9000')return backend==='hip'&&(gpus??[]).some(g=>(!g.vendor||g.vendor==='amd')&&(GFX12.test(String(g.arch??''))||(!g.arch&&RADEON_9000.test(String(g.name??'')))));return false;}/** The switch is outside its default when every entry it writes is in the environment with its value; anything less or other (a hand-edited file, STRATA_KVA=0) is the default state and is left alone. */-export function speedSwitchIsSet(env,id){const sw=SPEED_SWITCHES.find(s=>s.id===id);return !!sw&&Object.entries(sw.env).every(([name,value])=>env?.[name]===value);}+export function speedSwitchIsSet(env,id){const sw=SPEED_SWITCHES.find(s=>s.id===id),has=entries=>!!entries&&Object.keys(entries).length>0&&Object.entries(entries).every(([name,value])=>env?.[name]===value);return !!sw&&(has(sw.env)||has(sw.legacy));}/** Is the feature on for a launch with this environment? */export function speedSwitchIsOn(env,id){const sw=SPEED_SWITCHES.find(s=>s.id===id);return !!sw&&speedSwitchIsSet(env,id)!==(sw.default==='on');}/** The environment with the feature on or off: its default removes the switch's entries, the other state writes them. Nothing else in it changes. */export function setSpeedSwitch(env,id,on){const sw=SPEED_SWITCHES.find(s=>s.id===id);if(!sw)throw new Error(`Unknown speed switch: ${id}`);- const write=on!==(sw.default==='on'),next={...(env??{})};for(const [name,value] of Object.entries(sw.env)){if(write)next[name]=value;else delete next[name];}return next;+ const write=on!==(sw.default==='on'),next={...(env??{})};for(const [name,value] of Object.entries(sw.env)){if(write)next[name]=value;else delete next[name];}if(!write)for(const name of Object.keys(sw.legacy??{}))delete next[name];return next;}/** What the settings answer carries: each switch that applies, with its words, its default, the entries it writes outside the default, and whether the feature is on. */export function speedSwitchRows(env,context){return SPEED_SWITCHES.filter(s=>speedSwitchApplies(s.id,context)).map(s=>({...s,on:speedSwitchIsOn(env,s.id)}));}diff --git a/apps/host/src/components/NativeSettings.tsx b/apps/host/src/components/NativeSettings.tsxindex 062874f1b..356652fad 100644--- a/apps/host/src/components/NativeSettings.tsx+++ b/apps/host/src/components/NativeSettings.tsx@@ -16,8 +16,11 @@ interface SpeedSwitch {hint: string;default: 'on' | 'off';env: Record<string, string>;+ /** What an earlier test build wrote for the same state: it reads as set, and goes with it. */+ legacy?: Record<string, string>;}-const switchIsSet = (sw: SpeedSwitch, env: Record<string, string> | undefined) => Object.entries(sw.env).every(([name, value]) => env?.[name] === value);+const switchHas = (entries: Record<string, string> | undefined, env: Record<string, string> | undefined) => !!entries && Object.keys(entries).length > 0 && Object.entries(entries).every(([name, value]) => env?.[name] === value);+const switchIsSet = (sw: SpeedSwitch, env: Record<string, string> | undefined) => switchHas(sw.env, env) || switchHas(sw.legacy, env);const switchIsOn = (sw: SpeedSwitch, env: Record<string, string> | undefined) => switchIsSet(sw, env) !== (sw.default === 'on');export function NativeSettings({ model }: {model: string;@@ -61,7 +64,7 @@ export function NativeSettings({ model }: {}, [model,revision]);const change = (id: string, value: any) => { const next = { ...values, [id]: value }; setValues(next); setText(JSON.stringify(next, null, 2)); setNotice(''); };/** The default removes the switch's environment entries, the other state writes them: the model's file then carries nothing for a default launch. */- const changeSwitch = (sw: SpeedSwitch, on: boolean) => { const env = { ...(values.env ?? {}) }; const write = on !== (sw.default === 'on'); for (const [name, value] of Object.entries(sw.env)) { if (write) env[name] = value; else delete env[name]; } change('env', env); };+ const changeSwitch = (sw: SpeedSwitch, on: boolean) => { const env = { ...(values.env ?? {}) }; const write = on !== (sw.default === 'on'); for (const [name, value] of Object.entries(sw.env)) { if (write) env[name] = value; else delete env[name]; } if (!write) for (const name of Object.keys(sw.legacy ?? {})) delete env[name]; change('env', env); };async function save() {setPending(true);setError('');diff --git a/apps/host/src/locales/fix-de.json b/apps/host/src/locales/fix-de.jsonindex f378e020d..20e77cadb 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)",+ "fx82": "Schnellere Antworten auf NVIDIA-Karten mit 12 GB",+ "fx83": "Bevorzugt die Teile des Modells, die schon auf der Grafikkarte liegen. Das macht Antworten auf Karten mit 12 GB deutlich schneller. Schalten Sie die Option aus, wenn die Antworten schlechter aussehen als vorher."}diff --git a/apps/host/src/locales/fix-en.json b/apps/host/src/locales/fix-en.jsonindex efe529626..c64be1eeb 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)",+ "fx82": "Faster answers on 12 GB NVIDIA cards",+ "fx83": "Prefers the parts of the model already on the graphics card, which makes answers much faster on 12 GB cards. Turn off if answers look worse than before."}diff --git a/apps/host/src/locales/fix-es.json b/apps/host/src/locales/fix-es.jsonindex 211c1988d..e05f3251b 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)",+ "fx82": "Respuestas más rápidas en tarjetas NVIDIA de 12 GB",+ "fx83": "Prefiere las partes del modelo que ya están en la tarjeta gráfica, lo que hace las respuestas mucho más rápidas en tarjetas de 12 GB. Desactívalo si las respuestas parecen peores que antes."}diff --git a/apps/host/src/locales/fix-ja.json b/apps/host/src/locales/fix-ja.jsonindex 2b888a779..10003face 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": "オフ(推奨)",+ "fx82": "12 GB の NVIDIA カードでの高速な応答",+ "fx83": "グラフィックスカード上にすでにあるモデルの部分を優先して使うため、12 GB のカードで応答がとても速くなります。以前より回答が悪くなったと感じたらオフにしてください。"}diff --git a/apps/host/src/locales/fix-ko.json b/apps/host/src/locales/fix-ko.jsonindex befec99d1..85c435fc0 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": "끔(권장)",+ "fx82": "12GB NVIDIA 카드에서 더 빠른 응답",+ "fx83": "이미 그래픽 카드에 올라와 있는 모델 부분을 우선 사용해 12GB 카드에서 응답이 훨씬 빨라집니다. 답변이 이전보다 나빠 보이면 끄세요."}diff --git a/apps/host/src/locales/fix-pt.json b/apps/host/src/locales/fix-pt.jsonindex 3accb7ef3..35c4d471c 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)",+ "fx82": "Respostas mais rápidas em placas NVIDIA de 12 GB",+ "fx83": "Prefere as partes do modelo que já estão na placa de vídeo, o que deixa as respostas bem mais rápidas em placas de 12 GB. Desative se as respostas parecerem piores do que antes."}diff --git a/apps/host/src/locales/fix-ru.json b/apps/host/src/locales/fix-ru.jsonindex d21473271..f9cc74ff9 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": "Выкл. (рекомендуется)",+ "fx82": "Более быстрые ответы на видеокартах NVIDIA с 12 ГБ",+ "fx83": "Отдаёт предпочтение частям модели, которые уже находятся на видеокарте, поэтому ответы на картах с 12 ГБ становятся намного быстрее. Отключите, если ответы стали выглядеть хуже, чем раньше."}diff --git a/apps/host/src/locales/fix-zh.json b/apps/host/src/locales/fix-zh.jsonindex 48b64cd11..9d66e0384 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": "关闭(推荐)",+ "fx82": "12 GB NVIDIA 显卡上更快的回答",+ "fx83": "优先使用已经在显卡上的模型部分,使 12 GB 显卡上的回答快很多。如果回答看起来比以前差,请关闭。"}diff --git a/apps/host/tests/speed-switches.test.mjs b/apps/host/tests/speed-switches.test.mjsindex 58b8c6383..7bef737f5 100644--- a/apps/host/tests/speed-switches.test.mjs+++ b/apps/host/tests/speed-switches.test.mjs@@ -13,16 +13,19 @@ import { nativeFixture } from './helpers/native-fixture.mjs';const read = rel => readFileSync(fileURLToPath(new URL(rel, import.meta.url)), 'utf8').replace(/\r\n/g, '\n');const ENV = { // what each switch writes outside its defaultfaster_long_prompts: { STRATA_KVA: '1' },+ faster_12gb_nvidia: { STRATA_ROUTE_PRIOR: '0' },faster_radeon_9000: { STRATA_PCIE_FRAC_DEFAULT: 'old' },- deepseek_speedups: { DS4_FAST_ATTN: '0', DS4_ATTN_SLAB: '0', DS4_COPY_PIN: '0', DS4_COPY_HUGETLB: '0', DS4_STORE_SPARE: '0', DS4_STORE_PUT: '0' },+ deepseek_speedups: { DS4_DEFAULTS: '026', DS4_FAST_ATTN: '0', DS4_ATTN_SLAB: '0', DS4_COPY_PIN: '0', DS4_COPY_HUGETLB: '0', DS4_STORE_SPARE: '0', DS4_STORE_PUT: '0' },};-const DEFAULT = { faster_long_prompts: 'off', faster_radeon_9000: 'on', deepseek_speedups: 'on' };+const SIX = ['DS4_FAST_ATTN', 'DS4_ATTN_SLAB', 'DS4_COPY_PIN', 'DS4_COPY_HUGETLB', 'DS4_STORE_SPARE', 'DS4_STORE_PUT'];+const DEFAULT = { faster_long_prompts: 'off', faster_12gb_nvidia: 'on', faster_radeon_9000: 'on', deepseek_speedups: 'on' };+const RTX3060 = { index: 0, name: 'NVIDIA GeForce RTX 3060', vendor: 'nvidia', arch: '86', vram_gb: 12 };const R9700 = { index: 0, name: 'AMD Radeon AI PRO R9700', vendor: 'amd', arch: 'gfx1201', vram_gb: 32 };const RX7900 = { index: 0, name: 'AMD Radeon RX 7900 XTX', vendor: 'amd', arch: 'gfx1100', vram_gb: 24 };const RTX = { index: 0, name: 'NVIDIA GeForce RTX 4090', vendor: 'nvidia', arch: '89', vram_gb: 24 };const STRIX = { index: 0, name: 'AMD Radeon 8060S', vendor: 'amd', arch: 'gfx1151', vram_gb: 96, uma: true };-test('there are exactly three switches; each writes the engine names of the contract and has its default (KVA off, the others on)', () => {+test('there are exactly four switches in the app (the Terminal has one more); each writes the engine names of the contract and has its default (KVA off, the others on)', () => {assert.deepEqual(SPEED_SWITCHES.map(s => s.id), Object.keys(ENV));for (const sw of SPEED_SWITCHES) {assert.deepEqual(sw.env, ENV[sw.id], sw.id);@@ -30,6 +33,50 @@ test('there are exactly three switches; each writes the engine names of the cont}});+test('the Terminal\'s Qwen "0.2.6 behaviour" switch is not in the app', () => {+ assert.ok(!SPEED_SWITCHES.some(s => s.env.STRATA_DEFAULTS || /0\.2\.6 behaviour/.test(s.label)));+ assert.ok(!Object.values(SPEED_SWITCHES.flatMap(s => Object.keys(s.env))).includes('STRATA_DEFAULTS'));+});++test('Faster answers on 12 GB NVIDIA cards: only for Qwen on a discrete CUDA card of 13 GiB or less; Off writes STRATA_ROUTE_PRIOR=0', () => {+ const ids = context => speedSwitchRows({}, context).map(r => r.id);+ assert.deepEqual(ids({ backend: 'cuda', gpus: [RTX3060] }), ['faster_long_prompts', 'faster_12gb_nvidia']);+ assert.deepEqual(ids({ backend: 'cuda', gpus: [{ ...RTX3060, vram_gb: 13 }] }), ['faster_long_prompts', 'faster_12gb_nvidia'], '13 GiB counts');+ assert.deepEqual(ids({ backend: 'cuda', gpus: [{ ...RTX3060, vram_gb: 13.5 }] }), ['faster_long_prompts']);+ assert.deepEqual(ids({ backend: 'cuda', gpus: [{ ...RTX3060, vram_gb: 16 }] }), ['faster_long_prompts'], 'a 16 GB card is not a 12 GB card');+ assert.deepEqual(ids({ backend: 'cuda', gpus: [RTX] }), ['faster_long_prompts']);+ assert.deepEqual(ids({ backend: 'cuda', gpus: [RTX, RTX3060] }), ['faster_long_prompts', 'faster_12gb_nvidia'], 'one small card among others');+ assert.deepEqual(ids({ backend: 'cuda', gpus: [{ ...RTX3060, uma: true }] }), ['faster_long_prompts'], 'not a chip that shares system memory');+ assert.deepEqual(ids({ backend: 'cuda', gpus: [{ ...RTX3060, integrated: true }] }), ['faster_long_prompts']);+ assert.deepEqual(ids({ backend: 'cuda', gpus: [{ ...RTX3060, usable: false }] }), ['faster_long_prompts']);+ assert.deepEqual(ids({ backend: 'cuda', gpus: [{ name: 'GeForce RTX 3060', vram_gb: 12 }] }), ['faster_long_prompts', 'faster_12gb_nvidia'], 'no vendor reported: the name decides');+ assert.deepEqual(ids({ backend: 'cuda', gpus: [{ name: 'Mystery card', vram_gb: 12 }] }), ['faster_long_prompts']);+ assert.deepEqual(ids({ backend: 'hip', gpus: [{ name: 'AMD Radeon RX 7700 XT', vendor: 'amd', arch: 'gfx1101', vram_gb: 12 }] }), ['faster_long_prompts'], 'not a Radeon');+ assert.deepEqual(ids({ backend: 'sycl', gpus: [RTX3060] }), [], 'not a CUDA build');+ assert.deepEqual(ids({ backend: 'cuda', gpus: [RTX3060], arch: 'qwen35moe' }), [], 'Qwen3.6-35B-A3B: the routing needs 512 experts');+ assert.deepEqual(ids({ deepseek: true, backend: 'cuda', gpus: [RTX3060] }), ['deepseek_speedups']);+ const off = setSpeedSwitch({ PATH: '/bin' }, 'faster_12gb_nvidia', false);+ assert.deepEqual(off, { PATH: '/bin', STRATA_ROUTE_PRIOR: '0' });+ assert.equal(speedSwitchIsOn(off, 'faster_12gb_nvidia'), false);+ assert.equal(speedSwitchIsOn({}, 'faster_12gb_nvidia'), true);+ assert.deepEqual(setSpeedSwitch(off, 'faster_12gb_nvidia', true), { PATH: '/bin' });+ assert.equal(speedSwitchIsOn({ STRATA_ROUTE_PRIOR: '2.0' }, 'faster_12gb_nvidia'), true, 'any other value is the user\'s own and reads as the default');+});++test('DeepSeek speed-ups Off writes DS4_DEFAULTS=026 and the six; On removes all seven; the six alone (an earlier test build) still read as Off', () => {+ const env = { DS4_ASYNC_T: '4' };+ const off = setSpeedSwitch(env, 'deepseek_speedups', false);+ assert.deepEqual(Object.keys(off).slice(0, 2), ['DS4_ASYNC_T', 'DS4_DEFAULTS'], 'the master switch first');+ assert.deepEqual(off, { DS4_ASYNC_T: '4', DS4_DEFAULTS: '026', ...Object.fromEntries(SIX.map(k => [k, '0'])) });+ assert.equal(speedSwitchIsOn(off, 'deepseek_speedups'), false);+ assert.deepEqual(setSpeedSwitch(off, 'deepseek_speedups', true), env);+ const six = { DS4_ASYNC_T: '4', ...Object.fromEntries(SIX.map(k => [k, '0'])) };+ assert.equal(speedSwitchIsOn(six, 'deepseek_speedups'), false);+ assert.deepEqual(setSpeedSwitch(six, 'deepseek_speedups', true), env, 'turning it on removes the six too');+ assert.equal(speedSwitchIsOn({ DS4_DEFAULTS: '026' }, 'deepseek_speedups'), true, 'the master switch alone is a hand-edited file: left alone');+ assert.deepEqual(speedSwitchRows(six, { deepseek: true }).map(r => [r.id, r.on, Object.keys(r.legacy).length]), [['deepseek_speedups', false, 6]], 'the client gets the six to recognise and remove');+});+test('a default launch has none of the new environment entries: KVA reads as off, the others as on, and an environment in its default stays as it is', () => {for (const sw of SPEED_SWITCHES) assert.equal(speedSwitchIsSet({}, sw.id), false);const env = { PATH: '/native/bin', STRATA_PREFILL: '2' };