forked from vllm-project/vllm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Minor] Fix duplication of ignored seq group in engine step (vllm-pro…
- Loading branch information
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"""Containing tests that check for regressions in vLLM's behavior. | ||
It should include tests that are reported by users and making sure they | ||
will never happen again. | ||
""" | ||
from vllm import LLM, SamplingParams | ||
|
||
|
||
def test_duplicated_ignored_sequence_group(): | ||
"""https://github.com/vllm-project/vllm/issues/1655""" | ||
|
||
sampling_params = SamplingParams(temperature=0.01, | ||
top_p=0.1, | ||
max_tokens=256) | ||
llm = LLM(model="facebook/opt-125m", | ||
max_num_batched_tokens=4096, | ||
tensor_parallel_size=1) | ||
prompts = ["This is a short prompt", "This is a very long prompt " * 1000] | ||
outputs = llm.generate(prompts, sampling_params=sampling_params) | ||
|
||
assert len(prompts) == len(outputs) | ||
|
||
|
||
if __name__ == "__main__": | ||
import pytest | ||
pytest.main([__file__]) |
This file contains 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