GOG is getting acquired by its original co-founder
436 by haunter | 246 comments on Hacker News.
๐ เคोंเคกเคตाเคจा เคจ्เคฏूเค ๐
Monday, December 29, 2025
New best story on Hacker News: Show HN: Z80-ฮผLM, a 'Conversational AI' That Fits in 40KB
Show HN: Z80-ฮผLM, a 'Conversational AI' That Fits in 40KB
415 by quesomaster9000 | 95 comments on Hacker News.
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 :)
415 by quesomaster9000 | 95 comments on Hacker News.
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 :)
New best story on Hacker News: Show HN: Z80-ฮผLM, a 'Conversational AI' That Fits in 40KB
Show HN: Z80-ฮผLM, a 'Conversational AI' That Fits in 40KB
400 by quesomaster9000 | 90 comments on Hacker News.
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 :)
400 by quesomaster9000 | 90 comments on Hacker News.
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 :)
Sunday, December 28, 2025
Saturday, December 27, 2025
New best story on Hacker News: Exe.dev
Exe.dev
426 by achairapart | 280 comments on Hacker News.
https://ift.tt/GhpBA1i https://ift.tt/lLsMCDP https://ift.tt/54tncom
426 by achairapart | 280 comments on Hacker News.
https://ift.tt/GhpBA1i https://ift.tt/lLsMCDP https://ift.tt/54tncom
Subscribe to:
Comments (Atom)
New best story on Hacker News: GOG is getting acquired by its original co-founder
GOG is getting acquired by its original co-founder 436 by haunter | 246 comments on Hacker News.
-
เคตเคฐोเคฑ्เคฏाเคค เคถเคธ्เคค्เคฐाเคจी เคตाเคฐ เคเคฐूเคจ เคฏुเคตเคाเคा เคेเคฒा เคूเคจ เคตเคฐोเคฐा เคชोเคฒिเคธांเคจी เคेเคฒी เคเคฐोเคชीเคฒा เค เคเค เคตเคฐोเคฐा : เคตเคฐोเคฑ्เคฏाเคคीเคฒ เคेเคธเคฐी เคจंเคฆเคจ เคเคฃเคชเคคी เคเคตเคณ เคเคฐोเคชी เค เคฎो...
-
เคตिเคฆ्เคฏाเคฐ्เคฅ्เคฏांเคตเคฐीเคฒ เค เคฎाเคจुเคท เค เคค्เคฏाเคाเคฐ – เคฎुเค्เคฏाเคง्เคฏाเคชเค เคต เค เคงीเค्เคทเคाเคตเคฐ เคुเคจ्เคนा เคฆाเคเคฒ เคเคฐूเคจ เคคाเคค्เคाเคณ เคाเคฐเคตाเค เคเคฐा. เคเคฆिเคตाเคธी เคाเคฏเคเคฐ เคธेเคจेเคे เคंเคฆ्เคฐเคชूเคฐ เคिเคฒ्เคนा เคเคชाเคง...
-
เคฏेเคจ्เคธा เคฏेเคฅीเคฒ เค เคชเคाเคคाเคค เคฎूเคค्เคฏुंเคฎुเคी เคฎเคนिเคฒाเค्เคฏा เคตाเคฐเคธाเคจा 5 เคฒाเคाเคी เคเคฐ्เคฅिเค เคฎเคฆเคค เคเคฐा เคคुเคฒเคธी เค เคฒाเคฎ เคตเคฐोเคฐा เคถเคนเคฐाเคคीเคฒ เคฌाเคตเคฃे เคฒेเคเคเค เคต เคाॅเคฒเคฐी เคตॉเคฐ्เคก...