frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Show HN: Z80-μLM, a 'Conversational AI' That Fits in 40KB

https://github.com/HarryR/z80ai
132•quesomaster9000•4h ago•33 comments

Show HN: My not-for-profit search engine with no ads, no AI, & all DDG bangs

https://nilch.org
77•UnmappedStack•4h ago•42 comments

Show HN: My app just won best iOS Japanese learning tool of 2025 award (blog)

https://skerritt.blog/best-japanese-learning-tools-2025-award-show/
114•wahnfrieden•10h ago•15 comments

Show HN: Awaaz – revolutionary public opinion app for understanding society

https://awaaz.app
4•shauryatusk•2h ago•0 comments

Show HN: DockMate – Terminal UI for Container Management

https://github.com/shubh-io/DockMate
2•shubh-io•4h ago•0 comments

Show HN: Got tired of searching for AI news daily so I built my own AI news page

https://dreyx.com/
3•lilsquid•4h ago•3 comments

Show HN: LoongArch Userspace Emulator

https://github.com/libriscv/libloong
19•fwsgonzo•4d ago•5 comments

Show HN: AI-assisted approach to detecting patterns in network traffic

https://github.com/vgaj/phd/tree/main/mcp_prototype
2•viru7•4h ago•0 comments

Show HN: I Built a Tool to Turn YouTube into Structured Courses

https://www.disclass.com
5•yunbiao•8h ago•0 comments

Show HN: Matchstick Puzzle Game in the Browser

https://matchmath.pages.dev/
4•prettyblocks•5h ago•1 comments

Show HN: Phantas – A browser-based binaural strobe engine (Web Audio API)

https://phantas.io
25•AphantaZach•13h ago•8 comments

Show HN: Golazo – Live soccer updates in your terminal

https://github.com/0xjuanma/golazo
8•rocajuanma•10h ago•0 comments

Show HN: Mysti – Claude, Codex, and Gemini debate your code, then synthesize

https://github.com/DeepMyst/Mysti
208•bahaAbunojaim•5d ago•173 comments

Show HN: Pion SCTP with RACK is 70% faster with 30% less latency

https://pion.ly/blog/sctp-and-rack/
56•pch07•16h ago•5 comments

Show HN: Ez FFmpeg – Video editing in plain English

http://npmjs.com/package/ezff
407•josharsh•2d ago•191 comments

Show HN: KeyByKey.app – Daily piano game for practicing playing melodies by ear

https://keybykey.app
3•reassess_blind•8h ago•3 comments

Show HN: Xcc700: Self-hosting mini C compiler for ESP32 (Xtensa) in 700 lines

https://github.com/valdanylchuk/xcc700
150•isitcontent•2d ago•36 comments

Show HN: Witr – Explain why a process is running on your Linux system

https://github.com/pranshuparmar/witr
500•pranshuparmar•2d ago•98 comments

Show HN: Upload a song and get a finished music video (no editing, no prompts)

https://musicvideogenerator.app/
2•hexadecimal•11h ago•2 comments

Show HN: AI 3D Model Generator

https://3d-generator.com
3•jokera•16h ago•2 comments

Show HN: Mini-vLLM in ~500 lines of Python

https://github.com/ubermenchh/mini-vllm
3•ubermenchh•11h ago•0 comments

Show HN: Desktop‑2FA – offline, encrypted 2FA authenticator for your desktop

https://github.com/wrogistefan/desktop-2fa
3•wrogistefan•12h ago•0 comments

Show HN: Handoff – Claude Code plugin to let any AI continue where you left off

https://github.com/willseltzer/claude-handoff
2•pgspaintbrush•12h ago•0 comments

Show HN: AutoLISP interpreter in Rust/WASM – a CAD workflow invented 33 yrs ago

https://acadlisp.de/noscript.html
135•holg•2d ago•43 comments

Show HN: An MCP server to develop Norns/Supercollider audio apps

https://gist.github.com/rcarmo/9fe5f1523d4c93401dd2255180da299a
2•rcarmo•13h ago•0 comments

Show HN: Warlocks – a real-time browser multiplayer game running at 60fps

https://warlocks.icegaming.org/
2•iCeGaming•14h ago•0 comments

Show HN: Lamp Carousel – DIY kinetic sculpture powered by lamp heat (2024)

https://evan.widloski.com/posts/spinners/
100•Evidlo•4d ago•21 comments

Show HN: Pixels.style – a tiny watercolor-style pixel art maker

https://pixels.style
7•petersonh•15h ago•2 comments

Show HN: I built a replit game where you need to kill debuggers[Glitch Survival]

https://glitch-survival.replit.app
2•altras•16h ago•1 comments

Show HN: GeneGuessr – a daily biology web puzzle

https://geneguessr.brinedew.bio/
87•brinedew•6d ago•20 comments
Open in hackernews

Show HN: Z80-μLM, a 'Conversational AI' That Fits in 40KB

https://github.com/HarryR/z80ai
131•quesomaster9000•4h ago
How small can a language model be while still doing something useful? I wanted to find out, and had some spare time over the holidays.

Z80-μLM is a character-level language model with 2-bit quantized weights ({-2,-1,0,+1}) that runs on a Z80 with 64KB RAM. The entire thing: inference, weights, chat UI, it all fits in a 40KB .COM file that you can run in a CP/M emulator and hopefully even real hardware!

It won't write your emails, but it can be trained to play a stripped down version of 20 Questions, and is sometimes able to maintain the illusion of having simple but terse conversations with a distinct personality.

--

The extreme constraints nerd-sniped me and forced interesting trade-offs: trigram hashing (typo-tolerant, loses word order), 16-bit integer math, and some careful massaging of the training data meant I could keep the examples 'interesting'.

The key was quantization-aware training that accurately models the inference code limitations. The training loop runs both float and integer-quantized forward passes in parallel, scoring the model on how well its knowledge survives quantization. The weights are progressively pushed toward the 2-bit grid using straight-through estimators, with overflow penalties matching the Z80's 16-bit accumulator limits. By the end of training, the model has already adapted to its constraints, so no post-hoc quantization collapse.

Eventually I ended up spending a few dollars on Claude API to generate 20 questions data (see examples/guess/GUESS.COM), I hope Anthropic won't send me a C&D for distilling their model against the ToS ;P

But anyway, happy code-golf season everybody :)

Comments

Zee2•3h ago
This is super cool. Would love to see a Z80 simulator set up with these examples to play with!
jasonjmcghee•2h ago
For future projects and/or for this project, there are many LLMs available more than good enough to generate that kind of synthetic data (20 Qs) with permissive terms of use. (So you don’t need to stress about breaking TOS / C&D etc)
codetiger•2h ago
Imagine, this working on a Gameboy, in those days. Would've sounded like magic
alfiedotwtf•2h ago
And would have lasted 3 minutes.

Speaking of - I remember my first digital camera (Fujitsu 1Mb resolution using SmartMedia)… it used so much power that you could take 20-30 photos and then needed to replace all 4 batteries lol

Sharlin•2h ago
I don’t think this could beat an ELIZA-style bot in how magical it feels, given the extreme terseness of its replies.
lodovic•2h ago
I love these thought experiments. Looking at the code size, it would have been possible for someone to come up with this back in the days, similar to the idea of a million monkeys on a typewriter eventually producing Shakespeare.
alfiedotwtf•2h ago
An LLM in a .com file? Haha made my day
teaearlgraycold•1h ago
SLM
quesomaster9000•1h ago
All the 'Small' language models and the 'TinyML' scene in general tend to bottom out at a million parameters, hence I though 'micro' is more apt at ~150k params.
roygbiv2•2h ago
Awesome. I've just designed and built my own z80 computer, though right now it has 32kb ROM and 32kb RAM. This will definitely change on the next revision so I'll be sure to try it out.
wewewedxfgdf•2h ago
RAM is very expensive right now.
tgv•1h ago
We're talking kilobytes, not gigabytes. And it isn't DDR5 either.
vedmakk•2h ago
If one would train an actual secret (e.g. a passphrase) into such a model, that a user would need to guess by asking the right questions. Could this secret be easily reverse engineered / inferred by having access to models weights - or would it be safe to assume that one could only get to the secret by asking the right questions?
Kiboneu•1h ago
I don’t know, but your question reminds me of this paper which seems to address it on a lower level: https://arxiv.org/abs/2204.06974

“Planting Undetectable Backdoors in Machine Learning Models”

“ … On the surface, such a backdoored classifier behaves normally, but in reality, the learner maintains a mechanism for changing the classification of any input, with only a slight perturbation. Importantly, without the appropriate "backdoor key", the mechanism is hidden and cannot be detected by any computationally-bounded observer. We demonstrate two frameworks for planting undetectable backdoors, with incomparable guarantees. …”

ronsor•1h ago
> this secret be easily reverse engineered / inferred by having access to models weights

It could with a network this small. More generally this falls under "interpretability."

nineteen999•2h ago
This couldn't be more perfectly timed .. I have an Unreal Engine game with both VT100 terminals (for running coding agents) and Z80 emulators, and a serial bridge that allows coding agents to program the CP/M machines:

https://i.imgur.com/6TRe1NE.png

Thank you for posting! It's unbelievable how someone sometimes just drops something that fits right into what you're doing. However bizarre it seems.

quesomaster9000•1h ago
Oh dear, it seems we've... somehow been psychically linked...

I developed a browser-based CP/M emulator & IDE: https://lockboot.github.io/desktop/

I was going to post that instead, but wanted a 'cool demo' instead, and fell down the rabbit hole.

sixtyj•1h ago
Connections: Alternative History of Technology by James Burke documents these "coincidences".
TeMPOraL•49m ago
Those "coincidences" in Connections are really no coincidence at all, but path dependence. Breakthrough advance A is impossible or useless without prerequisites B and C and economic conditions D, but once B and C and D are in place, A becomes obvious next step.
Dwedit•2h ago
In before AI companies buy up all the Z80s and raise the prices to new heights.
pdyc•2h ago
interesting, i am wondering how far can it go if we remove some of these limitations but try to solve some extremely specific problem like generating regex based on user input? i know small models(270M range) can do that but can it be done in say < 10MB range?
Waterluvian•1h ago
Generate an LLM that is designed to solve one extremely specific problem: answering the ultimate question of life, the universe, and everything.

Even with modern supercomputing the computation would be outpaced by the heat death of the universe, so token output must be limited to a single integer.

dirkt•2h ago
Eliza's granddaughter.
a_t48•2h ago
Nice - that will fit on a Gameboy cartridge, though bank switching might make it super terrible to run. Each bank is only 16k. You can have a bunch of them, but you can only access one bank at a time (well, technically two - bank 0 is IIRC always accessible).
magicalhippo•1h ago
As far as I know, the last layer is very quantization-sensitive, and is typically not quantized, or quantized lightly.

Have you experimented with having it less quantized, and evaluated the quality drop?

Regardless, very cool project.

kouteiheika•27m ago
(Not OP)

It depends on the model, but from my experiments (quantizing one layer of a model to 2-bit and then training the model with that layer in 2-bit to fix the damage) the first layer is the most sensitive, and yes, the last layer is also sensitive too. The middle layers take the best to quantization.

Different components of a layer also have a different sensitivity; e.g. the MLP downscale block damages the model the most when quantized, while quantizing the Q projection in self attention damages the model the least.

Zardoz84•1h ago
Meanwhile, Eliza was ported to BASIC and was run on many home computers in the 80s.
anonzzzies•1h ago
Luckily I have a very large amount of MSX computers, zx, amstrad cpc etc and even one multiprocessor z80 cp/m machine for the real power. Wonder how gnarly this is going to perform with bankswitching though. Probably not good.
vatary•1h ago
It's pretty obvious this is just a stress test for compressing and running LLMs. It doesn't have much practical use right now, but it shows us that IoT devices are gonna have built-in LLMs really soon. It's a huge leap in intelligence—kind of like the jump from apes to humans. That is seriously cool.
acosmism•50m ago
i'll echo that practicality only surfaces once it is apparent what can be done. yea this feels like running "DOOM on pregnancy test devices" type of moment
orbital-decay•1h ago
Pretty cool! I wish free-input RPGs of old had fuzzy matchers. They worked by exact keyword matching and it was awkward. I think the last game of that kind (where you could input arbitrary text when talking to NPCs) was probably Wizardry 8 (2001).
NooneAtAll3•50m ago
did you measure token/s?
Peteragain•39m ago
There are two things happening here. A really small LLM mechanism which is useful for thinking about how the big ones work, and a reference to the well known phenomenon, commonly dismissively referred to as a "trick", in which humans want to believe. We work hard to account for what our conversational partner says. Language in use is a collective cultural construct. By this view the real question is how and why we humans understand an utterance in a particular way. Eliza, Parry, and the Chomsky bot at http://chomskybot.com work on this principle. Just sayin'.