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++
Other local models: the back link says Back; the running version's group can be collapsed
Niko122199cc9829a090
diff --git a/apps/host/src/components/NativeLocalModel.tsx b/apps/host/src/components/NativeLocalModel.tsxindex f2d05aaa9..09f9750bd 100644--- a/apps/host/src/components/NativeLocalModel.tsx+++ b/apps/host/src/components/NativeLocalModel.tsx@@ -58,7 +58,7 @@ export function NativeLocalModel({ onBack }: { onBack: () => void }) {finally { setPending(false); }}const found = checked ? problem(checked.preview.issues) : null;- return <Screen plainHeader title={tr("Model")} actions={<Btn onClick={onBack}>{tr("Strata optimized models")}</Btn>}>+ return <Screen plainHeader title={tr("Model")} actions={<Btn onClick={onBack}>{tr("Back")}</Btn>}><div className="native-model-layout"><div className="stack stack--lg"><section className="st-card native-choice"><h2 className="h3">{tr("Use a local GGUF…")}</h2>diff --git a/apps/host/src/components/VersionPicker.tsx b/apps/host/src/components/VersionPicker.tsxindex 346a6bb08..03939dc86 100644--- a/apps/host/src/components/VersionPicker.tsx+++ b/apps/host/src/components/VersionPicker.tsx@@ -4,7 +4,7 @@ import { Icon } from './ui';import { FloatingMenu } from './FloatingMenu';import { cx } from '../lib/format';import type { CatalogVersion } from '../lib/native-catalog';-import { RECOMMENDED, VERSION_GROUPS, fitOn, type FitHardware } from '../lib/native-fit';+import { RECOMMENDED, VERSION_GROUPS, fitOn, groupOpen, type FitHardware } from '../lib/native-fit';/** The name a version goes by in the list: the quantization, with the maker where the quantization alone is ambiguous. */export function versionName(v: CatalogVersion, withMaker = false): string {@@ -33,7 +33,8 @@ export function VersionPicker({ versions, selectedId, hardware, onSelect, onOwnG}) {const trigger = useRef<HTMLButtonElement>(null);const [open, setOpen] = useState(false);- const [folded, setFolded] = useState<Record<string, boolean>>({});+ // A group is open when the person opened it; until they touch it, only the group that holds the selected version is open.+ const [opened, setOpened] = useState<Record<string, boolean>>({});const selected = versions.find(v => v.id === selectedId);const recommended = RECOMMENDED.map(r => ({ r, v: versions.find(v => v.sourceFamily === r.family && v.model === r.model) })).filter((x): x is { r: typeof RECOMMENDED[number]; v: CatalogVersion } => !!x.v);const groups = [@@ -61,9 +62,9 @@ export function VersionPicker({ versions, selectedId, hardware, onSelect, onOwnG<div className="version-head"><span>{tr("Recommended")}</span><span>{tr("RAM + VRAM")}</span><span>{tr("Download")}</span></div>{tr(recommended.map(({ r, v }) => row(v, versionName(v, true), r.note)))}{tr(groups.map(g => {- const closed = folded[g.id] !== false && !g.items.some(v => v.id === selectedId);+ const closed = !groupOpen(opened, g.id, g.items.some(v => v.id === selectedId));return <div className="version-group" key={g.id} data-open={!closed || undefined}>- <button role="menuitem" className="version-group__head" aria-expanded={!closed} onClick={() => setFolded(f => ({ ...f, [g.id]: closed ? false : true }))}><span>{tr(g.title)} <span className="muted">{tr(g.items.length)}</span></span><Icon name="chevron" size={14} className={cx(!closed && 'is-open')}/></button>+ <button role="menuitem" className="version-group__head" aria-expanded={!closed} onClick={() => setOpened(o => ({ ...o, [g.id]: closed }))}><span>{tr(g.title)} <span className="muted">{tr(g.items.length)}</span></span><Icon name="chevron" size={14} className={cx(!closed && 'is-open')}/></button>{tr(!closed ? g.items.map(v => row(v, versionName(v))) : null)}</div>;}))}diff --git a/apps/host/src/lib/native-fit.ts b/apps/host/src/lib/native-fit.tsindex 5ea42087b..32250cc7d 100644--- a/apps/host/src/lib/native-fit.ts+++ b/apps/host/src/lib/native-fit.ts@@ -57,3 +57,7 @@ export const RECOMMENDED: { family: string; model: string; note: string }[] = [{ family: 'qwen', model: 'IQ3_S', note: 'best quality for its size' },{ family: 'unsloth', model: 'UD-Q4_K_XL', note: 'more quality' },];++/** Is a group of the version list open? What the person chose wins; until they touch it, only the group holding the selected version is open+ * (the running version's group used to stay open whatever was clicked). */+export const groupOpen = (opened: Record<string, boolean>, id: string, containsSelected: boolean): boolean => opened[id] ?? containsSelected;diff --git a/apps/host/src/screens/ModelRun.tsx b/apps/host/src/screens/ModelRun.tsxindex e2566bded..904196ec6 100644--- a/apps/host/src/screens/ModelRun.tsx+++ b/apps/host/src/screens/ModelRun.tsx@@ -38,7 +38,7 @@ export function ModelRunScreen() {return <NativeLocalModel onBack={() => { setOther(false); setImportFirst(false); }}/>;if (native && !other)return <NativeModels onOtherModels={() => setOther(true)} onImport={() => { setImportFirst(true); setOther(true); }}/>;- return <><LegacyModelRunScreen importFirst={importFirst} initialVariant={location.query.get('variant') ?? undefined}/>{tr(other ? <button className="st-btn native-return" onClick={() => setOther(false)}>{tr("Strata optimized models")}</button> : null)}</>;+ return <><LegacyModelRunScreen importFirst={importFirst} initialVariant={location.query.get('variant') ?? undefined}/>{tr(other ? <button className="st-btn native-return" onClick={() => setOther(false)}>{tr("Back")}</button> : null)}</>;}function LegacyModelRunScreen({ importFirst = false, initialVariant }: {importFirst?: boolean;diff --git a/apps/host/tests/native-fit.test.mjs b/apps/host/tests/native-fit.test.mjsindex 67f47110a..cabab07ac 100644--- a/apps/host/tests/native-fit.test.mjs+++ b/apps/host/tests/native-fit.test.mjs@@ -5,7 +5,7 @@ import { readFile } from 'node:fs/promises';import { transform } from 'esbuild';const { code } = await transform(await readFile(new URL('../src/lib/native-fit.ts', import.meta.url), 'utf8'), { loader: 'ts', format: 'esm' });-const { fitOn, memoryNeeded, RECOMMENDED, VERSION_GROUPS } = await import(`data:text/javascript;base64,${Buffer.from(code).toString('base64')}`);+const { fitOn, memoryNeeded, RECOMMENDED, VERSION_GROUPS, groupOpen } = await import(`data:text/javascript;base64,${Buffer.from(code).toString('base64')}`);const swift = { ram_needed_gb: 48, experts_gb: 35.5 };const gyroS = { ram_needed_gb: 27.6, experts_gb: 25.8, mem_total: true };@@ -41,3 +41,13 @@ test('Recommended is the fixed four, in the owner\'s order; the groups are Swiftassert.deepEqual(VERSION_GROUPS.map(g => g.title), ['Swift models', 'GSQ-RCO models', 'NVFP4 models', 'Gyro models', 'Unsloth models']);assert.ok(RECOMMENDED.every(r => r.note.length > 0 && r.note.length < 40), 'one short note each');});++test('the group of the running version can be collapsed (Gyro-M running, the Gyro group stayed open)', () => {+ let opened = {};+ assert.equal(groupOpen(opened, 'gyro', true), true, 'it starts open: it holds the selected version');+ assert.equal(groupOpen(opened, 'swift', false), false, 'the others start closed');+ opened = { ...opened, gyro: !groupOpen(opened, 'gyro', true) }; // the person clicks the Gyro header+ assert.equal(groupOpen(opened, 'gyro', true), false, 'one click closes it');+ opened = { ...opened, gyro: !groupOpen(opened, 'gyro', true) };+ assert.equal(groupOpen(opened, 'gyro', true), true, 'and one more opens it again');+});