Skip to content

Commit

Permalink
Fix imports in FP8 example (#3117)
Browse files Browse the repository at this point in the history
Workaround for issue
huggingface/optimum-intel#993
  • Loading branch information
kshpv authored Nov 29, 2024
1 parent 7c64c3d commit 03c0540
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/llm_compression/openvino/smollm2_360m_fp8/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
# limitations under the License.
from functools import partial

import datasets
import numpy as np
import openvino as ov
from datasets import load_dataset
from optimum.intel.openvino import OVModelForCausalLM
from transformers import AutoTokenizer

Expand Down Expand Up @@ -75,7 +75,7 @@ def main():
MODEL_ID = "HuggingFaceTB/SmolLM2-360M-Instruct"
OUTPUT_DIR = "smollm2_360m_compressed"

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ datasets
openvino==2024.5
optimum-intel[openvino]
transformers
onnx<1.16.2
onnx==1.17.0

0 comments on commit 03c0540

Please sign in to comment.