These 94 lines of code are everything that is needed to train a neural network. Everything else is just efficiency.
This is my earlier project Micrograd. It implements a scalar-valued auto-grad engine. You start with some numbers at the leafs (usually the input data and the neural network parameters), build up a computational graph with operations like + and * that mix them, and the graph ends with a single value at the very end (the loss). You then go backwards through the graph applying chain rule at each node to calculate the gradients. The gradients tell you how to nudge your parameters to decrease the loss (and hence improve your network).
Sometimes when things get too complicated, I come back to this code and just breathe a little. But ok ok you also do have to know what the computational graph should be (e.g. MLP -> Transformer), what the loss function should be (e.g. autoregressive/diffusion), how to best use the gradients for a parameter update (e.g. SGD -> AdamW) etc etc. But it is the core of what is mostly happening.
The 1986 paper from Rumelhart, Hinton, Williams that popularized and used this algorithm (backpropagation) for training neural nets:
https://t.co/f52IcDNitR
micrograd on Github: https://t.co/GaTd16jRnB
and my (now somewhat old) YouTube video where I very slowly build and explain:
https://t.co/EPGG6kd5Yz
The upcoming Llama-3-400B+ will mark the watershed moment that the community gains open-weight access to a GPT-4-class model. It will change the calculus for many research efforts and grassroot startups. I pulled the numbers on Claude 3 Opus, GPT-4-2024-04-09, and Gemini.
Llama-3-400B is still training and will hopefully get even better in the next few months. There is so many research potential that can be unlocked with such a powerful backbone. Expecting a surge in builder energy across the ecosystem!
Offsuit just got a fun update:
🏆 Weekly global leaderboards
🗣️ Player profiles
😎 A ton of new avatars to choose from
See ya on the leaderboard!
https://t.co/GCI1TFX7mX
Why does everything about poker look and feel like a scam? 🤔
For the past year, we’ve been building Offsuit: a simple and beautiful poker app.
• No constant pop-ups
• No account needed
• No fake felt or neon
• No waiting for games
Available now on iOS and Android.
Twitter departed the world of public companies just shy of its 9th birthday. To the question of who won and who lost, the answer should be obvious. From a start of $45 on 11/7/13 to Elon's buy this week at $54.20, the shareholder made 20.4%. That's cumulative. 2.1% per year. 1/
Twitter laid me off today. If you know of any open positions for project managers and senior software engineers, let me know. I was the PM in charge of that feature where you get random suggested tweets on your timeline instead of tweets from the people you actually follow.
@remi_rousselet We can write in docs exactly like you wrote in your tweet, like common mistakes or something where we say that, hey, this is not “then” like in Kotlin, this is different
@remi_rousselet Maybe docs 2.0 will fix this issue for people who are confused? For freezed I think it’s very intuitive, it basically says when value is X. For AsyncValue it’s debatable, but I would still leave as is, I think other words can be even more confusing for some
When a class of customers is slow and bureaucratic, the thing for startups to do is compete with them, not try to build things for them. Unless the source of the slowness is regulation; then startups should think twice.
The patterns proposal (also from @munificentbob , he's on a tear) is also looking fantastic: https://t.co/27L7rgqq3s . I'm pretty excited about this one.
Several years of studying mathematics and physics have led me to a place where I feel that I don't understand anything about anything. But at least I worked very hard to get to this place