Skip to content

This repo is an example of how we can train a model in the browser with WebAssembly.

Notifications You must be signed in to change notification settings

Mathiskrvl/Burn-Train-web

Repository files navigation

Burn-Train-web

This repo is an example of how we can train a model in the browser with WebAssembly.

Live Demo

Overview

This demo showcases how to execute the training process in a web browser using a simple model. The project utilizes the Burn deep learning framework, WebGPU and WebAssembly.

Running the Demo

Step 1: Install all dependecies for node

npm install

Step 2: Build the WebAssembly Binary and Other Assets

To compile the Rust code into WebAssembly and build other essential files, execute the following script:

If your are on linux:

npm run lin-wasm

And If your are on Windows:

npm run win-wasm

Step 3: Launch the dev Web Server

Run the following command to initiate a dev web server on your local machine:

npm run dev

Backend Compatibility

As of now, the WebGPU backend is compatible only with Chrome browsers running on macOS and Windows. The application will dynamically detect if WebGPU support is available and proceed accordingly.

Tune

In the main.js you can test by changing the hidden_size variable like 128, i recommand to use WebGpu.

About

This repo is an example of how we can train a model in the browser with WebAssembly.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published