[GH-ISSUE #5109] [Engine] On a mixed NVIDIA+AMD box the drafter is sized from the idle NVIDIA card: Auto sets --draft-conf 0.8 where the serving RX 7900 XTX's 9,239 slots prescribe 0.5 #2387

Open
opened 2026-11-04 01:58:53 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @foomip on GitHub (Nov 3, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5109

Area

[Engine] (speed, kernels, models, the server and API)

Desktop app, Terminal or source?

Source (START-HERE.bat, setup.sh or a build)

What happened

On a computer that has a small idle NVIDIA card and an AMD card that Strata actually serves from, the drafter's
confidence and single-card sizing are read from the NVIDIA card, which is not the card the engine runs on.

Measured on a box running Strata 0.2.10 from source with the HIP engine it compiled here (gfx1100), which has an
RTX 3060 12 GB (sm_86) that only drives the desktop beside the RX 7900 XTX the engine serves from:

  • strata_control.drafting.detect_hardware() returns ('cuda', ['sm_86', 'gfx1100']):
    engine_component.detect_backend() answers ('cuda', 'nvidia-smi'), and serve/server.py puts
    cuda_archs_present() before hip_archs_present().
  • serve/server.py: drafting_vram_mib() therefore returns 12288 MiB (the 3060). The serving XTX is 24560 MiB.
  • drafting.expected_slots(12288, args) = 1761, and conf_for_slots turns that into --draft-conf 0.8 -
    confirmed on the engine's command line, not inferred.
  • For that same start the engine's own log says GPU 0: AMD Radeon RX 7900 XTX (gfx1100) and
    filling the GPU's expert cache (9239 experts, 17.53 GiB of VRAM). For 9239 slots that module's own CONF_STEPS
    prescribes 0.5.

So an Auto start picks the confidence meant for a card holding 1,761 experts on a card holding 9,239, and nothing in the
output says a second card was consulted.

Two more consequences from the same wrong vendor answer:

  • drafting.hardware_support(*drafting.detect_hardware()) returns Support(can_run=True, level='slower', line='On graphics cards like yours, DFlash2 was slower than MTP in our tests.'), because it evaluates the cuda/sm_86 row. For
    the card in use it answers Support(can_run=True, level='untested', line='DFlash2 has not been tested on your graphics card yet.') for hip/gfx1100. The card class used for the tables here is ampere.
  • vram_fit.fit_start takes the cuda branch. Verified by calling it with those values: on this config it printed no
    note and changed no arguments, so this point made no difference in our runs. That it would use
    BASE_SLOTTED_MIB[('cuda','flash-next')] = 4990 instead of [('hip','flash-next')] = 3900 is read from the code:
    unconfirmed static analysis as to any effect.

Smallest steps or command that reproduce it

cd ~/Strata && .venv/bin/python - <<'EOF'
import json, sys
sys.path.insert(0, "serve")
from serve import server
from strata_control import drafting
cfg = json.load(open("strata-iq3_s.json"))
backend, archs = drafting.detect_hardware()
print(backend, archs)                                   # cuda ['sm_86', 'gfx1100']
print(drafting.hardware_support(backend, archs))         # slower   (the cuda/sm_86 row)
print(drafting.hardware_support("hip", ["gfx1100"]))     # untested (the card the engine uses)
v = server.drafting_vram_mib(cfg, backend, archs)
print(v)                                                 # 12288.0  (the idle 3060)
s = drafting.expected_slots(v, [str(a) for a in cfg["args"]])
print(s, drafting.conf_for(backend, s))                  # 1761  0.8
print(drafting.conf_for_slots(9239))                     # 0.5     (what the engine really holds)
EOF

The lane is an ordinary single-card Qwen3.8 IQ3_S start: --max-context 262144 --kv k8v4 --kv-resident 32768 --expert-cache auto --vram-reserve-mib 256, no "gpu" list in the config, "parallel" unset. Nothing about the box is
unusual except that a second, unused GPU vendor is present.

Reproduction status

Reproduced locally

Strata version

Strata 0.2.10 - engine 0.1.56 (source checkout at tag v0.2.10, the HIP engine compiled on this box for gfx1100,
BUILD.json source: local-hip)

Graphics card, memory and system

Radeon RX 7900 XTX 24 GB (gfx1100, the serving card) plus an idle GeForce RTX 3060 12 GB (sm_86, desktop only,
NVIDIA driver 595.104.02) - 125 GB RAM - Pop!_OS 24.04 LTS, kernel 7.2.6-76070206-generic, Python 3.14.5, ROCm wheels
7.10.0a20251120 (gfx110X-dgpu) in .venv

What we measured with it

Interleaved arms on the same box and engine, standard-v1. Every arm: 21 of 21 required requests finished, sanity
checks 12 of 12 (instruction 4/4, retrieval 4/4, tool calls 4/4). Medians; suite wall in the last column.

arm prefill 4K / 16K tok/s decode short / 4K / 16K tok/s TTFT 16K one 16K request end to end suite wall drafts accepted
MTP 1042.6 / 1286.4 62.0 / 60.0 / 59.3 12.78 s 21.3 s 3 min 01 s 67%
MTP, re-run 1038.0 / 1283.9 62.2 / 58.2 / 58.2 12.81 s 21.6 s 3 min 07 s 67%
DFlash2 --draft-conf 0.8 (what Auto chose) 1028.7 / 1286.6 65.3 / 56.8 / 57.5 12.77 s 21.6 s 3 min 02 s 86%
DFlash2 --draft-conf 0.7, run 1 / run 2 1028.3, 1026.2 / 1288.1, 1285.5 59.3, 63.9 / 60.7, 65.7 / 66.5, 58.2 12.76, 12.79 s 20.4, 21.5 s 3 min 03, 2 min 58 s 78%, 79%
DFlash2 --draft-conf 0.5 (what CONF_STEPS gives for 9239 slots) 1029.9 / 1287.5 70.2 / 58.9 / 64.7 12.77 s 20.6 s 2 min 57 s 69%

Read it with the noise kept in: within-run ranges are wide (the 0.7 arm gave 16K decode 66.5 [63.7-66.8] in one run and
58.2 [58.0-70.9] in the next), so one run per confidence does not separate the confidence from run-to-run spread. What
is consistent: prefill (1026-1043 / 1284-1288) and TTFT (12.76-12.81 s) do not move between drafters at all on this card,
and every DFlash2 arm's end-to-end 16K time (20.4-21.6 s) sits at or below MTP's (21.3-21.6 s) with a slightly faster
suite wall (2:57-3:03 against 3:01-3:07). The 0.5 arm was the best single run. DFlash2 is also the cheaper drafter here:
the expert cache came up at 9239 slots with DFlash2 against 9114 with the MTP (436 against 400 MiB free with the
model loaded), with the engine printing drafter 625 MiB of VRAM (Q4_0 weights).

These are our measurements on a card you say you have no way to run, not a recommendation.

What we did to work around it

Pinned the choice rather than leaving it to Auto, using the documented path for hand-set options
(strata_control/user_args.py; options set by hand in "args" are regenerated, "user_args" survive every start):

"drafting": "dflash2",
"user_args": ["--draft-conf", "0.5"]

Suggested shape of a fix

The drafter's card should be the card the engine will run on, not the first one a probe finds - and both are already
known at that moment: the config's "gpu" list or --gpu, and the installed engine's BUILD.json backend and
archs (here local-hip, ["gfx1100"]). So: take the backend and arch from the engine that is about to start, falling
back to the present detection only when that is unknown. And when more than one vendor is present, say which card the
drafter was sized from - a wrong card silently changes a speed-critical number. A config that names its AMD card should
not be sized from an NVIDIA adapter it never uses.

What we did not test

  • The mirror case: a mixed box where NVIDIA is the serving card and AMD is idle. Nor two cards of the same vendor, nor a
    layer split on a mixed box.
  • Whether a numeric --expert-cache N (instead of auto) makes apply use that number and so dodge vram_mib - the
    docstring says it prefers the person's own value; we did not run it.
  • Any effect of the vram_fit branch: on our config it changed nothing.
  • Windows. This report is Linux only.
  • Only Qwen3.8 IQ3_S: no DeepSeek, no Unsloth or Gyro file on this mixed box, no picture request, no request with
    "parallel" set.

Related: #3795 reported the same theme at install time on Windows ("an RTX 3060 + RX 7900 XTX rig, setup defaults to
NVIDIA"). This is a different code path - runtime control on Linux - where a second, unused vendor quietly changes a
speed setting rather than which build gets installed.

Originally created by @foomip on GitHub (Nov 3, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5109 ### Area [Engine] (speed, kernels, models, the server and API) ### Desktop app, Terminal or source? Source (START-HERE.bat, setup.sh or a build) ### What happened On a computer that has a small idle NVIDIA card and an AMD card that Strata actually serves from, the drafter's confidence and single-card sizing are read from the **NVIDIA** card, which is not the card the engine runs on. Measured on a box running Strata 0.2.10 from source with the HIP engine it compiled here (`gfx1100`), which has an **RTX 3060 12 GB (sm_86) that only drives the desktop** beside the **RX 7900 XTX** the engine serves from: - `strata_control.drafting.detect_hardware()` returns `('cuda', ['sm_86', 'gfx1100'])`: `engine_component.detect_backend()` answers `('cuda', 'nvidia-smi')`, and `serve/server.py` puts `cuda_archs_present()` before `hip_archs_present()`. - `serve/server.py: drafting_vram_mib()` therefore returns **12288 MiB** (the 3060). The serving XTX is **24560 MiB**. - `drafting.expected_slots(12288, args)` = **1761**, and `conf_for_slots` turns that into **`--draft-conf 0.8`** - confirmed on the engine's command line, not inferred. - For that same start the engine's own log says `GPU 0: AMD Radeon RX 7900 XTX (gfx1100)` and `filling the GPU's expert cache (9239 experts, 17.53 GiB of VRAM)`. For 9239 slots that module's own `CONF_STEPS` prescribes **0.5**. So an Auto start picks the confidence meant for a card holding 1,761 experts on a card holding 9,239, and nothing in the output says a second card was consulted. Two more consequences from the same wrong vendor answer: - `drafting.hardware_support(*drafting.detect_hardware())` returns `Support(can_run=True, level='slower', line='On graphics cards like yours, DFlash2 was slower than MTP in our tests.')`, because it evaluates the `cuda/sm_86` row. For the card in use it answers `Support(can_run=True, level='untested', line='DFlash2 has not been tested on your graphics card yet.')` for `hip/gfx1100`. The card class used for the tables here is `ampere`. - `vram_fit.fit_start` takes the `cuda` branch. Verified by calling it with those values: on this config it printed no note and changed no arguments, so this point made no difference in our runs. That it would use `BASE_SLOTTED_MIB[('cuda','flash-next')] = 4990` instead of `[('hip','flash-next')] = 3900` is read from the code: unconfirmed static analysis as to any effect. ### Smallest steps or command that reproduce it ```sh cd ~/Strata && .venv/bin/python - <<'EOF' import json, sys sys.path.insert(0, "serve") from serve import server from strata_control import drafting cfg = json.load(open("strata-iq3_s.json")) backend, archs = drafting.detect_hardware() print(backend, archs) # cuda ['sm_86', 'gfx1100'] print(drafting.hardware_support(backend, archs)) # slower (the cuda/sm_86 row) print(drafting.hardware_support("hip", ["gfx1100"])) # untested (the card the engine uses) v = server.drafting_vram_mib(cfg, backend, archs) print(v) # 12288.0 (the idle 3060) s = drafting.expected_slots(v, [str(a) for a in cfg["args"]]) print(s, drafting.conf_for(backend, s)) # 1761 0.8 print(drafting.conf_for_slots(9239)) # 0.5 (what the engine really holds) EOF ``` The lane is an ordinary single-card Qwen3.8 IQ3_S start: `--max-context 262144 --kv k8v4 --kv-resident 32768 --expert-cache auto --vram-reserve-mib 256`, no `"gpu"` list in the config, `"parallel"` unset. Nothing about the box is unusual except that a second, unused GPU vendor is present. ### Reproduction status Reproduced locally ### Strata version Strata 0.2.10 - engine 0.1.56 (source checkout at tag `v0.2.10`, the HIP engine compiled on this box for `gfx1100`, `BUILD.json` `source: local-hip`) ### Graphics card, memory and system Radeon RX 7900 XTX 24 GB (`gfx1100`, the serving card) plus an idle GeForce RTX 3060 12 GB (`sm_86`, desktop only, NVIDIA driver 595.104.02) - 125 GB RAM - Pop!_OS 24.04 LTS, kernel 7.2.6-76070206-generic, Python 3.14.5, ROCm wheels 7.10.0a20251120 (`gfx110X-dgpu`) in `.venv` ### What we measured with it Interleaved arms on the same box and engine, `standard-v1`. Every arm: 21 of 21 required requests finished, sanity checks 12 of 12 (instruction 4/4, retrieval 4/4, tool calls 4/4). Medians; suite wall in the last column. | arm | prefill 4K / 16K tok/s | decode short / 4K / 16K tok/s | TTFT 16K | one 16K request end to end | suite wall | drafts accepted | |---|---|---|---|---|---|---| | MTP | 1042.6 / 1286.4 | 62.0 / 60.0 / 59.3 | 12.78 s | 21.3 s | 3 min 01 s | 67% | | MTP, re-run | 1038.0 / 1283.9 | 62.2 / 58.2 / 58.2 | 12.81 s | 21.6 s | 3 min 07 s | 67% | | DFlash2 `--draft-conf 0.8` (what Auto chose) | 1028.7 / 1286.6 | 65.3 / 56.8 / 57.5 | 12.77 s | 21.6 s | 3 min 02 s | 86% | | DFlash2 `--draft-conf 0.7`, run 1 / run 2 | 1028.3, 1026.2 / 1288.1, 1285.5 | 59.3, 63.9 / 60.7, 65.7 / 66.5, 58.2 | 12.76, 12.79 s | 20.4, 21.5 s | 3 min 03, 2 min 58 s | 78%, 79% | | DFlash2 `--draft-conf 0.5` (what `CONF_STEPS` gives for 9239 slots) | 1029.9 / 1287.5 | 70.2 / 58.9 / 64.7 | 12.77 s | 20.6 s | 2 min 57 s | 69% | Read it with the noise kept in: within-run ranges are wide (the 0.7 arm gave 16K decode 66.5 [63.7-66.8] in one run and 58.2 [58.0-70.9] in the next), so one run per confidence does not separate the confidence from run-to-run spread. What is consistent: prefill (1026-1043 / 1284-1288) and TTFT (12.76-12.81 s) do not move between drafters at all on this card, and every DFlash2 arm's end-to-end 16K time (20.4-21.6 s) sits at or below MTP's (21.3-21.6 s) with a slightly faster suite wall (2:57-3:03 against 3:01-3:07). The 0.5 arm was the best single run. DFlash2 is also the cheaper drafter here: the expert cache came up at **9239 slots with DFlash2 against 9114 with the MTP** (436 against 400 MiB free with the model loaded), with the engine printing `drafter 625 MiB of VRAM (Q4_0 weights)`. These are our measurements on a card you say you have no way to run, not a recommendation. ### What we did to work around it Pinned the choice rather than leaving it to Auto, using the documented path for hand-set options (`strata_control/user_args.py`; options set by hand in `"args"` are regenerated, `"user_args"` survive every start): ```json "drafting": "dflash2", "user_args": ["--draft-conf", "0.5"] ``` ### Suggested shape of a fix The drafter's card should be the card the engine will run on, not the first one a probe finds - and both are already known at that moment: the config's `"gpu"` list or `--gpu`, and the installed engine's `BUILD.json` `backend` and `archs` (here `local-hip`, `["gfx1100"]`). So: take the backend and arch from the engine that is about to start, falling back to the present detection only when that is unknown. And when more than one vendor is present, say which card the drafter was sized from - a wrong card silently changes a speed-critical number. A config that names its AMD card should not be sized from an NVIDIA adapter it never uses. ### What we did not test - The mirror case: a mixed box where NVIDIA is the serving card and AMD is idle. Nor two cards of the same vendor, nor a layer split on a mixed box. - Whether a numeric `--expert-cache N` (instead of `auto`) makes `apply` use that number and so dodge `vram_mib` - the docstring says it prefers the person's own value; we did not run it. - Any effect of the `vram_fit` branch: on our config it changed nothing. - Windows. This report is Linux only. - Only Qwen3.8 IQ3_S: no DeepSeek, no Unsloth or Gyro file on this mixed box, no picture request, no request with `"parallel"` set. Related: #3795 reported the same theme at install time on Windows ("an RTX 3060 + RX 7900 XTX rig, setup defaults to NVIDIA"). This is a different code path - runtime control on Linux - where a second, unused vendor quietly changes a speed setting rather than which build gets installed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2387
No description provided.