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++
GPU roles: two identical cards recommend the highest number as Main, so the engine order stays [0, 1]; a model that keeps one card keeps setup's old pick; golden back to [0, 1] with roles only
Niko1221890fee81b0ae
diff --git a/apps/host/src/components/GpuRoles.tsx b/apps/host/src/components/GpuRoles.tsxindex b2aa282e4..1badb9a97 100644--- a/apps/host/src/components/GpuRoles.tsx+++ b/apps/host/src/components/GpuRoles.tsx@@ -16,7 +16,7 @@ export function recommendationLine(cards: RoleCard[], vendor?: string | null): sconst byi = new Map(cards.map(c => [c.index, c]));const m = byi.get(rec.main)!;if (cards.length === 1) return tr('Strata will use your {0}.', [shortName(m)]);- const why = { same: 'the cards are alike, so the lower number is Main', memory: 'it has more memory', faster: 'it is faster', only: 'it is the only card', none: '' }[rec.why];+ const why = { same: 'the cards are alike', memory: 'it has more memory', faster: 'it is faster', only: 'it is the only card', none: '' }[rec.why];let s = tr('{0} is Main: {1}.', [shortName(m), tr(why)]);const helpers = Object.keys(rec.roles).map(Number).filter(i => rec.roles[i] === 'helper').map(i => shortName(byi.get(i)!));if (helpers.length) s += ' ' + tr(helpers.length > 1 ? '{0} help.' : '{0} helps.', [helpers.join(', ')]);diff --git a/apps/host/src/lib/gpu-roles.ts b/apps/host/src/lib/gpu-roles.tsindex 8ba20e054..374e017c3 100644--- a/apps/host/src/lib/gpu-roles.ts+++ b/apps/host/src/lib/gpu-roles.ts@@ -79,6 +79,7 @@ export function pickMain(cs: RoleCard[]): { main: RoleCard | null; why: MainWhyconst byMem = (a: RoleCard, b: RoleCard) => rnd(mem(b)) - rnd(mem(a)) || a.index - b.index;let main = [...group].sort(byMem)[0];let why: MainWhy = group.length === 1 ? 'faster' : 'same';+ if (group.length > 1 && new Set(group.map(c => `${c.name}|${rnd(mem(c))}`)).size === 1) main = [...group].sort((a, b) => b.index - a.index)[0]; // identical cards: the HIGHEST number is Mainif (top <= 0 && new Set(pool.map(c => rnd(mem(c)))).size > 1) why = 'memory';const bigger = pool.filter(c => rnd(mem(c)) > rnd(mem(main)) && (top <= 0 || speed(c) >= MEMORY_GUARD_SPEED * top));if (bigger.length) { main = [...bigger].sort(byMem)[0]; why = 'memory'; }@@ -238,7 +239,7 @@ export function sentence(cards: RoleCard[] | null | undefined, vendor?: string |const byi = new Map(cs.map(c => [c.index, c]));const m = byi.get(rec.main)!;if (cs.length === 1) return `Strata will use your ${shortName(m)}.`;- const why = { same: 'the cards are alike, so the lower number is Main', memory: 'it has more memory', faster: 'it is faster', only: 'it is the only card', none: '' }[rec.why];+ const why = { same: 'the cards are alike', memory: 'it has more memory', faster: 'it is faster', only: 'it is the only card', none: '' }[rec.why];let s = `${shortName(m)} is Main: ${why}.`;const helpers = byNumber(rec.roles).filter(i => rec.roles[i] === 'helper').map(i => shortName(byi.get(i)!));if (helpers.length) s += ` ${helpers.join(' and ')} ${helpers.length > 1 ? 'help' : 'helps'}.`;diff --git a/apps/host/src/locales/de.json b/apps/host/src/locales/de.jsonindex fa6c50540..d181908ce 100644--- a/apps/host/src/locales/de.json+++ b/apps/host/src/locales/de.json@@ -3471,7 +3471,7 @@"s8625": "Es wurde keine Grafikkarte gefunden, die Strata nutzen kann.","s8626": "Strata verwendet Ihre {0}.","s8627": "{0} ist die Hauptkarte: {1}.",- "s8628": "die Karten sind gleich, daher ist die niedrigere Nummer die Hauptkarte",+ "s8628": "die Karten sind gleich","s8629": "sie hat mehr Speicher","s8630": "sie ist schneller","s8631": "sie ist die einzige Karte",diff --git a/apps/host/src/locales/en.json b/apps/host/src/locales/en.jsonindex 2609d43d4..f1ecc9800 100644--- a/apps/host/src/locales/en.json+++ b/apps/host/src/locales/en.json@@ -3471,7 +3471,7 @@"s8625": "No graphics card that Strata can use was found.","s8626": "Strata will use your {0}.","s8627": "{0} is Main: {1}.",- "s8628": "the cards are alike, so the lower number is Main",+ "s8628": "the cards are alike","s8629": "it has more memory","s8630": "it is faster","s8631": "it is the only card",diff --git a/apps/host/src/locales/es.json b/apps/host/src/locales/es.jsonindex 37158a49e..905102726 100644--- a/apps/host/src/locales/es.json+++ b/apps/host/src/locales/es.json@@ -3471,7 +3471,7 @@"s8625": "No se encontró ninguna tarjeta gráfica que Strata pueda usar.","s8626": "Strata usará tu {0}.","s8627": "{0} es la principal: {1}.",- "s8628": "las tarjetas son iguales, así que la de menor número es la principal",+ "s8628": "las tarjetas son iguales","s8629": "tiene más memoria","s8630": "es más rápida","s8631": "es la única tarjeta",diff --git a/apps/host/src/locales/ja.json b/apps/host/src/locales/ja.jsonindex d5d0caac1..eeddc975a 100644--- a/apps/host/src/locales/ja.json+++ b/apps/host/src/locales/ja.json@@ -3471,7 +3471,7 @@"s8625": "Strata が使えるグラフィックカードが見つかりません。","s8626": "Strata は {0} を使います。","s8627": "{0} がメインです:{1}。",- "s8628": "カードが同じなので番号の小さい方がメインです",+ "s8628": "カードが同じため","s8629": "メモリが多いため","s8630": "より高速なため","s8631": "唯一のカードのため",diff --git a/apps/host/src/locales/ko.json b/apps/host/src/locales/ko.jsonindex b103fa278..ea1aded1a 100644--- a/apps/host/src/locales/ko.json+++ b/apps/host/src/locales/ko.json@@ -3471,7 +3471,7 @@"s8625": "Strata가 사용할 수 있는 그래픽 카드를 찾지 못했습니다.","s8626": "Strata가 {0}을(를) 사용합니다.","s8627": "{0}이(가) 메인입니다: {1}.",- "s8628": "카드가 같아서 번호가 낮은 쪽이 메인입니다",+ "s8628": "카드가 같습니다","s8629": "메모리가 더 많습니다","s8630": "더 빠릅니다","s8631": "유일한 카드입니다",diff --git a/apps/host/src/locales/pt.json b/apps/host/src/locales/pt.jsonindex 4af869165..7787a542c 100644--- a/apps/host/src/locales/pt.json+++ b/apps/host/src/locales/pt.json@@ -3471,7 +3471,7 @@"s8625": "Nenhuma placa de vídeo que o Strata possa usar foi encontrada.","s8626": "O Strata usará a sua {0}.","s8627": "{0} é a principal: {1}.",- "s8628": "as placas são iguais, por isso a de menor número é a principal",+ "s8628": "as placas são iguais","s8629": "tem mais memória","s8630": "é mais rápida","s8631": "é a única placa",diff --git a/apps/host/src/locales/ru.json b/apps/host/src/locales/ru.jsonindex 621a867cf..ed0d4358d 100644--- a/apps/host/src/locales/ru.json+++ b/apps/host/src/locales/ru.json@@ -3471,7 +3471,7 @@"s8625": "Не найдено видеокарт, которые может использовать Strata.","s8626": "Strata будет использовать ваш {0}.","s8627": "{0} — основная: {1}.",- "s8628": "карты одинаковые, поэтому основной считается карта с меньшим номером",+ "s8628": "карты одинаковые","s8629": "у неё больше памяти","s8630": "она быстрее","s8631": "это единственная карта",diff --git a/apps/host/src/locales/zh.json b/apps/host/src/locales/zh.jsonindex bef3dc374..f7a00a9df 100644--- a/apps/host/src/locales/zh.json+++ b/apps/host/src/locales/zh.json@@ -3471,7 +3471,7 @@"s8625": "未找到 Strata 可用的显卡。","s8626": "Strata 将使用你的 {0}。","s8627": "{0} 是主卡:{1}。",- "s8628": "两张卡相同,所以编号较小的是主卡",+ "s8628": "两张卡相同","s8629": "它的显存更大","s8630": "它更快","s8631": "它是唯一的显卡",diff --git a/docs/MULTI_GPU.md b/docs/MULTI_GPU.mdindex b043bff11..5ebae7fe7 100644--- a/docs/MULTI_GPU.md+++ b/docs/MULTI_GPU.md@@ -56,7 +56,7 @@ the picture reader. (Older versions of this page said "the first is the main one**Recommended roles** (the same rule in the app, `strata launch` and setup; `strata_control/gpu_roles.py`): the faster cardis Main (speed is multiprocessors x max clock, the engine's own measure; cards within 5% are the same card, and the one with-more memory, then the lower number, wins; a card with clearly more memory beats a faster one that is at least half as fast).+more memory wins, then the lower number; two identical cards: the highest number is Main, so the engine order stays 0, 1 as it always was; a card with clearly more memory beats a faster one that is at least half as fast).Every other card starts as Helper, except a card with **8 GB or less** (Off), built-in graphics beside a card with memory ofits own (Off) and a card the engine cannot run (Off). Every role is one click (the app), one key (`strata launch`: M, H, O;R goes back to the recommendation) or one line (below).diff --git a/setup.py b/setup.pyindex 3d486fd32..94cd0fc3e 100644--- a/setup.py+++ b/setup.py@@ -1634,6 +1634,14 @@ def choose_gpus(a, found) -> list:return choose_roles(a, found)+def fallback_card(a, gpu, chosen):+ """A model that cannot share its memory across cards keeps ONE card: the one setup always chose (the most VRAM, then the lower number),+ not the Main card of the roles - unless the person named the roles (--gpu-roles), then their Main card."""+ if getattr(a, "_roles_explicit", False) or not getattr(a, "_roles", None):+ return gpu+ return min(chosen, key=lambda g: (-round(g["vram_gb"]), g["index"]))++def card_speeds() -> dict:"""{card number: SMs x max clock} of the NVIDIA cards (strata_control/gpu_roles.py); {} when it cannot say."""from strata_control import gpu_roles@@ -7616,6 +7624,7 @@ def main() -> int:ap.error("--gpu-roles: setup needs at least one card that is Main or Helper")mains = [i for i, r in named.items() if r == "main"] or [sorted(on)[-1]]helpers = sorted(i for i in on if i != mains[0])+ a._roles_explicit = Truea._roles = {**{i: "off" for i in named}, **{i: "helper" for i in helpers}, mains[0]: "main"}order = helpers + [mains[0]]if len(order) > 1:@@ -8017,7 +8026,8 @@ def main() -> int:warn(f"installing {model} with {ram:.0f} GB of RAM, as you chose")if in_budget:budget = budget_choice(model, ram, a.resident_budget_gib)- if multi and not unsloth_together(a, model, ram, gpu, chosen):+ if multi and not unsloth_together(a, model, ram, fallback_card(a, gpu, chosen), chosen):+ gpu = fallback_card(a, gpu, chosen)multi, sel, chosen = [], [gpu["index"]], [gpu]q4_split = bool(multi) and not resident_split() # #498: on several GPUs without the RAM budget (#642: kept)if not q4_split:@@ -8033,7 +8043,8 @@ def main() -> int:"the low-RAM mode")low_ram = low_ram_wanted(model, ram, a.low_ram)# #642: the engines from RESIDENT_SPLIT_ENGINE run the low-RAM mode on the chosen cards as on one (decided below)- if low_ram and multi and not resident_split() and not low_ram_together(a, model, ram, gpu, chosen):+ if low_ram and multi and not resident_split() and not low_ram_together(a, model, ram, fallback_card(a, gpu, chosen), chosen):+ gpu = fallback_card(a, gpu, chosen)multi, sel, chosen = [], [gpu["index"]], [gpu]# (the low-RAM mode's variant is decided once the context is known, below; on several GPUs it is the mapped one# before RESIDENT_SPLIT_ENGINE, #642)diff --git a/strata_control/gpu_roles.py b/strata_control/gpu_roles.pyindex 8b2d5e1ee..33df9fe43 100644--- a/strata_control/gpu_roles.py+++ b/strata_control/gpu_roles.py@@ -40,6 +40,10 @@ def _speed(c: dict) -> float:return float(v) if isinstance(v, (int, float)) and not isinstance(v, bool) and v > 0 else 0.0+def rnd_(x: float) -> int:+ return round(x)++def _shares(c: dict) -> bool:return gpu_fit._shares_memory(c)@@ -80,7 +84,7 @@ def _eligible(cs: list[dict]) -> list[dict]:def pick_main(cs: list[dict]) -> tuple[dict | None, str]:"""(the Main card, why) why: only | faster | same | memory. The faster card, cards within 5% being the same card (the one with more memory,- then the lower number); a card with clearly more memory wins when it is at least half as fast (#1576)."""+ then, for identical cards, the HIGHEST number - so the engine order stays [0, 1] - else the lower number); a card with clearly more memory wins when it is at least half as fast (#1576)."""pool = _eligible(cs)if not pool:return None, "none"@@ -90,6 +94,8 @@ def pick_main(cs: list[dict]) -> tuple[dict | None, str]:group = [c for c in pool if _speed(c) * SAME_SPEED >= top] if top > 0 else list(pool)main = sorted(group, key=lambda c: (-round(_mem(c)), _idx(c)))[0]why = "faster" if len(group) == 1 else "same"+ if len(group) > 1 and len({(str(c.get("name")), rnd_(_mem(c))) for c in group}) == 1:+ main = max(group, key=_idx) # identical cards: the HIGHEST number is Main, so the engine order stays [0, 1] as it always wasif top <= 0 and len({round(_mem(c)) for c in pool}) > 1:why = "memory" # speeds unknown: the card with the most memorybigger = [c for c in pool if round(_mem(c)) > round(_mem(main)) and (top <= 0 or _speed(c) >= MEMORY_GUARD_SPEED * top)]@@ -338,7 +344,7 @@ def sentence(cards: list[dict], vendor: str | None = None) -> str:if len(cs) == 1:return f"Strata will use your {short_name(m)}."helpers = [byi[i] for i, r in rec["roles"].items() if r == "helper"]- why = {"same": "the cards are alike, so the lower number is Main", "memory": "it has more memory", "faster": "it is faster", "only": "it is the only card"}[rec["why"]]+ why = {"same": "the cards are alike", "memory": "it has more memory", "faster": "it is faster", "only": "it is the only card"}[rec["why"]]s = f"{short_name(m)} is Main: {why}."if helpers:s += " " + " and ".join(short_name(h) for h in helpers) + (" help." if len(helpers) > 1 else " helps.")diff --git a/tests/data/gpu_roles_vectors.json b/tests/data/gpu_roles_vectors.jsonindex 41dd5ed8f..45c2eff12 100644--- a/tests/data/gpu_roles_vectors.json+++ b/tests/data/gpu_roles_vectors.json@@ -15,7 +15,7 @@"recommend": [{"hw": "one", "roles": {"0": "main"}, "main": 0, "why": "only"},{"hw": "two", "roles": {"0": "helper", "1": "main"}, "main": 1, "why": "faster"},- {"hw": "equal", "roles": {"0": "main", "1": "helper"}, "main": 0, "why": "same"},+ {"hw": "equal", "roles": {"0": "helper", "1": "main"}, "main": 1, "why": "same"},{"hw": "three", "roles": {"0": "helper", "1": "main", "2": "off"}, "main": 1, "why": "faster"},{"hw": "igpu", "roles": {"0": "off", "1": "main"}, "main": 1, "why": "only"},{"hw": "igpu_only", "roles": {"0": "main"}, "main": 0, "why": "only"},diff --git a/tests/terminal/test_launch.py b/tests/terminal/test_launch.pyindex 733fa1bbb..a4d6acc64 100644--- a/tests/terminal/test_launch.py+++ b/tests/terminal/test_launch.py@@ -585,7 +585,7 @@ class AdoptRules(unittest.TestCase):# which cards: named ones win (one card too: --gpu 1 on a box that has them), else the fit rule on a box with several cardstwo = catalog(HW_2X16)self.assertEqual(cards_for_launch(S.LaunchSettings(family="qwen", model="IQ3_XXS", gpus=[1, 0]), two), [1, 0])- self.assertEqual(cards_for_launch(S.LaunchSettings(family="qwen", model="IQ3_XXS"), two), [1, 0]) # roles: card 0 Main (last), card 1 Helper+ self.assertEqual(cards_for_launch(S.LaunchSettings(family="qwen", model="IQ3_XXS"), two), [0, 1]) # roles: card 0 Main (last), card 1 Helperone = catalog(HW_12)self.assertEqual(cards_for_launch(S.LaunchSettings(family="qwen", model="IQ3_XXS", gpus=[1]), one), [1])self.assertIsNone(cards_for_launch(S.LaunchSettings(family="qwen", model="IQ3_XXS"), one))@@ -614,7 +614,7 @@ class AdoptRules(unittest.TestCase):self.assertIsNone(installed_cards({**chosen, "gpus_asked": False})) # never asked: setup's default, not a choiceself.assertIsNone(installed_cards({"gpu": 1}))self.assertIsNone(cards_for_launch(plain, two, base=chosen)) # the installed choice stays- self.assertEqual(cards_for_launch(plain, two, base={**chosen, "gpus_asked": False}), [1, 0]) # no choice recorded: the recommended roles+ self.assertEqual(cards_for_launch(plain, two, base={**chosen, "gpus_asked": False}), [0, 1]) # no choice recorded: the recommended rolesself.assertEqual(cards_for_launch(S.LaunchSettings(family="qwen", model="IQ3_XXS", gpus=[0]), two, base=chosen), [0]) # --gpu 0 winsif True:installed = h.base / "strata-iq3_xxs.json"diff --git a/tests/terminal/test_launch_tui.py b/tests/terminal/test_launch_tui.pyindex f579870bb..9ed3d990f 100644--- a/tests/terminal/test_launch_tui.py+++ b/tests/terminal/test_launch_tui.py@@ -866,7 +866,7 @@ class CardsStep(Base):self.assertIn("Which graphics cards should it use?", t)self.assertIn("Step 2 of 10", t)flat = " ".join(t.split())- self.assertIn("[ Main ]", flat) # equal cards: the lower number is Main+ self.assertIn("[ Main ]", flat) # equal cards: the highest number is Main (the engine order stays [0, 1])self.assertIn("[ Helper ]", flat)self.assertIn("recommended", flat)self.assertIn("M Main", flat)@@ -880,14 +880,14 @@ class CardsStep(Base):def test_m_h_o_set_the_role_of_the_card_under_the_cursor_and_r_goes_back(self):async def case(app, pilot, ctx):await press(pilot, "enter", "enter")- await press(pilot, "down", "o") # card 2 Off+ await press(pilot, "o") # card 1 (a Helper) Offflat = " ".join(text_of(app).split())self.assertIn("recommended: helper", flat) # the muted tag says what was recommended- await press(pilot, "m") # Main on card 2: card 1 becomes a Helper, one quiet line says so+ await press(pilot, "m") # Main on card 1: card 2 becomes a Helper, one quiet line says soflat = " ".join(text_of(app).split())self.assertIn("is now a Helper.", flat)await press(pilot, "enter")- self.assertEqual(ctx.settings.gpu_roles, {"0": "helper", "1": "main"})+ self.assertEqual(ctx.settings.gpu_roles, {"0": "main", "1": "helper"})self.assertIsNone(ctx.settings.gpus)self.run_app(case, ctx=make_ctx(HW_2X16))diff --git a/tools/test_setup_golden.json b/tools/test_setup_golden.jsonindex 73725ecc7..430fc2992 100644--- a/tools/test_setup_golden.json+++ b/tools/test_setup_golden.json@@ -295,13 +295,13 @@"cwd": "<T>","exe": "<T>/engine/<EXE>","gpu": [- 1,- 0+ 0,+ 1],"gpu_order": "as_given","gpu_roles": {- "0": "main",- "1": "helper"+ "0": "helper",+ "1": "main"},"gpus_asked": true,"layer_split": "auto",@@ -355,13 +355,13 @@"cwd": "<T>","exe": "<T>/engine/<EXE>","gpu": [- 1,- 0+ 0,+ 1],"gpu_order": "as_given","gpu_roles": {- "0": "main",- "1": "helper"+ "0": "helper",+ "1": "main"},"gpus_asked": true,"layer_split": "auto",@@ -415,13 +415,13 @@"cwd": "<T>","exe": "<T>/engine/<EXE>","gpu": [- 1,- 0+ 0,+ 1],"gpu_order": "as_given","gpu_roles": {- "0": "main",- "1": "helper"+ "0": "helper",+ "1": "main"},"gpus_asked": true,"layer_split": "auto",@@ -475,13 +475,13 @@"cwd": "<T>","exe": "<T>/engine/<EXE>","gpu": [- 1,- 0+ 0,+ 1],"gpu_order": "as_given","gpu_roles": {- "0": "main",- "1": "helper"+ "0": "helper",+ "1": "main"},"gpus_asked": true,"layer_split": "auto",@@ -590,13 +590,13 @@"cwd": "<T>","exe": "<T>/engine/<EXE>","gpu": [- 1,- 0+ 0,+ 1],"gpu_order": "as_given","gpu_roles": {- "0": "main",- "1": "helper"+ "0": "helper",+ "1": "main"},"gpus_asked": true,"layer_split": "auto",@@ -649,13 +649,13 @@"cwd": "<T>","exe": "<T>/engine/<EXE>","gpu": [- 1,- 0+ 0,+ 1],"gpu_order": "as_given","gpu_roles": {- "0": "main",- "1": "helper"+ "0": "helper",+ "1": "main"},"gpus_asked": true,"layer_split": "auto",@@ -707,13 +707,13 @@"cwd": "<T>","exe": "<T>/engine/<EXE>","gpu": [- 1,- 0+ 0,+ 1],"gpu_order": "as_given","gpu_roles": {- "0": "main",- "1": "helper"+ "0": "helper",+ "1": "main"},"gpus_asked": true,"layer_split": "auto",@@ -766,13 +766,13 @@"cwd": "<T>","exe": "<T>/engine/<EXE>","gpu": [- 1,- 0+ 0,+ 1],"gpu_order": "as_given","gpu_roles": {- "0": "main",- "1": "helper"+ "0": "helper",+ "1": "main"},"gpus_asked": true,"layer_split": "auto",diff --git a/tools/test_setup_golden.py b/tools/test_setup_golden.pyindex 2d5ea6186..eb940cee6 100644--- a/tools/test_setup_golden.py+++ b/tools/test_setup_golden.py@@ -180,7 +180,7 @@ class Golden(unittest.TestCase):lowram_multi = self.golden["32GB-2x24GB qwen IQ3_XXS"]["config"] # #364 -> #642: low-RAM, two cards -> bothself.assertIn("--resident-experts" if "--resident-experts" in lowram_multi["args"] else "--mmap-experts",lowram_multi["args"])- self.assertEqual(lowram_multi.get("gpu"), [1, 0]) # 0.1.40 (#642): resident on both cards; roles: Main 0 goes last+ self.assertEqual(lowram_multi.get("gpu"), [0, 1]) # 0.1.40 (#642): resident on both cards; roles: Main 1 goes last, as beforedef test_yes(self):for key, ram, found, family, model in self.cases():diff --git a/tools/test_setup_gpu_fit.py b/tools/test_setup_gpu_fit.pyindex 20e8e1b3a..efbbc837e 100644--- a/tools/test_setup_gpu_fit.py+++ b/tools/test_setup_gpu_fit.py@@ -44,12 +44,12 @@ class SetupFitRule(unittest.TestCase):self.assertEqual(cfg["gpu_roles"], {"0": "helper", "1": "main"})self.assertEqual(cfg["layer_split"], "auto")- def test_two_equal_cards_start_as_main_and_helper_with_the_lower_number_main(self):+ def test_two_equal_cards_start_with_the_highest_number_as_main(self):found = [card(0, "NVIDIA GeForce RTX 3060", 12.0, "86"), card(1, "NVIDIA GeForce RTX 3060", 12.0, "86")]code, out, cfg, asked = run(26.0, found, "IQ3_XXS")self.assertEqual(code, 0, out)- self.assertEqual(cfg["gpu"], [1, 0])- self.assertEqual(cfg["gpu_roles"], {"0": "main", "1": "helper"})+ self.assertEqual(cfg["gpu"], [0, 1])+ self.assertEqual(cfg["gpu_roles"], {"0": "helper", "1": "main"})self.assertEqual(cfg["gpu_order"], "as_given")self.assertEqual(cfg["layer_split"], "auto")diff --git a/tools/test_setup_risk.py b/tools/test_setup_risk.pyindex b3562e2c6..99d6cfe30 100644--- a/tools/test_setup_risk.py+++ b/tools/test_setup_risk.py@@ -241,7 +241,7 @@ class LowRamGpus(unittest.TestCase):answers={"Low-RAM mode: which GPUs?": "2"}) # the roles are the default (Main last); the low-RAM question still defaults to one cardself.assertEqual(code, 0, out)self.assertTrue(any("Low-RAM mode: which GPUs? [1]" in q for q in asked), asked)- self.assertEqual(cfg["gpu"], [1, 0])+ self.assertEqual(cfg["gpu"], [0, 1])self.assertIn("--mmap-experts", cfg["args"])self.assertIn("1) GPU 0 (NVIDIA GeForce RTX 3090, 24 GB) only", out)@@ -278,7 +278,7 @@ class LowRamGpus(unittest.TestCase):code, out, cfg, asked = install(ram, found, ["--family", "qwen", "--model", "Q2_0", "--no-start"],answers={"Use these roles?": "y"}) # the recommended roles: Main 0 (last), Helper 1self.assertEqual(code, 0, out)- self.assertEqual(cfg["gpu"], [1, 0])+ self.assertEqual(cfg["gpu"], [0, 1])self.assertIn("--resident-experts", cfg["args"])self.assertFalse(any("Low-RAM mode" in q for q in asked), asked)self.assertIn("stay in RAM", out)diff --git a/tools/test_setup_unsloth.py b/tools/test_setup_unsloth.pyindex f6cc3d180..2d32c1397 100644--- a/tools/test_setup_unsloth.py+++ b/tools/test_setup_unsloth.py@@ -647,7 +647,7 @@ class LayerSplit(unittest.TestCase):self.assertIn("--resident-budget-gib", cfg["args"])code, out, cfg, asked = install(165.0, self.found, argv, answers={f"{M}: which GPUs?": "2"})self.assertEqual(code, 0, out)- self.assertEqual(cfg["gpu"], [1, 0])+ self.assertEqual(cfg["gpu"], [0, 1])self.assertEqual(cfg["layer_split"], "auto")self.assertNotIn("--resident-budget-gib", cfg["args"])