File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -338,29 +338,23 @@ def __post_init__(self) -> None:
338338
339339 if self .seed == - 1 :
340340 self .seed = None
341- else :
342- self .seed = self .seed
343341
344342 if self .stop is None :
345343 self .stop = []
346344 elif isinstance (self .stop , str ):
347345 self .stop = [self .stop ]
348- else :
349- self .stop = list (self .stop )
350346
351347 if self .stop_token_ids is None :
352348 self .stop_token_ids = []
353- else :
354- self .stop_token_ids = list (self .stop_token_ids )
355349
356350 if self .bad_words is None :
357351 self .bad_words = []
358- else :
359- self .bad_words = list (self .bad_words )
360352
361- self .logprobs = 1 if self .logprobs is True else self .logprobs
362- self .prompt_logprobs = (1 if self .prompt_logprobs is True else
363- self .prompt_logprobs )
353+ if self .logprobs is True :
354+ self .logprobs = 1
355+
356+ if self .prompt_logprobs is True :
357+ self .prompt_logprobs = 1
364358
365359 # Number of characters to hold back for stop string evaluation
366360 # until sequence is finished.
You can’t perform that action at this time.
0 commit comments