IPv6 support (#3949)
Signed-off-by: Brayden Zhong <b8zhong@uwaterloo.ca>
This commit is contained in:
@@ -24,6 +24,7 @@ from typing import List, Optional
|
||||
from sglang.srt.hf_transformers_utils import check_gguf_file
|
||||
from sglang.srt.reasoning_parser import ReasoningParser
|
||||
from sglang.srt.utils import (
|
||||
configure_ipv6,
|
||||
get_amdgpu_memory_capacity,
|
||||
get_device,
|
||||
get_hpu_memory_capacity,
|
||||
@@ -52,7 +53,7 @@ class ServerArgs:
|
||||
dtype: str = "auto"
|
||||
kv_cache_dtype: str = "auto"
|
||||
quantization: Optional[str] = None
|
||||
quantization_param_path: nullable_str = None
|
||||
quantization_param_path: Optional[str] = None
|
||||
context_length: Optional[int] = None
|
||||
device: Optional[str] = None
|
||||
served_model_name: Optional[str] = None
|
||||
@@ -140,7 +141,7 @@ class ServerArgs:
|
||||
|
||||
# Double Sparsity
|
||||
enable_double_sparsity: bool = False
|
||||
ds_channel_config_path: str = None
|
||||
ds_channel_config_path: Optional[str] = None
|
||||
ds_heavy_channel_num: int = 32
|
||||
ds_heavy_token_num: int = 256
|
||||
ds_heavy_channel_type: str = "qk"
|
||||
@@ -173,7 +174,7 @@ class ServerArgs:
|
||||
enable_memory_saver: bool = False
|
||||
allow_auto_truncate: bool = False
|
||||
enable_custom_logit_processor: bool = False
|
||||
tool_call_parser: str = None
|
||||
tool_call_parser: Optional[str] = None
|
||||
enable_hierarchical_cache: bool = False
|
||||
hicache_ratio: float = 2.0
|
||||
enable_flashinfer_mla: bool = False
|
||||
@@ -1205,8 +1206,12 @@ class PortArgs:
|
||||
# DP attention. Use TCP + port to handle both single-node and multi-node.
|
||||
if server_args.nnodes == 1 and server_args.dist_init_addr is None:
|
||||
dist_init_addr = ("127.0.0.1", server_args.port + ZMQ_TCP_PORT_DELTA)
|
||||
elif server_args.dist_init_addr.startswith("["): # ipv6 address
|
||||
port_num, host = configure_ipv6(server_args.dist_init_addr)
|
||||
dist_init_addr = (host, str(port_num))
|
||||
else:
|
||||
dist_init_addr = server_args.dist_init_addr.split(":")
|
||||
|
||||
assert (
|
||||
len(dist_init_addr) == 2
|
||||
), "please provide --dist-init-addr as host:port of head node"
|
||||
|
||||
Reference in New Issue
Block a user