[speculative decoding] rename lookahead to ngram (#11010)

Co-authored-by: a4zhangfei <a4zhangfei@qq.com>
This commit is contained in:
Zhihao Zhang
2025-09-28 21:06:59 -07:00
committed by GitHub
co-authored by a4zhangfei
parent e05555fad8
commit 24f7cb1ece
22 changed files with 154 additions and 181 deletions
+4 -4
View File
@@ -6,7 +6,7 @@ class SpeculativeAlgorithm(IntEnum):
EAGLE = auto()
EAGLE3 = auto()
STANDALONE = auto()
LOOKAHEAD = auto()
NGRAM = auto()
def is_none(self):
return self == SpeculativeAlgorithm.NONE
@@ -20,8 +20,8 @@ class SpeculativeAlgorithm(IntEnum):
def is_standalone(self):
return self == SpeculativeAlgorithm.STANDALONE
def is_lookahead(self):
return self == SpeculativeAlgorithm.LOOKAHEAD
def is_ngram(self):
return self == SpeculativeAlgorithm.NGRAM
@staticmethod
def from_string(name: str):
@@ -29,7 +29,7 @@ class SpeculativeAlgorithm(IntEnum):
"EAGLE": SpeculativeAlgorithm.EAGLE,
"EAGLE3": SpeculativeAlgorithm.EAGLE3,
"STANDALONE": SpeculativeAlgorithm.STANDALONE,
"LOOKAHEAD": SpeculativeAlgorithm.LOOKAHEAD,
"NGRAM": SpeculativeAlgorithm.NGRAM,
None: SpeculativeAlgorithm.NONE,
}
if name is not None: