Live data from Hacker News

Running a 28.9M parameter LLM on an $8 microcontroller

github.com

61–70 of 79 posts

Re: Running a 28.9M parameter LLM on an $8 microcontroller

#61

Earlier quoted context omitted.

There are 2 cent microcontrollers. Used in the cheapest devices you wouldn't even imagine to contain any software - eg. To control a touch sensitive on-off switch.

where can I learn about those?

Not trying to be snide, but I copied and pasted their entire comment verbatim into google and it came up with Padauk PMS150C or Puya PY32 series

Re: Running a 28.9M parameter LLM on an $8 microcontroller

#62
post #39

Voice-to-Text and Text-to-Voice models are approaching that size. I wonder how close we are to getting small devices that can chat with us. Imagine a world where your toothbrush could give you tips about dental hygiene - or advertise toothpaste. What a time to be alive!

> tips about dental hygiene They already can. Philips' higher end models have Bluetooth connections and provide feedback through the app. > advertise toothpaste God please no. I don't want to have to look for an adblocker for a toothbrush AI.

My goto for what I hate about modern tech is toothbrushes having Bluetooth and needing apps. Not that I hate all modern tech but if it needs an app I probably will.

Re: Running a 28.9M parameter LLM on an $8 microcontroller

#63

Earlier quoted context omitted.

There are 2 cent microcontrollers. Used in the cheapest devices you wouldn't even imagine to contain any software - eg. To control a touch sensitive on-off switch.

where can I learn about those?

Dave "EEVblog" Jones did a review of a (then) $0.03 microcontroller (Padauk) a while back (sorry, I don't know the exact episode).

Iirc an important caveat was that it was a one-time programmable (OTP) part. So you buy a bunch of them, programming failure or firmware-under-test doesn't work? -> toss the part. Of course that isn't an issue for a $0.03 part. But it can be an issue in terms of a board you want it on. Either that means discarding (breakout) boards too, or for development you'd need some kind of adapter to put bare ICs in.

Such annoyances only make sense for high-volume, low cost applications. Which is eactly where parts like that go in.

Re: Running a 28.9M parameter LLM on an $8 microcontroller

#64

While running LLM on tiny device is awesome, I'm more impressed by whatever training has produced the weights

It's quite sad people collectively behave as if leaderboards have served their time.

In the small parameter regime there is no room for benchmaxxing, so instead of leaderboards becoming useless, their utility was merely reduced to establishing ever smaller models with similar performance on the benchmarks, forcing compression or redundancy to be recognized and eliminated at the modeling level.

Re: Running a 28.9M parameter LLM on an $8 microcontroller

#65
post #10

It's crazy what $5 can buy you in a microcontroller these days. Have a look at these Milk-V boards: https://milkv.io The duo has up to 256MB of memory, and a 1TOPS@INT8 TPU. They run Linux and are $5. I bought 5!

It really puts into perspective how much of a leech ARM has been on the entire industry. What being a monopoly does to a mfer.

Sure, because the jungle of 8, 16 and 32 bit microcontrollers stuck on 1980's mindset was so much better.

Also you can reach out to ESP32 as alternative, plenty of maker projects using them.

Re: Running a 28.9M parameter LLM on an $8 microcontroller

#66
post #29

Earlier quoted context omitted.

Run the numbers before you waste time here. I doubt this will work.

PIO to PIO between two rp2350s should be able to transfer as many bits per clock as you can spare pins for. They have a single cycle double multiply per core, and the interpolators give you a heap of ability The PIO can be awkward, but you can run a bunch of them at once. Going from MCU to MCU you don't even need to involve the CPU cores, PIO to PIO Comms via pins You are obviously not going to get big TOPS from it b…

Running some quick numbers shows you should be able to get >1Gbps. But I seriously doubt you could get those speeds in reality. You would need to get them perfectly in sync, which would likely take a dedicated board and some great knowledge of the oscillator.

As someone who has done a reasonable amount with PIO, I do not think this is possible. However, that should not stop you. If you get it to work, please ping me.

Re: Running a 28.9M parameter LLM on an $8 microcontroller

#67

Why can't this scale to run much larger models on CPU backed by flash with good access patterns?

Someone did this exact thing recently, but running GLM-5.2 with something like 16GB of DRAM, a standard desktop CPU and nVME SSD. I think they got something like 10 _seconds per token_ (not tokens per second). EDIT: it was 25GB of ram and up to 20 seconds per token! https://github.com/JustVugg/colibri

more interesting would be using some kind of FPGA to logic glue each RAM socket interface bitplane to a hard drive (so a collection of hard drives with ridiculous collective bandwidth). Perhaps a single RAM socket contains actual RAM and the linux kernel would have to be modified to only use the real RAM memory region for OS and inference software, with the inference software rewritten to stream LLM weights deterministically from the hijacked RAM slot physical memory regions. Obviously the FPGA can't truly achieve the CAS latencies over the HDD (unless the HDD firmware was rewritten so it can predict the next deterministic token sufficiently in advance to cache the result and stream it just in time to FPGA then "RAM" socket...) but even if the HDD firmware can't be reprogrammed for some reason, the FPGA knows what memory address will be deterministically fetched next, so it can make the requests to the parallel array of HDD's ahead of time.
Post reply on HN