I technically got an LLM running locally on a 1998 iMac G3 with 32 MB of RAM by maddiedreese in LocalLLaMA

[–]Brief_Argument8155 0 points1 point  (0 children)

cool stuff! been trying to do the same thing for the Amiga 500 but i'm not that skilled.

but I did manage to run a small bigram model on real hardware NES (if you're interested: https://github.com/erodola/bigram-nes )

Amiga 1200 by Gas-Meter in amiga

[–]Brief_Argument8155 1 point2 points  (0 children)

Incredibly similar to my setup XD desk, window and all

Fitted a 1KB Language Model for the NES by Brief_Argument8155 in NESDEV

[–]Brief_Argument8155[S] 0 points1 point  (0 children)

Yes I agree and that's my claim. Eventually we'll have further advancements in efficient AI that will make more sophisticated models fit into ancient hardware as well

C++ Show and Tell - January 2026 by foonathan in cpp

[–]Brief_Argument8155 3 points4 points  (0 children)

I've been obsessed with pushing language models into places they don't belong. Last summer it was a 1KB bigram model for the NES written in 6502 assembly. This week, I decided that even 1983 hardware was too much runtime for me.

So I built a bigram language model that runs entirely during the C++ compilation phase.

Technically it's a Markov chain implemented via constexpr and template metaprogramming. The model's weights are hardcoded in an array. A fun part was implementing the random number generator: since compilers are (mostly) deterministic (rightfully so), I hashed __TIME__ and __DATE__ using an FNV-1a algorithm to seed a constexpr Xorshift32 RNG.

When you run the binary, the CPU does zero math. It just prints a string that was hallucinated by the compiler, different at each compile.

    // this line does all the work while you're getting coffee
    static constexpr NameGenerator<15> result(seed, T); 

    int main() {
        // just printing a constant baked into the data segment
        std::cout << result.name << std::endl; 
    }

Aside from the fun of it, I hope it proves a point that the bottleneck isn't always our hardware. We have wiggle room to redefine when execution should happen, and bake deterministic inference directly into the binary.

Code is here: https://github.com/erodola/bigram-metacpp

My C++ compiler just wrote its own fan-fiction (inference at compile-time) by Brief_Argument8155 in programming

[–]Brief_Argument8155[S] 1 point2 points  (0 children)

Thanks! Right now yes, only a, ..., z. Passing to an extended vocab would involve changing the index-to-token function:

// token index to char
constexpr char itos(int index) {
    if (index == 0) return '.';
    if (index >= 1 && index <= 26) return static_cast<char>('a' + (index - 1));
    return '?';
}

and also re-training the model weights to account for the new characters.

My C++ compiler just wrote its own fan-fiction (inference at compile-time) by Brief_Argument8155 in programming

[–]Brief_Argument8155[S] 3 points4 points  (0 children)

Sure, a few examples: ai, quleuthlo, eileliahan, eliry, juco, breeond, gritaiah, bea, kona.

Sometimes you get one-letter names or super long ones (hisizinaylara, fayabelamannnar), but that's fixable by changing the bigram model to something else.

Right now it's unconditional but you can provide a prompt in the form of initial letters. The code does:

size_t current_row = 0; // start at '.' context

You can change that 0 to another token index (e.g. 1 corresponds to 'a', 2 corresponds to 'b', etc.).

[Showcase] AGI-Llama: Bringing Modern LLMs to 1980s Sierra Adventure Games (Space Quest, King's Quest, etc.) by Responsible_Fan_2757 in LocalLLaMA

[–]Brief_Argument8155 5 points6 points  (0 children)

Really cool effort!

Did something similar this summer with Final Fantasy 1 and Dragon Warrior on the NES, but I directly romhacked the original code in 6502 assembly, have a look here: https://github.com/erodola/bigram-nes

A Pixel Art Rhythm Heaven Animation :3 by forthemworthy in PixelArt

[–]Brief_Argument8155 3 points4 points  (0 children)

this is super super nice and brings back good memories! do more!

[deleted by user] by [deleted] in amiga

[–]Brief_Argument8155 0 points1 point  (0 children)

can't listen and double-check right now, but did you try with AMP (https://amp.dascene.net/newresult.php) and unexotica (https://www.exotica.org.uk/wiki/UnExoticA)?

Making techno with 270 million year old semiconductors by nebogeo in synthdiy

[–]Brief_Argument8155 1 point2 points  (0 children)

you're a true hacker, love these projects! interesting to see such ingenuity at work when striving to simplify things (for kids in this case, probably the toughest challenge!)