File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -149,8 +149,6 @@ async def add_requests(self, task):
149
149
task ["prompt_token_ids_len" ] = len (task ["prompt_token_ids" ])
150
150
input_ids_len = task ["prompt_token_ids_len" ]
151
151
task ["max_tokens" ] = min (self .max_model_len - input_ids_len , task .get ("max_tokens" ))
152
- if task .get ("reasoning_max_tokens" , None ) is None :
153
- task ["reasoning_max_tokens" ] = max (int (task ["max_tokens" ] * 0.8 ), 1 )
154
152
min_tokens = task .get ("min_tokens" , 1 )
155
153
if "messages" in task :
156
154
del task ["messages" ]
@@ -229,8 +227,8 @@ def vaild_parameters(self, data):
229
227
raise ValueError (f"max_tokens can be defined [1, { self .max_model_len } )." )
230
228
231
229
if data .get ("reasoning_max_tokens" ) is not None :
232
- if data ["reasoning_max_tokens" ] > data ["max_tokens" ] or data ["reasoning_max_tokens" ] < 1 :
233
- raise ValueError ("reasoning_max_tokens must be between max_tokens and 1 " )
230
+ if data ["reasoning_max_tokens" ] > data ["max_tokens" ] or data ["reasoning_max_tokens" ] < 0 :
231
+ raise ValueError ("reasoning_max_tokens must be between max_tokens and 0 " )
234
232
235
233
if data .get ("top_p" ) is not None :
236
234
if data ["top_p" ] > 1 or data ["top_p" ] < 0 :
You can’t perform that action at this time.
0 commit comments