[GH-ISSUE #3294] [Engine] Qwen3.6-35B-A3B: layer split across 2 GPUs (single GPU = 58 tok/s vs 95 with llama.cpp -sm layer) #1333

Closed
opened 2026-11-04 01:50:26 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @FernandoSPinto on GitHub (Oct 20, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3294

Context

Strata's Qwen3.6-35B-A3B path (src/qwen35) runs on one GPU only. Setup says it explicitly:

[!] Qwen3.6-35B-A3B runs on one GPU so far: using GPU 0 (Tesla P100-PCIE-16GB, 16 GB) only

With the 0.1.45.3 engine it now loads on 2x Tesla P100-16GB (32 GB total) — the earlier engine died at load with cudaMalloc(&d, h.size() * 4) failed: out of memory (q36_engine.cu:954) — but everything stays on GPU 0:

strata-q36: hybrid experts: 76 of 256 per layer in VRAM (5.56 GiB), all 18.75 GiB in pinned host memory, the rest of a batch of <= 128 rows on 27 CPU threads
strata serve: session 0: prompt 33 tokens ... 200 generated in 3439 ms (58.2 tok/s)

GPU 1 stays at 262 MiB (idle).

The case a layer split fits

  • 32 GB of VRAM in total against a 22.9 GB model (UD-Q4_K_XL): with a split every expert fits in VRAM — the case docs/MULTI_GPU.md calls the fast one ("every expert in VRAM"), instead of the current hybrid mode (76/256 experts in VRAM, the rest from pinned RAM / CPU).
  • Pascal is already admitted on this path: docs/OLDER_GPUS.md (2x P100 reported; 2x P40 ran the layer split in a community benchmark: IQ2_XS 19.6 tok/s on one card, 34.8 on both, #1028).
  • The same GGUF on llama.cpp with -sm layer on these two cards: 91-95 tok/s, against 58 with Strata today.

Request

Port the layer split from src/program/generate.cpp to src/qwen35/q36_engine.cu: contiguous layer ranges per GPU, each layer's dense/GDN state and KV cache on its own GPU, and an expert cache per card for its own layers. Expose it as --gpus 0,1 ("gpu": [0, 1] + "layer_split": "auto" in the config) — the setup already accepts --gpus for this family and then warns that it runs on one GPU.

Reproduce

./setup.sh --family qwen36 --model UD-Q4_K_XL --gpus 0,1 --context 8192
# -> [!] Qwen3.6-35B-A3B runs on one GPU so far: using GPU 0 only
# start it: loads (0.1.45.3) with 76/256 experts per layer in VRAM, GPU 1 idle, ~58 tok/s

What I already checked (so this is not a duplicate)

  • docs/MULTI_GPU.md: the split exists for Flash-Next/Coder; --peer-device and --gpu-placement are expert-cache tiers, not a layer split (--peer-device is refused beside --layer-split).
  • docs/SECOND_GPU.md: secondary-GPU expert tiers — a different mechanism, not offered for the qwen36 family.
  • src/qwen35/q36_engine.cu: split-K (intra-GPU) only, nothing across devices.
  • Existing issues: #2747 (OOM — fixed by 0.1.45.3), #2982 (GPU utilization), #1402 (the original qwen35moe support), #2239 (a layer-split bug on a supported model) — none asks for a layer split for this family.

Assisted-by: Hermes Agent (Nous Research)

Originally created by @FernandoSPinto on GitHub (Oct 20, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3294 ## Context Strata's Qwen3.6-35B-A3B path (`src/qwen35`) runs on one GPU only. Setup says it explicitly: ``` [!] Qwen3.6-35B-A3B runs on one GPU so far: using GPU 0 (Tesla P100-PCIE-16GB, 16 GB) only ``` With the 0.1.45.3 engine it now loads on 2x Tesla P100-16GB (32 GB total) — the earlier engine died at load with `cudaMalloc(&d, h.size() * 4) failed: out of memory` (q36_engine.cu:954) — but everything stays on GPU 0: ``` strata-q36: hybrid experts: 76 of 256 per layer in VRAM (5.56 GiB), all 18.75 GiB in pinned host memory, the rest of a batch of <= 128 rows on 27 CPU threads strata serve: session 0: prompt 33 tokens ... 200 generated in 3439 ms (58.2 tok/s) ``` GPU 1 stays at 262 MiB (idle). ## The case a layer split fits - 32 GB of VRAM in total against a 22.9 GB model (UD-Q4_K_XL): with a split every expert fits in VRAM — the case `docs/MULTI_GPU.md` calls the fast one ("every expert in VRAM"), instead of the current hybrid mode (76/256 experts in VRAM, the rest from pinned RAM / CPU). - Pascal is already admitted on this path: `docs/OLDER_GPUS.md` (2x P100 reported; 2x P40 ran the layer split in a community benchmark: IQ2_XS 19.6 tok/s on one card, 34.8 on both, #1028). - The same GGUF on llama.cpp with `-sm layer` on these two cards: **91-95 tok/s**, against 58 with Strata today. ## Request Port the layer split from `src/program/generate.cpp` to `src/qwen35/q36_engine.cu`: contiguous layer ranges per GPU, each layer's dense/GDN state and KV cache on its own GPU, and an expert cache per card for its own layers. Expose it as `--gpus 0,1` (`"gpu": [0, 1]` + `"layer_split": "auto"` in the config) — the setup already accepts `--gpus` for this family and then warns that it runs on one GPU. ## Reproduce ``` ./setup.sh --family qwen36 --model UD-Q4_K_XL --gpus 0,1 --context 8192 # -> [!] Qwen3.6-35B-A3B runs on one GPU so far: using GPU 0 only # start it: loads (0.1.45.3) with 76/256 experts per layer in VRAM, GPU 1 idle, ~58 tok/s ``` ## What I already checked (so this is not a duplicate) - `docs/MULTI_GPU.md`: the split exists for Flash-Next/Coder; `--peer-device` and `--gpu-placement` are expert-cache tiers, not a layer split (`--peer-device` is refused beside `--layer-split`). - `docs/SECOND_GPU.md`: secondary-GPU expert tiers — a different mechanism, not offered for the qwen36 family. - `src/qwen35/q36_engine.cu`: split-K (intra-GPU) only, nothing across devices. - Existing issues: #2747 (OOM — fixed by 0.1.45.3), #2982 (GPU utilization), #1402 (the original qwen35moe support), #2239 (a layer-split bug on a supported model) — none asks for a layer split for this family. Assisted-by: Hermes Agent (Nous Research)
Author
Owner

@DebugSultan commented on GitHub (Oct 22, 2026):

Strongly interested in multi-GPU support for Qwen3.6-35B-A3B on the src/qwen35 path: a layer split, and also a helper-GPU mode (as in docs/SECOND_GPU.md) would both be very welcome.

I can test it if useful: I have 2x sm_61 (Pascal) cards with 8 GB each, plus 32 GB RAM. With 16 GB total VRAM against the 22.9 GB UD-Q4_K_XL, I’d be exercising layer split + hybrid mode, not the all-experts-in-VRAM case. I’m also willing to test other quants (e.g. smaller ones) and report benchmarks or try early builds.

<!-- gh-comment-id:6351787743 --> @DebugSultan commented on GitHub (Oct 22, 2026): Strongly interested in multi-GPU support for Qwen3.6-35B-A3B on the src/qwen35 path: a layer split, and also a helper-GPU mode (as in docs/SECOND_GPU.md) would both be very welcome. I can test it if useful: I have 2x sm_61 (Pascal) cards with 8 GB each, plus 32 GB RAM. With 16 GB total VRAM against the 22.9 GB UD-Q4_K_XL, I’d be exercising layer split + hybrid mode, not the all-experts-in-VRAM case. I’m also willing to test other quants (e.g. smaller ones) and report benchmarks or try early builds.
Author
Owner

@Niko1221 commented on GitHub (Nov 5, 2026):

Thanks for taking the time to report this.

Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.11. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6659440847 --> @Niko1221 commented on GitHub (Nov 5, 2026): Thanks for taking the time to report this. Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.11. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
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#1333
No description provided.