[GH-ISSUE #3304] [Engine] speculative decoding #1341

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

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

I use Strata for arround 5 days now and do not really know what is possible.

I am running Strata with an RTX4090 on an amd epyc 32cores + 196GB RAM.

So fare it was a real improvement to the QWen 3.8 27B I ran befor.

I am working on a very tight ai factory. Claude suggested me to run a second small model for speculative decoding next to the big qwen3.8-flash-next-unsloth-q8_0.

Claude said there could be a gain up to 1.5–2× on all model writing, which sounds really good.

Here the exact text:

Speculative decoding is a way to make the model on Strata write faster, without changing what it writes.

Why the model writes slowly: a language model writes one token (about one word piece) at a time. For each single token, the GPU has to read the model’s whole weights from memory. That memory read is the bottleneck; the GPU’s compute mostly waits. Whether it checks 1 token or 5 at once costs almost the same.

The trick: a second, much smaller model (the “draft” model, e.g. a 1-billion-parameter model of the same family) quickly guesses the next 5–8 tokens. The large model then checks all these guesses in one pass.

Guesses that match what the large model would have written anyway are kept, so several tokens for the price of one;
at the first wrong guess, the large model’s own token is used from there on, and guessing starts again.

I think Claude doesn't know Strata, so I thaught I just ask here.

Is this possible?
Would it really bring this improvements?
How would I have to make the setup?

Originally created by @peterkendlbacher on GitHub (Oct 20, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3304 I use Strata for arround 5 days now and do not really know what is possible. I am running Strata with an RTX4090 on an amd epyc 32cores + 196GB RAM. So fare it was a real improvement to the QWen 3.8 27B I ran befor. I am working on a very tight ai factory. Claude suggested me to run a second small model for speculative decoding next to the big qwen3.8-flash-next-unsloth-q8_0. Claude said there could be a gain up to 1.5–2× on all model writing, which sounds really good. Here the exact text: ----------------------------------------------------------------------------------------------- Speculative decoding is a way to make the model on Strata write faster, without changing what it writes. Why the model writes slowly: a language model writes one token (about one word piece) at a time. For each single token, the GPU has to read the model’s whole weights from memory. That memory read is the bottleneck; the GPU’s compute mostly waits. Whether it checks 1 token or 5 at once costs almost the same. The trick: a second, much smaller model (the “draft” model, e.g. a 1-billion-parameter model of the same family) quickly guesses the next 5–8 tokens. The large model then checks all these guesses in one pass. Guesses that match what the large model would have written anyway are kept, so several tokens for the price of one; at the first wrong guess, the large model’s own token is used from there on, and guessing starts again. ----------------------------------------------------------------------------------------------- I think Claude doesn't know Strata, so I thaught I just ask here. Is this possible? Would it really bring this improvements? How would I have to make the setup?
Author
Owner

@github-actions[bot] commented on GitHub (Oct 20, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6281067313 --> @github-actions[bot] commented on GitHub (Oct 20, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes". Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@j-luwierski commented on GitHub (Oct 20, 2026):

Related pull requests:

<!-- gh-comment-id:6287331750 --> @j-luwierski commented on GitHub (Oct 20, 2026): Related pull requests: - [#3322 — support the official Flash-Next DFlash2 checkpoint](https://github.com/Niko1221/Strata/pull/3322) — my DFlash2 support PR. - [#3397 — initial plan for DSpark speculative decoding](https://github.com/Niko1221/Strata/pull/3397) — draft plan for a possible DSpark integration.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 20, 2026):

Thanks, this follows the format now.

<!-- gh-comment-id:6297081093 --> @github-actions[bot] commented on GitHub (Oct 20, 2026): Thanks, this follows the format now.
Author
Owner

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

Short answer: Strata already does this, and you do not need a second model.

Qwen3.8-Flash-Next carries its own small prediction head (MTP). Strata uses it to guess the next few tokens and checks them with the big model in one pass. That is the speculative decoding you describe, and setup turns it on for you (--mtp, with --spec 4 as the common value). The gain depends on the text: more for code and repeated text, less for free writing. The answer is the same with it on or off at temperature 0, apart from tiny numerical differences.

A separate small draft model is not supported. j-luwierski's PRs #3322 and #3397 are about a different draft model (DFlash2/DSpark); they are not merged. If you tell us your Strata version and your current flags, we can say whether MTP is active (the start log has a line about it).

<!-- gh-comment-id:6308093766 --> @Niko1221 commented on GitHub (Oct 21, 2026): Short answer: Strata already does this, and you do not need a second model. Qwen3.8-Flash-Next carries its own small prediction head (MTP). Strata uses it to guess the next few tokens and checks them with the big model in one pass. That is the speculative decoding you describe, and setup turns it on for you (`--mtp`, with `--spec 4` as the common value). The gain depends on the text: more for code and repeated text, less for free writing. The answer is the same with it on or off at temperature 0, apart from tiny numerical differences. A separate small draft model is not supported. j-luwierski's PRs #3322 and #3397 are about a different draft model (DFlash2/DSpark); they are not merged. If you tell us your Strata version and your current flags, we can say whether MTP is active (the start log has a line about it).
Author
Owner

@peterkendlbacher commented on GitHub (Oct 27, 2026):

Thank you for the detailed answer. I hoped to help you improve the product and for me gain even more speed. As this is already inside strata, I will close the ticket.

<!-- gh-comment-id:6437867977 --> @peterkendlbacher commented on GitHub (Oct 27, 2026): Thank you for the detailed answer. I hoped to help you improve the product and for me gain even more speed. As this is already inside strata, I will close the ticket.
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#1341
No description provided.