Skip to content

Thesis — Comparison of Machine Learning Frameworks for In-browser Model Execution


Why In Browser?

Everything runs locally — no cloud, no API keys, no install. Short answer: PLOC

  • Privacy


    Data never leaves the device. User inputs stay local.

  • Latency


    No round-trip to server. Instant predictions.

  • Offline


    Works without internet after initial load.

  • Cost


    No server bills. Free inference for everyone.


  • 3 Runtimes


    TensorFlow.js · ONNX Runtime Web · LiteRT

    Details
  • 3 Frameworks


    Transformers.js · ml5.js · MediaPipe

    Details
    • Transformers.js — HuggingFace, ONNX Runtime wrapper, easy pipelines
    • ml5.js — Community, TensorFlow.js wrapper, beginner-friendly
    • MediaPipe Tasks — Google, LiteRT wrapper, pre-trained models
  • 5 Backends


    CPU · WASM · WebGL · WebGPU · WebNN

    Details
    • CPU — Pure JavaScript, universal compatibility
    • WASM — Compiled C++, ~2-3x faster than pure CPU
    • WebGL — GPU via shaders, ~5-10x faster
    • WebGPU — Next-gen GPU, ~10x faster than WebGL
    • WebNN — Neural network interoperable API, the future
  • 6 Metrics


    Load time · Cold inference · Warm mean · Memory · Backend · Sanity

    Details
    • Load time — Model download + init duration
    • Cold inference — First prediction (cold start)
    • Warm mean — Average of subsequent predictions
    • Memory delta — Heap usage before/after inference
    • Backend detection — Which backends are available
    • Prediction sanity — Valid output probability check

Explore the project

  • Research Hub


    Decision logs, deep dives, and architectural findings captured throughout development.

  • Prototype


    Zero-build, CDN-only SPA. Benchmarks inference across four ML frameworks.

  • Thesis


    Structure, outline, research questions, and comparison criteria for the thesis.


Companion repositories

  • Repository


    All related source code.

  • Paper


    Will be released once the work is complete.


Timeline

Date Milestone Status
2026-04-28 Thesis scope defined Complete
2026-04-30 Sources and tech stack research Complete
2026-05-04 First prototype plan iteration Complete
2026-05-06 1. Prototype implementation Complete
2026-05-08 1. Prototype auditing Complete
ModelsProvider implementation Pending
DatasetProvider implementation Pending
Second Prototype planning Pending
Cross-browser-platform benchmark runs Pending
Thesis writing In-Progress
---