EasyDeepLearn

Running ML in the browser — WebAssembly / WebGPU.

medium

Answer

  • Options: (1) TensorFlow.js: JS/WebGL/WebGPU backend; ONNX Runtime Web (WASM + WebGL / WebGPU).
  • (2) Transformers.js: run HuggingFace models in browser.
  • (3) WebLLM (MLC.ai): run LLM entirely in-browser via WebGPU.
  • Advantages: (1) no server cost.
  • (2) privacy (data never leaves device).
  • (3) offline capability.
  • (4) instant deploy.
  • Disadvantages: (1) model download size (users notice 100+ MB).
  • (2) limited GPU/memory (mobile).
  • Use cases: privacy-first ML, PWAs, demos.
Check yourself — multiple choice
  • Random
  • TF.js / ONNX Runtime Web (WASM+WebGL/WebGPU) + Transformers.js (HF in browser) + WebLLM (LLM via WebGPU); pros: no server + privacy + offline + instant deploy; cons: download size + limited GPU/mem
  • Just JS
  • Not real

Browser ML: TF.js / ONNX Web / Transformers.js / WebLLM; privacy + no server.

#serving#infrastructure

Practise MLOps & Data Quality

215 interview questions in this topic.

Related questions