fast regex decode

Auto-detect constant str path in regex FSM, then extend instead.
This commit is contained in:
Liangsheng Yin
2024-01-25 01:16:25 +08:00
committed by GitHub
parent 711d343530
commit 01ee0fbc05
16 changed files with 968 additions and 16 deletions

View File

@@ -23,6 +23,7 @@ class ServerArgs:
disable_log_stats: bool = False
log_stats_interval: int = 10
log_level: str = "info"
no_regex_fast_forward: bool = False
def __post_init__(self):
if self.tokenizer_path is None:
@@ -150,6 +151,11 @@ class ServerArgs:
default=ServerArgs.log_stats_interval,
help="Log stats interval in second.",
)
parser.add_argument(
"--no-regex-fast-forward",
action="store_true",
help="Disable regex fast forward",
)
@classmethod
def from_cli_args(cls, args: argparse.Namespace):