We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c816e96 commit ede353eCopy full SHA for ede353e
optimum/intel/openvino/modeling_decoder.py
@@ -419,7 +419,8 @@ def prepare_inputs(
419
# past_key_values are not used explicitly, instead they are handled inside the model
420
if past_key_values is None:
421
# This is the first iteration in a sequence, reset all states
422
- self.request.reset_state()
+ if self.request is not None:
423
+ self.request.reset_state()
424
# Set initial value for the next beam_idx input that will be used at the current iteration
425
# and will be optionally updated by _reorder_cache at the next iterations if beam_search is used
426
self.next_beam_idx = np.arange(batch_size, dtype=int)
0 commit comments