File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -625,7 +625,7 @@ def __init__(self,
625625
626626 def _handle_response (self , response : "GenerationExecutor.Response" ):
627627 # Save token lengths before processing to detect which outputs received new tokens
628- prev_token_lens = {o . index : len (o .token_ids ) for o in self ._outputs }
628+ prev_token_lens = {id ( o ) : len (o .token_ids ) for o in self ._outputs }
629629
630630 GenerationResultBase ._handle_response (self , response )
631631
@@ -647,7 +647,7 @@ def _handle_response(self, response: "GenerationExecutor.Response"):
647647 # to prevent re-decoding the same tokens multiple times
648648 output_received_new_tokens = len (
649649 beam_output .token_ids ) != prev_token_lens .get (
650- beam_output . index , 0 )
650+ id ( beam_output ) , 0 )
651651 if not output_received_new_tokens :
652652 continue
653653 if hasattr (
You can’t perform that action at this time.
0 commit comments