Skip to content

Commit 8364b87

Browse files
committed
refactor applying code style with preserve logic for olmo
1 parent 8273de7 commit 8364b87

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

optimum/intel/openvino/modeling_decoder.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -386,11 +386,8 @@ def prepare_inputs(
386386
inputs = {}
387387
if not self.stateful:
388388
if past_key_values is not None:
389-
if (
390-
self.config.model_type not in MULTI_QUERY_ATTN_MODELS
391-
or self.config.model_type == "falcon"
392-
and self.config.new_decoder_architecture
393-
):
389+
is_falcon_multi_query = self.config.model_type == "falcon" and self.config.new_decoder_architecture
390+
if self.config.model_type not in MULTI_QUERY_ATTN_MODELS or is_falcon_multi_query:
394391
if self._pkv_precision == Type.bf16:
395392
# numpy does not support bf16, pretending f16, should change to bf16
396393
past_key_values = tuple(

0 commit comments

Comments
 (0)