Files
sglang/python/sglang/lang/global_config.py
T

28 lines
756 B
Python

"""Global configuration for the frontend language API."""
class GlobalConfig:
"""Store mutable process-wide frontend settings."""
def __init__(self):
# Verbosity level
# 0: do not output anything
# 2: output final text after every run
self.verbosity = 0
# Default backend of the language
self.default_backend = None
# Output tokenization configs
self.skip_special_tokens_in_output = True
self.spaces_between_special_tokens_in_out = True
# Language frontend interpreter optimization configs
self.enable_precache_with_tracing = True
self.enable_parallel_encoding = True
global_config = GlobalConfig()
__all__ = ["GlobalConfig", "global_config"]