Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Built-in AI und WebNN – wie das Web zur GenAI-P...

Built-in AI und WebNN – wie das Web zur GenAI-Plattform wird

Immer mehr Entwickler beabsichtigen, Generative-AI-Funktionen in ihre Anwendungen zu integrieren. Dieser Weg führt bislang praktisch immer in die Cloud – doch das muss nicht unbedingt so sein! Aktuell gibt es unterschiedliche, vielversprechende Ansätze, um KI-Modelle direkt auf dem Rechner des Anwenders auszuführen: Die Web Neural Network API (WebNN) des W3C, die sich noch in der Spezifikationsphase befindet, wird solchen Modellen in Zukunft Zugang zur Neural Processing Unit (NPU) des Geräts gewähren. Damit können etwa auch Large Language Models (LLM) oder Stable-Diffusion-Modelle effizient im Browser betrieben werden.

Zunehmend werden LLMs auch mit mobilen Geräten oder in Browsern ausgeliefert: So experimentieren Microsoft und Google derzeit mit den Built-in-AI-APIs, die eine Ausführung komplett auf dem eigenen Gerät erlauben. Die Vorteile dieser Ansätze liegen auf der Hand: Lokal ausgeführte KI-Modelle stehen auch offline zur Verfügung, die Nutzerdaten verlassen das Gerät nicht, und das alles dank Open-Source-Modellen sogar kostenfrei. Aber natürlich muss das Modell erst einmal auf das Gerät des Anwenders übertragen werden, das auch noch ausreichend leistungsfähig sein muss.

In dieser Session wird Christian Liebel, Thinktectures Vertreter beim W3C, diese unterschiedlichen Ansätze präsentieren, die das Web zur erstklassigen GenAI-Plattform machen. Wir werden Anwendungsfälle diskutieren und Vor- und Nachteile der jeweiligen Lösungen aufzeigen. Seien Sie dabei!

Avatar for Christian Liebel

Christian Liebel

July 01, 2025
Tweet

More Decks by Christian Liebel

Other Decks in Programming

Transcript

  1. Built-in AI und WebNN wie das Web zur GenAI-Plattform wird

    Christian Liebel @christianliebel Consultant
  2. Hello, it’s me. Built-in AI und WebNN Christian Liebel W3C

    WebML WG & CG TAG Associate christian.liebel @thinktecture.com Angular, PWA & Generative AI Microsoft MVP & Google GDE (Angular, Web) wie das Web zur GenAI-Plattform wird
  3. Rule-based algorithms are limited in their capabilities. Built-in AI und

    WebNN Why should you care? wie das Web zur GenAI-Plattform wird
  4. Use AI to implement use cases that are difficult or

    impossible to implement using rule-based algorithms. Built-in AI und WebNN Why should you care? wie das Web zur GenAI-Plattform wird
  5. Drawbacks Built-in AI und WebNN Generative AI Cloud Providers Require

    a (stable) internet connection Subject to network latency and server availability Data is transferred to the cloud service Require a subscription wie das Web zur GenAI-Plattform wird
  6. Can we run GenAI models locally? Built-in AI und WebNN

    wie das Web zur GenAI-Plattform wird
  7. Bring Your Own AI (BYOAI) – Libraries – WebLLM –

    Transfomers.js – Frameworks – ONNX Runtime – TensorFlow.js – APIs – WebNN – Cross-Origin Storage Built-in AI (BIAI) – Writing Assistance APIs – Summarizer API – Writer API – Rewriter API – Translator & Language Detector APIs – Prompt API Built-in AI und WebNN Local AI Inference wie das Web zur GenAI-Plattform wird
  8. Storing model files locally Built-in AI und WebNN WebLLM Internet

    Website HTML/JS Cache with model files Hugging Face Note: Due to the Same-Origin Policy, models cannot be shared across origins. wie das Web zur GenAI-Plattform wird
  9. Model Size Comparison Model:Parameters Size phi3:3.8b 2.2 GB mistral:7b 4.1

    GB deepseek-r1:8b 5.2 GB gemma3n:e4b 7.5 GB gemma3:12b 8.1 GB llama4:16x17b 67 GB Built-in AI und WebNN WebLLM wie das Web zur GenAI-Plattform wird
  10. – Grants web apps access to the device’s CPU, GPU

    and Neural Processing Unit (NPU) – In specification by the WebML Working Group at W3C – Implementation in progress in Chromium (behind a flag) – Better performance for specific workloads Built-in AI und WebNN WebNN Source: https://webmachinelearning.github.io/webnn-intro/ DEMO wie das Web zur GenAI-Plattform wird
  11. Built-in AI und WebNN Why should you care? DEMO wie

    das Web zur GenAI-Plattform wird
  12. about://flags Enables WebNN API à Enabled Enables experimental WebNN API

    features à Enabled Built-in AI und WebNN WebNN wie das Web zur GenAI-Plattform wird
  13. Drawbacks Built-in AI und WebNN WebNN Models can’t be shared

    across origins Inference is fast, but doesn’t reach full native speed wie das Web zur GenAI-Plattform wird
  14. – Initiative by Google Chrome – Exploratory APIs for local

    experiments and use case determination – Downloads AI models into Google Chrome – Models are shared across origins – Uses native APIs directly (full performance) Built-in AI und WebNN Built-in AI https://developer.chrome.com/docs/ai/built-in wie das Web zur GenAI-Plattform wird
  15. Incubated by the WebML CG Built-in AI und WebNN Built-in

    AI APIs https://webmachinelearning.github.io/incubations/ DEMO wie das Web zur GenAI-Plattform wird
  16. Built-in AI und WebNN Built-in AI APIs Operating System Website

    HTML/JS Browser Internet Apple Intelligence Gemini Nano wie das Web zur GenAI-Plattform wird
  17. about://on-device-internals https://www.google.com/chrome/canary/ about://flags Enables optimization guide on device à EnabledBypassPerfRequirement

    (API) for Gemini Nano à Enabled Built-in AI und WebNN Built-in AI APIs wie das Web zur GenAI-Plattform wird
  18. Pros & Cons + Data does not leave the browser

    (privacy) + High availability (offline support) + Low latency + Stability (no external API changes) + Low cost – Lower response quality – Less capable – High system (RAM, GPU) and bandwidth requirements – Large model size, models cannot always be shared – Model initialization and inference are relatively slow – APIs are experimental Built-in AI und WebNN On-device AI Models wie das Web zur GenAI-Plattform wird