Skip to content

Commit

Permalink
add _supports_cache_class and _supports_static_cache
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Jun 29, 2024
1 parent aa25c34 commit fba9586
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions optimum/onnxruntime/modeling_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ class ORTModelForCausalLM(ORTModel, GenerationMixin):
auto_model_class = AutoModelForCausalLM
main_input_name = "input_ids"

_supports_cache_class = False
_supports_static_cache = False

def __init__(
self,
model: onnxruntime.InferenceSession,
Expand Down
3 changes: 3 additions & 0 deletions optimum/onnxruntime/modeling_seq2seq.py
Original file line number Diff line number Diff line change
Expand Up @@ -1142,6 +1142,9 @@ class ORTModelForSeq2SeqLM(ORTModelForConditionalGeneration, GenerationMixin):
auto_model_class = AutoModelForSeq2SeqLM
main_input_name = "input_ids"

_supports_cache_class = False
_supports_static_cache = False

def __init__(
self,
encoder_session: ort.InferenceSession,
Expand Down

0 comments on commit fba9586

Please sign in to comment.