#1072: Updated review of Web Neural Network API

Visit on Github.

Opened Mar 20, 2025

Hello TAG!

I'm requesting an updated TAG review of WebNN API - previous TAG review: #933

Further details:

  • I have reviewed the TAG's Web Platform Design Principles
  • Previous early design review, if any: 2000, 2022, 2024
  • Relevant time constraints or deadlines: We plan to publish a new CRS during Q2 2025
  • The group where the work on this specification is currently being done: W3C Web Machine Learning Working Group
  • Major unresolved issues with or opposition to this specification: none
  • This work is being funded by:

You should also know that...

Below is a summary of substantive changes since the previous TAG review in 2024 to assist you in this delta review.

Significant new features:

  • Add 12 new operators ("Wave 3") to support well-known transformer models based on an analysis of top 20 downloaded Hugging Face models. The models comprise of a diverse set of tasks, including Small Language Models and Large Language Models, object detection, sentence similarity, feature extraction, speech recognition, image segmentation, text classification, and text generation. See issue, PR, presentation for details on these operators and motivation.
  • Add MLTensor interface that represents a tensor, an input or output to an MLGraph. Update MLContext interface with new createTensor(), readTensor(), writeTensor() methods, change compute() to dispatch() for scheduling the workload, add new destroy() method for MLContext, MLGraph, MLTensor. These changes allow buffer reuse, chained inference, better resource management with explicit destruction, and the opportunity to share memory with WebGPU, minimizing copies. See MLTensor Explainer for details.

Other substantial changes:

The group would like to seek TAG's explicit advise on the following:

Discussions