Web Machine Learning: Model Loader API
- Category
- Miscellaneous
- Type
- New or changed feature
- Status
- In developer trial (Behind a flag) (Chrome In developer trial (Behind a flag))
- Intent stage
- Start incubating
Summary
Run machine learning models, taking advantage of hardware acceleration. Currently, javascript libraries must parse a model and call WebGL, WebGPU and WASM for the individual compute operations. Providing a model loader API gains performance by optimizing in the browser and potentially taking advantage of new ML processors like TPUs.
Motivation
Model Loader is a proposed web API to load a custom, pre-trained machine learning model in a standard format, compile it for the available hardware, and apply it to example data in JavaScript in order to perform inference, like classification, regression, or ranking. The idea is to make it as easy as possible for web developers to use a custom, pre-built machine learning model in their web app, across devices and browsers. Performing inference locally can: - Preserve privacy, by not shipping user data across the network - Improve performance, by eliminating network latency and taking advantage of hardware acceleration, including specialized hardware not available with WebGL, WebGPU or WASM. - Provide a fallback if network access is unavailable, possibly using a smaller and lower quality model Unlike the Shape Detection API, the model loader APIs are generic. Application-specific libraries and APIs could be built on top.
Standards & signals
- Specification: https://webmachinelearning.github.io/model-loader/#api
- Firefox: No signal
- Safari: No signal
- Web developers: No signals
- Tracking bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1263240
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=web-machine-learning-model-loader-api
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+Web%20Machine%20Learning%3A%20Model%20Loader%20API
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=Web%20Machine%20Learning%3A%20Model%20Loader%20API
- Baseline status: https://webstatus.dev/?q=Web%20Machine%20Learning%3A%20Model%20Loader%20API
Explainers: https://github.com/webmachinelearning/model-loader/blob/master/explainer.md