test_regression.py 820 B

1234567891011121314151617181920212223242526
  1. """Containing tests that check for regressions in Aphrodite's behavior.
  2. It should include tests that are reported by users and making sure they
  3. will never happen again.
  4. """
  5. from aphrodite import LLM, SamplingParams
  6. def test_duplicated_ignored_sequence_group():
  7. sampling_params = SamplingParams(temperature=0.01,
  8. top_p=0.1,
  9. max_tokens=256)
  10. llm = LLM(model="EleutherAI/pythia-70m-deduped",
  11. max_num_batched_tokens=4096,
  12. tensor_parallel_size=1)
  13. prompts = ["This is a short prompt", "This is a very long prompt " * 1000]
  14. outputs = llm.generate(prompts, sampling_params=sampling_params)
  15. assert len(prompts) == len(outputs)
  16. if __name__ == "__main__":
  17. import pytest
  18. pytest.main([__file__])