Skip to content

Reducing Web AI Framework Overhead by 99% #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: ONNX2WebNN - Reducing Web AI Framework Overhead by 400x
title: ONNX2WebNN - Reducing Web AI Framework Overhead by 99%
description:
'WebNN is a privacy-first browser API enabling hardware-accelerated, client-side AI inference. While frameworks
offer convenience, they inflate bundle sizes (2-20 MB) and slow startup. Alternatively, using WebNN directly in
Expand All @@ -18,7 +18,7 @@ import InfoIcon from '../../../app/_components/icons/info.jsx'

<TopContent lang={props.params.lang} {...metadata} />

![ONNX2WebNN - Reducing Web AI Framework Overhead by 400x](/blog/onnx2webnn/article.png)
![ONNX2WebNN - Reducing Web AI Framework Overhead by 99%](/blog/onnx2webnn/article.png)

Machine learning in web browsers has come a long way from the early days of running everything on CPUs through JavaScript. The Web Neural Network (WebNN) API represents the latest evolution - a browser standard that taps directly into hardware acceleration, whether that's your CPU, GPU, or NPU.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: ONNX2WebNN - 将 Web AI 框架开销减少 400
title: ONNX2WebNN - 将 Web AI 框架开销降低至 1/400
description:
'WebNN 是一个隐私优先的浏览器 API,支持硬件加速的客户端 AI 推理。虽然框架提供了便利,但它们会增加包大小(2-20 MB)并减慢启动速度。
相比之下,直接在原生 JavaScript 中使用 WebNN 的开销极小(数十到数百 KB)。ONNX2WebNN 和基于浏览器的代码生成器等工具可以自动将 ONNX 模型
Expand All @@ -17,7 +17,7 @@ import InfoIcon from '../../../app/_components/icons/info.jsx'

<TopContent lang={props.params.lang} {...metadata} />

![ONNX2WebNN - 将 Web AI 框架开销减少 400](/blog/onnx2webnn/article.png)
![ONNX2WebNN - 将 Web AI 框架开销降低至 1/400](/blog/onnx2webnn/article.png)

浏览器中的机器学习从早期依赖 JavaScript 在 CPU 上运行的时代至今,已经取得了长足的进步。Web 神经网络(WebNN)API 代表了最新的演进 - 一个直接利用硬件加速的 Web 标准,无论是 CPU、GPU 还是 NPU。

Expand Down