2024-10-24 21:23:09 -07:00
|
|
|
"""
|
|
|
|
|
python3 -m unittest test_chunked_prefill.TestChunkedPrefill.test_mixed_chunked_prefill_without_radix_cache
|
|
|
|
|
"""
|
|
|
|
|
|
2024-08-03 23:09:21 -07:00
|
|
|
import unittest
|
|
|
|
|
|
2024-11-25 04:58:16 -08:00
|
|
|
from sglang.test.test_utils import run_mmlu_test, run_mulit_request_test
|
2024-08-03 23:09:21 -07:00
|
|
|
|
|
|
|
|
|
2024-08-12 02:21:38 -07:00
|
|
|
class TestChunkedPrefill(unittest.TestCase):
|
|
|
|
|
def test_chunked_prefill(self):
|
2024-10-24 21:23:09 -07:00
|
|
|
run_mmlu_test(disable_radix_cache=False, enable_mixed_chunk=False)
|
2024-08-16 02:13:00 -07:00
|
|
|
|
|
|
|
|
def test_mixed_chunked_prefill(self):
|
2024-10-24 21:23:09 -07:00
|
|
|
run_mmlu_test(disable_radix_cache=False, enable_mixed_chunk=True)
|
2024-08-12 02:21:38 -07:00
|
|
|
|
|
|
|
|
def test_chunked_prefill_without_radix_cache(self):
|
2024-10-24 21:23:09 -07:00
|
|
|
run_mmlu_test(disable_radix_cache=True, enable_mixed_chunk=False)
|
2024-08-16 02:13:00 -07:00
|
|
|
|
|
|
|
|
def test_mixed_chunked_prefill_without_radix_cache(self):
|
2024-10-24 21:23:09 -07:00
|
|
|
run_mmlu_test(disable_radix_cache=True, enable_mixed_chunk=True)
|
2024-08-03 23:09:21 -07:00
|
|
|
|
2024-10-30 21:20:41 -07:00
|
|
|
def test_mixed_chunked_prefill_multi_requests(self):
|
|
|
|
|
run_mulit_request_test(
|
|
|
|
|
enable_mixed_chunk=True,
|
|
|
|
|
chunked_prefill_size=2048,
|
|
|
|
|
)
|
|
|
|
|
|
2024-08-03 23:09:21 -07:00
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2024-08-10 15:09:03 -07:00
|
|
|
unittest.main()
|