Switch eagle_infer_beta to EAGLE3 (#22303)

Co-authored-by: Liangsheng Yin <hnyls2002@users.noreply.github.com>
This commit is contained in:
Qiaolin Yu
2026-04-07 18:43:48 -07:00
committed by GitHub
co-authored by Liangsheng Yin
parent 6c2a759a04
commit 117508dcd7
@@ -11,8 +11,8 @@ from sglang.test.kits.matched_stop_kit import MatchedStopMixin
from sglang.test.kits.radix_cache_server_kit import run_radix_attention_test
from sglang.test.run_eval import run_eval
from sglang.test.test_utils import (
DEFAULT_DRAFT_MODEL_EAGLE,
DEFAULT_TARGET_MODEL_EAGLE,
DEFAULT_DRAFT_MODEL_EAGLE3,
DEFAULT_TARGET_MODEL_EAGLE3,
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
DEFAULT_URL_FOR_TEST,
CustomTestCase,
@@ -22,7 +22,7 @@ from sglang.test.test_utils import (
register_cuda_ci(est_time=283, suite="stage-b-test-1-gpu-small")
class TestEagleServerBase(CustomTestCase, MatchedStopMixin):
class TestEagle3ServerBase(CustomTestCase, MatchedStopMixin):
max_running_requests = 64
attention_backend = "triton"
spec_steps = 5
@@ -30,18 +30,21 @@ class TestEagleServerBase(CustomTestCase, MatchedStopMixin):
spec_draft_tokens = 6
page_size = 1
other_launch_args = []
model = DEFAULT_TARGET_MODEL_EAGLE
draft_model = DEFAULT_DRAFT_MODEL_EAGLE
model = DEFAULT_TARGET_MODEL_EAGLE3
draft_model = DEFAULT_DRAFT_MODEL_EAGLE3
@classmethod
def setUpClass(cls):
cls.base_url = DEFAULT_URL_FOR_TEST
launch_args = [
"--trust-remote-code",
"--dtype=float16",
"--chunked-prefill-size",
"1024",
"--attention-backend",
cls.attention_backend,
"--speculative-algorithm",
"EAGLE",
"EAGLE3",
"--speculative-draft-model",
cls.draft_model,
"--speculative-num-steps",
@@ -68,6 +71,8 @@ class TestEagleServerBase(CustomTestCase, MatchedStopMixin):
True
), envs.SGLANG_SPEC_OOB_DETECTION.override(
True
), envs.SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN.override(
True
):
cls.process = popen_launch_server(
cls.model,
@@ -95,10 +100,8 @@ class TestEagleServerBase(CustomTestCase, MatchedStopMixin):
num_threads=128,
)
metrics = run_eval(args)
print(f"TestEagleLargeBS -- {metrics=}")
self.assertGreater(
metrics["score"], 0.22
) # ~0.227 for 1000 questions via /v1/completions
print(f"TestEagle3LargeBS -- {metrics=}")
self.assertGreater(metrics["score"], 0.7)
assert self.process.poll() is None
def test_logprob_spec_v2_match(self):
@@ -241,7 +244,7 @@ class TestEagleServerBase(CustomTestCase, MatchedStopMixin):
self.assertIn("text", res, f"Server error: {res}")
class TestEagleServerPage(TestEagleServerBase):
class TestEagle3ServerPage(TestEagle3ServerBase):
other_launch_args = ["--page-size", "64"]