How does this compare to Andrej Karpathy's microgpt (<a href="https://karpathy.github.io/2026/02/12/microgpt/" rel="nofollow">https://karpathy.github.io/2026/02/12/microgpt/</a>) or minGPT (<a href="https://github.com/karpathy/minGPT" rel="nofollow">https://github.com/karpathy/minGPT</a>)?
I haven't compared it with anything yet. Thanks for the suggestion; I'll look into these.
Who cares how it compares, it's not a product it's a cool project
Even cool projects can learn from others. Maybe they missed something that could benefit the project, or made some interesting technical choice that gives a different result.<p>For the readers/learners, it's useful to understand the differences so we know what details matter, and which are just stylistic choices.<p>This isn't art; it's science & engineering.
> Who cares how it compares<p>Well, the person who asked the question, for one. I'm sure they're not the only one. Best not to assume why people are asking though, so you can save time by not writing irrelevant comments.
Microgpt isn’t a product either. Are you saying that differences between cool projects aren’t worth thinking and conversing about?
Is there some documentation for this? The code is probably the simplest (Not So) Large Language Model implementation possible, but it is not straight forward to understand for developers not familiar with multi-head attention, ReLU FFN, LayerNorm and learned positional embeddings.<p>This projects shares similarities with Minix. Minix is still used at universities as an educational tool for teaching operating system design. Minix is the operating system that taught Linus Torvalds how to design (monolithic) operating systems. Similarly having students adding capabilities to GuppyLM is a good way to learn LLM design.
<a href="https://bbycroft.net/llm" rel="nofollow">https://bbycroft.net/llm</a> has 3d Visualization of tiny example LLM layers that do a very good job at showing what is going on (<a href="https://news.ycombinator.com/item?id=38505211">https://news.ycombinator.com/item?id=38505211</a>)
Pretty neat! I'll definitely take a deeper look into this.
Thanks for sharing
have little to do with this, but i have to say your project are indeed pretty cool! Consider adding some more UI?
Neat!
It's genuinely a great introduction to LLMs. I built my own awhile ago based off Milton's Paradise Lost: <a href="https://www.wvrk.org/works/milton" rel="nofollow">https://www.wvrk.org/works/milton</a>
This is probably a consequence of the training data being fully lowercase:<p>You> hello
Guppy> hi. did you bring micro pellets.<p>You> HELLO
Guppy> i don't know what it means but it's mine.
This really makes me think if it would be feasible to make an llm trained exclusively on toki pona (<a href="https://en.wikipedia.org/wiki/Toki_Pona" rel="nofollow">https://en.wikipedia.org/wiki/Toki_Pona</a>)
There isn't enough training data though, is there? The "secret sauce" of LLMs is the vast amount of training data available + the compute to process it all.
People have made toki pona translation models before, not exclusively trained though
Cool project. I'm working on something where multiple LLM agents share a world and interact with each other autonomously. One thing that surprised me is how much the "world" matters — same model, same prompt, but put it in a system with resource constraints, other agents, and persistent memory, the behavior changes dramatically. Made me realize we spend too much time optimizing the model and not enough thinking about the environment it operates in.
Would have been funny if it were called "DORY" due to memory recall issues of the fish vs LLMs similar recall issues :)
I like the idea, just that the examples are reproduced from the training data set.<p>How does it handle unknown queries?
Why are there so many dead comments from new accounts?
Because despite what HN users seem to think, HN is a LLM-infested hellscape to the same degree as Reddit, if not more.
You’re absolutely right! HN isn’t just LLM-infested hellscape, it’s a completely new paradigm of machine assisted chocolate-infused information generation.
But what should we do? The parent company isn't transparent about communicating the seriousness of this problem
It really seems it's mostly AI comments on this. Maybe this topic is attractive to all the bots.
They all seem to be slop comments.
Could it be possible to train LLM only through the chat messages without any other data or input?<p>If Guppy doesn't know regular expressions yet, could I teach it to it just by conversation? It's a fish so it wouldn't probably understand much about my blabbing, but would be interesting to give it a try.<p>Or is there some hard architectural limit in the current LLM's, that the training needs to be done offline and with fairly large training set.
I love these kinds of educational implementations.<p>I want to really praise the (unintentional?) nod to Nagel, by limiting capabilities to representation of a fish, the user is immediately able to understand the constraints. It can only talk like a fish cause it’s very simple<p>Especially compared to public models, thats a really simple correspondence to grok intuitively (small LLM > only as verbose as a fish, larger LLM > more verbose) so kudos to the author for making that simple and fun.
> the user is immediately able to understand the constraints<p>Nagel's point was quite literally the <i>opposite</i>[1] of this, though. We can't understand what it must "be like to be a bat" because their mental model is so fundamentally different than ours. So using all the human language tokens in the world can't get us to truly understand what it's like to be a bat, or a guppy, or whatever. In fact, Nagel's point is arguably even stronger: there's no <i>possible</i> mental mapping between the experience of a bat and the experience of a human.<p>[1] <a href="https://www.sas.upenn.edu/~cavitch/pdf-library/Nagel_Bat.pdf" rel="nofollow">https://www.sas.upenn.edu/~cavitch/pdf-library/Nagel_Bat.pdf</a>
IMO we're a step before that: We don't even have a <i>real</i> fish involved, we have a <i>character</i> that is fictionally a fish.<p>In LLM-discussions, obviously-fictional characters can be useful for this, like if someone builds a "Chat with Count Dracula" app. To truly believe that a typical "AI" is some entity that "wants to be helpful" is just as mistaken as believing the same architecture creates an entity that "feels the dark thirst for the blood of the living."<p>Or, in this case, that it really enjoys food-pellets.
Id highly disagree with that. Were all living in the same shared universe, and underlying every intelligence must be precisely an understanding of events happening in this space-time.
Different argument<p>I’m not going to argue other than to say that you need to view the point from a third party perspective evaluating “fish” vs “more verbose thing,” such that the composition is the determinant of the complexity of interaction (which has a unique qualia per nagel)<p>Hence why it’s a “unintentional nod” not an instantiation
> you're my favorite big shape. my mouth are happy when you're here.<p>Laughed loudly :-D
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.
Nice work and thanks for sharing it!<p>Now, I ask, have LLMs ben demystified to you? :D<p>I am still impressed how much (for the most part) trivial statistics and a lot of compute can do.
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.
This is so cool! I'd love to see a write-up on how made it, and what you referenced because designing neural networks always feel like a maze ;)
Wow that is such a cool idea! And honestly very much needed. LLMs seem to be this blackbox nobody understands. So I love every effort to make that whole thing less mysterious. I will definitely have a look at dabbling with this, may it not be a goldfish LLM :)
Love it! I think it's important to understand how the tools we use (and will only increasingly use) work under the hood.
Hm, I can actually try the training on my GPU. One of the things I want to try next. Maybe a bit more complex than a fish :)
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!
It's just so amazing that 5 years ago it would be extremely to build a conversational bot like this.<p>But right now people make it a hobby, and that thing can run on a laptop.<p>This is just so wild.
I love this! Seems like it can't understand uppercase letters though
This is such a smart way to demystify LLMs. I really like that GuppyLM makes the whole pipeline feel approachable..great work
I was going to suggest implementing RoPE to fix the context limit, but realized that would make it anatomically incorrect.
I... wow, you made an LLM that can actually tell jokes?
how's it handle longer context or does it start hallucinating after like 2 sentences? curious what the ceiling is before the 9M params
how did you generate the synthetic data?
Building it yourself is always the best test if you really understand how it works.
> A 9M model can't conditionally follow instructions<p>How many parameters would you need for that?
My initial idea was to train a navigation decision model with 25M parameters for a Raspberry Pi, which, in testing, was getting about 60% of tool calls correct. IMO, it seems like around 20M parameters would be a good size for following some narrow & basic language instructions.
Great and simple way to bridge the gap between LLMs and users coming in to the field!
I could fork it and create TrumpLM. Not a big leap, I suppose.
Thanks. Tinkering is how I learn and this is what I’ve been looking for.
Forked. Very cool. I appreciate the simplicity and documentation.
This is really great! I've been wanting to do something similar for a while.
looking forward to try it, great job
Adorable! Maybe a personality that speaks in emojis?
This is amazing work. Thank you.
Is this a reference from the Bobiverse?
Love it! Great idea for the dataset.
* How creating dataset? I download it but it is commpresed in binary format.<p>* How training. In cloud or in my own dev<p>* How creating a gguf
```
uv run python -m guppylm chat<p>Traceback (most recent call last):<p><pre><code> File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/home/user/gupik/guppylm/guppylm/__main__.py", line 48, in <module>
main()
File "/home/user/gupik/guppylm/guppylm/__main__.py", line 29, in main
engine = GuppyInference("checkpoints/best_model.pt", "data/tokenizer.json")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/gupik/guppylm/guppylm/inference.py", line 17, in __init__
self.tokenizer = Tokenizer.from_file(tokenizer_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</code></pre>
Exception: No such file or directory (os error 2)
```
meybe add training again (read best od fine) and train again<p>```
# after config device
checkpoint_path = "checkpoints/best_model.pt"<p>ckpt = torch.load(checkpoint_path, map_location=device, weights_only=False)<p>model = GuppyLM(mc).to(device)
if "model_state_dict" in ckpt:
model.load_state_dict(ckpt["model_state_dict"])
else:
model.load_state_dict(ckpt)<p>start_step = ckpt.get("step", 0)
print(f"Encore {start_step}")
```
You sound like Guppy. Nice touch.
I don't mean to be 'that guy', but after a quick review, this really feels like low-effort AI slop to me.<p>There is nothing wrong using AI tools to write code, but nothing here seems to have taken more than a generic 'write me a small LLM in PyTorch' prompt, or any specific human understanding.<p>The bar for what constitutes an engineering feat on HN seems to have shifted significantly.
Haha, funny name :)
Cool
Neat!
Tiny LLM is an oxymoron, just sayin.
How about: LLMs are on a spectrum and this one is on the tiny side?
True, but most would ignore LM if it weren't LLM.
haha funny, but really cool project. why fish tho lol.
[flagged]
Meaning/goal of life is to reproduce. Food (and everything else) is only a means to it. Reproduction is the only root goal given by nature to any life form. All resources and qualities are provided are only to help mating.
Reproduction is the goal of <i>genes</i>.<p>Food (not dying) is the goal of organisms.
No, evolution has encoded lust. It has not yet allowed for condoms. But it's a process.
Then why are reproductive rates so low in western countries?<p><a href="https://en.wikipedia.org/wiki/List_of_countries_by_total_fertility_rate#/media/File:Total_Fertility_Rate_Map_by_Country.svg" rel="nofollow">https://en.wikipedia.org/wiki/List_of_countries_by_total_fer...</a>
I don't get why anyone downvoted you but maybe we can "all get along" by saying:<p><pre><code> "the meaning of life is to continue living."
</code></pre>
Thus the short-term answer is "food" and "reproduction" is the long-term answer.
It's arguably even better than the most famous answer to that question.
[flagged]
[dead]
[dead]
[flagged]
[dead]
[dead]
[dead]
[flagged]
[dead]
[flagged]
[flagged]
[dead]
[flagged]
[flagged]
[flagged]
[dead]
[flagged]
[flagged]
[flagged]
[dead]
[dead]
[dead]
[dead]
Did something similar last year
<a href="https://github.com/aditya699/EduMOE" rel="nofollow">https://github.com/aditya699/EduMOE</a>
[dead]
[dead]
[flagged]
[flagged]
[flagged]
[flagged]
I think this is a nice project because it is end to end and serves its goal well. Good job! It's a good example how someone might do something similar for a specific purpose. There are other visualizers that explain different aspects of LLMs but this is a good applied example.
Great work! I still think that [1] does a better job of helping us understand how GPT and LLM work, but yours is funnier.<p>Then, some criticism. I probably don't get it, but I think the HN headline does your project a disservice. Your project does not demystify anything (see below) and it diverges from your project's claim, too. Furthermore, I think you claim too much on your github. "This project exists to show that training your own language model is not magic." and then just posts a few command line statements to execute. Yeah, running a mail server is not magic, just apt-get install exim4. So, code. Looking at train_guppylm.ipynb and, oh, it's PyTorch again. I'm better off reading [2] if I'm looking into that (I know, it is a published book, but I maintain my point).<p>So, in short, it does not help the initiated or the uninitiated. For the initiated it needs more detail for it to be useful, the uninitiated more context for it to be understood. Still a fun project, even if oversold.<p>[1] <a href="https://spreadsheets-are-all-you-need.ai/" rel="nofollow">https://spreadsheets-are-all-you-need.ai/</a>
[2] <a href="https://github.com/rasbt/LLMs-from-scratch" rel="nofollow">https://github.com/rasbt/LLMs-from-scratch</a>