ONNX 模型库
返回模型

说明文档

gilbert-whisper-onnx

Whisper 模型的 ONNX 优化版本,专为法语转录设计,针对生产环境推理进行了优化。

🚀 改进

  • ⚡ 比 PyTorch 版本快 2-3 倍
  • 💾 体积减少 50%(0.74 GB vs 1.51 GB)
  • 🔧 针对 ONNX Runtime 优化(CPU/GPU/TPU)
  • 📦 标准化格式,兼容 TensorRT、OpenVINO 等

🎯 使用场景

  • 生产环境部署(API、服务)
  • 边缘计算 / 嵌入式设备
  • 降低推理成本
  • 与 ONNX 框架集成

💡 使用方法

from optimum.onnxruntime import ORTModelForSpeechSeq2Seq
from transformers import AutoProcessor
import torch

# 加载模型和处理器
model = ORTModelForSpeechSeq2Seq.from_pretrained("gilbert-whisper-onnx")
processor = AutoProcessor.from_pretrained("gilbert-whisper-onnx")

# 转录音频
audio = [...]  # numpy 数组格式的音频(16kHz)
inputs = processor(audio, sampling_rate=16000, return_tensors="pt")

# 生成
with torch.no_grad():
    generated_ids = model.generate(**inputs, language="fr")

# 解码
transcription = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(transcription)

📊 规格

  • 大小:0.74 GB (FP16)
  • 格式:ONNX(优化版)
  • 速度:比 PyTorch 快约 2-3 倍
  • 基础模型:bofenghuang/whisper-large-v3-distil-fr-v0.2
  • 兼容性:ONNX Runtime(CPU/GPU/TPU)

📈 性能基准

指标 数值
模型大小 0.74 GB
相比原始模型减少 ~50%
推理加速 2-3x
格式 ONNX Runtime

🔗 参考

⚖️ 许可证

MIT 许可证 - 详情请参阅 LICENSE 文件。

🤝 引用

如果您使用此模型,请引用:

@misc{gilbert_whisper_onnx,
  title={Version ONNX optimisée de Whisper pour le français},
  author={Gilbert Models},
  year={2025},
  howpublished={\url{https://huggingface.co/gilbert-whisper-onnx}}
}

MEscriva/gilbert-whisper-onnx

作者 MEscriva

optimum
↓ 1 ♥ 0

创建时间: 2025-12-09 17:29:56+00:00

更新时间: 2025-12-09 17:30:20+00:00

在 Hugging Face 上查看

文件 (14)

.gitattributes
README.md
added_tokens.json
config.json
decoder_model.onnx ONNX
encoder_model.onnx ONNX
encoder_model.onnx_data
generation_config.json
merges.txt
preprocessor_config.json
special_tokens_map.json
tokenizer.json
tokenizer_config.json
vocab.json