Issues / #2724

#2724 --prefill-head-alias: 3x slower cold prefill on a 16GB card, and the safety stop aborts the request at the end of prompt read

open · @ShaggyDragon · 0 Kommentare · Auf GitHub

BenchmarksSetup & installServer & APIMulti-GPUNVIDIA / CUDAModels & quantsDocumentationLinux

Beschreibung

## Environment

- Strata **0.1.44.1**, `--serve`, single GPU
- RTX 5080 **16 GB**, dual Xeon Platinum 8176 (56C/112T), 256 GB RAM, Linux (Unraid, docker)
- Model: Qwen3.8-Flash-Next GSQ-RCO IQ3_S (79 GB pack: 52 GB main + 27 GB PLE), `--expert-cache auto`, `--ple-io ram`, `--kv int8 --kv-resident 16384`
- `--prefill-head-alias` enabled (from the initial setup recommendation)

## 1. Cold prefill is ~3x SLOWER with the flag on a 16 GB card

A/B on the same config, one flag changed, 35K-token cold prompt, same engine generation:

| | with `--prefill-head-alias` | without |
|---|---|---|
| Cold prefill (35K tok) | 60 s (~505 t/s) | **21 s (~1,650 t/s)** |
| Fork/resume of same prompt | 60 s | **5.4 s** |
| Decode steady state | 88–96 t/s | 89–92 t/s (unchanged) |

With the flag on, the prompt path appeared forced into ~2048-token chunks that borrowed expert-cache slots (engine log slot accounting); without it, chunks went to the normal size and experts loaded once per chunk. The docs describe the flag as paying off on small (8 GB) cards — on 16 GB it looks like pure cost.

**Suggestion:** auto-enable only when the prompt-path buffers don't fit alongside the expert cache, rather than leaving it to users to discover the regression by A/B.

## 2. The safety stop aborts the whole request — always at the very end of prompt read

4 occurrences in one engine generation. The pattern is consistent: the error fires at **96–99 % of prompt read**, i.e. the head layer appears to be reloaded (address moved) *during* prefill, and the captured verify graphs then fail at decode start:

```
[strata] reading the prompt: 26,845 of 26,850 tokens, 9 s so far
[strata] the engine reported an error: --prefill-head-alias: the output head was reloaded at another address, so the captured verify graphs would read freed memory
[strata] done: 0 tokens in 10 s (0.0 tok/s) (error, cancel=False)

[strata] reading the prompt: 56,354 of 56,429 tokens, 42 s so far
[strata] the engine reported an error: --prefill-head-alias: the output head was reloaded at another address, so the captured verify graphs would read freed memory
[strata] done: 0 tokens in 44 s (0.0 tok/s) (error, cancel=False)

[strata] reading the prompt: 90,338 of 90,343 tokens, 47 s so far
[strata] the engine reported an error: --prefill-head-alias: the output head was reloaded at another address, so the captured verify graphs would read freed memory
[strata] done: 0 tokens in 48 s (0.0 tok/s) (error, cancel=False)
```

The guard itself is right — reading freed memory would be worse — but the cost is brutal: the entire prefill (up to 48 s of work) is discarded, the client gets an error, and in our case the retries plus engine restarts wiped the adaptive tier, making every following request stone cold. That's how a "safety stop" turned into 100 s+ perceived cold starts.

**Suggestion:** when the moved head is detected, drop the alias for that request and decode via the non-aliased path (or re-capture the verify graphs) instead of failing the request — the prefill is already done at that point, everything else is throwaway.

Happy to run further A/Bs or capture the engine log around the reload events if useful.

Mehr auf der Site

Links zu Install, Modellen, Releases.