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

Masatoshi Hidaka,Tomohiro Hashimoto,Yuto Nishizawa,Tatsuya Harada
2024-07-01
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 <a class="link-external link-https" href="https://github.com/mil-tokyo/distmljs" rel="external noopener nofollow">this https URL</a>.
Machine Learning
What problem does this paper attempt to address?
The problem that this paper attempts to solve is to achieve distributed training of machine - learning models by leveraging Volunteer Computing, especially for edge devices such as personal computers and smart phones. Specifically, the paper introduces a new JavaScript machine - learning library named "DistML.js", which is designed for training and inference of machine - learning models in web browsers. Its main objectives include: 1. **Reducing hardware requirements**: By performing model training on local devices, reducing the dependence on high - performance servers, enabling more types of devices to participate in machine - learning tasks. 2. **Supporting distributed learning**: By communicating with servers, supporting data - parallel distributed learning, thereby accelerating the model training process. 3. **Cross - platform compatibility**: Ensuring that the library can run on various devices and operating systems, increasing its application range. 4. **Efficient computing**: Utilizing the WebGL backend for matrix operations to achieve high - speed computing, especially when dealing with large - scale data sets and complex models. The paper verifies the effectiveness of DistML.js through a series of experiments, including single - device independent training and multi - device data - parallel distributed training, demonstrating its performance under different configurations. These experiments not only prove the technical feasibility of DistML.js but also provide an important reference for its practical applications.