File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
server/text_generation_server/models Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -667,12 +667,12 @@ def generate_token(
667
667
logprobs ,
668
668
all_input_ids ,
669
669
) in enumerate (iterator ):
670
- # Ensure tok view is 1st order, everything else is second.
671
- tok_view = next_token .view (- 1 )
672
- scores_view = scores .view (- 1 , scores .shape [- 1 ])
673
- logprobs_view = logprobs .view (- 1 , logprobs .shape [- 1 ]) if request .details .logprobs else None
674
-
675
670
try :
671
+ # Ensure tok view is 1st order, everything else is second.
672
+ tok_view = next_token .view (- 1 )
673
+ scores_view = scores .view (- 1 , scores .shape [- 1 ])
674
+ logprobs_view = logprobs .view (- 1 , logprobs .shape [- 1 ]) if request .details .logprobs else None
675
+
676
676
# TODO would be best to vectorize this also
677
677
token_info = get_token_info (request , scores_view , tok_view , logprobs_view )
678
678
You can’t perform that action at this time.
0 commit comments