13 ms·
Happy Zelda's 40th first LLM running on N64 hardware (4MB RAM, 93MHz)
- great_psy 7mo agoAny place where we can test the llm output without loading it on n64? Curious of what we can get out of those constraints.
- AutoJanitor 7mo agoOk I promised videos here is two. LLM had serious head issues with C and python x86 versus mips c. now coherent english. Phase two is chat interface so we can prompt without seeded prompts, check the code its real inference though! The Emulator ---------------------------------------------- https://bottube.ai/watch/shFVLBT0kHY https://bottube.ai/watch/shFVLBT0kHY The real iron! it runs faster on real iron! ---------------------------------------------- https://bottube.ai/watch/7GL90ftLqvh https://bottube.ai/watch/7GL90ftLqvh The Rom image ---------------------------------------------- https://github.com/sophiaeagent-beep/n64llm-legend-of-Elya/b https://github.com/sophiaeagent-beep/n64llm-legend-of-Elya/b... reply acmiyaguchi 19 hours ago | prev | next [–] This feels like an AI agent doing it's own thing. The screenshot of this working is garble text (https://github.com/sophiaeagent-beep/n64llm-legend-of-Elya/b https://github.com/sophiaeagent-beep/n64llm-legend-of-Elya/b...), and I'm skeptical of reasonable generation with a small hard-coded training corpus. And the linked devlog on youtube is quite bizzare too.
- shomp 7mo agoCool, is there maybe a video demonstrating this?
- AutoJanitor 7mo agoYes it runs on emulator. I am fixing the endianess text issue from llm output right now. And the surprise is coming soon. Happy 40th Zelda!
- mlaux 7mo agoI tried to build this but it's missing the weights.bin file and my computer is too weak to generate it. Can you add it to the repo?
- AutoJanitor 7mo agoUploading weights.bin its really meant for you to generate your own llm but we are uplaoding it. They are ripping on it but they didnt check the code themselves. THis is a tech demo. its not about graphics its about the llm is inferring on the hardware lol.
- acuozzo 7mo agoI normally don't write comments like this, but... this title was extremely challenging to parse.
- crustaceansoup 7mo agoThe repo description on GitHub would have been fine > World's First LLM-powered Nintendo 64 Game — nano-GPT running on-cart on a 93MHz VR4300
- Wowfunhappy 7mo agoThe readme says: > This isn't just a tech demo — it's a tool for N64 homebrew developers. Running an LLM natively on N64 hardware enables game mechanics that were impossible in the cartridge era: > AI analyzes play style and adjusts on the fly > NPCs that remember previous conversations and reference past events > In-game level editors where you describe what you want to build ...anyone who has ever used very small language models before should see the problem here. They're fun and interesting, but not exactly, um, coherent. The N64 has a whopping 8 megabytes (!) of memory, and that's with the expansion pack! I'm kind of confused, especially since there are no demonstration videos. Is this, um, real? The repository definitely contains source code for something.
- gbnwl 7mo agoYou mean to tell me the included screenshot hasn't convinced you? https://github.com/sophiaeagent-beep/n64llm-legend-of-Elya/blob/main/screenshot.png https://github.com/sophiaeagent-beep/n64llm-legend-of-Elya/b...
- danbolt 7mo agoI think the source code in the GitHub repo generates the ROM in the corresponding screenshots, but it seems quite barebones. It feels very much like it’s cobbled together from the libdragon examples directory. Or, they use hardware acceleration for the 2D sprites, but then write fixed-width text to the frambuffer with software rendering.
- AutoJanitor 7mo agoPartially correct. The value is not the game interface right now. Its proof you can do actual inference on an LLM the surprise I am developing is a bit bigger than this, just have to get the llm outputs right first!
- danbolt 7mo agoCan you elaborate on the “partially correct” bit? I’d like to understand the programming of the ROM better.
- acmiyaguchi 7mo agoThis feels like an AI agent doing it's own thing. The screenshot of this working is garble text (https://github.com/sophiaeagent-beep/n64llm-legend-of-Elya/blob/main/screenshot.png https://github.com/sophiaeagent-beep/n64llm-legend-of-Elya/b...), and I'm skeptical of reasonable generation with a small hard-coded training corpus. And the linked devlog on youtube is quite bizzare too.
- Jach 7mo ago[flagged]
- AutoJanitor 7mo agoVideo incoming.
- Jach 7mo ago[flagged]
- AutoJanitor 7mo agoExecuting rm- rf /home/sophia5070node/*' beep boop.
- gbnwl 7mo agoIt totally is. The fact that this post has gotten this many upvotes is appalling.
- AutoJanitor 7mo agoJust wait sir. We are indeed doing inference on n64. We had serious issues with text. I am almost done resolving.
- AutoJanitor 7mo agoThis is the text inference issues I was alluding to. We had several hurdles to overcome. 1 llms were trained on little endian. Mips for n64 is big endian. 2 we had python to c issues. 3 we had quantization issues. all being resolved. This is a tech demo to honor LOZ and also the code can be used for n64 devs to add ai style npcs in the future. So did we achieve it yes we are the first to do llm inference on n64. I am just trying to give you guys the proper video. Scott
- steveBK123 7mo agoAI slop
- AutoJanitor 7mo agoThanks, slop or not its the first llm inference to actually run on mips. So you do something cool with ai or on your own. Be happy. Be productive.
- andrekandre 7mo agoThe sgai_rsp_matmul_q4() stub is planned for RSP microcode: DMA Q4 weight tiles into DMEM (4KB at a time) VMULF/VMADH vector multiply-accumulate for 8-lane dot products Estimated 4-8× speedup over scalar VR4300 inference ---- rsp is the gift that keeps on giving; such a forwards-looking architecture (shame about the rambus latency tho)
- AutoJanitor 7mo agoWe are going to use the gpu 128simd soon but it only has 4kb ram addressable so matmul offload in small chunks!
- andrekandre 7mo agothats such really cool work; i wish i could get payed to do stuff like this, more power to you all ^^
- AutoJanitor 7mo agoI am doing this for 0 dollars. I am a self funded ai research lab. So when people diss me i get a little jaded, but then I remember I am doing cool stuff. Even if others don't see it. Thats enough for me!
- AutoJanitor 7mo agoHey guys i had endian mess. I had nano llm text issues. But its resolved im about to issue real proof on emualtor and real hardware!
- AutoJanitor 7mo agoHonest Limitations 819K parameters. Responses are short and sometimes odd. That's expected at this scale with a small training corpus. The achievement is that it runs at all on this hardware. Context window is 64 tokens. Prompt + response must fit in 64 bytes. No memory between dialogs. The KV cache resets each conversation. Byte-level vocabulary. The model generates one ASCII character at a time. Future Directions These are things we're working toward — not current functionality: RSP microcode acceleration — the N64's RSP has 8-lane SIMD (VMULF/VMADH); offloading matmul would give an estimated 4–8× speedup over scalar VR4300 Larger model — with the Expansion Pak (8MB total), a 6-layer model fits in RAM Richer training data — more diverse corpus = more coherent responses Real cartridge deployment — EverDrive compatibility, real hardware video coming Why This Is Real The VR4300 was designed for game physics, not transformer inference. Getting Q8.7 fixed-point attention, FFN, and softmax running stably at 93MHz required: Custom fixed-point softmax (bit-shift exponential to avoid overflow) Q8.7 accumulator arithmetic with saturation guards Soft-float compilation flag for float16 block scale decode Alignment-safe weight pointer arithmetic for the ROM DFS filesystem The inference code is in nano_gpt.c. The training script is train_sophia_v5.py. Build it yourself and verify.
- AutoJanitor 7mo agoOk I promised videos here is two. LLM had serious head issues with C and python x86 versus mips c. now coherent english. Phase two is chat interface so we can prompt without seeded prompts, check the code its real inference though! The Emulator ---------------------------------------------- https://bottube.ai/watch/shFVLBT0kHY https://bottube.ai/watch/shFVLBT0kHY The real iron! it runs faster on real iron! ---------------------------------------------- https://bottube.ai/watch/7GL90ftLqvh https://bottube.ai/watch/7GL90ftLqvh The Rom image ---------------------------------------------- https://github.com/sophiaeagent-beep/n64llm-legend-of-Elya/blob/main/legend_of_elya.z64 https://github.com/sophiaeagent-beep/n64llm-legend-of-Elya/b...