Skip to content

[Test] Cover prompt-logprob boundaries through worker and real model - #1

Open
kamb-code wants to merge 1 commit into
ojeda-e:fix-prompt-logprob-row-clampfrom
kamb-code:test/prompt-logprob-boundaries-61693
Open

kamb-code wants to merge 1 commit into
ojeda-e:fix-prompt-logprob-row-clampfrom
kamb-code:test/prompt-logprob-boundaries-61693

Conversation

@kamb-code

Copy link
Copy Markdown

Overview

This is the test-only follow-up offered in my review of vllm-project/vllm#61693, targeting your fix-prompt-logprob-row-clamp branch at c298b2211a. It extends your worker tests and adds the real-model reproduction to the existing logprob suite.

Claims

  • Replace the worker fixture's SimpleNamespace with a real InputBatch.
  • Check that earlier prompt scores survive a final chunk with speculative padding, including a final chunk that contributes no new score rows.
  • Reproduce the one-token prompt case through LLM using real Qwen3-0.6B weights: the result must contain exactly [None], without scores for speculative placeholders.

Validation

GPU validation ran on November 4, 2026, on one RTX PRO 6000 Blackwell Server Edition (SM120, CUDA 13.0), Python 3.12.3, Torch 2.14.0+cu130 and Triton 3.8.0. Both arms used the same compiled wheel from parent 5082c45853; only the production prompt_logprob.py hunk differed. The two proposed test files are byte-identical to those tested.

The model case uses Qwen/Qwen3-0.6B at revision c1899de289a04d12100db370d81485cdf75e47ca, BF16, MRV2, four-token ngram speculation, synchronous scheduling, eager execution and prefix caching disabled. It steps an in-process engine explicitly so an active decode shares admission with the one-token prompt.

Run the same selection with the test patch present in both arms:

# Negative arm: prompt_logprob.py from parent 5082c45853.
python -m pytest -q -s --tb=short \
  tests/v1/worker/test_gpu_prompt_logprobs.py \
  tests/v1/sample/test_logprobs.py::test_prompt_logprobs_stop_before_speculative_padding
# 6 failed, 1 passed
# Model failure: AssertionError: assert 5 == 1

# Fixed arm: prompt_logprob.py from your head c298b2211a.
python -m pytest -q -s --tb=short \
  tests/v1/worker/test_gpu_prompt_logprobs.py \
  tests/v1/sample/test_logprobs.py::test_prompt_logprobs_stop_before_speculative_padding
# 7 passed

These are six worker cases and one model case; no errors or skips were recorded. The complete test_logprobs.py module was not run, so interaction with all neighbouring engine tests remains unverified. This is correctness evidence for the selected configuration, not a performance or broad model-quality result.

On November 5, the target branch and test-file hashes were rechecked, git diff --check passed, and all applicable hooks passed for:

pre-commit run --files \
  tests/v1/sample/test_logprobs.py \
  tests/v1/worker/test_gpu_prompt_logprobs.py

Both test paths are already selected by Buildkite's v1-sample and v1-executor-worker jobs.

Details

The original worker tests start from a fresh worker. The added two-call cases verify that scores already accumulated from an earlier prompt chunk survive the final slice, with exact values and ordering. The model regression exercises the user-visible result through the existing VllmRunner, following tests/AGENTS.md.

For landing order, vllm-project/vllm#61679 replaces the same production slicing block and introduces the same worker-test pathname; please carry the bound and these cases across whichever lands second. vllm-project/vllm#65049 changes the worker's streams and host-output contract, requiring corresponding constructor and synchronization adaptations. This patch targets your current branch; it does not claim GPU validation of either overlapping PR.

This contributes regression coverage to your existing fix, with no production changes. November 5 searches found no existing author-fork PR delivering this test follow-up. Related upstream work on logprob memory chunk sizes and hidden output stop tokens addresses different behavior.

AI assistance (Codex) was used for test implementation, validation and drafting. GPU validation ran on a rented GPU.


Pull Request Checklist
  • I used vLLM's /pr-checklist skill. (Mandatory for agents, optional for humans).

  • AI assistance was used during the creation of this PR.

  • Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.

  • Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.

  • Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.

  • Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.

BEFORE SUBMITTING, PLEASE READ https://docs.vllm.ai/en/latest/contributing (anything written below this line will be removed by GitHub Actions)

Follow up on ojeda-e’s vllm-project#61693 with real InputBatch construction, two-call accumulation checks, and a deterministic one-token Qwen3-0.6B regression using ordered engine steps.

Seven selected worker/model tests pass on RTX PRO 6000 Blackwell. With the exact parent production hunk, six fail as expected and one passes; the model returns five prompt-logprob entries instead of one. Same pinned parent binaries and model revision in both arms. The complete sample/logprobs module was not run; this is correctness evidence for the selected configuration, not a performance measurement.

AI-assisted implementation and validation.

Co-authored-by: Codex <noreply@openai.com>
Signed-off-by: Kam Basra <kameldipbasra@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant