Repository navigation
Stop pipeline generation at an immediate EOS 🤖🤖🤖 - #307
Conversation
|
This draft is ready for the repository's runner-vetting step at commit a173f14. The automated DCO check passed. The focused CPU suite passes all 8 cases after reproducing 3 failures on unchanged main; flake8, mypy and SPDX checks also pass, as detailed in the PR description. An authorized NVIDIA vetter will need to approve CI before the upstream test workflow can run. Please vet this commit when appropriate. I am keeping the PR in draft pending that validation; the full GPU suite has not been run locally. 🤖🤖🤖 |
|
Hi thanks for the PR, please remove the added tests |
Signed-off-by: Arham Begani <123586002+Arham-Begani@users.noreply.github.com>
a173f14 to
fa2161b
Compare
|
Removed the added test file as requested in fa2161b. The PR now changes only kvpress/pipeline.py; its production code is identical to the previously submitted fix. The eight regression checks are retained locally and were rerun after removing the file from the branch: all 8 pass, including the tiny CPU Llama pipeline check. The PR description now clearly identifies these as local evidence rather than tests included in the diff. Full NVIDIA GPU CI still requires authorized runner vetting for this head, so the PR remains draft. This revision and reply were prepared with automated AI assistance. 🤖🤖🤖 |
|
/ok to test fa2161b |
PR description
Fixes #306.
The first predicted token was appended before the generation loop, but the EOS check ran only after subsequent predictions. An immediate EOS could therefore trigger extra model calls and append ordinary text after the stop token. Removing special tokens during decoding does not remove that extra text.
Move the existing EOS check to the beginning of each additional decoding iteration. This handles the first and later predictions uniformly and preserves the existing EOS configuration, position IDs and token-limit behavior.
Local regression evidence (tests omitted from PR at maintainer request)
The eight regression checks were preserved locally after SimJeg requested removing the added tests from the PR. Only
kvpress/pipeline.pyremains in the submitted diff, with the production change identical to the contributor-reviewed patch.On unchanged main (
7136c224105ba7b046a6e538742c3589698680b8), the new tests produce 3 failures and 5 passes. After the fix, all 8 pass. The scripted immediate-EOS case drops from four model calls to one; the real pipeline drops from two to one. These are deterministic call-count checks, not GPU throughput claims.Validation
python -m pytest tests/test_generation_stopping.py -q: 8 passed. These results validate the identical production code retained in the current PR.python -m mypy . --check-untyped-defs: no issues in 85 source files.git diff --checkpasses.make test, FlashAttention and GPU benchmarks were not run. The repository's agent instructions request testing new/modified tests; this change does not modify a press or a compression algorithm.Related #301 changes EOS fallback configuration. This fix addresses the first-token stopping boundary and preserves the current configuration behavior.
Checklist
make test) — targeted CPU regression suite passes; full GPU suite not runmake style, on errors trymake format) — equivalent style checks pass as detailed above; changed files pass Black/isortgit commit -s— contributor personally authorized the DCO sign-off for the reviewed patchThis change adds no new press; the new-press checklist is not applicable.
AI assistance
An automated AI coding agent investigated the bug, wrote the implementation and tests, and ran the validation on behalf of Arham-Begani. The contributor supplied personal DCO authorization for the reviewed patch. The revised commit retains that sign-off on the identical production change and omits only the added test file as requested by the maintainer; it adds no new code beyond the certified patch.
🤖🤖🤖