Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions examples/llm_compression/onnx/tiny_llama/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
MODEL_ID = "TinyLlama/TinyLlama-1.1B-Chat-v1.0"
OUTPUT_DIR = ROOT / "tinyllama_compressed"

# TODO(AlexanderDokuchaev): WA for https://github.com/huggingface/optimum-intel/issues/1498
from optimum.exporters.tasks import TasksManager # noqa: E402

TasksManager._TRANSFORMERS_TASKS_TO_MODEL_LOADERS["image-text-to-text"] = "AutoModelForImageTextToText"


def main():
# Export the pretrained model in ONNX format. The OUTPUT_DIR directory
Expand Down
10 changes: 6 additions & 4 deletions examples/llm_compression/onnx/tiny_llama/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
transformers==4.52.1
transformers==4.53.0
openvino==2025.3.0
optimum-intel[openvino]
git+https://github.com/onnx/onnx.git@c25eebcf51b781dbfcc75a9c8bdf5dd1781367fe # onnx-1.19.0.dev
optimum-intel[openvino]==1.26.0
optimum-onnx==0.0.3
optimum==2.0.0
onnx==1.19.1
onnxruntime==1.21.1
torch==2.8.0
torch==2.9.0
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
warnings.filterwarnings("ignore", category=torch.jit.TracerWarning)
warnings.filterwarnings("ignore", category=OnnxExporterWarning)

# TODO(AlexanderDokuchaev): WA for https://github.com/huggingface/optimum-intel/issues/1498
from optimum.exporters.tasks import TasksManager # noqa: E402

TasksManager._TRANSFORMERS_TASKS_TO_MODEL_LOADERS["image-text-to-text"] = "AutoModelForImageTextToText"


def tiny_llama_transform_func(
item: dict[str, str], tokenizer: LlamaTokenizerFast, onnx_model: onnx.ModelProto
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
torch==2.8.0
transformers==4.52.1
torch==2.9.0
transformers==4.53.0
openvino==2025.3.0
optimum-intel[openvino]
optimum-intel[openvino]==1.26.0
optimum-onnx==0.0.3
optimum==2.0.0
onnx==1.17.0
onnxruntime==1.21.1
datasets==2.14.7
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
openvino==2025.3.0
optimum-intel[openvino]>=1.22.0
transformers==4.52.1
optimum-intel[openvino]==1.26.0
optimum-onnx==0.0.3
optimum==2.0.0
transformers==4.53.0
onnx==1.17.0
torch==2.8.0
torchvision==0.23.0
torch==2.9.0
torchvision==0.24.0
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
datasets
datasets==4.3.0
openvino==2025.3.0
optimum-intel[openvino]>=1.22.0
transformers==4.52.1
optimum-intel[openvino]==1.26.0
optimum-onnx==0.0.3
optimum==2.0.0
transformers==4.53.0
onnx==1.17.0
torch==2.8.0
torch==2.9.0
10 changes: 6 additions & 4 deletions examples/llm_compression/openvino/tiny_llama/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
transformers==4.52.1
datasets==2.14.7
openvino==2025.3.0
optimum-intel[openvino]>=1.22.0
onnx==1.17.0
torch==2.8.0
openvino==2025.3.0
optimum-intel[openvino]==1.26.0
optimum-onnx==0.0.3
optimum==2.0.0
torch==2.9.0
transformers==4.53.0
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
whowhatbench @ git+https://github.com/openvinotoolkit/[email protected]#subdirectory=tools/who_what_benchmark
numpy==1.26.4
openvino==2025.3.0
optimum-intel==1.24.0
transformers==4.52.1
optimum-intel==1.26.0
optimum-onnx==0.0.3
optimum==2.0.0
transformers==4.53.0
onnx==1.17.0
torch==2.9.0
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
torch==2.8.0
torch==2.9.0
datasets==3.0.1
numpy>=1.23.5,<2
openvino==2025.3.0
optimum-intel>=1.22.0
transformers==4.52.1
optimum-intel==1.26.0
optimum-onnx==0.0.3
optimum==2.0.0
transformers==4.53.0
onnx==1.17.0
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
tensorboard==2.13.0
torch==2.8.0
torch==2.9.0
numpy>=1.23.5,<2
openvino==2025.3.0
optimum-intel>=1.22.0
transformers==4.52.1
optimum-intel==1.26.0
optimum-onnx==0.0.3
optimum==2.0.0
transformers==4.53.0
lm_eval==0.4.8
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
tensorboard==2.13.0
torch==2.8.0
torch==2.9.0
numpy>=1.23.5,<2
openvino==2025.3.0
optimum-intel>=1.22.0
transformers==4.52.1
optimum-intel==1.26.0
optimum-onnx==0.0.3
optimum==2.0.0
transformers==4.53.0
lm_eval==0.4.8
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
transformers==4.52.1
transformers==4.53.0
datasets==2.14.7
openvino==2025.3.0
optimum==1.24.0
optimum==2.0.0
torch==2.9.0
torchvision==0.24.0
8 changes: 5 additions & 3 deletions tests/openvino/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ pytest-xdist
torch
torchvision
virtualenv

addict>=2.4.0
timm==0.9.2
efficientnet_pytorch==0.7.1
datasets==3.0.1
transformers==4.52.1
optimum-intel==1.24.0
optimum==1.26.0
transformers==4.53.0
optimum-intel==1.26.0
optimum-onnx==0.0.3
optimum==2.0.0
7 changes: 4 additions & 3 deletions tests/post_training/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ pytest-split

librosa==0.10.0
memory-profiler==0.61.0
optimum-intel==1.24.0
optimum==1.26.0
optimum-intel==1.26.0
optimum-onnx==0.0.3
optimum==2.0.0
scikit-learn>=1.2.2,<=1.5.0
soundfile==0.12.1
tensorboard==2.13.0
tensorflow-io==0.32.0
timm==0.9.2
accelerate==1.9.0
transformers==4.52.1
transformers==4.53.0
whowhatbench @ git+https://github.com/openvinotoolkit/[email protected]#subdirectory=tools/who_what_benchmark
datasets==3.6.0
8 changes: 4 additions & 4 deletions tests/post_training/test_quantize_conformance.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@
import traceback
from collections import OrderedDict
from collections import defaultdict
from functools import partial
from pathlib import Path
from typing import Optional

import pandas as pd
import pytest
import torch
import yaml
from packaging import version

Expand All @@ -38,8 +36,10 @@
DATA_ROOT = Path(__file__).parent / "data"


# TODO(AlexanderDokuchaev): Remove it after update optimum
torch.onnx.export = partial(torch.onnx.export, dynamo=False)
# TODO(AlexanderDokuchaev): WA for https://github.com/huggingface/optimum-intel/issues/1498
from optimum.exporters.tasks import TasksManager # noqa: E402

TasksManager._TRANSFORMERS_TASKS_TO_MODEL_LOADERS["image-text-to-text"] = "AutoModelForImageTextToText"


@pytest.fixture(scope="function", name="use_avx2")
Expand Down
82 changes: 41 additions & 41 deletions tests/torch/data/reference_graphs/pruning_groups/Wave2Vec_2.0.dot
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
strict digraph {
0 [color=red, label="Block: S:1__O:0
strict digraph {
0 [label="Block: S:1__O:0
Producers: 19
Consumers: ", style=filled];
1 [color=grey, label="Block: S:1__O:0
Consumers: ", color=red, style=filled];
1 [label="Block: S:1__O:0
Producers: 29
Consumers: ", style=filled];
2 [color=red, label="Block: S:24__O:0
Consumers: ", color=grey, style=filled];
2 [label="Block: S:24__O:0
Producers: 29
Consumers: ", style=filled];
3 [color=red, label="Block: S:1__O:24
Consumers: ", color=red, style=filled];
3 [label="Block: S:1__O:24
Producers: 29
Consumers: ", style=filled];
4 [color=grey, label="Block: S:1__O:0
Producers: 30
Consumers: ", style=filled];
5 [color=red, label="Block: S:24__O:0
Producers: 30
Consumers: ", style=filled];
6 [color=red, label="Block: S:1__O:24
Producers: 30
Consumers: ", style=filled];
7 [color=grey, label="Block: S:1__O:0
Producers: 34
Consumers: ", style=filled];
8 [color=red, label="Block: S:24__O:0
Producers: 34
Consumers: ", style=filled];
9 [color=red, label="Block: S:1__O:24
Producers: 34
Consumers: ", style=filled];
10 [color=red, label="Block: S:1__O:0
Producers: 44
Consumers: ", style=filled];
11 [color=green, label="Block: S:1__O:0
Producers: 48
Consumers: 51", style=filled];
12 [color=red, label="Block: S:1__O:0
Producers: 51
Consumers: ", style=filled];
13 [color=red, label="Block: S:1__O:0
Producers: 55
Consumers: ", style=filled];
14 [color=red, label="Block: S:1__O:0
Consumers: ", color=red, style=filled];
4 [label="Block: S:1__O:0
Producers: 32
Consumers: ", color=grey, style=filled];
5 [label="Block: S:24__O:0
Producers: 32
Consumers: ", color=red, style=filled];
6 [label="Block: S:1__O:24
Producers: 32
Consumers: ", color=red, style=filled];
7 [label="Block: S:1__O:0
Producers: 35
Consumers: ", color=grey, style=filled];
8 [label="Block: S:24__O:0
Producers: 35
Consumers: ", color=red, style=filled];
9 [label="Block: S:1__O:24
Producers: 35
Consumers: ", color=red, style=filled];
10 [label="Block: S:1__O:0
Producers: 46
Consumers: ", color=red, style=filled];
11 [label="Block: S:1__O:0
Producers: 50
Consumers: 53", color=green, style=filled];
12 [label="Block: S:1__O:0
Producers: 53
Consumers: ", color=red, style=filled];
13 [label="Block: S:1__O:0
Producers: 57
Consumers: ", style=filled];
Consumers: ", color=red, style=filled];
14 [label="Block: S:1__O:0
Producers: 59
Consumers: ", color=red, style=filled];
1 -> 2;
1 -> 3;
4 -> 5;
Expand Down
Loading