Repository navigation
feat(client): transport sampler probability heads for score centering - #180
Merged
Merged
Conversation
hallerite
marked this pull request as ready for review
October 19, 2026 11:20
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — This adds a substantial opt-in sampler-head capability with new request semantics, compact binary transport, replay-mask handling, and additional response fields in the production client. Its cross-component protocol behavior and sizable parsing/selection logic merit human review. Notes:
You can add or adjust custom eligibility rules. Learn more. |
hallerite
added a commit
to PrimeIntellect-ai/verifiers
that referenced
this pull request
Oct 19, 2026
) Carry sampler probability heads from renderer responses onto assistant nodes and training branches for [prime-rl #4012](PrimeIntellect-ai/prime-rl#4012), paired with [renderers #180](PrimeIntellect-ai/renderers#180). `TopLogprobs` is a flat IDs/logprobs/counts carrier. It shares the existing raw-array serializer with sampling masks, checks sampled-token alignment when attributed, and gives context or uncaptured positions zero counts when flattening a branch. Public trace records exclude the arrays. Empty completions preserve an empty carrier. Validation: 179 unit tests passed; a temporary probe covered multi-turn alignment, mixed capture, empty completions, malformed rows/counts, MessagePack round trips, and record exclusion. All contributor hooks and the configured type gate passed using uv 0.13.1. The full suite was attempted: four Docker Compose integration cases failed because the local Docker daemon is unavailable; provider/runtime cases were skipped where prerequisites were absent. Updated onto current main without rewriting the existing PR history. Co-authored-by: hallerite <git@hallerite.com>
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.
Capture action-independent sampler probability heads for prime-rl #3927 and prime-rl #4012, paired with verifiers #2804.
A positive integer
sampling_params["logprobs"]requests a probability head. Without replay, request two extra candidates, exclude cutoff ties, and retain the sampler's original full-vocabulary normalization. With a recorded sampling mask, retain its complete support, including boundary ties, and require probability mass one over that support. Accept native list masks and prime-rl's packed int32 CSR masks; reject missing probabilities or malformed support. Boolean and sampled-only requests keep their existing request path.Compact numeric transport avoids per-token JSON overhead and accepts native JSON fallback. The response parser detects the payload format directly. Native logprobs accept both numeric
token_idfields andtoken_id:Nstrings. Validate buffers, probability mass, and sampled-token agreement, including conflicting repeated token IDs.Validation on 2026-10-19: 103 focused client tests passed, including native/compact and packed/list replay-support cases; seven unrelated model/multimodal cases were deselected. The paired prime-rl stack passed 19 vLLM 0.32 response-format tests, including complete replay support and native/compact equivalence. Renderer Ruff and formatting checks passed. These checks did not launch a GPU inference engine.
Updated onto main without rewriting the existing PR history. The replay-support compatibility follow-up is
5ffade9.Note
Add compact sampler-head transport for top-logprob score centering
generatenow requests the head size plus 2 candidates, enables compact transport throughextra_argsby default, and returnscompletion_top_idsandcompletion_top_logprobs_select_sampler_headthat ranks candidates deterministically, is independent of the sampled action, and preserves all candidates covered by a recorded sampling support mask_logprob_token_idaccepts numerictoken_idfields alongside the existing textual token form;_strip_base64_fieldsnow extracts all matching base64 fields so multi-choice responses keep their buffersNonefor the new top-logprob fields; callers can override compact transport viaextra_argsMacroscope summarized 5ffade9.