A developer has shared a tool that turns ordinary JavaScript into a neural network, and it does so without any training. The project was posted to Hacker News as a "Show HN" submission.
The idea is to rewrite simple program logic as neural network operations. A conditional like a simple greater-than check can be expressed using ReLU functions, which the project's description presents as an exact, fully differentiable version of the original code. According to the project's description, the result is exact yet still differentiable, and it runs in a browser without requiring a GPU.
The project includes several demos to show what the approach can handle. The most elaborate is a small desktop environment written in JavaScript and transformed by the tool. It supports giant lists, animation, stacking, scrolling, dragging, input and pictures, and it renders to the regular DOM. The demo lists 9,909 weights and 130 layers, with zero training.
A second demo, labeled "Learned gallery," lets users unfreeze a compiled program's weights and train them in real time. That suggests the converted code can be adjusted after it has been turned into a network, although the project's description gives few further details on how that process works.
A third demo is a search tool built to scan 100,000 JSON documents. Its regex matching, JSON parsing and highlighting are all written in JavaScript, then converted into WebGPU kernels to achieve parallel processing at scale.
The project's materials are brief and do not describe performance benchmarks, limitations or the tool's intended uses beyond the demos. The Hacker News post presents it as a demonstration of what is possible when ordinary code and neural network computation are treated as the same thing.
Dieser Artikel wurde mit Unterstützung von KI verfasst.
News Factory APP - agentische News für besseres SEO & AEO.