I wrote a C++ translation of it: https://github.com/verma7/microgpt/blob/main/microgpt.cc 2x the number of lines of code (~400L), 10x the speed The hard part was figuring out how to represent the Value class in C++ (ended up using shared_ptrs).
I made an explicit reverse pass (no autodiff), it was 8x faster in Python
Microgpt
311–320 of 354 posts
Re: Microgpt
#312Someone has modified microgpt to build a tiny GPT that generates Korean first names, and created a web page that visualizes the entire process [1]. Users can interactively explore the microgpt pipeline end to end, from tokenization until inference. [1] English GPT lab: https://ko-microgpt.vercel.app/
Re: Microgpt
#313Earlier quoted context omitted.
Yesterday an interesting video was posted "Is AI Hiding Its Full Power?", interviewing professor emeritus and nobel laureate Geoffrey Hinton, with some great explanations for the non-LLM experts. Some remarkable and mindblowing observations in there. Like saying that AI's hallucinate is incorrect language, and we should use "confabulation" instead, same as people do too. And that AI agents once they are launched deve…
> And that AI agents once they are launched develop a strong survivability drive, and do not want to be switched off. Isn't this a massive case of anthropomorphizing code? What do you mean "it does not want to be switched off"? Are we really thinking that it's alive and has desires and stuff? It's not alive or conscious, it cannot have desires. It can only output tokens that are based on its training. How are we jump…
Re: Microgpt
#314Earlier quoted context omitted.
It just doesn’t work that way, LLMs need to be generalised a lot to be useful even in specific tasks. It really is the antithesis to the human brain, where it rewards specific knowledge
Are you trying to imply that humans don’t need generalized knowledge, or that we’re not “rewarded” for having highly generalized knowledge? If so, good luck walking to your kitchen this morning, knowing how to breathe, etc.
Re: Microgpt
#315I'm half shocked this wasn't on HN before? Haha I built PicoGPT as a minified fork with And it's small enough to run from a QR code :) https://kuber.studio/picogpt/ You can quite literally train a micro LLM from your phone's browser
Wow I agree - surprising that it took 2 weeks to make HN's frontpage. We do generally like HN to be a bit uncorrelated with the rest of the internet, but it feels like a miss to me that neither https://news.ycombinator.com/item?id=47000263 nor https://news.ycombinator.com/item?id=47018557 made the frontpage.
Re: Microgpt
#316Re: Microgpt
#317Earlier quoted context omitted.
If anything, memory ain't getting cheaper, disks aren't either, and as for graphics cards, forget it. People wont be competing with even a current 2026 SOTA from their home LLM nowhere soon. Even actual SOTA LLM providers are not competing either - they're losing money on energy and costs, hopping to make it up on market capture and win the IPO races.
I don’t think anyone needs to compete with the LLM SOTA to get the benefits of these technologies on-device. Consumers don’t need a 100k context window oracle that knows everything about both T-Cells and the ancient Welsh Royal lineage. We need focused & small models which are specialised, and then we need a good query router.
Re: Microgpt
#318Earlier quoted context omitted.
Wtf? Once it was AI. Then the models started passing the Turing test and calling themselves AI, so we started using AGI to say "truly intelligent machines". Now, as per the definition you quoted, apparently even GPT-3 is AGI, so we now have to use "ASI" to mean "intelligent, but artificial"? I think I'll just keep using AI and then explain to anyone who uses that term that there is no "I" in today's LLMs, and they sh…
What's your definition of intelligence? If you exclude LLMs, you might have to exclude quite a few humans as well.
Re: Microgpt
#319Re: Microgpt
#320Earlier quoted context omitted.
The training set is far too small for that to explain it. Try to explain why one shotting works.
Uh, to explain what? You probably read something into what I said while I was being very literal. If you train an LLM on mostly false statements, it will generate both known and novel falsehoods. Same for truth. An LLM has no intrinsic concept of true or false, everything is a function of the training set. It just generates statements similar to what it has seen and higher-dimensional analogies of those .
You generate your text based on a "stochastic parrot" hypothesis with no post-validation it seems.