[GH-ISSUE #474] strata serve: mtp: the draft head does not fit — no guidance when MTP draft head exceeds VRAM on smaller GPUs #218

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

Originally created by @saikiran121111 on GitHub (Oct 2, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/474

What happened

The engine crashes on startup with this error when the MTP draft layer's token-subset head can't fit in VRAM:

strata serve: mtp: the draft head does not fit
RuntimeError: the engine exited before it was ready

This is a silent failure — the user gets no hint about what to change. On a 12 GB RTX 3060 with IQ3_S at 262K context, only ~1,500 MiB is free when MTP tries to bind; the default CJK draft vocab (106K tokens) needs ~348 MiB of contiguous VRAM and fails.

The fix already exists but isn't surfaced

setup.py and setup.sh already accept --draft-vocab with three choices:

┌───────────────┬─────────┬─────────────────┐
│ choice │ tokens │ draft head VRAM │
├───────────────┼─────────┼─────────────────┤
│cjk (default) │ 106,299 │ ~348 MiB │
├───────────────┼─────────┼─────────────────┤
│ cyrillic │ 57,793 │ ~189 MiB │
├───────────────┼─────────┼─────────────────┤
│ en │ 40,525 │ ~133 MiB │
└───────────────┴─────────┴─────────────────┘

Switching to --draft-vocab en resolved it immediately. The issue is that setup picks the default without considering VRAM headroom, and the engine's error message doesn't mention the flag.

Two small improvements that would help

  1. Engine: when MTP's bind() fails with "the draft head does not fit", print a hint: "Try a smaller draft vocabulary: --draft-vocab en (English/code, ~110 MiB less VRAM) or --draft-vocab cyrillic. Change it in setup with --draft-vocab."
  2. Setup / engine startup: when --vram-reserve-mib leaves less headroom than the draft head needs, pick en (or cyrillic) automatically and note it, rather than silently using the largest vocab regardless of GPU size.
  3. setup.sh / START-HERE.bat: mention --draft-vocab as a tuning option for GPUs under 14 GB VRAM.

Environment

  • Strata engine v0.1.34, model: Qwen3.8-Flash-Next IQ3_S, context 262144
  • GPU: NVIDIA GeForce RTX 3060 12 GB
  • OS: Linux
Originally created by @saikiran121111 on GitHub (Oct 2, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/474 What happened The engine crashes on startup with this error when the MTP draft layer's token-subset head can't fit in VRAM: strata serve: mtp: the draft head does not fit RuntimeError: the engine exited before it was ready This is a silent failure — the user gets no hint about what to change. On a 12 GB RTX 3060 with IQ3_S at 262K context, only ~1,500 MiB is free when MTP tries to bind; the default CJK draft vocab (106K tokens) needs ~348 MiB of contiguous VRAM and fails. The fix already exists but isn't surfaced setup.py and setup.sh already accept --draft-vocab with three choices: ┌───────────────┬─────────┬─────────────────┐ │ choice │ tokens │ draft head VRAM │ ├───────────────┼─────────┼─────────────────┤ │cjk (default) │ 106,299 │ ~348 MiB │ ├───────────────┼─────────┼─────────────────┤ │ cyrillic │ 57,793 │ ~189 MiB │ ├───────────────┼─────────┼─────────────────┤ │ en │ 40,525 │ ~133 MiB │ └───────────────┴─────────┴─────────────────┘ Switching to --draft-vocab en resolved it immediately. The issue is that setup picks the default without considering VRAM headroom, and the engine's error message doesn't mention the flag. Two small improvements that would help 1. Engine: when MTP's bind() fails with "the draft head does not fit", print a hint: "Try a smaller draft vocabulary: --draft-vocab en (English/code, ~110 MiB less VRAM) or --draft-vocab cyrillic. Change it in setup with --draft-vocab." 2. Setup / engine startup: when --vram-reserve-mib leaves less headroom than the draft head needs, pick en (or cyrillic) automatically and note it, rather than silently using the largest vocab regardless of GPU size. 3. setup.sh / START-HERE.bat: mention --draft-vocab as a tuning option for GPUs under 14 GB VRAM. Environment - Strata engine v0.1.34, model: Qwen3.8-Flash-Next IQ3_S, context 262144 - GPU: NVIDIA GeForce RTX 3060 12 GB - OS: Linux
Author
Owner

@Niko1221 commented on GitHub (Oct 2, 2026):

Thanks. In 0.1.36, when the draft head doesn't fit, the engine says what it needs and how much VRAM is free, and names --draft-vocab cyrillic / en with their sizes (computed for the model in use) and how to switch (START-HERE.bat --draft-vocab en, or ./setup.sh). The server's "exited before it was ready" error includes that hint. On cards under 14 GB, setup mentions --draft-vocab en when no vocabulary was chosen. It recommends rather than picks, because setup can't yet estimate the VRAM left after the plan precisely.

<!-- gh-comment-id:5956865109 --> @Niko1221 commented on GitHub (Oct 2, 2026): Thanks. In [0.1.36](https://github.com/Niko1221/Strata/releases/tag/v0.1.36), when the draft head doesn't fit, the engine says what it needs and how much VRAM is free, and names `--draft-vocab cyrillic` / `en` with their sizes (computed for the model in use) and how to switch (`START-HERE.bat --draft-vocab en`, or `./setup.sh`). The server's "exited before it was ready" error includes that hint. On cards under 14 GB, setup mentions `--draft-vocab en` when no vocabulary was chosen. It recommends rather than picks, because setup can't yet estimate the VRAM left after the plan precisely.
Author
Owner

@Dampfinchen commented on GitHub (Oct 4, 2026):

Thanks. In 0.1.36, when the draft head doesn't fit, the engine says what it needs and how much VRAM is free, and names --draft-vocab cyrillic / en with their sizes (computed for the model in use) and how to switch (START-HERE.bat --draft-vocab en, or ./setup.sh). The server's "exited before it was ready" error includes that hint. On cards under 14 GB, setup mentions --draft-vocab en when no vocabulary was chosen. It recommends rather than picks, because setup can't yet estimate the VRAM left after the plan precisely. ```

Even with --draft-vocab en, the MTP heads need too much memory.

strata mtp: the draft head over 40525 tokens needs 68 MiB of VRAM and 0 MiB is free.
  strata mtp: hint: this is already the smallest shipped draft vocabulary: a smaller --context (or closing what else uses the GPU) leaves it room.
  strata serve: mtp: the draft head does not fit

Please consider making speculative decoding an Opt-out option (I really wonder why that hasn't been the case in the first place as it is in llama.cpp). MTP so far in my testing has only lead to minor speedups in coding or regressions in creative writing at the cost of much higher VRAM usage that would be better spent on more experts on the GPU or more / higher quality context. It seems it is only a straight win for more recent systems with more video memory.

See #708

<!-- gh-comment-id:5983857897 --> @Dampfinchen commented on GitHub (Oct 4, 2026): > Thanks. In [0.1.36](https://github.com/Niko1221/Strata/releases/tag/v0.1.36), when the draft head doesn't fit, the engine says what it needs and how much VRAM is free, and names `--draft-vocab cyrillic` / `en` with their sizes (computed for the model in use) and how to switch (`START-HERE.bat --draft-vocab en`, or `./setup.sh`). The server's "exited before it was ready" error includes that hint. On cards under 14 GB, setup mentions `--draft-vocab en` when no vocabulary was chosen. It recommends rather than picks, because setup can't yet estimate the VRAM left after the plan precisely. ``` Even with --draft-vocab en, the MTP heads need too much memory. ``` strata mtp: the draft head over 40525 tokens needs 68 MiB of VRAM and 0 MiB is free. strata mtp: hint: this is already the smallest shipped draft vocabulary: a smaller --context (or closing what else uses the GPU) leaves it room. strata serve: mtp: the draft head does not fit ``` Please consider making speculative decoding an Opt-out option (I really wonder why that hasn't been the case in the first place as it is in llama.cpp). MTP so far in my testing has only lead to minor speedups in coding or regressions in creative writing at the cost of much higher VRAM usage that would be better spent on more experts on the GPU or more / higher quality context. It seems it is only a straight win for more recent systems with more video memory. See #708
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#218
No description provided.