Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: huggingface/optimum-intel
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b130021f0919c773a7c1e74edd3e1e6c618b539c
Choose a base ref
..
head repository: huggingface/optimum-intel
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0b380cf77d112f21fc179297c609ced3c2f214d5
Choose a head ref
Showing with 1 addition and 0 deletions.
  1. +1 −0 optimum/exporters/openvino/model_patcher.py
1 change: 1 addition & 0 deletions optimum/exporters/openvino/model_patcher.py
Original file line number Diff line number Diff line change
@@ -1429,6 +1429,7 @@ def __exit__(self, exc_type, exc_value, traceback):
if hasattr(layer.attn, "_orig_attn"):
layer.attn._attn = layer.attn._orig_attn


# adapted from https://github.com/huggingface/transformers/blob/v4.40.2/src/transformers/models/dbrx/modeling_dbrx.py#L763
def _dbrx_experts_forward(
self, x: torch.Tensor, weights: torch.Tensor, top_weights: torch.Tensor, top_experts: torch.LongTensor