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++

tuner: say so when the default itself is not repeatable (RTX 3060 resident mode, A750); exact knobs are still auto-picked there

Niko1221c20c4aed112a
diff --git a/apps/host/scripts/make-tune-locales.py b/apps/host/scripts/make-tune-locales.py
index dfd958701..96ad8af63 100644
--- a/apps/host/scripts/make-tune-locales.py
+++ b/apps/host/scripts/make-tune-locales.py
@@ -42,6 +42,7 @@ KEYS = [
"Tune again",
"Start tuning",
"Tuning your model",
+ 'Answers can differ from run to run on this PC even with the standard setup; this setting does not add to that.',
]
T = {
@@ -60,6 +61,7 @@ T = {
"请先完成当前操作。", "花多长时间", "快速(约 20 分钟)", "彻底(最多 2 小时)", "你主要做什么",
"长提示的编程", "允许可能略微改变回答的设置", "已保存的调优", "使用中", "使用",
"再次检查(约 2 分钟)", "再次调优", "开始调优", "正在调优你的模型",
+ '在这台电脑上,即使使用标准设置,每次运行的回答也可能不同;此设置不会增加这种差异。',
],
"ja": [
"このモデルをチューニング", "あなたの PC で最も速い設定を探しています…", "残り約 {0} 分",
@@ -76,6 +78,7 @@ T = {
"先に現在の操作を終えてください。", "かける時間", "クイック(約 20 分)", "じっくり(最大 2 時間)", "主な用途",
"長いプロンプトでのコーディング", "回答がわずかに変わる可能性のある設定も許可する", "保存済みチューニング", "使用中", "使用する",
"もう一度チェック(約 2 分)", "もう一度チューニング", "チューニングを開始", "モデルをチューニング中",
+ 'このPCでは標準設定でも実行のたびに回答が変わることがあります。この設定がそれを増やすことはありません。',
],
"de": [
"Dieses Modell abstimmen", "Die schnellsten Einstellungen für deinen PC werden gesucht…", "noch etwa {0} Min.",
@@ -92,6 +95,7 @@ T = {
"Beende zuerst den aktuellen Vorgang.", "Wie lange soll es dauern?", "Schnell (etwa 20 Minuten)", "Gründlich (bis zu 2 Stunden)", "Was du hauptsächlich machst",
"Programmieren mit langen Prompts", "Einstellungen erlauben, die Antworten leicht verändern können", "Gespeicherte Abstimmungen", "In Gebrauch", "Verwenden",
"Erneut prüfen (etwa 2 Minuten)", "Erneut abstimmen", "Abstimmung starten", "Dein Modell wird abgestimmt",
+ 'Auf diesem PC können die Antworten von Lauf zu Lauf abweichen, auch mit der Standardeinstellung; diese Einstellung verstärkt das nicht.',
],
"es": [
"Ajustar este modelo", "Buscando los ajustes más rápidos para tu PC…", "faltan unos {0} min",
@@ -108,6 +112,7 @@ T = {
"Termina primero la operación actual.", "Cuánto tiempo dedicar", "Rápido (unos 20 minutos)", "A fondo (hasta 2 horas)", "Qué haces sobre todo",
"Programar con prompts largos", "Permitir ajustes que pueden cambiar ligeramente las respuestas", "Ajustes guardados", "En uso", "Usar",
"Comprobar de nuevo (unos 2 minutos)", "Ajustar de nuevo", "Empezar a ajustar", "Ajustando tu modelo",
+ 'En este PC las respuestas pueden variar de una ejecución a otra incluso con el ajuste estándar; este ajuste no lo aumenta.',
],
"ru": [
"Настроить эту модель", "Ищем самые быстрые настройки для вашего ПК…", "осталось примерно {0} мин.",
@@ -124,6 +129,7 @@ T = {
"Сначала завершите текущую операцию.", "Сколько времени потратить", "Быстро (около 20 минут)", "Тщательно (до 2 часов)", "Чем вы в основном занимаетесь",
"Программирование с длинными промптами", "Разрешить настройки, которые могут немного изменить ответы", "Сохранённые настройки", "Используется", "Использовать",
"Проверить снова (около 2 минут)", "Настроить снова", "Начать настройку", "Настройка вашей модели",
+ 'На этом ПК ответы могут отличаться от запуска к запуску даже при стандартных настройках; эта настройка этого не усиливает.',
],
"pt": [
"Ajustar este modelo", "Procurando as configurações mais rápidas para o seu PC…", "faltam cerca de {0} min",
@@ -140,6 +146,7 @@ T = {
"Termine primeiro a operação atual.", "Quanto tempo dedicar", "Rápido (cerca de 20 minutos)", "Completo (até 2 horas)", "O que você mais faz",
"Programação com prompts longos", "Permitir configurações que podem mudar um pouco as respostas", "Ajustes salvos", "Em uso", "Usar",
"Verificar de novo (cerca de 2 minutos)", "Ajustar de novo", "Iniciar ajuste", "Ajustando o seu modelo",
+ 'Neste PC as respostas podem variar de uma execução para outra mesmo com a configuração padrão; esta configuração não aumenta isso.',
],
"ko": [
"이 모델 최적화", "내 PC에서 가장 빠른 설정을 찾는 중…", "약 {0}분 남음",
@@ -156,6 +163,7 @@ T = {
"먼저 현재 작업을 끝내세요.", "얼마나 오래 할까요", "빠름 (약 20분)", "꼼꼼히 (최대 2시간)", "주로 하는 일",
"긴 프롬프트로 코딩", "답변을 조금 바꿀 수 있는 설정 허용", "저장된 최적화", "사용 중", "사용",
"다시 점검 (약 2분)", "다시 최적화", "최적화 시작", "모델을 최적화하는 중",
+ '이 PC에서는 표준 설정에서도 실행할 때마다 답변이 달라질 수 있으며, 이 설정이 그 차이를 키우지는 않습니다.',
],
}
diff --git a/apps/host/src/components/NativeTune.tsx b/apps/host/src/components/NativeTune.tsx
index 75b366a99..82eaf7de3 100644
--- a/apps/host/src/components/NativeTune.tsx
+++ b/apps/host/src/components/NativeTune.tsx
@@ -2,7 +2,7 @@ import { tr } from '../lib/i18n';
import { useCallback, useEffect, useState } from 'react';
import { Btn, Dialog, Icon, Select } from './ui';
import { nativeAction, useNative, type NativeJob } from '../lib/native';
-import { ANSWER_NOTICE, tunePresetAction, tuneStatus, tuneUndo, type TuneProgress, type TunePreset, type TuneResult, type TuneStatus } from '../lib/native-tune';
+import { answerNotice, tunePresetAction, tuneStatus, tuneUndo, type TuneProgress, type TunePreset, type TuneResult, type TuneStatus } from '../lib/native-tune';
type Phase = 'idle' | 'running' | 'result';
@@ -58,7 +58,7 @@ export function NativeTune({ open, onClose, model, resourceProfile, vision }: {
const active = status?.active ?? null;
const orbit = (complete: boolean) => <div className="tune-orbit" data-complete={complete}><svg viewBox="0 0 120 120" aria-hidden="true"><circle cx="60" cy="60" r="50"/><circle cx="60" cy="60" r="50" pathLength="100" strokeDasharray={`${complete ? 100 : Math.max(4, Math.round(ratio * 100))} 100`}/></svg><Icon name={complete ? 'check' : 'gauge'} size={42}/></div>;
- const notice = (cls?: string) => cls ? <p className="small muted">{tr(ANSWER_NOTICE[cls] ?? '')}</p> : null;
+ const notice = (cls?: string, steady?: boolean) => cls ? <p className="small muted">{tr(answerNotice(cls, steady))}</p> : null;
let body;
let actions;
@@ -73,7 +73,7 @@ export function NativeTune({ open, onClose, model, resourceProfile, vision }: {
const text = stopped ? tr("Stopped. Your settings were not changed.") : job?.state === 'error' ? tr("The tune did not finish. Your settings were not changed.") : result?.verdict ? (result.verdict === 'keep' ? tr("Still as fast as when it was saved.") : result.verdict === 'retune' ? tr("It is slower than before. You can tune again.") : tr("Could not tell right now. Your tuning was kept.")) : result?.outcome === 'improved' ? tr("+{0}% faster answers, saved as '{1}'", [Math.max(0, Math.round(result.gain_pct ?? 0)), result.preset?.name ?? '']) : result?.outcome === 'default_confirmed' ? tr("Your current settings are already the fastest we found.") : (result?.message ?? tr("Nothing was changed."));
body = <div className="tune-progress">{orbit(improved || result?.outcome === 'default_confirmed')}<h3 role="status">{text}</h3>
{result?.outcome === 'default_confirmed' && result.preset ? <p className="small muted">{tr("Saved as '{0}', so it is not tuned again when you reopen the app.", [result.preset.name])}</p> : null}
- {result?.outcome === 'improved' ? <><p className="small muted">{tr("Speed: {0} → {1} tok/s", [Math.round((result.base?.decode_tok_s ?? 0) * 10) / 10, Math.round((result.chosen?.decode_tok_s ?? 0) * 10) / 10])}</p>{notice(result.answers?.class)}</> : null}
+ {result?.outcome === 'improved' ? <><p className="small muted">{tr("Speed: {0} → {1} tok/s", [Math.round((result.base?.decode_tok_s ?? 0) * 10) / 10, Math.round((result.chosen?.decode_tok_s ?? 0) * 10) / 10])}</p>{notice(result.answers?.class, result.answers?.default_repeatable)}</> : null}
{job?.state === 'error' ? <p className="small inline-error" role="alert">{job.error}</p> : null}</div>;
actions = <>{status?.can_undo && result?.outcome === 'improved' ? <Btn disabled={busy} onClick={() => void act(async () => { await tuneUndo(model, resourceProfile, vision); setJobId(''); })}>{tr("Undo")}</Btn> : null}<Btn variant="primary" onClick={close}>{tr("Close")}</Btn></>;
} else {
@@ -82,7 +82,7 @@ export function NativeTune({ open, onClose, model, resourceProfile, vision }: {
{error ? <p className="small inline-error" role="alert">{error}</p> : null}
{active ? <div><p className="strong">{tr("Saved tuning in use: {0}", [active.name])}</p>
{active.gain_pct ? <p className="small muted">{tr("+{0}% faster answers", [Math.round(active.gain_pct)])}</p> : null}
- {notice(active.answers?.class)}
+ {notice(active.answers?.class, active.answers?.default_repeatable)}
{stale ? <p className="small">{status?.state === 'hard' ? tr("This PC changed since it was tuned, so these settings are not used until you tune again.") : tr("This PC or the engine changed since it was tuned. A short check takes about 2 minutes.")}</p> : null}</div>
: <p className="small muted">{tr("No saved tuning for these choices yet.")}</p>}
<p className="small muted">{tr("Strata tries different settings on this PC and keeps the ones that make answers faster. Your model is unloaded while this runs, and the computer will be busy.")}</p>
diff --git a/apps/host/src/lib/native-tune.ts b/apps/host/src/lib/native-tune.ts
index fc4e2b893..4c7181ce5 100644
--- a/apps/host/src/lib/native-tune.ts
+++ b/apps/host/src/lib/native-tune.ts
@@ -6,7 +6,7 @@ export interface TunePreset {
name: string;
active: boolean;
created?: string;
- answers?: { class: 'exact' | 'placement' | 'nonrepeatable' | 'quality'; fields: string[] };
+ answers?: { class: 'exact' | 'placement' | 'nonrepeatable' | 'quality'; fields: string[]; default_repeatable?: boolean };
settings?: { args: Record<string, unknown>; env: Record<string, unknown>; per_request: Record<string, unknown> };
gain_pct?: number | null;
decode_tok_s?: number | null;
@@ -39,7 +39,7 @@ export interface TuneResult {
faster_pairs?: number;
base?: { decode_tok_s?: number | null };
chosen?: { decode_tok_s?: number | null };
- answers?: { class: TunePreset['answers'] extends infer A ? (A extends { class: infer C } ? C : never) : never; fields: string[] };
+ answers?: { class: 'exact' | 'placement' | 'nonrepeatable' | 'quality'; fields: string[]; default_repeatable?: boolean };
preset?: { id: string; name: string } | null;
notes?: string[];
verdict?: 'keep' | 'retune' | 'inconclusive';
@@ -62,3 +62,7 @@ export const ANSWER_NOTICE: Record<string, string> = {
nonrepeatable: 'Answers are not repeatable run to run.',
quality: 'Includes a quality setting that changes the numbers.',
};
+
+/** Where the standard setup is itself not repeatable (RTX 3060 in low-RAM mode, Arc A750), an exact setting cannot promise identical answers. */
+export const answerNotice = (cls?: string, defaultRepeatable?: boolean) =>
+ cls === 'exact' && defaultRepeatable === false ? 'Answers can differ from run to run on this PC even with the standard setup; this setting does not add to that.' : ANSWER_NOTICE[cls ?? ''] ?? '';
diff --git a/apps/host/src/locales/tune-de.json b/apps/host/src/locales/tune-de.json
index 92462cccb..ebb2b6c10 100644
--- a/apps/host/src/locales/tune-de.json
+++ b/apps/host/src/locales/tune-de.json
@@ -35,5 +35,6 @@
"tune34": "Verwenden",
"tune35": "Erneut abstimmen",
"tune36": "Abstimmung starten",
- "tune37": "Dein Modell wird abgestimmt"
+ "tune37": "Dein Modell wird abgestimmt",
+ "tune38": "Auf diesem PC können die Antworten von Lauf zu Lauf abweichen, auch mit der Standardeinstellung; diese Einstellung verstärkt das nicht."
}
diff --git a/apps/host/src/locales/tune-en.json b/apps/host/src/locales/tune-en.json
index 30e2b76cf..b23797d1f 100644
--- a/apps/host/src/locales/tune-en.json
+++ b/apps/host/src/locales/tune-en.json
@@ -35,5 +35,6 @@
"tune34": "Use",
"tune35": "Tune again",
"tune36": "Start tuning",
- "tune37": "Tuning your model"
+ "tune37": "Tuning your model",
+ "tune38": "Answers can differ from run to run on this PC even with the standard setup; this setting does not add to that."
}
diff --git a/apps/host/src/locales/tune-es.json b/apps/host/src/locales/tune-es.json
index 6c8df85de..3efe14dbf 100644
--- a/apps/host/src/locales/tune-es.json
+++ b/apps/host/src/locales/tune-es.json
@@ -35,5 +35,6 @@
"tune34": "Usar",
"tune35": "Ajustar de nuevo",
"tune36": "Empezar a ajustar",
- "tune37": "Ajustando tu modelo"
+ "tune37": "Ajustando tu modelo",
+ "tune38": "En este PC las respuestas pueden variar de una ejecución a otra incluso con el ajuste estándar; este ajuste no lo aumenta."
}
diff --git a/apps/host/src/locales/tune-ja.json b/apps/host/src/locales/tune-ja.json
index 87c74abf1..4ed9d8495 100644
--- a/apps/host/src/locales/tune-ja.json
+++ b/apps/host/src/locales/tune-ja.json
@@ -35,5 +35,6 @@
"tune34": "使用する",
"tune35": "もう一度チューニング",
"tune36": "チューニングを開始",
- "tune37": "モデルをチューニング中"
+ "tune37": "モデルをチューニング中",
+ "tune38": "このPCでは標準設定でも実行のたびに回答が変わることがあります。この設定がそれを増やすことはありません。"
}
diff --git a/apps/host/src/locales/tune-ko.json b/apps/host/src/locales/tune-ko.json
index 8faca5adc..da1b39436 100644
--- a/apps/host/src/locales/tune-ko.json
+++ b/apps/host/src/locales/tune-ko.json
@@ -35,5 +35,6 @@
"tune34": "사용",
"tune35": "다시 최적화",
"tune36": "최적화 시작",
- "tune37": "모델을 최적화하는 중"
+ "tune37": "모델을 최적화하는 중",
+ "tune38": "이 PC에서는 표준 설정에서도 실행할 때마다 답변이 달라질 수 있으며, 이 설정이 그 차이를 키우지는 않습니다."
}
diff --git a/apps/host/src/locales/tune-pt.json b/apps/host/src/locales/tune-pt.json
index 39359010d..aeaab552d 100644
--- a/apps/host/src/locales/tune-pt.json
+++ b/apps/host/src/locales/tune-pt.json
@@ -35,5 +35,6 @@
"tune34": "Usar",
"tune35": "Ajustar de novo",
"tune36": "Iniciar ajuste",
- "tune37": "Ajustando o seu modelo"
+ "tune37": "Ajustando o seu modelo",
+ "tune38": "Neste PC as respostas podem variar de uma execução para outra mesmo com a configuração padrão; esta configuração não aumenta isso."
}
diff --git a/apps/host/src/locales/tune-ru.json b/apps/host/src/locales/tune-ru.json
index 3f5fe5459..5fa769e69 100644
--- a/apps/host/src/locales/tune-ru.json
+++ b/apps/host/src/locales/tune-ru.json
@@ -35,5 +35,6 @@
"tune34": "Использовать",
"tune35": "Настроить снова",
"tune36": "Начать настройку",
- "tune37": "Настройка вашей модели"
+ "tune37": "Настройка вашей модели",
+ "tune38": "На этом ПК ответы могут отличаться от запуска к запуску даже при стандартных настройках; эта настройка этого не усиливает."
}
diff --git a/apps/host/src/locales/tune-zh.json b/apps/host/src/locales/tune-zh.json
index 458dbbbfd..afcde045f 100644
--- a/apps/host/src/locales/tune-zh.json
+++ b/apps/host/src/locales/tune-zh.json
@@ -35,5 +35,6 @@
"tune34": "使用",
"tune35": "再次调优",
"tune36": "开始调优",
- "tune37": "正在调优你的模型"
+ "tune37": "正在调优你的模型",
+ "tune38": "在这台电脑上,即使使用标准设置,每次运行的回答也可能不同;此设置不会增加这种差异。"
}
diff --git a/strata_cli/tune_commands.py b/strata_cli/tune_commands.py
index d0a4bf0cb..f47349520 100644
--- a/strata_cli/tune_commands.py
+++ b/strata_cli/tune_commands.py
@@ -264,7 +264,9 @@ def _human_result(r: dict[str, Any], saved: dict[str, Any] | None) -> str:
lines.append(f" Measured: {r['base'].get('decode_tok_s')} -> {r['chosen'].get('decode_tok_s')} tok/s "
f"({r['faster_pairs']} of {r['pairs']} pairs faster)")
from strata_control.tune_knobs import ANSWER_NOTICE
- lines.append(" " + ANSWER_NOTICE.get(r["answers"]["class"], ""))
+ from strata_control.tune_knobs import ANSWER_NOTICE_UNSTEADY
+ unsteady = r["answers"].get("default_repeatable") is False and r["answers"]["class"] in ANSWER_NOTICE_UNSTEADY
+ lines.append(" " + (ANSWER_NOTICE_UNSTEADY if unsteady else ANSWER_NOTICE).get(r["answers"]["class"], ""))
else:
lines.append(r["message"] or r["outcome"])
if saved:
diff --git a/strata_control/autotune.py b/strata_control/autotune.py
index fe51ada2c..ed14852ab 100644
--- a/strata_control/autotune.py
+++ b/strata_control/autotune.py
@@ -601,7 +601,7 @@ class Tuner:
cls = row["answer"]
if row["key"] == key and row["answer"] != "exact":
fields.append(key)
- r.answers = {"class": cls, "fields": sorted(set(fields))}
+ r.answers = {"class": cls, "fields": sorted(set(fields)), "default_repeatable": not tune_knobs.default_unsteady(self.ctx)}
if final_pairs:
fu = fu_final
ratios = [metric(c, fu) / metric(b, fu) for b, c in final_pairs if metric(c, fu) and metric(b, fu)]
diff --git a/strata_control/presets.py b/strata_control/presets.py
index f99e5f7be..7a04937f4 100644
--- a/strata_control/presets.py
+++ b/strata_control/presets.py
@@ -431,7 +431,10 @@ def record_recheck(ref: str, outcome: dict[str, Any]) -> dict[str, Any]:
# --------------------------------------------------------------------------- applying the active preset at every start
def notice(preset: dict[str, Any]) -> str:
- return tune_knobs.ANSWER_NOTICE.get((preset.get("answers") or {}).get("class", "exact"), "")
+ a = preset.get("answers") or {}
+ if a.get("default_repeatable") is False and a.get("class", "exact") in tune_knobs.ANSWER_NOTICE_UNSTEADY:
+ return tune_knobs.ANSWER_NOTICE_UNSTEADY[a.get("class", "exact")]
+ return tune_knobs.ANSWER_NOTICE.get(a.get("class", "exact"), "")
def overlay(cfg: dict[str, Any], *, now: dict[str, Any] | None = None, use: str = "chat") -> tuple[dict[str, Any], dict[str, Any]]:
diff --git a/strata_control/tune_knobs.py b/strata_control/tune_knobs.py
index 2e2dbb0bf..259d7296d 100644
--- a/strata_control/tune_knobs.py
+++ b/strata_control/tune_knobs.py
@@ -29,6 +29,19 @@ ANSWER_NOTICE = {
"quality": "Includes a quality setting that changes the numbers.",
}
+#: On some cards the standard setup itself is not repeatable run to run (the RTX 3060 in resident-RAM mode and the Arc A750:
+#: 2 and 3 of 10 gate prompts identical between two runs of the default, spec 3.3 note). There "exact" can only mean "no worse
+#: than the default's own variation", so the notice must not promise identical answers.
+ANSWER_NOTICE_UNSTEADY = {
+ "exact": "Answers can differ from run to run on this PC even with the standard setup; this setting does not add to that.",
+}
+
+
+def default_unsteady(ctx: "Context") -> bool:
+ """True where the setup default is itself not repeatable: the low-RAM resident mode (adaptive tier and draft timing) and SYCL."""
+ return ctx.backend == "sycl" or condition_holds("resident_ram", ctx)
+
+
#: Flags that take no value (present = on, absent = off).
BOOL_FLAGS = frozenset({"--kv-grow", "--trim-stage-weights", "--no-host-worker", "--no-pool", "--mmap-experts",
"--resident-experts", "--prompt-cache-tail", "--vram-elastic", "--split-skip-if-fits",
diff --git a/tests/tuning/test_autotune.py b/tests/tuning/test_autotune.py
index 50845041b..1caf85c1a 100644
--- a/tests/tuning/test_autotune.py
+++ b/tests/tuning/test_autotune.py
@@ -126,6 +126,23 @@ class RulesTest(unittest.TestCase):
self.assertEqual(len(r.settings["args"]), 1)
self.assertTrue(any("only the best one" in n for n in r.notes))
+ def test_a_box_whose_default_is_not_repeatable_says_so(self):
+ ctx = make_ctx()
+ self.assertFalse(tune_knobs.default_unsteady(ctx))
+ ctx.facts = {"workers": 6, "resident_ram": True} # the RTX 3060 in resident-RAM mode
+ self.assertTrue(tune_knobs.default_unsteady(ctx))
+ sy = make_ctx()
+ sy.backend = "sycl"
+ self.assertTrue(tune_knobs.default_unsteady(sy))
+ from strata_control import presets
+ steady = {"answers": {"class": "exact", "default_repeatable": True}}
+ unsteady = {"answers": {"class": "exact", "default_repeatable": False}}
+ self.assertIn("identical", presets.notice(steady))
+ self.assertIn("even with the standard setup", presets.notice(unsteady))
+ # the class of the knob does not change: exact knobs are still auto-picked there, nonrepeatable ones stay behind their switch
+ ids = [p.arm.id for p in tune_knobs.plan_arms(ctx, mode="quick")[0]]
+ self.assertNotIn("adapt_async", ids)
+
def test_hybrid_cpu_affinity_never(self):
ctx = make_ctx()
ctx.hybrid_cpu = True