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 long prompts" (KVA) is Off by default in the model's Expert settings; On writes STRATA_KVA=1, Off removes it
Niko12219760cbca4b71
diff --git a/apps/host/server/native-settings.mjs b/apps/host/server/native-settings.mjsindex 37730c782..fb671659c 100644--- a/apps/host/server/native-settings.mjs+++ b/apps/host/server/native-settings.mjs@@ -29,21 +29,22 @@ export const NATIVE_FIELDS=[/** Engine environment names the app shows and edits: STRATA_* and the DeepSeek engine's DS4_*. Any other name in a model's file is kept untouched and not shown. */export const ENV_FLAG=/^(?:STRATA|DS4)_[A-Z0-9_]+$/;/**- * The three speed features that are on by default in 0.2.7 and have an off switch in Expert settings. Each switch, when off, writes exactly the- * environment entries below into the model's settings file ("env"); turning it on again removes them, so a default launch carries none of them.- * The names are the engine switch contract (phaseA-tests/notes-027-plan.md); strata_control/speed_switches.py says the same for the Terminal- * (tests/terminal/test_speed_switches.py compares the two).+ * The speed features of 0.2.7 that have a switch in Expert settings. A switch has a default ('on' or 'off'); outside it, it writes exactly the+ * environment entries `env` into the model's settings file ("env"); back in its default it removes them, so a default launch carries none of them.+ * "Faster long prompts" (Qwen KVA) is OFF by default (owner decision, 26 October): STRATA_KVA=1 turns it on, and an earlier test build's STRATA_KVA=0 reads as off.+ * The other two are on by default. The names are the engine switch contract (phaseA-tests/notes-027-plan.md); strata_control/speed_switches.py says the+ * same for the Terminal (tests/terminal/test_speed_switches.py compares the two).*/export const SPEED_SWITCHES=[{id:'faster_long_prompts',label:'Faster long prompts',group:'Speed',- hint:'Reads long prompts faster by approximating part of the work. Turn off if answers about long documents look wrong.',- off:{STRATA_KVA:'0'}},+ 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_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.',- off:{STRATA_PCIE_FRAC_DEFAULT:'old'}},+ 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.',- off:{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_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;/** Which switches make sense for this model on this PC: only those are shown. `backend` is the engine's (cuda, hip, sycl, metal, cpu). */@@ -54,15 +55,17 @@ export function speedSwitchApplies(id,{deepseek=false,backend=null,gpus=[]}={}){if(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;}-/** A switch is off when every entry it writes is in the environment with its value; anything less (a hand-edited file) reads as on and is left alone. */-export function speedSwitchIsOff(env,id){const sw=SPEED_SWITCHES.find(s=>s.id===id);return !!sw&&Object.entries(sw.off).every(([name,value])=>env?.[name]===value);}-/** The environment with the switch turned off (its entries written) or on (its entries removed). Nothing else in it changes. */+/** 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);}+/** 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 next={...(env??{})};for(const [name,value] of Object.entries(sw.off)){if(on)delete next[name];else next[name]=value;}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];}return next;}-/** What the settings answer carries: each switch that applies, with its words, the entries it writes when off, and whether it is on. */-export function speedSwitchRows(env,context){return SPEED_SWITCHES.filter(s=>speedSwitchApplies(s.id,context)).map(s=>({...s,on:!speedSwitchIsOff(env,s.id)}));}+/** 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)}));}/** Settings the app itself applies when it starts a model (they are not read from the engine's source, so the engine's text never says it supports them). */export const APP_OWNED_FIELDS=['mtp','batchMtp','drafting','ds_experts'];/** The engine arguments without the draft layer: --mtp <folder or count>, --spec-min-p <p> (its confidence threshold) and --batch-mtp. --spec stays: prompt lookup still uses its windows. Same rule as strata_control/draft_layer.py. */diff --git a/apps/host/src/components/NativeSettings.tsx b/apps/host/src/components/NativeSettings.tsxindex 561c8f661..062874f1b 100644--- a/apps/host/src/components/NativeSettings.tsx+++ b/apps/host/src/components/NativeSettings.tsx@@ -9,14 +9,16 @@ import { Btn, ErrorNotice, Select } from './ui';import { speedOptions } from '../lib/deepseek-speed';import type { RunCard } from '../lib/native-fit';import { NativeMcpEditor } from './NativeMcpEditor';-/** One of the three speed features that are on by default: what it is called, what turning it off does, and the engine environment it writes when off (server/native-settings.mjs). */+/** One of the speed features: what it is called, what it does, whether it is on by default, and the engine environment it writes outside its default (server/native-settings.mjs). */interface SpeedSwitch {id: string;label: string;hint: string;- off: Record<string, string>;+ default: 'on' | 'off';+ env: Record<string, string>;}-const switchIsOff = (sw: SpeedSwitch, env: Record<string, string> | undefined) => Object.entries(sw.off).every(([name, value]) => env?.[name] === value);+const switchIsSet = (sw: SpeedSwitch, env: Record<string, string> | undefined) => Object.entries(sw.env).every(([name, value]) => env?.[name] === value);+const switchIsOn = (sw: SpeedSwitch, env: Record<string, string> | undefined) => switchIsSet(sw, env) !== (sw.default === 'on');export function NativeSettings({ model }: {model: string;}) {@@ -58,8 +60,8 @@ export function NativeSettings({ model }: {return () => { active = false; };}, [model,revision]);const change = (id: string, value: any) => { const next = { ...values, [id]: value }; setValues(next); setText(JSON.stringify(next, null, 2)); setNotice(''); };- /** On removes the switch's environment entries, off writes them: the model's file then carries nothing for a default launch. */- const changeSwitch = (sw: SpeedSwitch, on: boolean) => { const env = { ...(values.env ?? {}) }; for (const [name, value] of Object.entries(sw.off)) { if (on) delete env[name]; else env[name] = value; } change('env', env); };+ /** 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); };async function save() {setPending(true);setError('');@@ -112,7 +114,7 @@ export function NativeSettings({ model }: {const rows = (native?.fields ?? []).filter(f => (!f.forModel || (model.toLowerCase().includes(f.forModel) && (f.id !== 'ds_experts' || dsExperts))) && `${tr(f.label)} ${f.id} ${tr(f.group)}`.toLowerCase().includes(query.toLowerCase()));const switchRows = switches.filter(sw => `${tr(sw.label)} ${sw.id} ${tr('Speed')}`.toLowerCase().includes(query.toLowerCase()));return <details className="native-settings"><summary>{tr("Native engine settings")}</summary>{tr(tuned?.changed?.length ? <div className="native-tuned"><p className="small"><strong>{tr("Your tuning '{0}' sets", [tuned.preset?.name ?? ''])}</strong></p><ul>{tuned.changed.map(c => { const d = describeChange(c); return <li key={c.flag}><span>{d.name}</span><b>{d.now || tr('off')}</b>{d.was !== null ? <small className="muted">{tr("was {0}", [d.was])}</small> : null}</li>; })}</ul></div> : null)}<p className="small muted">{tr(!original ? 'Reading saved settings… ' : '')}{tr("Settings for this model. Blank values use Strata\u2019s defaults.")}</p><div className="editor-tabs" role="tablist" aria-label={tr("Native settings editor")}>{tr(['fields', 'json', 'tools'].map(t => <button key={t} role="tab" aria-selected={tab === t} onClick={() => chooseTab(t)}>{tr(t === 'fields' ? 'Parameters' : t === 'json' ? 'JSON' : 'MCP tools')}</button>))}</div>- {tr(tab === 'fields' ? <><input className="st-input" type="search" aria-label={tr("Search native parameters")} placeholder={tr("Search parameters…")} value={query} onChange={e => setQuery(e.target.value)}/>{tr(['Responses', 'GPU & memory', 'Serving', 'Image reading', 'Tools', 'Recovery'].map(group => rows.some(f => f.group === group) ? <section className="native-settings-group" key={group}><h3 className="h4">{tr(group)}</h3>{tr(rows.filter(f => f.group === group).map(f => <label className="native-setting-row" key={f.id}><span><strong>{tr(f.label)}</strong>{tr(f.supported === false ? <small>{tr("Requires a newer Strata installation.")}</small> : f.hint ? <small>{tr(f.hint)}</small> : null)}</span><NativeFieldInput field={f} value={values[f.id]} onChange={v => change(f.id, v)}/></label>))}</section> : null))}{tr(switchRows.length ? <section className="native-settings-group"><h3 className="h4">{tr("Speed")}</h3>{tr(switchRows.map(sw => <label className="native-setting-row" key={sw.id}><span><strong>{tr(sw.label)}</strong><small>{tr(sw.hint)}</small></span><Select ariaLabel={tr(sw.label)} value={switchIsOff(sw, values.env) ? 'off' : 'on'} options={[{ value: 'on', label: 'On (recommended)' }, { value: 'off', label: 'Off' }]} onChange={v => changeSwitch(sw, v === 'on')}/></label>))}</section> : null)}<section className="native-settings-group"><h3 className="h4">{tr("Sampling")}</h3>{tr([['temperature', 'Temperature'], ['top_p', 'Top-p'], ['top_k', 'Top-k'], ['min_p', 'Min-p'], ['repetition_penalty', 'Repetition penalty'], ['presence_penalty', 'Presence penalty'], ['frequency_penalty', 'Frequency penalty'], ['penalty_last_n', 'Penalty window'], ['seed', 'Seed']].map(([id, label]) => <label className="native-setting-row" key={id}><span><strong>{tr(label)}</strong></span><DecimalInput ariaLabel={tr("Native {0}", [label])} value={values.sampling?.[id] ?? null} onChange={n => { const sampling = { ...values.sampling }; if (n === null) delete sampling[id]; else sampling[id] = n; change('sampling', sampling); }}/></label>))}</section></> : tab === 'json' ? <><p className="small muted">{tr("Engine arguments and STRATA environment flags are editable here. Program paths and network access remain managed by the host.")}</p><textarea className="st-input native-json" aria-label={tr("Native configuration JSON")} spellCheck={false} value={text} onChange={e => { setText(e.target.value); setNotice(''); }}/></> : <><p className="small muted">{tr("Add local programs or HTTP MCP servers. Connected tools can read or change the resources you give them access to. Enable tools in chat when you want the model to use them.")}</p><NativeMcpEditor text={mcp} onChange={value => { setMcp(value); setNotice(''); }}/><details><summary className="small">{tr("Configuration example")}</summary><pre className="native-example">{'{\n "files": {\n "command": "npx",\n "args": ["-y", "@modelcontextprotocol/server-filesystem", "/your/folder"],\n "disabled": false\n }\n}'}</pre><p className="xs muted">{tr("Saved credentials are masked. Keep the mask to preserve an existing value; type a new value to replace it.")}</p></details></>)}+ {tr(tab === 'fields' ? <><input className="st-input" type="search" aria-label={tr("Search native parameters")} placeholder={tr("Search parameters…")} value={query} onChange={e => setQuery(e.target.value)}/>{tr(['Responses', 'GPU & memory', 'Serving', 'Image reading', 'Tools', 'Recovery'].map(group => rows.some(f => f.group === group) ? <section className="native-settings-group" key={group}><h3 className="h4">{tr(group)}</h3>{tr(rows.filter(f => f.group === group).map(f => <label className="native-setting-row" key={f.id}><span><strong>{tr(f.label)}</strong>{tr(f.supported === false ? <small>{tr("Requires a newer Strata installation.")}</small> : f.hint ? <small>{tr(f.hint)}</small> : null)}</span><NativeFieldInput field={f} value={values[f.id]} onChange={v => change(f.id, v)}/></label>))}</section> : null))}{tr(switchRows.length ? <section className="native-settings-group"><h3 className="h4">{tr("Speed")}</h3>{tr(switchRows.map(sw => <label className="native-setting-row" key={sw.id}><span><strong>{tr(sw.label)}</strong><small>{tr(sw.hint)}</small></span><Select ariaLabel={tr(sw.label)} value={switchIsOn(sw, values.env) ? 'on' : 'off'} options={sw.default === 'on' ? [{ value: 'on', label: 'On (recommended)' }, { value: 'off', label: 'Off' }] : [{ value: 'off', label: 'Off (recommended)' }, { value: 'on', label: 'On' }]} onChange={v => changeSwitch(sw, v === 'on')}/></label>))}</section> : null)}<section className="native-settings-group"><h3 className="h4">{tr("Sampling")}</h3>{tr([['temperature', 'Temperature'], ['top_p', 'Top-p'], ['top_k', 'Top-k'], ['min_p', 'Min-p'], ['repetition_penalty', 'Repetition penalty'], ['presence_penalty', 'Presence penalty'], ['frequency_penalty', 'Frequency penalty'], ['penalty_last_n', 'Penalty window'], ['seed', 'Seed']].map(([id, label]) => <label className="native-setting-row" key={id}><span><strong>{tr(label)}</strong></span><DecimalInput ariaLabel={tr("Native {0}", [label])} value={values.sampling?.[id] ?? null} onChange={n => { const sampling = { ...values.sampling }; if (n === null) delete sampling[id]; else sampling[id] = n; change('sampling', sampling); }}/></label>))}</section></> : tab === 'json' ? <><p className="small muted">{tr("Engine arguments and STRATA environment flags are editable here. Program paths and network access remain managed by the host.")}</p><textarea className="st-input native-json" aria-label={tr("Native configuration JSON")} spellCheck={false} value={text} onChange={e => { setText(e.target.value); setNotice(''); }}/></> : <><p className="small muted">{tr("Add local programs or HTTP MCP servers. Connected tools can read or change the resources you give them access to. Enable tools in chat when you want the model to use them.")}</p><NativeMcpEditor text={mcp} onChange={value => { setMcp(value); setNotice(''); }}/><details><summary className="small">{tr("Configuration example")}</summary><pre className="native-example">{'{\n "files": {\n "command": "npx",\n "args": ["-y", "@modelcontextprotocol/server-filesystem", "/your/folder"],\n "disabled": false\n }\n}'}</pre><p className="xs muted">{tr("Saved credentials are masked. Keep the mask to preserve an existing value; type a new value to replace it.")}</p></details></>)}<div className="native-settings-actions"><Btn disabled={pending || !original || !dirty} variant="primary" onClick={() => void save()}>{tr(pending ? 'Saving…' : 'Save settings')}</Btn><Btn disabled={pending} onClick={() => { const saved = JSON.parse(original || '{"values":{},"mcp":{}}'); setValues(saved.values); setText(JSON.stringify(saved.values, null, 2)); setMcp(JSON.stringify(saved.mcp, null, 2)); setError(''); }}>{tr("Restore saved")}</Btn></div>{tr(notice ? <p role="status" className="small">{tr(notice)}</p> : null)}{tr(error ? <ErrorNotice message={error} onRetry={() => setRevision(value => value + 1)}/> : null)}</details>;}diff --git a/apps/host/src/locales/fix-de.json b/apps/host/src/locales/fix-de.jsonindex be8bc8e74..f378e020d 100644--- a/apps/host/src/locales/fix-de.json+++ b/apps/host/src/locales/fix-de.json@@ -71,10 +71,11 @@"fx70": "Lange Prompts schneller lesen","fx71": "Schnellere Antworten auf Radeon RX 9000 / AI PRO R9700","fx72": "DeepSeek-Beschleunigungen",- "fx73": "Liest lange Prompts schneller, indem ein Teil der Arbeit angenähert wird. Schalten Sie die Option aus, wenn Antworten zu langen Dokumenten falsch aussehen.",+ "fx73": "Liest sehr lange Prompts schneller, indem ein Teil der Arbeit angenähert wird. Standardmäßig aus: Antworten zu langen Dokumenten können Einzelheiten auslassen oder verwechseln.","fx74": "Verteilt die Arbeit so zwischen Grafikkarte und Prozessor, dass Antworten auf diesen Karten schneller werden. Ausschalten stellt die vorherige, langsamere Einstellung wieder her.","fx75": "Liest lange Prompts schneller und lädt die benötigten Teile des Modells schneller. Schalten Sie die Option aus, wenn DeepSeek nicht mehr funktioniert oder die Antworten falsch aussehen; dann läuft es wie in Version 0.2.6.","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."+ "fx78": "Noch nicht getestet. Ein so langer Kontext nimmt dem Modell Grafikspeicher weg, und lange Prompts werden langsam gelesen.",+ "fx79": "Aus (empfohlen)"}diff --git a/apps/host/src/locales/fix-en.json b/apps/host/src/locales/fix-en.jsonindex 4f498f9c9..efe529626 100644--- a/apps/host/src/locales/fix-en.json+++ b/apps/host/src/locales/fix-en.json@@ -71,10 +71,11 @@"fx70": "Faster long prompts","fx71": "Faster answers on Radeon RX 9000 / AI PRO R9700","fx72": "DeepSeek speed-ups",- "fx73": "Reads long prompts faster by approximating part of the work. Turn off if answers about long documents look wrong.",+ "fx73": "Reads very long prompts faster by approximating part of the work. Off by default: answers about long documents can miss or mix up details.","fx74": "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.","fx75": "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.","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."+ "fx78": "Not tested yet. A context this long takes graphics memory from the model and reads long prompts slowly.",+ "fx79": "Off (recommended)"}diff --git a/apps/host/src/locales/fix-es.json b/apps/host/src/locales/fix-es.jsonindex 2d64de50a..211c1988d 100644--- a/apps/host/src/locales/fix-es.json+++ b/apps/host/src/locales/fix-es.json@@ -71,10 +71,11 @@"fx70": "Prompts largos más rápidos","fx71": "Respuestas más rápidas en Radeon RX 9000 / AI PRO R9700","fx72": "Aceleraciones de DeepSeek",- "fx73": "Lee los prompts largos más rápido aproximando una parte del trabajo. Desactívalo si las respuestas sobre documentos largos parecen incorrectas.",+ "fx73": "Lee prompts muy largos más rápido aproximando una parte del trabajo. Desactivado de forma predeterminada: las respuestas sobre documentos largos pueden omitir o confundir detalles.","fx74": "Reparte el trabajo entre la tarjeta gráfica y el procesador de una forma que acelera las respuestas en estas tarjetas. Si lo desactivas, vuelve el ajuste anterior, que es más lento.","fx75": "Lee los prompts largos más rápido y carga más rápido las partes del modelo que necesita. Desactívalo si DeepSeek deja de funcionar o sus respuestas parecen incorrectas; entonces funciona como en la versión 0.2.6.","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."+ "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)"}diff --git a/apps/host/src/locales/fix-ja.json b/apps/host/src/locales/fix-ja.jsonindex f29d4dce5..2b888a779 100644--- a/apps/host/src/locales/fix-ja.json+++ b/apps/host/src/locales/fix-ja.json@@ -71,10 +71,11 @@"fx70": "長いプロンプトを高速化","fx71": "Radeon RX 9000 / AI PRO R9700 での高速な応答","fx72": "DeepSeek の高速化",- "fx73": "処理の一部を近似することで、長いプロンプトをより速く読み込みます。長い文書についての回答がおかしいと感じたらオフにしてください。",+ "fx73": "処理の一部を近似することで、とても長いプロンプトをより速く読み込みます。既定ではオフです。長い文書についての回答で、細部が抜けたり混ざったりすることがあります。","fx74": "これらのグラフィックスカードで応答が速くなるよう、グラフィックスカードとプロセッサーの間で作業を分担します。オフにすると、以前の(より遅い)設定に戻ります。","fx75": "長いプロンプトと、必要なモデルの部分をより速く読み込みます。DeepSeek が動かなくなったり、回答がおかしいと感じたりしたらオフにしてください。バージョン 0.2.6 と同じ動作になります。","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": "まだテストされていません。これほど長いコンテキストは、モデルが使うグラフィックスメモリを消費し、長いプロンプトの読み込みも遅くなります。"+ "fx78": "まだテストされていません。これほど長いコンテキストは、モデルが使うグラフィックスメモリを消費し、長いプロンプトの読み込みも遅くなります。",+ "fx79": "オフ(推奨)"}diff --git a/apps/host/src/locales/fix-ko.json b/apps/host/src/locales/fix-ko.jsonindex 5924193c6..befec99d1 100644--- a/apps/host/src/locales/fix-ko.json+++ b/apps/host/src/locales/fix-ko.json@@ -71,10 +71,11 @@"fx70": "긴 프롬프트 더 빠르게 읽기","fx71": "Radeon RX 9000 / AI PRO R9700에서 더 빠른 응답","fx72": "DeepSeek 속도 향상",- "fx73": "작업의 일부를 근사 처리하여 긴 프롬프트를 더 빠르게 읽습니다. 긴 문서에 대한 답변이 이상해 보이면 끄세요.",+ "fx73": "작업의 일부를 근사 처리하여 매우 긴 프롬프트를 더 빠르게 읽습니다. 기본값은 꺼짐입니다. 긴 문서에 대한 답변에서 세부 내용이 빠지거나 뒤섞일 수 있습니다.","fx74": "이 그래픽 카드에서 응답이 빨라지도록 그래픽 카드와 프로세서가 작업을 나눕니다. 끄면 이전의 더 느린 설정으로 돌아갑니다.","fx75": "긴 프롬프트와 필요한 모델 부분을 더 빠르게 읽고 불러옵니다. DeepSeek가 멈추거나 답변이 이상해 보이면 끄세요. 그러면 0.2.6 버전처럼 동작합니다.","fx76": "켬(권장)","fx77": "매우 큰 모델입니다. 다운로드는 {0}GB이고, 거의 같은 크기의 여유 디스크 공간이 필요합니다. NVIDIA RTX 30·40·50 시리즈 카드, Radeon AI PRO R9700(Linux), 또는 Ryzen AI Max / Strix Halo PC(Windows)에서 실행됩니다. 속도는 메모리와 카드에 따라 달라집니다(아래 줄에 이 컴퓨터에서 기대할 수 있는 속도가 표시됩니다). 메모리에 들어가지 않는 부분은 SSD에서 읽으므로 NVMe 드라이브가 중요합니다.",- "fx78": "아직 테스트하지 않았습니다. 이렇게 긴 컨텍스트는 모델이 쓸 그래픽 메모리를 차지하고, 긴 프롬프트를 느리게 읽습니다."+ "fx78": "아직 테스트하지 않았습니다. 이렇게 긴 컨텍스트는 모델이 쓸 그래픽 메모리를 차지하고, 긴 프롬프트를 느리게 읽습니다.",+ "fx79": "끔(권장)"}diff --git a/apps/host/src/locales/fix-pt.json b/apps/host/src/locales/fix-pt.jsonindex 2d1b40680..3accb7ef3 100644--- a/apps/host/src/locales/fix-pt.json+++ b/apps/host/src/locales/fix-pt.json@@ -71,10 +71,11 @@"fx70": "Prompts longos mais rápidos","fx71": "Respostas mais rápidas em Radeon RX 9000 / AI PRO R9700","fx72": "Acelerações do DeepSeek",- "fx73": "Lê prompts longos mais rápido aproximando parte do trabalho. Desative se as respostas sobre documentos longos parecerem erradas.",+ "fx73": "Lê prompts muito longos mais rápido aproximando parte do trabalho. Desativado por padrão: as respostas sobre documentos longos podem omitir ou misturar detalhes.","fx74": "Divide o trabalho entre a placa de vídeo e o processador de um jeito que deixa as respostas mais rápidas nessas placas. Ao desativar, volta a configuração anterior, que é mais lenta.","fx75": "Lê prompts longos mais rápido e carrega mais rápido as partes do modelo de que precisa. Desative se o DeepSeek parar de funcionar ou as respostas parecerem erradas; ele passa a funcionar como na versão 0.2.6.","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."+ "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)"}diff --git a/apps/host/src/locales/fix-ru.json b/apps/host/src/locales/fix-ru.jsonindex 1cc6e7eb9..d21473271 100644--- a/apps/host/src/locales/fix-ru.json+++ b/apps/host/src/locales/fix-ru.json@@ -71,10 +71,11 @@"fx70": "Более быстрое чтение длинных запросов","fx71": "Более быстрые ответы на Radeon RX 9000 / AI PRO R9700","fx72": "Ускорения DeepSeek",- "fx73": "Читает длинные запросы быстрее, приближённо выполняя часть работы. Отключите, если ответы по длинным документам выглядят неверными.",+ "fx73": "Читает очень длинные запросы быстрее, приближённо выполняя часть работы. По умолчанию выключено: в ответах по длинным документам могут пропадать или путаться детали.","fx74": "Распределяет работу между видеокартой и процессором так, что ответы на этих видеокартах получаются быстрее. Если отключить, вернётся прежняя, более медленная настройка.","fx75": "Быстрее читает длинные запросы и быстрее загружает нужные части модели. Отключите, если DeepSeek перестаёт работать или его ответы выглядят неверными; тогда он работает как в версии 0.2.6.","fx76": "Вкл. (рекомендуется)","fx77": "Это очень большая модель. Загрузка — {0} ГБ, и нужно почти столько же свободного места на диске. Она работает на видеокартах NVIDIA RTX серий 30, 40 и 50, на Radeon AI PRO R9700 (Linux) или на ПК с Ryzen AI Max / Strix Halo (Windows); скорость зависит от памяти и видеокарты (строка ниже подскажет, чего ждать на этом компьютере). То, что не помещается в память, читается с вашего SSD, поэтому важен накопитель NVMe.",- "fx78": "Ещё не проверено. Такой длинный контекст отнимает у модели видеопамять, а длинные запросы читаются медленно."+ "fx78": "Ещё не проверено. Такой длинный контекст отнимает у модели видеопамять, а длинные запросы читаются медленно.",+ "fx79": "Выкл. (рекомендуется)"}diff --git a/apps/host/src/locales/fix-zh.json b/apps/host/src/locales/fix-zh.jsonindex 16f90879a..48b64cd11 100644--- a/apps/host/src/locales/fix-zh.json+++ b/apps/host/src/locales/fix-zh.json@@ -71,10 +71,11 @@"fx70": "更快读取长提示词","fx71": "Radeon RX 9000 / AI PRO R9700 上更快的回答","fx72": "DeepSeek 加速",- "fx73": "通过近似处理部分计算,更快读取长提示词。如果关于长文档的回答看起来不对,请关闭。",+ "fx73": "通过近似处理部分计算,更快读取很长的提示词。默认关闭:关于长文档的回答可能遗漏或混淆细节。","fx74": "以更适合这些显卡的方式在显卡和处理器之间分配工作,使回答更快。关闭后恢复到之前较慢的设置。","fx75": "更快读取长提示词,并更快加载所需的模型部分。如果 DeepSeek 无法运行或回答看起来不对,请关闭;关闭后它将像 0.2.6 版本那样运行。","fx76": "开启(推荐)","fx77": "这是一个非常大的模型。下载大小为 {0} GB,需要差不多同样大小的可用磁盘空间。它可在 NVIDIA RTX 30、40 和 50 系列显卡、Radeon AI PRO R9700(Linux)或 Ryzen AI Max / Strix Halo 电脑(Windows)上运行;速度取决于内存和显卡(下面一行会说明在这台电脑上的预期)。内存放不下的部分会从你的 SSD 读取,所以 NVMe 硬盘很重要。",- "fx78": "尚未测试。这么长的上下文会占用本该给模型使用的显存,读取长提示词也会很慢。"+ "fx78": "尚未测试。这么长的上下文会占用本该给模型使用的显存,读取长提示词也会很慢。",+ "fx79": "关闭(推荐)"}diff --git a/apps/host/tests/speed-switches.test.mjs b/apps/host/tests/speed-switches.test.mjsindex 8df4a6342..ea1597523 100644--- a/apps/host/tests/speed-switches.test.mjs+++ b/apps/host/tests/speed-switches.test.mjs@@ -1,57 +1,75 @@-// The three 0.2.7 speed features are on by default and each has an off switch in Expert settings (the model's "Native engine settings").-// Off writes exactly the engine environment of the switch contract (phaseA-tests/notes-027-plan.md) into the model's settings file; on removes it,-// so a default launch carries none of it. strata_control/speed_switches.py says the same for the Terminal (tests/terminal/test_speed_switches.py).+// The 0.2.7 speed features have a switch in Expert settings (the model's "Native engine settings"). "Faster long prompts" (Qwen KVA) is OFF by default (owner+// decision, 26 October) and STRATA_KVA=1 turns it on; the Radeon RX 9000 and DeepSeek ones are on by default and turning them off writes their entries.+// Back in its default a switch removes its entries, so a default launch carries none of them. strata_control/speed_switches.py says the same for the+// Terminal (tests/terminal/test_speed_switches.py).import test from 'node:test';import assert from 'node:assert/strict';import { readFileSync, writeFileSync } from 'node:fs';import { join } from 'node:path';import { fileURLToPath } from 'node:url';-import { SPEED_SWITCHES, speedSwitchApplies, speedSwitchIsOff, speedSwitchRows, setSpeedSwitch, validateNativeSettings, publicNativeEnv, restoreNativeEnv } from '../server/native-settings.mjs';+import { SPEED_SWITCHES, speedSwitchApplies, speedSwitchIsSet, speedSwitchIsOn, speedSwitchRows, setSpeedSwitch, validateNativeSettings, publicNativeEnv, restoreNativeEnv } from '../server/native-settings.mjs';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 OFF = {- faster_long_prompts: { STRATA_KVA: '0' },+const ENV = { // what each switch writes outside its default+ faster_long_prompts: { STRATA_KVA: '1' },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' },};+const DEFAULT = { faster_long_prompts: 'off', faster_radeon_9000: 'on', deepseek_speedups: 'on' };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 and each writes the engine names of the contract', () => {- assert.deepEqual(SPEED_SWITCHES.map(s => s.id), Object.keys(OFF));- for (const sw of SPEED_SWITCHES) assert.deepEqual(sw.off, OFF[sw.id], sw.id);+test('there are exactly three switches; 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);+ assert.equal(sw.default, DEFAULT[sw.id], sw.id);+ }});-test('a default launch has none of the new environment entries: every switch reads as on and an empty environment stays empty', () => {- for (const sw of SPEED_SWITCHES) assert.equal(speedSwitchIsOff({}, sw.id), false);+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' };- for (const sw of SPEED_SWITCHES) assert.deepEqual(setSpeedSwitch(env, sw.id, true), env, 'on removes nothing that is not the switch\'s');+ for (const sw of SPEED_SWITCHES) assert.deepEqual(setSpeedSwitch(env, sw.id, sw.default === 'on'), env, 'the default state removes nothing that is not the switch\'s');const rows = speedSwitchRows({}, { backend: 'hip', gpus: [R9700] });- assert.ok(rows.every(r => r.on === true));+ assert.deepEqual(rows.map(r => [r.id, r.on]), [['faster_long_prompts', false], ['faster_radeon_9000', true]]);+ assert.deepEqual(rows.map(r => r.default), ['off', 'on']);+});++test('Faster long prompts: On writes STRATA_KVA=1, Off removes it, and an earlier test build\'s STRATA_KVA=0 shows as Off', () => {+ const env = { PATH: '/native/bin' };+ assert.deepEqual(setSpeedSwitch(env, 'faster_long_prompts', true), { PATH: '/native/bin', STRATA_KVA: '1' });+ assert.deepEqual(setSpeedSwitch({ ...env, STRATA_KVA: '1' }, 'faster_long_prompts', false), env);+ assert.equal(speedSwitchIsOn({ STRATA_KVA: '1' }, 'faster_long_prompts'), true);+ assert.equal(speedSwitchIsOn({ STRATA_KVA: '0' }, 'faster_long_prompts'), false, 'stored by the off switch of an earlier build: harmless, and Off is what it is now');+ assert.equal(speedSwitchIsOn({}, 'faster_long_prompts'), false);+ assert.deepEqual(setSpeedSwitch({ ...env, STRATA_KVA: '0' }, 'faster_long_prompts', false), env, 'choosing Off again cleans it up');+ assert.deepEqual(speedSwitchRows({ STRATA_KVA: '0' }, { backend: 'cuda', gpus: [RTX] }).map(r => [r.id, r.on]), [['faster_long_prompts', false]]);});-test('each switch off yields exactly its entries and nothing else; on again gives back the same environment', () => {+test('each switch outside its default yields exactly its entries and nothing else; back in the default gives back the same environment', () => {const env = { PATH: '/native/bin', STRATA_PREFILL: '2', DS4_ASYNC_T: '4' };for (const sw of SPEED_SWITCHES) {- const off = setSpeedSwitch(env, sw.id, false);- assert.deepEqual(off, { ...env, ...OFF[sw.id] }, sw.id);- assert.equal(speedSwitchIsOff(off, sw.id), true);- for (const other of SPEED_SWITCHES) if (other.id !== sw.id) assert.equal(speedSwitchIsOff(off, other.id), false, `${sw.id} does not turn ${other.id} off`);- const back = setSpeedSwitch(off, sw.id, true);+ const other = setSpeedSwitch(env, sw.id, sw.default !== 'on'); // the non-default state: KVA on, the others off+ assert.deepEqual(other, { ...env, ...ENV[sw.id] }, sw.id);+ assert.equal(speedSwitchIsSet(other, sw.id), true);+ assert.equal(speedSwitchIsOn(other, sw.id), sw.default !== 'on');+ for (const another of SPEED_SWITCHES) if (another.id !== sw.id) assert.equal(speedSwitchIsSet(other, another.id), false, `${sw.id} does not touch ${another.id}`);+ const back = setSpeedSwitch(other, sw.id, sw.default === 'on');assert.deepEqual(back, env, sw.id);assert.equal(JSON.stringify(back), JSON.stringify(env), 'byte for byte, key order included');}assert.throws(() => setSpeedSwitch({}, 'nothing', false), /Unknown speed switch/);});-test('a hand-edited file with only some of a switch\'s entries reads as on and is left alone by an unchanged save', () => {+test('a hand-edited file with only some of a switch\'s entries reads as its default and is left alone by an unchanged save', () => {const partial = { DS4_FAST_ATTN: '0' };- assert.equal(speedSwitchIsOff(partial, 'deepseek_speedups'), false);- assert.deepEqual(setSpeedSwitch(partial, 'faster_long_prompts', true), partial);- assert.equal(speedSwitchIsOff({ STRATA_KVA: '1' }, 'faster_long_prompts'), false, 'only the off value counts');+ assert.equal(speedSwitchIsOn(partial, 'deepseek_speedups'), true);+ assert.deepEqual(setSpeedSwitch(partial, 'faster_long_prompts', false), partial);+ assert.equal(speedSwitchIsOn({ STRATA_KVA: 'yes' }, 'faster_long_prompts'), false, 'only 1 turns it on');});test('a switch shows only where it applies: Qwen on CUDA or HIP, Qwen on a Radeon RX 9000 / R9700, DeepSeek', () => {@@ -71,13 +89,13 @@ test('a switch shows only where it applies: Qwen on CUDA or HIP, Qwen on a Radeo});test('the environment names round-trip through the validator, the public view and the restore, and other names stay untouched', () => {- const all = Object.assign({}, ...Object.values(OFF));+ const all = Object.assign({}, ...Object.values(ENV));assert.deepEqual(validateNativeSettings({ env: all }), { env: all });assert.throws(() => validateNativeSettings({ env: { HOME: '/tmp' } }));assert.throws(() => validateNativeSettings({ env: { DS4_fast: '0' } }));const previous = { PATH: '/native/bin', HIP_VISIBLE_DEVICES: '0', ...all };assert.deepEqual(publicNativeEnv(previous), all);- assert.deepEqual(restoreNativeEnv({}, previous), { PATH: '/native/bin', HIP_VISIBLE_DEVICES: '0' }, 'turning every switch on removes only theirs');+ assert.deepEqual(restoreNativeEnv({}, previous), { PATH: '/native/bin', HIP_VISIBLE_DEVICES: '0' }, 'every switch back in its default removes only theirs');assert.deepEqual(restoreNativeEnv(all, { PATH: '/native/bin' }), { PATH: '/native/bin', ...all });});@@ -87,7 +105,7 @@ function setConfig(f, model, patch) {return path;}-test('through the host: the settings answer lists the switches that apply, and off then on gives back the same file', async () => {+test('through the host: the settings answer lists the switches that apply, and KVA on then off gives back the same file', async () => {const f = nativeFixture();try {f.setHardware({ ram_gb: 64, gpus: [R9700] });@@ -95,24 +113,24 @@ test('through the host: the settings answer lists the switches that apply, and oawait f.control.refresh();const before = readFileSync(path, 'utf8');const first = f.control.settings('iq2_xs');- assert.deepEqual(first.speedSwitches.map(s => [s.id, s.on]), [['faster_long_prompts', true], ['faster_radeon_9000', true]]);- assert.deepEqual(first.speedSwitches.map(s => s.off), [OFF.faster_long_prompts, OFF.faster_radeon_9000], 'the client writes what the host says');+ assert.deepEqual(first.speedSwitches.map(s => [s.id, s.on]), [['faster_long_prompts', false], ['faster_radeon_9000', true]]);+ assert.deepEqual(first.speedSwitches.map(s => [s.default, s.env]), [['off', ENV.faster_long_prompts], ['on', ENV.faster_radeon_9000]], 'the client writes what the host says');assert.equal('STRATA_KVA' in first.values.env, false, 'default: nothing in the environment');- // the client turns "Faster long prompts" off: it sends the environment with the entry added- const off = f.control.save('iq2_xs', { values: { env: { ...first.values.env, ...OFF.faster_long_prompts } } });+ // the client turns "Faster long prompts" on: it sends the environment with the entry added+ const off = f.control.save('iq2_xs', { values: { env: { ...first.values.env, ...ENV.faster_long_prompts } } });const file = JSON.parse(readFileSync(path, 'utf8'));- assert.equal(file.env.STRATA_KVA, '0');+ assert.equal(file.env.STRATA_KVA, '1');assert.equal(file.env.PATH, '/native/bin');assert.equal(file.env.STRATA_TOKEN, 'private', 'a credential is kept, not lost behind its mask');assert.equal('STRATA_PCIE_FRAC_DEFAULT' in file.env, false);- assert.deepEqual(off.speedSwitches.map(s => [s.id, s.on]), [['faster_long_prompts', false], ['faster_radeon_9000', true]]);+ assert.deepEqual(off.speedSwitches.map(s => [s.id, s.on]), [['faster_long_prompts', true], ['faster_radeon_9000', true]]);- // and on again: the entry is gone and the file is as it was+ // and Off again: the entry is gone and the file is as it wasconst env = { ...off.values.env };delete env.STRATA_KVA;const on = f.control.save('iq2_xs', { values: { env } });- assert.deepEqual(on.speedSwitches.map(s => s.on), [true, true]);+ assert.deepEqual(on.speedSwitches.map(s => s.on), [false, true]);const after = JSON.parse(readFileSync(path, 'utf8'));assert.deepEqual(after, JSON.parse(before));assert.equal(JSON.stringify(after.env), JSON.stringify(JSON.parse(before).env), 'the same environment, same order');@@ -128,10 +146,10 @@ test('through the host: a DeepSeek model gets its own switch only, and the Strixconst first = f.control.settings('iq2_xs');assert.deepEqual(first.speedSwitches.map(s => [s.id, s.on]), [['deepseek_speedups', true]]);assert.equal(first.values.env.DS4_ASYNC_T, '4', 'setup\'s own entry is visible and kept');- const off = f.control.save('iq2_xs', { values: { env: { ...first.values.env, ...OFF.deepseek_speedups } } });- assert.deepEqual(JSON.parse(readFileSync(path, 'utf8')).env, { DS4_ASYNC_T: '4', ...OFF.deepseek_speedups });+ const off = f.control.save('iq2_xs', { values: { env: { ...first.values.env, ...ENV.deepseek_speedups } } });+ assert.deepEqual(JSON.parse(readFileSync(path, 'utf8')).env, { DS4_ASYNC_T: '4', ...ENV.deepseek_speedups });assert.equal(off.speedSwitches[0].on, false);- const env = Object.fromEntries(Object.entries(off.values.env).filter(([name]) => !(name in OFF.deepseek_speedups)));+ const env = Object.fromEntries(Object.entries(off.values.env).filter(([name]) => !(name in ENV.deepseek_speedups)));f.control.save('iq2_xs', { values: { env } });assert.deepEqual(JSON.parse(readFileSync(path, 'utf8')).env, { DS4_ASYNC_T: '4' });} finally { await f.cleanup(); }@@ -147,15 +165,15 @@ test('through the host: a Qwen model on a PC the engine cannot speed up offers n} finally { await f.cleanup(); }});-test('the Expert settings show the rows in the existing row layout with an On / Off choice, and the words are in all eight languages', () => {+test('the Expert settings show the rows in the existing row layout with an On / Off choice (Off recommended for KVA), and the words are in all eight languages', () => {const screen = read('../src/components/NativeSettings.tsx');assert.match(screen, /<h3 className="h4">\{tr\("Speed"\)\}<\/h3>/);assert.match(screen, /<label className="native-setting-row" key=\{sw\.id\}><span><strong>\{tr\(sw\.label\)\}<\/strong><small>\{tr\(sw\.hint\)\}<\/small><\/span><Select /, 'the same row, the same Select');- assert.match(screen, /label: 'On \(recommended\)' \}, \{ value: 'off', label: 'Off' \}/);- assert.match(screen, /if \(on\) delete env\[name\]; else env\[name\] = value;/, 'on removes the entries');+ assert.match(screen, /\[\{ value: 'on', label: 'On \(recommended\)' \}, \{ value: 'off', label: 'Off' \}\] : \[\{ value: 'off', label: 'Off \(recommended\)' \}, \{ value: 'on', label: 'On' \}\]/);+ assert.match(screen, /if \(write\) env\[name\] = value; else delete env\[name\];/, 'the default removes the entries');const languages = ['en', 'zh', 'ja', 'de', 'es', 'ru', 'pt', 'ko'];const catalog = lang => JSON.parse(read(`../src/locales/fix-${lang}.json`));- const words = [...SPEED_SWITCHES.flatMap(s => [s.label, s.hint]), 'On (recommended)'];+ const words = [...SPEED_SWITCHES.flatMap(s => [s.label, s.hint]), 'On (recommended)', 'Off (recommended)'];const english = Object.values(catalog('en'));for (const word of words) assert.ok(english.includes(word), `English catalog: ${word}`);for (const lang of languages.slice(1)) {@@ -170,11 +188,11 @@ test('the Expert settings show the rows in the existing row layout with an On /for (const lang of ['zh', 'ja', 'ko']) assert.ok(Object.values(catalog(lang)).some(v => v.includes('0.2.6')), 'the version number is kept in the DeepSeek text');});-test('the effect texts say what turning the feature off does, in plain words', () => {+test('the effect texts say what the feature does and what the other choice costs, in plain words', () => {for (const sw of SPEED_SWITCHES) {- assert.match(sw.hint, /[Tt]urn off/, sw.id);+ assert.ok(sw.default === 'off' ? /Off by default/.test(sw.hint) : /[Tt]urn off/.test(sw.hint), sw.id);assert.ok(sw.hint.length < 260, sw.id);assert.ok(!/STRATA_|DS4_|env|--/.test(sw.hint), 'no flags or variable names for a non-technical reader');}- assert.equal(SPEED_SWITCHES[0].hint, 'Reads long prompts faster by approximating part of the work. Turn off if answers about long documents look wrong.');+ assert.equal(SPEED_SWITCHES[0].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.');});