[PR #284] [CLOSED] Verify: the commit graph no longer waits; it overlaps the MTP draft #2550

Closed
opened 2026-11-04 02:01:14 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/284
Author: @sergqwer
Created: 9/30/2026
Status: ❌ Closed

Base: main ← Head: pr/async-verify-commit


📝 Commits (1)

  • 2ee612e Verify: the commit graph no longer waits; it overlaps the MTP draft

📊 Changes

3 files changed (+20 additions, -2 deletions)

View changed files

📝 include/strata/core/verify.hpp (+5 -0)
📝 src/core/verify.cpp (+10 -2)
📝 src/program/generate.cpp (+5 -0)

📄 Description

Summary

The verify window's commit ended in cudaStreamSynchronize, which held the host ~0.45 ms a round. The next window
follows the commit on the same stream, and the drafter (on its own stream) reads only this window's final rows and
its own K/V. So on a single GPU the commit now returns at once (Verifier::set_commit_async).

Whatever touches the session from another stream or from the host afterwards synchronizes the device first: the
start of each --serve request (checkpoint restore, zeroing, the prompt path) and the end of a generate run.
Checkpoint saves already did. A layer split keeps the wait.

Measured

Measured on current main (0.1.29, d6708a4) with ISTA-DASLab's IQ2_XS, RTX 5090 32 GB, Ryzen 9 9950X3D, 128 GB DDR5, Windows 11. KL is first-token KL divergence (STRATA_DUMP_FIRST_LOGITS, #276); two runs of main itself differ by 0 on 5 of 6 short prompts and by 0.00013 on the sixth. 400-token answers, --vram-reserve-mib 1500 (#279), 3 runs each,
interleaved:

decode
main 139.8 / 123.0 / 122.9 tok/s (mean 128.6)
this PR 139.0 / 130.6 / 137.8 tok/s (mean 135.8)

That is +5.6%. The generated tokens are identical in every pair. On an NVFP4 pack, which has more GPU work per
round, the gain was +0.8% (114.7 -> 115.6 tok/s), within the noise. Five consecutive --serve requests over two
conversations (fork) answered correctly, with the same prompt reuse as with the wait.

I know #203 was closed for showing no difference. This one is small too, so I'm leaving the call to you.

Switch

STRATA_COMMIT_SYNC=1 keeps the wait.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VZy1yKaDDiA8a7svdwaHio


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/284 **Author:** [@sergqwer](https://github.com/sergqwer) **Created:** 9/30/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `pr/async-verify-commit` --- ### 📝 Commits (1) - [`2ee612e`](https://github.com/Niko1221/Strata/commit/2ee612ee55d039db8e88657a86d9af699a426aa6) Verify: the commit graph no longer waits; it overlaps the MTP draft ### 📊 Changes **3 files changed** (+20 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `include/strata/core/verify.hpp` (+5 -0) 📝 `src/core/verify.cpp` (+10 -2) 📝 `src/program/generate.cpp` (+5 -0) </details> ### 📄 Description ## Summary The verify window's commit ended in `cudaStreamSynchronize`, which held the host ~0.45 ms a round. The next window follows the commit on the same stream, and the drafter (on its own stream) reads only this window's final rows and its own K/V. So on a single GPU the commit now returns at once (`Verifier::set_commit_async`). Whatever touches the session from another stream or from the host afterwards synchronizes the device first: the start of each `--serve` request (checkpoint restore, zeroing, the prompt path) and the end of a generate run. Checkpoint saves already did. A layer split keeps the wait. ## Measured Measured on current main (0.1.29, d6708a4) with ISTA-DASLab's IQ2_XS, RTX 5090 32 GB, Ryzen 9 9950X3D, 128 GB DDR5, Windows 11. KL is first-token KL divergence (`STRATA_DUMP_FIRST_LOGITS`, #276); two runs of main itself differ by 0 on 5 of 6 short prompts and by 0.00013 on the sixth. 400-token answers, `--vram-reserve-mib 1500` (#279), 3 runs each, interleaved: | | decode | | --- | ---: | | main | 139.8 / 123.0 / 122.9 tok/s (mean 128.6) | | this PR | 139.0 / 130.6 / 137.8 tok/s (mean 135.8) | That is +5.6%. The generated tokens are identical in every pair. On an NVFP4 pack, which has more GPU work per round, the gain was +0.8% (114.7 -> 115.6 tok/s), within the noise. Five consecutive `--serve` requests over two conversations (fork) answered correctly, with the same prompt reuse as with the wait. I know #203 was closed for showing no difference. This one is small too, so I'm leaving the call to you. ## Switch `STRATA_COMMIT_SYNC=1` keeps the wait. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01VZy1yKaDDiA8a7svdwaHio --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:01:14 +07:00
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#2550
No description provided.