Repository navigation
feat(client): pass through sampling-mask logprobs and by-handle payload segments - #170
Open
faresobeid wants to merge 2 commits into
Open
faresobeid wants to merge 2 commits into
faresobeid wants to merge 2 commits into
Conversation
faresobeid
marked this pull request as ready for review
October 3, 2026 11:52
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This one-file change adds two optional server-response fields to Notes:
You can add or adjust custom eligibility rules. Learn more. |
faresobeid
force-pushed
the
feat/top-logprobs-v2
branch
3 times, most recently
from
October 6, 2026 17:19
01c9cce to
1cd3446
Compare
faresobeid
changed the base branch from
main
to
perf/packed-completion-logprobs
October 6, 2026 17:19
faresobeid
force-pushed
the
perf/packed-completion-logprobs
branch
from
October 8, 2026 14:35
e134d56 to
e161362
Compare
faresobeid
force-pushed
the
feat/top-logprobs-v2
branch
from
October 8, 2026 14:35
1cd3446 to
ea01237
Compare
faresobeid
force-pushed
the
perf/packed-completion-logprobs
branch
from
October 9, 2026 23:48
e161362 to
19c558f
Compare
faresobeid
force-pushed
the
feat/top-logprobs-v2
branch
from
October 9, 2026 23:48
ea01237 to
ecfeef7
Compare
macroscopeapp
Bot
dismissed
their stale review
October 12, 2026 18:47
Dismissing prior approval to re-evaluate d3a1af0
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On top of #174's packed completion logprobs,
renderers.client.generate()passes two more optional prime-rl/inference/v1/generatefields through. Both are pure pass-through: no request-side change, no parsing or validation (same assampling_mask). Stock vLLM sends neither, and then the keys areNone.sampling_mask_logprobs = choice.get("sampling_mask_logprobs"): the sampler's logprobs at the sampling-mask ids, packed base64 float32{data, shape, dtype}, parallel to the packedsampling_maskids. verifiers decodes it (feat(v1): optional sampler logprobs on SamplingMask verifiers#2756). Consumer: prime-rl score centering, feat: exact score centering over the sampling mask (arXiv:2609.20807) prime-rl#3794.payload = choice.get("payload"): by-handle segments of a shared file that prime-rl's inference server writes instead of returningrouted_experts/sampling_maskinline. verifiers puts them on traces (feat(v1): by-handle payload segments on traces verifiers#2765). Consumer: feat: pass router-replay ids and sampling masks by handle on multi-node runs prime-rl#3902.Stack
Base: #174 (
perf/packed-completion-logprobs). Order: #174 -> PrimeIntellect-ai/verifiers#2778 -> prime-rl#3900; then this PR with PrimeIntellect-ai/verifiers#2756 (-> prime-rl#3794) and PrimeIntellect-ai/verifiers#2765 (-> prime-rl#3902).Validation
pytest tests/test_client.py --noconftest(32 passed),ruff check,ruff format --checkonrenderers/client.py.Note
Add
sampling_mask_logprobsandpayloadtogenerateclient resultThe async generation client in client.py now reads two new fields from the generation choice and returns them.
sampling_mask_logprobscarries the server's renormalized sampling-mask logprobs (prime-rl may send these with packed sampling-mask data).payloadcarries by-handle side-array data. Both keys areNonewhen the choice does not provide the field.Macroscope summarized d3a1af0.
Note
Low Risk
Optional response-field pass-through only; no request changes, validation, or behavior when fields are absent.
Overview
generate()now surfaces optional inference metadata from the generation choice without parsing or validation.It returns
sampling_mask_logprobsalongside the existingsampling_mask: when prime-rl’s server runs with score centering, this is the packed float32 logprob per kept vocab id (parallel to the mask ids); stock vLLM omits it and the value isNone. The docstring and inline comments describe that behavior.The result dict also passes through
payload(by-handle side arrays for largerouted_experts/sampling_masksegments written by the inference server instead of inline JSON).Reviewed by Cursor Bugbot for commit d3a1af0. Bugbot is set up for automated code reviews on this repo. Configure here.