Intent to Prototype: Web Machine Learning: Model Loader API

Skip to first unread message

Jonathan Bingham

Dec 3, 2021, 2:51:00 PM12/3/21

Contact emails,,




Run machine learning models natively, 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.

Blink component



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, running models natively 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

The graph-based Web NN API and the Model Loader API are complementary approaches. We'll need to do some benchmarking to understand if there are performance differences, and get feedback from developers to see if it's valuable to offer both types of API.

Initial public proposal

TAG review

TAG review status



The Model Loader API is currently included as a Tentative Specification in the Web Machine Learning Working Group Charter.

Interoperability and Compatibility

Gecko: No signals

WebKit: No signals

Chrome/TensorFlow: Positive

Intel : Collaborating in Working Group

Microsoft/ONNX: Collaborating in Working Group

PyTorch: No signals

Salesforce: Collaborating in Working Group


Is this feature fully tested by web-platform-tests?


Flag name

Requires code in //chrome?


Tracking bug

Estimated milestones

No milestones specified

Link to entry on the Chrome Platform Status

This intent message was generated by Chrome Platform Status.

Victor Miura

Dec 3, 2021, 5:24:17 PM12/3/21
to Jonathan Bingham,
This specification references "tflite" model files.  Could you please add a reference to the specification of the model format that would be exposed?


You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

I support flexible work schedules, and I’m sending this email now because it is within the hours I’m working today.  Please do not feel obliged to reply straight away - I understand that you will reply during the hours you work, which may not match mine. (credit: jparent@)

Jonathan Bingham

Dec 3, 2021, 9:17:15 PM12/3/21
to Victor Miura, Honglin Yu,
Absolutely. We'll update it.

Reply all
Reply to author
0 new messages