Eagle speculative decoding part 3: small modifications to the general scheduler (#2709)

Co-authored-by: kavioyu <kavioyu@tencent.com>
This commit is contained in:
Lianmin Zheng
2025-01-02 02:09:08 -08:00
committed by GitHub
parent 9183c23eca
commit ad20b7957e
13 changed files with 224 additions and 69 deletions

View File

@@ -2,8 +2,12 @@ from enum import IntEnum, auto
class SpeculativeAlgorithm(IntEnum):
NONE = auto()
EAGLE = auto()
def is_none(self):
return self == SpeculativeAlgorithm.NONE
def is_eagle(self):
return self == SpeculativeAlgorithm.EAGLE
@@ -11,6 +15,7 @@ class SpeculativeAlgorithm(IntEnum):
def from_string(name: str):
name_map = {
"EAGLE": SpeculativeAlgorithm.EAGLE,
None: SpeculativeAlgorithm.NONE,
}
return name_map[name]