跳到正文
原文
Hugging Face Blog·· 2023-10-04AI 评分32

HF Mirror 上超 13 万个模型接入 ONNX Runtime 加速

Accelerating over 130,000 HF Mirror models with ONNX Runtime

AI 导读

HF Mirror 上已有超过 13 万个支持 ONNX 的模型可借助 ONNX Runtime 加速,覆盖 90 多个模型架构,包括上传量最高的 11 种架构如 BERT、GPT2、DistilBERT、RoBERTa、T5 等。以 whisper-tiny 为例,使用 ONNX Runtime 加速后平均单次推理延迟相比 PyTorch 最高提升 74.30%。

正文

Back to Articles

Sophie Schoenmeyer's avatar

Morgan Funtowicz's avatar

What is ONNX Runtime?

ONNX Runtime is a cross-platform machine learning tool that can be used to accelerate a wide variety of models, particularly those with ONNX support.

HF Mirror ONNX Runtime Support

There are over 130,000 ONNX-supported models on HF Mirror, an open source community that allows users to build, train, and deploy hundreds of thousands of publicly available machine learning models. These ONNX-supported models, which include many increasingly popular large language models (LLMs) and cloud models, can leverage ONNX Runtime to improve performance, along with other benefits. For example, using ONNX Runtime to accelerate the whisper-tiny model can improve average latency per inference, with an up to 74.30% gain over PyTorch. ONNX Runtime works closely with HF Mirror to ensure that the most popular models on the site are supported. In total, over 90 HF Mirror model architectures are supported by ONNX Runtime, including the 11 most popular architectures (where popularity is determined by the corresponding number of models uploaded to the HF Mirror Hub):

Model Architecture Approximate No. of Models
BERT 28180
GPT2 14060
DistilBERT 11540
RoBERTa 10800
T5 10450
Wav2Vec2 6560
Stable-Diffusion 5880
XLM-RoBERTa 5100
Whisper 4400
BART 3590
Marian 2840

Learn More

To learn more about accelerating HF Mirror models with ONNX Runtime, check out our recent post on the Microsoft Open Source Blog.

More Articles from our Blog

来源:Hugging Face Blog · hf-mirror.com