gitmyhub

brain-cluster

JavaScript ★ 25 updated 8y ago

Brain + Distributed Deep Learning

Brain-cluster is an experimental add-on for brain.js that speeds up neural network training by splitting the work across multiple processes or computers. It's an early proof-of-concept, not a finished tool.

JavaScriptbrain.jsklyngNode.jssetup: hardcomplexity 4/5

Brain-cluster is an experimental add-on for brain.js, a JavaScript library that lets you build and train neural networks in the browser or on a server. Its goal is to let a network learn faster by splitting the training work across multiple processes or even multiple computers, instead of doing it all one step at a time on a single machine.

Under the hood it relies on a package called klyng, which acts as a coordinator between the separate processes. You install klyng globally, it runs a small background service (a "beacon") on port 2222, and the processes use it to talk to each other. A machine.json file is meant to describe the cluster setup, though the README notes that file isn't fully wired up yet. For now, the project is hard-coded to train on a specific test problem from brain.js, and most of the scripts are for running examples or stress-testing how much data can move between processes.

The main audience is developers already using brain.js who want to experiment with distributed training — for instance, if you're training a model on a large dataset and a single machine is too slow, you'd use this to spread the load. It could also appeal to people curious about how message-passing between processes works in JavaScript. In its current form it's more proof-of-concept than production tool: the cluster configuration isn't fully implemented, and several scripts exist mainly for testing the underlying communication layer rather than doing real training.

What's notable is that this is a very early-stage project. The README is candid about what isn't done yet — multi-machine coordination, better integration with brain.js, and actual documentation are all flagged as work in progress. The codebase also reflects an exploratory style: scripts like example and test-sizes were added specifically to probe the limits of klyng because its own documentation was thin. If you're looking for a polished distributed-training framework, this isn't it yet, but it's an honest look at the engineering questions involved in getting there.

Where it fits