[PR #1676] [CLOSED] verify: initialize remote expert helper state in both batch paths #3601

Closed
opened 2026-11-07 15:29:28 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1676
Author: @saikiran-rs
Created: 10/9/2026
Status: ❌ Closed

Base: main ← Head: community/batch-remote-helper-lifecycle-20261009


📝 Commits (1)

  • 69779cb verify: initialize remote expert helper state in both batch paths

📊 Changes

1 file changed (+6 additions, -0 deletions)

View changed files

📝 src/core/verify.cpp (+6 -0)

📄 Description

Summary

When concurrent requests use --remote-expert-opt, batch verification can return
repeated characters or unrelated output. The batch graphs consume the helper's
mask and weighted sum, but run_slot_rows and batch_poll do not initialize the
helper with the current layer's routing weights or finish its work around the
CPU/helper pool call.

What changed

Add guarded remote_opt_->begin(h_w_, 0, S) and remote_opt_->end() calls around
both batch pool calls, matching the existing solo verifier lifecycle. This is six
added lines in src/core/verify.cpp. The helper-disabled path executes no new
calls. Model weights, sampler, KV layout and GPU kernels are unchanged.

Validation

Historical Linux HIP validation on v0.1.41 (fb58e0d) with RX 7900 XTX + RX 6800 XT,
Xeon E5-2696 v4, 128 GB DDR4 and Qwen3.8 Flash-Next UD-Q4_K_XL:

  • Original helper-enabled three-client control passed 1/3 semantic replies.
    Disabling QFUSE also passed 1/3; disabling the helper passed 12/12.
  • With this fix and the helper enabled, 18/18 initial/follow-up replies passed
    correct identity, arithmetic, meaningful-language and cross-session checks,
    with three native slots busy in every round. Another 12 configured-sampling
    replies passed.
  • Patched solo/three-client sampled quality was 181/181 HellaSwag and 172/174
    WinoGrande, each out of 200, with zero invalid outputs. These scores compare
    modes of the patched runtime, not a before/after quality gain.
  • All three configured 400K request windows recovered their own facts without
    cross-session leakage, including the generated output and API reservation.
  • The patch applies to the current main source; whitespace checks pass.

These are correctness results from the recorded 2026-10-08 stack, which also has
separate Python API compatibility changes. They are not a new isolated speed
benchmark or a claim of bitwise/universal model-quality equivalence.
This PR is a draft: fresh PR-branch CUDA/HIP build checks and CUDA hardware testing
remain pending. No new model/GPU runs were performed for publication because the
machine is running a separate experiment. The original serving setup is unchanged.

Extra notes

Related #1209/#1524 change batch layout/scheduling and #1636/#1637 change batch
MTP/adaptation. This change only supplies the missing helper lifecycle at the
two existing pool calls. It does not include the helper allowance setting from
#1458 or the performance report from #1459.


🔄 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/1676 **Author:** [@saikiran-rs](https://github.com/saikiran-rs) **Created:** 10/9/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `community/batch-remote-helper-lifecycle-20261009` --- ### 📝 Commits (1) - [`69779cb`](https://github.com/Niko1221/Strata/commit/69779cbacdc05874b35714e2810cc27c85bda7f5) verify: initialize remote expert helper state in both batch paths ### 📊 Changes **1 file changed** (+6 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/core/verify.cpp` (+6 -0) </details> ### 📄 Description ## Summary When concurrent requests use `--remote-expert-opt`, batch verification can return repeated characters or unrelated output. The batch graphs consume the helper's mask and weighted sum, but `run_slot_rows` and `batch_poll` do not initialize the helper with the current layer's routing weights or finish its work around the CPU/helper pool call. ## What changed Add guarded `remote_opt_->begin(h_w_, 0, S)` and `remote_opt_->end()` calls around both batch pool calls, matching the existing solo verifier lifecycle. This is six added lines in `src/core/verify.cpp`. The helper-disabled path executes no new calls. Model weights, sampler, KV layout and GPU kernels are unchanged. ## Validation Historical Linux HIP validation on v0.1.41 (`fb58e0d`) with RX 7900 XTX + RX 6800 XT, Xeon E5-2696 v4, 128 GB DDR4 and Qwen3.8 Flash-Next UD-Q4_K_XL: - Original helper-enabled three-client control passed 1/3 semantic replies. Disabling QFUSE also passed 1/3; disabling the helper passed 12/12. - With this fix and the helper enabled, 18/18 initial/follow-up replies passed correct identity, arithmetic, meaningful-language and cross-session checks, with three native slots busy in every round. Another 12 configured-sampling replies passed. - Patched solo/three-client sampled quality was 181/181 HellaSwag and 172/174 WinoGrande, each out of 200, with zero invalid outputs. These scores compare modes of the patched runtime, not a before/after quality gain. - All three configured 400K request windows recovered their own facts without cross-session leakage, including the generated output and API reservation. - The patch applies to the current main source; whitespace checks pass. These are correctness results from the recorded 2026-10-08 stack, which also has separate Python API compatibility changes. They are not a new isolated speed benchmark or a claim of bitwise/universal model-quality equivalence. This PR is a draft: fresh PR-branch CUDA/HIP build checks and CUDA hardware testing remain pending. No new model/GPU runs were performed for publication because the machine is running a separate experiment. The original serving setup is unchanged. ## Extra notes Related #1209/#1524 change batch layout/scheduling and #1636/#1637 change batch MTP/adaptation. This change only supplies the missing helper lifecycle at the two existing pool calls. It does not include the helper allowance setting from #1458 or the performance report from #1459. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:29:28 +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#3601
No description provided.