Clean up wrapper in flashinfer backend (#2638)
This commit is contained in:
19
python/sglang/srt/speculative/spec_info.py
Normal file
19
python/sglang/srt/speculative/spec_info.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from enum import IntEnum, auto
|
||||
|
||||
|
||||
class SpeculativeAlgorithm(IntEnum):
|
||||
EAGLE = auto()
|
||||
|
||||
def is_eagle(self):
|
||||
return self == SpeculativeAlgorithm.EAGLE
|
||||
|
||||
@staticmethod
|
||||
def from_string(name: str):
|
||||
name_map = {
|
||||
"EAGLE": SpeculativeAlgorithm.EAGLE,
|
||||
}
|
||||
return name_map[name]
|
||||
|
||||
|
||||
class SpecInfo:
|
||||
pass
|
||||
Reference in New Issue
Block a user