Issues / #3294

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

open · @FernandoSPinto · 0 comentários · No GitHub

BenchmarksSetup & installServer & APIMulti-GPUNVIDIA / CUDAModels & quantsDocumentation

Descrição

## 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)

No site

Links install, modelos, releases.