[speculative decoding] rename lookahead to ngram (#11010)
Co-authored-by: a4zhangfei <a4zhangfei@qq.com>
This commit is contained in:
co-authored by
a4zhangfei
parent
e05555fad8
commit
24f7cb1ece
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user