File tree Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ runtime_common = [
47
47
48
48
srt = [
49
49
" sglang[runtime_common]" ,
50
- " sgl-kernel==0.0.9.post1 " ,
50
+ " sgl-kernel==0.0.9.post2 " ,
51
51
" flashinfer_python==0.2.3" ,
52
52
" torch==2.5.1" ,
53
53
" torchvision==0.20.1" ,
Original file line number Diff line number Diff line change @@ -93,25 +93,21 @@ def forward(
93
93
).clamp (min = torch .finfo (probs .dtype ).min )
94
94
95
95
max_top_k_round , batch_size = 32 , probs .shape [0 ]
96
- uniform_samples = torch .rand (
97
- (max_top_k_round , batch_size ), device = probs .device
98
- )
99
96
if sampling_info .need_min_p_sampling :
100
97
probs = top_k_renorm_prob (probs , sampling_info .top_ks )
101
98
probs = top_p_renorm_prob (probs , sampling_info .top_ps )
102
99
batch_next_token_ids = min_p_sampling_from_probs (
103
- probs , uniform_samples , sampling_info .min_ps
100
+ probs , sampling_info .min_ps
104
101
)
105
102
else :
106
- batch_next_token_ids , success = top_k_top_p_sampling_from_probs (
103
+ batch_next_token_ids = top_k_top_p_sampling_from_probs (
107
104
probs ,
108
- uniform_samples ,
109
105
sampling_info .top_ks ,
110
106
sampling_info .top_ps ,
111
107
filter_apply_order = "joint" ,
112
108
)
113
109
114
- if self .use_nan_detection and not torch . all ( success ) :
110
+ if self .use_nan_detection :
115
111
logger .warning ("Detected errors during sampling!" )
116
112
batch_next_token_ids = torch .zeros_like (batch_next_token_ids )
117
113
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ pip install --upgrade pip
20
20
21
21
# Install flashinfer and sgl-kernel
22
22
pip install flashinfer_python==0.2.3 --find-links ${FLASHINFER_REPO} --no-cache-dir
23
- pip install sgl-kernel==0.0.9.post1 --no-cache-dir
23
+ pip install sgl-kernel==0.0.9.post2 --no-cache-dir
24
24
25
25
# Install the main package
26
26
pip install -e " python[all]" --find-links ${FLASHINFER_REPO}
You can’t perform that action at this time.
0 commit comments