Fix openai speculative execution (#456)

This commit is contained in:
Ying Sheng
2024-05-20 17:01:13 -07:00
committed by GitHub
parent ec380dfd30
commit 3e684be7a3
7 changed files with 243 additions and 128 deletions

View File

@@ -14,6 +14,8 @@ from sglang.test.test_programs import (
test_select,
test_stream,
test_tool_use,
test_completion_speculative,
test_chat_completion_speculative
)
@@ -78,6 +80,14 @@ class TestOpenAIBackend(unittest.TestCase):
set_default_backend(self.backend)
test_stream()
def test_completion_speculative(self):
set_default_backend(self.backend)
test_completion_speculative()
def test_chat_completion_speculative(self):
set_default_backend(self.chat_backend)
test_chat_completion_speculative()
if __name__ == "__main__":
unittest.main(warnings="ignore")
@@ -87,4 +97,4 @@ if __name__ == "__main__":
# global_config.verbosity = 2
# t = TestOpenAIBackend()
# t.setUp()
# t.test_few_shot_qa()
# t.test_chat_completion_speculative()