Table of Contents
Fetching ...

DistML.js: Installation-free Distributed Deep Learning Framework for Web Browsers

Masatoshi Hidaka, Tomohiro Hashimoto, Yuto Nishizawa, Tatsuya Harada

TL;DR

DistML.js addresses the lack of browser-friendly, distributed deep learning frameworks by providing an installation-free library with a PyTorch-like define-by-run API and a WebGL backend. It enables both stand-alone browser training and data-parallel distributed learning across devices coordinated by a Python server. The paper details the design, API, implementation, and experiments showing feasibility on edge devices and performance gains from distribution, while acknowledging network bottlenecks as a challenge. This work broadens browser-based ML capabilities and enables volunteer-computing-style scalable training without software installation.

Abstract

We present "DistML.js", a library designed for training and inference of machine learning models within web browsers. Not only does DistML.js facilitate model training on local devices, but it also supports distributed learning through communication with servers. Its design and define-by-run API for deep learning model construction resemble PyTorch, thereby reducing the learning curve for prototyping. Matrix computations involved in model training and inference are executed on the backend utilizing WebGL, enabling high-speed calculations. We provide a comprehensive explanation of DistML.js's design, API, and implementation, alongside practical applications including data parallelism in learning. The source code is publicly available at https://github.com/mil-tokyo/distmljs.

DistML.js: Installation-free Distributed Deep Learning Framework for Web Browsers

TL;DR

DistML.js addresses the lack of browser-friendly, distributed deep learning frameworks by providing an installation-free library with a PyTorch-like define-by-run API and a WebGL backend. It enables both stand-alone browser training and data-parallel distributed learning across devices coordinated by a Python server. The paper details the design, API, implementation, and experiments showing feasibility on edge devices and performance gains from distribution, while acknowledging network bottlenecks as a challenge. This work broadens browser-based ML capabilities and enables volunteer-computing-style scalable training without software installation.

Abstract

We present "DistML.js", a library designed for training and inference of machine learning models within web browsers. Not only does DistML.js facilitate model training on local devices, but it also supports distributed learning through communication with servers. Its design and define-by-run API for deep learning model construction resemble PyTorch, thereby reducing the learning curve for prototyping. Matrix computations involved in model training and inference are executed on the backend utilizing WebGL, enabling high-speed calculations. We provide a comprehensive explanation of DistML.js's design, API, and implementation, alongside practical applications including data parallelism in learning. The source code is publicly available at https://github.com/mil-tokyo/distmljs.
Paper Structure (14 sections, 2 figures, 1 table)

This paper contains 14 sections, 2 figures, 1 table.

Figures (2)

  • Figure 1: The relationship between batch size and processing speed in standalone ResNet-18 training on a single device. The result shows that increasing the batch size leads to improved sample processing speed.
  • Figure 2: The processing speed in ResNet-18's data parallel distributed learning using multiple devices. Blue and orange plot show the samples processed per second when the global batch size and local batch size are fixed respectively.