🚀 distil-whisper-large-v3-int8-ov
This project offers a model converted from distil-large-v3 to OpenVINO™ IR format with INT8 weight compression, enabling efficient automatic speech recognition.
🚀 Quick Start
This is a guide on how to quickly start using the distil-whisper-large-v3-int8-ov
model for automatic speech recognition. You can choose to run the model inference with either Optimum Intel or OpenVINO GenAI.
✨ Features
- Model Conversion: Converted from distil-large-v3 to the OpenVINO™ IR format.
- Weight Compression: Weights are compressed to INT8 by NNCF, reducing model size and potentially improving inference speed.
- Compatibility: Compatible with OpenVINO version 2025.1.0 and higher, as well as Optimum Intel 1.23.0 and higher.
📦 Installation
Installing Dependencies for Optimum Intel
pip install optimum[openvino]
Installing Dependencies for OpenVINO GenAI
pip install huggingface_hub
pip install -U --pre --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly openvino openvino-tokenizers openvino-genai
💻 Usage Examples
Running Model Inference with Optimum Intel
from datasets import load_dataset
from transformers import AutoProcessor
from optimum.intel.openvino import OVModelForSpeechSeq2Seq
model_id = "OpenVINO/distil-whisper-large-v3-int8-ov"
tokenizer = AutoProcessor.from_pretrained(model_id)
model = OVModelForSpeechSeq2Seq.from_pretrained(model_id)
dataset = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation", trust_remote_code=True)
sample = dataset[0]
input_features = tokenizer(
sample["audio"]["array"],
sampling_rate=sample["audio"]["sampling_rate"],
return_tensors="pt",
).input_features
outputs = model.generate(input_features)
text = tokenizer.batch_decode(outputs)[0]
print(text)
Running Model Inference with OpenVINO GenAI
import huggingface_hub as hf_hub
import openvino_genai as ov_genai
import datasets
model_id = "OpenVINO/distil-whisper-large-v3-int8-ov"
model_path = "distil-whisper-large-v3-int8-ov"
hf_hub.snapshot_download(model_id, local_dir=model_path)
device = "CPU"
pipe = ov_genai.WhisperPipeline(model_path, device)
dataset = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation", trust_remote_code=True)
sample = dataset[0]["audio"]["array"]
print(pipe.generate(sample))
More GenAI usage examples can be found in OpenVINO GenAI library docs and samples.
📚 Documentation
Description
This is distil-large-v3 model converted to the OpenVINO™ IR (Intermediate Representation) format with weights compressed to INT8 by NNCF.
Quantization Parameters
Weight compression was performed using nncf.compress_weights
with the following parameters:
- mode: INT8_ASYM
- group_size: 128
For more information on quantization, check the OpenVINO model optimization guide.
Compatibility
The provided OpenVINO™ IR model is compatible with:
- OpenVINO version 2025.1.0 and higher
- Optimum Intel 1.23.0 and higher
Limitations
Check the original model card for original model card for limitations.
Legal information
The original model is distributed under mit license. More details can be found in original model card.
Disclaimer
Intel is committed to respecting human rights and avoiding causing or contributing to adverse impacts on human rights. See Intel’s Global Human Rights Principles. Intel’s products and software are intended only to be used in applications that do not cause or contribute to adverse impacts on human rights.
📄 License
This project is licensed under the MIT License.