Lurker News
Built a ~9M param LLM from scratch to understand how they actually work. Vanilla transformer, 60K synthetic conversations, ~130 lines of PyTorch. Trains in 5 min on a free Colab T4. The fish thinks the meaning of life is food.

Fork it and swap the personality for your own character.

Comments (134) 83 threads

Earlier comments
cbdevidal1 reply#
> you're my favorite big shape. my mouth are happy when you're here.

Laughed loudly :-D

vunderba#
This is a direct output from the synthetic training data though - wonder if there is a bit of overfitting going on or it’s just a natural limitation of a much smaller model.
CaseFlatline1 reply#
I am trying to find how the synthetic data was created (looking through the repo) and didn't find it. Maybe I am missing it - Would love to see the prompts and process on that aspect of the training data generation!
rpdaiml#
This is a nice idea. A tiny implementation can be way more useful for learning than yet another wrapper around a big model, especially if it keeps the training loop and inference path small enough to read end to end.
jzer0cool#
Does this work by just training once with next token prediction? Want to understand better how it creates fluent sentences if anyone can provide insights.

Load more comments