Skip to content

Commit

Permalink
Fix runtime.generate when sampling param is not passed (#1582)
Browse files Browse the repository at this point in the history
  • Loading branch information
ByronHsu authored Oct 6, 2024
1 parent 34c32d2 commit 521f862
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/sglang/srt/managers/io_struct.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def post_init(self):

if self.sampling_params is None:
self.parallel_sample_num = 1
if isinstance(self.sampling_params, dict):
elif isinstance(self.sampling_params, dict):
self.parallel_sample_num = self.sampling_params.get("n", 1)
else: # isinstance(self.sampling_params, list):
self.parallel_sample_num = self.sampling_params[0].get("n", 1)
Expand Down

0 comments on commit 521f862

Please sign in to comment.