Skip to content

Commit

Permalink
Revert "Make the server random by default" (#492)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ying1123 authored May 31, 2024
1 parent 80a33ce commit 83525a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions python/sglang/srt/managers/controller/tp_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ def __init__(
self.int_token_logit_bias = torch.tensor(
get_int_token_logit_bias(self.tokenizer, self.model_config.vocab_size)
)
if server_args.random_seed is not None:
set_random_seed(server_args.random_seed)
set_random_seed(server_args.random_seed)

# Print info
logger.info(
Expand Down
4 changes: 2 additions & 2 deletions python/sglang/srt/server_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ServerArgs:
# Other runtime options
tp_size: int = 1
stream_interval: int = 8
random_seed: Optional[int] = None
random_seed: int = 42

# Logging
log_level: str = "info"
Expand Down Expand Up @@ -194,7 +194,7 @@ def add_cli_args(parser: argparse.ArgumentParser):
"--random-seed",
type=int,
default=ServerArgs.random_seed,
help="The global random seed of the server.",
help="Random seed.",
)
parser.add_argument(
"--log-level",
Expand Down

0 comments on commit 83525a1

Please sign in to comment.