Skip to content

Commit 03c0540

Browse files
authored
Fix imports in FP8 example (#3117)
Workaround for issue huggingface/optimum-intel#993
1 parent 7c64c3d commit 03c0540

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/llm_compression/openvino/smollm2_360m_fp8/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
# limitations under the License.
1111
from functools import partial
1212

13-
import datasets
1413
import numpy as np
1514
import openvino as ov
15+
from datasets import load_dataset
1616
from optimum.intel.openvino import OVModelForCausalLM
1717
from transformers import AutoTokenizer
1818

@@ -75,7 +75,7 @@ def main():
7575
MODEL_ID = "HuggingFaceTB/SmolLM2-360M-Instruct"
7676
OUTPUT_DIR = "smollm2_360m_compressed"
7777

78-
dataset = datasets.load_dataset("wikitext", "wikitext-2-raw-v1", split="test")
78+
dataset = load_dataset("wikitext", "wikitext-2-raw-v1", split="test")
7979
# Filtering to remove empty samples from the dataset
8080
dataset = dataset.filter(lambda example: len(example["text"]) > 1)
8181

examples/llm_compression/openvino/smollm2_360m_fp8/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ datasets
22
openvino==2024.5
33
optimum-intel[openvino]
44
transformers
5-
onnx<1.16.2
5+
onnx==1.17.0

0 commit comments

Comments
 (0)