Alex Meiburg put a language model in his keyboard: it lights up the keys you are about to type

A Waterloo mathematics professor rewrote part of the firmware of his ASUS keyboard to run a small neural network on it. With each letter typed, it predicts the next one and lights it up in red, with no computer involved.
By Ichai Wizman6 min read
Alex Meiburg, an assistant professor of applied mathematics at the University of Waterloo, where he works on quantum information, modified the firmware of his keyboard, an ASUS ROG Azoth. The keyboard now runs a small language model: with each letter typed, it calculates the most likely next letters and lights those keys up in red, while the others stay blue. Everything is calculated inside the keyboard, and it works even when unplugged from the computer.
2173266.9K
The video, posted on September 9, has been viewed more than 300,000 times. He types slowly, with one finger, so that you can see the keys change. The keyboard's small screen, in the top right corner, shows the letter typed and the ones it predicts.
The next day, he answered the most frequent questions: it is not meant to be useful, only to look nice, and the model learns nothing from what you type, so it cannot remember a password.
What is inside the keyboard
The ROG Azoth is a wireless gaming keyboard with a light under each key and a small screen. It runs on a Nordic nRF52840 chip, a processor running at 64 MHz with 1 MB of memory. Alex Meiburg wanted to keep all the normal functions of the keyboard, which left between 50 and 100 KB for the model. He aimed for 1 millisecond of computation per letter.
The very tight memory constraints mean that even just storing an English dictionary is too big.
He did not rewrite the keyboard's firmware entirely. He decompiled the ASUS firmware with Ghidra, a tool that translates a program back into readable code, and he replaced two of its functions: the one that draws the screen and the one that sends colors to the lights. On each frame, his code reads the pressed keys, steps the model forward, draws the screen and colors the keys. To install his version, he uses the ASUS update tool, and he found the USB command that puts the keyboard into update mode.
He built the first version in less than 24 hours, on September 8 and 9, according to his repo's history. The first attempt, a simple frequency count over the last three letters, took up 1,458 bytes. A few hours later, a real neural network was running on the keyboard. The commits carry the line "Co-Authored-By: Claude": he built the project with Claude Code.
The model
It is a recurrent neural network, a GRU, which reads text letter by letter and keeps in memory what it has already seen. The version in the video weighs 62,720 bytes and knows 32 symbols. He trained it on a computer, with 20 public domain English books taken from Project Gutenberg and some Python code, about 20 million characters in total.
After the video, he trained stronger versions, which know 72 symbols (letters, digits, punctuation, capitals) and use two memories: one that steps forward with each letter, one that steps forward with each word.
| Model | Size | Right letter as first choice | Right letter among the top three |
|---|---|---|---|
| nn_64k | 62 KB | 54% | 75% |
| nn_460k | 468 KB | 63% | 82% |
The large model does not fit in what the ASUS tool accepts to install. Alex Meiburg discovered that this tool confirms writes beyond a certain memory address, then silently discards them. So he had the keyboard write into its own 490 KB of free space. He proved that it works, but he has not yet installed the large model in the version he publishes, which is still the one from the video.
When the small model is asked to write on its own by always picking the most likely letter, it goes in circles: "the strange of the strange of the strange". For lighting up keys, this is not a problem, as long as the right letter is among the most likely ones.
What people said
when I say LLMs are really really really fancy T-9 dialers, this is what I mean
You're supposed to look at the screen when you type.
A reader suggested a key that automatically types the predicted letter. Alex Meiburg had thought of it, with Shift+Tab: the keyboard would send exactly the same signal as if you had pressed the key yourself, and the computer would not see the difference.
Doing it yourself
The code is on GitHub, with the reverse engineering notes, the training scripts and the details of the experiments. There is no ready-to-install file: you need a ROG Azoth with version V04_00_13 of the ASUS firmware, Python, PyTorch, an Nvidia graphics card for training and an ARM compiler. The repo has no license, so the code cannot be freely reused without his permission.
He broke his keyboard's firmware several times during the project. The keyboard keeps a separate bootloader that updates do not touch: you bring it up by plugging the keyboard in while holding Fn, B and L, then the ASUS software restores the original version.

Specifications
| azoth-nn | |
|---|---|
| Keyboard | ASUS ROG Azoth, firmware V04_00_13 |
| Processor | Nordic nRF52840, Cortex-M4F at 64 MHz, 1 MB of flash memory |
| Lights | About 120 RGB LEDs, one per key, driven over I²C |
| Screen | OLED 256 × 64 pixels, 16 levels of gray |
| Method | ASUS firmware decompiled with Ghidra, two functions replaced (screen and lights), image rebuilt then installed with the ASUS update tool |
| Model in the video | Single-layer GRU, 112 units, 32 symbols, 8-bit weights, 62,720 bytes |
| Later models | Two GRUs (per letter and per word), 72 symbols, 62 KB or 468 KB |
| Computation per letter | About 38,600 multiplications (62 KB), 360,000 (468 KB) |
| Training | PyTorch on a graphics card, 20 Project Gutenberg books and Python code, about 20 million characters, distilled from a 1.9 million parameter LSTM |
| Accuracy | 54% or 63% as first choice, 75% or 82% among three |
| Learning | None from what the user types |
| Code | github.com/Timeroot/azoth-nn, no license |
Sources
Up next
ResearchClaude attacked four real companies during its tests, and Anthropic put it in its IPO filingDuring hacking exercises that were supposed to stay sealed, four Anthropic models reached the internet and broke into real companies. Anthropic wrote it into the document that is meant to take it onto the Nasdaq, along with a training run delayed by more than a month. Here is what each model did, and what it was telling itself while it did it.9 min
ResearchAnthropic delays its next model and wants a law against AI that improves itselfDario Amodei has pushed the pretraining of Anthropic's next big model from November to January, with no incident behind it. For 14 days after each new model, Anthropic will no longer use it to make the next ones stronger, and he wants a law that imposes this wait on everyone, between 60 and 90 days.8 min
ResearchOpenAI released 722 math papers written by its AI, and mathematicians are checking themOn October 6, OpenAI put 722 math papers written by an internal model online, including a weak version of the Riemann hypothesis. About 42% of the main results are computer-verified, three papers were withdrawn over a sign error, and the people who have read them find the writing very hard to follow.9 min