Skip to content

Commit 3cb4e20

Browse files
Revert "Update modeling_visual_language.py"
This reverts commit 8e7cdd2.
1 parent 8e7cdd2 commit 3cb4e20

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

optimum/intel/openvino/modeling_visual_language.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -979,13 +979,6 @@ def preprocess_inputs(
979979
Preprocess input instruction and an image.
980980
"""
981981

982-
# modified from https://github.com/huggingface/transformers/blob/v4.55.0/src/transformers/generation/utils.py#L1992
983-
def _prepare_cache_for_generation(self, *args, **kwargs):
984-
"""
985-
This function is used to prepare the cache : when calling `generate` before the first inference, an instance of `DynamicCache` will be created.
986-
For OVModel, we don't want model_kwargs to be updated before generation.
987-
"""
988-
return
989982

990983
class _OVLlavaForCausalLM(OVModelForVisualCausalLM):
991984
def __init__(

0 commit comments

Comments
 (0)