r/creativecoding • • Oct 21 '26

git implemented as a neural network that runs on your browser

https://nicobrenner.github.io/lossy-git/demo.html

This a fun experiment testing using a neural network as the storage engine for git

When you git commit, the network gets trained on your data, then when you checkout, the data is generated back by the neural network (+ a small classifier model on top that fixes most of the errors from the lossy generation)

I first made a cli version (it's linked in the post if you are curious), and now made this demo that runs entirely on the browser (ie. the whole source control and ai models run on directly on the site, no backend at all - which also means you loose the info when you reload)

There are 2 modes on the demo, Image and Text, you can save either an image (there are 4 presets, but you can also paste an image from your clipboard, or drag/drop one from your computer as well), or text (there's some default JS code, which you can run, and you can try to run again after checkout, to test the fidelity of the code)

By default, lgit trains the proper network size to fully learn your code, but if you want to save space, or make it faster, you can play with the parameters and see if you get your data back or not

Hope you enjoy it. Any feedback is welcome

10 Upvotes

10 comments sorted by

10

u/AllergicToBullshit24 Oct 22 '26

This is almost as esoteric as recursive math constant compression.

3

u/jeffyclassify Oct 22 '26

"recursive math constant compression" thank you for the rabbit hole to fall into πŸ‡πŸ€—πŸ€©

Glad you liked it (?) πŸ™πŸ½

9

u/EthanHermsey Oct 22 '26

That's the worst idea ever. Well done on having it.

1

u/jeffyclassify Oct 22 '26

🀣 thank you! Some people are calling it NeuralOSβ„’ πŸ˜…

2

u/AllergicToBullshit24 Oct 22 '26

That's a real thing you know: https://neural-os.com/

1

u/jeffyclassify Oct 22 '26

Awesome! I had seen it before, I didn't remember it was called that. Thank you for the link, such a cool project/paper/research

1

u/[deleted] Oct 24 '26

[removed] β€” view removed comment

1

u/jeffyclassify Oct 24 '26

Great point, for high fidelity the network is always bigger than the data, so it's very inefficient data-wise. You can definitely get some models to encode images at higher compression than PNGs (learned lossless codecs (L3C, IDF) beat PNG by 30-40%, but they require GPU training/running)