Skip to content

Commit

Permalink
Update optimum/exporters/openvino/model_patcher.py
Browse files Browse the repository at this point in the history
  • Loading branch information
eaidova authored Jul 10, 2024
1 parent 26d9593 commit d82faa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion optimum/exporters/openvino/model_patcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ def create_sinusoidal_positions(num_pos: int, dim: int, base: int = 10000) -> to

base = self._model.model.layers[0].self_attn.rotary_emb.base
dim = self._model.model.layers[0].self_attn.rotary_emb.dim
embed_positions = create_sinusoidal_positions(max_positions, dim, base),
embed_positions = create_sinusoidal_positions(max_positions, dim, base)

for layer in self._model.model.layers:
layer.self_attn.rotary_emb.register_buffer("embed_positions", embed_positions)
Expand Down

0 comments on commit d82faa3

Please sign in to comment.