[Fix] fix outlines and xgrammar (#4947)

This commit is contained in:
JieXin Liang
2025-04-21 04:31:25 +08:00
committed by GitHub
parent d9dd529854
commit bca832c7c6
5 changed files with 185 additions and 10 deletions

View File

@@ -392,6 +392,10 @@ class ServerArgs:
os.environ["SGLANG_ENABLE_TORCH_COMPILE"] = (
"1" if self.enable_torch_compile else "0"
)
# Set env var before grammar backends init
os.environ["SGLANG_DISABLE_OUTLINES_DISK_CACHE"] = (
"1" if self.disable_outlines_disk_cache else "0"
)
@staticmethod
def add_cli_args(parser: argparse.ArgumentParser):