Skip to content

Commit

Permalink
add comment for gemma
Browse files Browse the repository at this point in the history
  • Loading branch information
eaidova committed Mar 12, 2024
1 parent c1208c8 commit 91016a8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions optimum/exporters/openvino/model_patcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ def __enter__(self):
super().__enter__()

# init inv_freq for torchscript tracing
# https://github.com/huggingface/transformers/blob/ed74d97871468f3a4695ede50abdc0b55717a84d/src/transformers/models/gemma/modeling_gemma.py#L108
for layer in self._model.model.layers:
if layer.self_attn.rotary_emb.inv_freq is None:
rotary_emb = layer.self_attn.rotary_emb
Expand Down

0 comments on commit 91016a8

Please sign in to comment.