joaorura/distil-whisper-large-v3-ptbr-openvino-int8
distil-whisper-large-v3-ptbr-openvino-int8 (INT8)
English
OpenVINO IR (INT8, weight-compressed) conversion of freds0/distil-whisper-large-v3-ptbr, a Portuguese (pt-BR) fine-tune of distil-whisper/distil-large-v3 by freds0. All credit for the underlying model weights and training goes to the original author — this repository only provides an OpenVINO-optimized, INT8 weight-compressed export for CPU/GPU/NPU inference on Intel hardware. See also the FP32 version of this conversion.
Conversion
Converted with optimum-intel 2.2.0, using openvino 2026.4.0, openvino-genai 2026.4.0.0 and nncf 3.4.0. The optimum-cli export openvino CLI command failed due to a version incompatibility with transformers 5.5.4, so the conversion was done directly through the optimum-intel Python API. The INT8 weights were produced by NNCF weight compression (post-training, weights-only quantization — activations remain in floating point), applied at export time via quantization_config:
from optimum.intel.openvino import OVModelForSpeechSeq2Seq, OVWeightQuantizationConfig
from transformers import AutoProcessor
model_id = "freds0/distil-whisper-large-v3-ptbr"
model = OVModelForSpeechSeq2Seq.from_pretrained(
model_id,
export=True,
quantization_config=OVWeightQuantizationConfig(bits=8),
)
processor = AutoProcessor.from_pretrained(model_id)
model.save_pretrained("distil-whisper-large-v3-ptbr-ov-int8")
processor.save_pretrained("distil-whisper-large-v3-ptbr-ov-int8")The exported model uses a single merged decoder graph (openvino_decoder_model.xml/.bin, with use_cache: true in config.json) rather than separate decoder/decoder-with-past graphs, plus the OpenVINO tokenizer/detokenizer pair (openvino_tokenizer.*, openvino_detokenizer.*) generated for use with openvino_genai. openvino_config.json records the NNCF quantization metadata used at conversion time.
Usage with openvino_genai.WhisperPipeline
import openvino_genai as ov_genai
device = "CPU" # or "GPU", "NPU"
pipeline_config = {}
if device == "NPU":
# Avoids recompiling the model on every NPU run.
pipeline_config["CACHE_DIR"] = "./npu_cache"
pipe = ov_genai.WhisperPipeline("distil-whisper-large-v3-ptbr-ov-int8", device=device, **pipeline_config)
gen_config = pipe.get_generation_config()
gen_config.language = "<|pt|>"
gen_config.task = "transcribe"
result = pipe.generate("audio.wav", gen_config)
print(result.texts[0])Measured performance
Hardware: Intel Core Ultra 7 265H. Test audio: 8.35 s. (These figures were measured on this INT8 build; the model is ~4x smaller than the FP32 version, 738 MB vs 2.9 GB.)
Limitations
Testing was done with synthetic (TTS-generated) speech, not recorded human speech. Transcription quality depends entirely on the original freds0/distil-whisper-large-v3-ptbr model, and INT8 weight compression may introduce a small additional accuracy loss versus the FP32 export that has not been separately quantified here.
Português
Conversão para OpenVINO IR (INT8, com compressão de pesos) do modelo freds0/distil-whisper-large-v3-ptbr, um fine-tune em português (pt-BR) do distil-whisper/distil-large-v3 feito por freds0. Todo o crédito pelos pesos e pelo treinamento do modelo original é do autor original — este repositório apenas fornece uma exportação otimizada para OpenVINO, com compressão de pesos em INT8, para inferência em CPU/GPU/NPU em hardware Intel. Veja também a versão FP32 desta conversão.
Conversão
Convertido com optimum-intel 2.2.0, usando openvino 2026.4.0, openvino-genai 2026.4.0.0 e nncf 3.4.0. O comando optimum-cli export openvino quebrou por incompatibilidade de versão com transformers 5.5.4, então a conversão foi feita diretamente pela API Python do optimum-intel. Os pesos INT8 foram gerados por compressão de pesos via NNCF (quantização pós-treinamento, apenas nos pesos — as ativações permanecem em ponto flutuante), aplicada no momento da exportação via quantization_config (ver trecho de código na seção em inglês acima).
O modelo exportado usa um único grafo de decoder mesclado (openvino_decoder_model.xml/.bin, com use_cache: true no config.json), em vez de grafos separados de decoder/decoder-with-past, além do par tokenizer/detokenizer OpenVINO (openvino_tokenizer.*, openvino_detokenizer.*) gerado para uso com openvino_genai. O arquivo openvino_config.json registra os metadados da quantização NNCF usada na conversão.
Uso com openvino_genai.WhisperPipeline
Ver o trecho de código na seção em inglês acima — é o mesmo para CPU, GPU e NPU, bastando trocar o valor de device. Para NPU, defina CACHE_DIR nas propriedades do pipeline para evitar recompilar o modelo a cada execução.
Desempenho medido
Hardware: Intel Core Ultra 7 265H. Áudio de teste: 8,35 s. (Medidas obtidas nesta versão INT8, que é cerca de 4x menor que a versão FP32: 738 MB contra 2,9 GB.)
Limitações
O teste foi feito com fala sintética (gerada por TTS), não com fala humana real gravada. A qualidade da transcrição depende inteiramente do modelo original freds0/distil-whisper-large-v3-ptbr, e a compressão de pesos INT8 pode introduzir uma pequena perda adicional de acurácia em relação à exportação FP32, que não foi quantificada separadamente aqui.
