A Working Nintendo in ~1GB of Qwen Weights

(github.com)

55 points | by dbreunig 1 hour ago

12 comments

  • pbohun 26 minutes ago
    >Overall, nesformer runs 150–290× slower than the real console.

    I like these kinds of projects because it helps to show the massive compute requirement between LLMs and ordinary programs.

    A while back I saw some people saying we would just have LMMs hallucinate an entire operating system every single frame. I guess technically it's now proven to be technically possible, but it would be thousands of times slower while requiring thousands of times more compute (a multi-million x difference from an ordinary OS!).

    • varispeed 24 minutes ago
      Isn't that the same with e.g. human brain? Computer program can compute billions of equations, whilst human will struggle with just one.
      • krige 13 minutes ago
        Human brain does a lot more at any given time than just whatever you're consciously thinking about.
      • Terr_ 18 minutes ago
        Perhaps, but it doesn't indicate anything new or interesting about cognition or biology.

        For example, Minecraft in Minecraft [0] is (while impressive) slow and inefficient too, but it doesn't tell us much about humans except that some of them are weirdly ambitious in their projects.

        [0] https://www.youtube.com/watch?v=-BP7DhHTU-I

    • im3w1l 16 minutes ago
      These systems in weights are proof of concepts. Surely there is room for optimization in there somewhere.
      • jerf 7 minutes ago
        Yes, there is.

        It's called a Nintendo emulator.

        That's kind of the point here.

        Code isn't going anywhere. It can be literally billions or trillions of times more efficient than an AI, and as AIs scale up that number just continues to grow and can completely plausibly hit quadrillions in our lifetime. What relationships humans have with code is a completely different question, but the idea itself isn't going anywhere. Anyone who thinks otherwise has failed to grasp just what producing a single token from an AI actually entails.

  • dbreunig 15 minutes ago
    A couple thoughts on the process here…

    First off, Opus 5.5 built working weights and code with only two prompts:

    1. Read this article and any relevant source code: https://divagr.com/blog/qwenputer. Then explore if you could emulate the chip and ram in a Nintendo Entertainment System (as people do today with FPGAs in MISTRs) using this technique. If so, what size model would you have to build and if you could use smaller faster ones, could you get it to be at the standard clockspeed.

    It returned charts well illustrating any model would be _slow_. But it's still fun, so the second prompt was:

    2. I think we should build it! Just for fun. It's okay if it's not fast. We want to be able to have the weights, and a cli to run them that we can point at a ROM.

    Now while this was an _epic_ run by Opus (5.5 is a crazy capable model), this is a surprisingly well-structured challenge.

    There is a long-lived and incredible community of classic gaming emulation work online for it to reference. And that community has created…conformance tests! Opus found them and built against one, that has >3k golden instructions: https://github.com/christopherpow/nes-test-roms/blob/master/...

    Also, there is the original Qwenputer repo that Opus used to drive the weight writing. That was essential.

    But this is a great example of what these models can do with proper reference materials, great specs, conformance tests, and clear direction.

  • armcat 21 minutes ago
    This opens up so many interesting opportunities. In principle one could compile a small VM inside the LLM weights. The VM can host for example a Python interpreter, a shell and tools like sed, cat, grep etc. Instead of LLMs having to do slow autoregressive token emission with the current "external" tool calling, it could literally execute everything except web search, inside the LLM, with just matmul operations. You could probably optimise this so it runs in batches. You could have a gdb like application that can step through the LLM forward pass. Anyway, just a crazy thought. Have a great weekend everyone!
  • cafebeen 36 minutes ago
    I expected this to only simulate the CPU itself, but was surprised to find they actually simulate the RAM as well (contained in the model itself via the gated deltanet architecture). So in my understanding, the CPU, ROM, and RAM are all handled internally by the model, and the only inputs after initialization are the controller events, wild.
  • jacquesm 56 minutes ago
    I love these hacks, even though from an efficiency point of view it is horrifying to my assembly-code-golfing-brain. And it also gives some new appreciation for how much more efficient deterministic programs are compared to AI.
    • nonethewiser 51 minutes ago
      The day is coming when we have widespread local inference on super powerful and efficient hardware and people will ask it what time the store closes, get distracted, and then ask it again instead of scrolling up.
      • jacquesm 36 minutes ago
        That probably has already happened.
        • carljungslabtek 21 minutes ago
          I’m ashamed to admit I do this on my work account sometimes… Not for looking up a basic fact of course.

          I wish they would let me use claude desktop, I really hate looking at the terminal and don’t know how to customize it to make it more readable

          • tmpz22 15 minutes ago
            > I really hate looking at the terminal and don’t know how to customize it to make it more readable

            On a comment where you discuss a powerful tool for looking up information, you claim ignorance about a piece of information that same tool could explain to you! What the heck!

      • matthewsinclair 16 minutes ago
        There’s another way?
      • misiti3780 29 minutes ago
        am i the only one confused by this ?
        • tomcam 26 minutes ago
          I believe GP is making the point that tokens are expensive atm so we are better at conserving them (the scroll back part), but soon it'll be so inexpensive or even free that we won't bother.
          • misiti3780 17 minutes ago
            tokens are not that expensive...
    • garciasn 45 minutes ago
      Two years ago: nice toy.

      18 months ago: it can do some things but it’s generally not useful.

      12 months ago: wow; this can write ok code that a human has to do a lot of review to make sure it’s ok.

      6 months ago: holy fuck I’m shipping great stuff with only the occasional redo.

      3 months ago: Jesus Christ this is actually pretty fucking great. I have to work entirely differently; becoming a manager of my single agent launching sub agents.

      1 month ago: my god I am shipping more, faster, and more useful than ever.

      Today: we have fleets of highly effectively domain expert agents working entirely autonomously and shifting between fleets depending on domain, available usage remaining, and we’re shipping 10x with 100% better reviews than before—expanding by the day and self-improving its own harness.

      —-

      Next week: the agents will prioritize code golf.

      The week after that: everything is written in ASM.

      We’ll come full circle in 3y

      e: fyi; this is my personal progression with LLMs.

      • derwiki 4 minutes ago
        > The week after that: everything is written in ASM.

        Also “1 month ago,” but s/ASM/Rust

      • jacquesm 37 minutes ago
        Next week: hey, I'm out of a job, what happened?
        • pjmlp 23 minutes ago
          This is what I don't get with the kind of posts you are replying to.

          I have experienced directly what the evolution of cloud based software, and now AI based tooling, has done to team sizes on delivery projects.

          Cannot understand how they don't get how all the performance improvements directly correlates to smaller team sizes, in shareholders driven economy.

          So far I have been lucky, and just hope to have enough savings when time comes, as finding jobs after 50s wasn't already easy without having to add AI on top.

          • garciasn 11 minutes ago
            Because I don't live in a world where my team needs to grow for me to feel more successful? My teams have been small and tight-knit at every place I've been an Eng leader. I left a job with 13 engineers and they're at >90 now, apparently doing less; but, that's just what I hear second-hand.

            I want to do MORE with the same amount of folks.

        • tomcam 24 minutes ago
          I think that's this week
      • misiti3780 27 minutes ago
        i wish this was my experience, it's basically the opposite. im shipping a little faster -- but spending endless amounts of time reviewing LLM-generated code that usually isnt production ready.
      • Imustaskforhelp 32 minutes ago
        > The week after that: everything is written in ASM.

        This is an genuinely good minimalist good editor that is created in mostly assembly that was created with the help of AI[0]

        I maintain a fork of it which basically adds scratchpad ability to it and is something that I use daily myself for what it's worth[1]

        My fork was created with the help of GLM 5.3 (an open-weights model)

        The future is already here in some sense. I could in theory add more features but I intentionally add not more features because asm is still slightly difficult for it to write but in some sense the tradeoff has been/could be worth it. It was more of an experiment really and I am really impressed by it.

        in many ways, forcing AI to write asm does make you now think intentionally of features and ironically prevents feature creep and makes you think of stability of the product (atleast right now for me anyways)

        [0]: https://rhun.app

        [1]: https://github.com/serJaimeLannister/rhunpad

    • bitwize 45 minutes ago
      Once our compute base shifts from silicon to human brains grown in vats, you'll be thankful you can run all your old deterministic compute tasks on flesh neurons!
  • munro 18 minutes ago
    Woowww this is cool, not trained is even cooler--maybe I'm probably a bit naive, but to me it demonstrates an understanding of how an LLM can compute
  • amelius 50 minutes ago
    How do they know it's "working"?

    Did they test every possible input/output combination?

    • dbreunig 44 minutes ago
      Doesn't work for all cartridges (I didn't run Opus that long, but it could keep going). Works with Super Mario.

      But to answer your question, it's in the readme: https://github.com/dbreunig/nesformer#how-it-was-checked

    • anyfoo 44 minutes ago
      Do you test every possible input/output combination on any CPU?

      No, because that would be impossible.

      You perform a series of more specific tests. In this case, it's "working" in so far as that Super Mario Bros. appears to be playable, for example.

      Does not mean that it behaves perfectly according to some spec, or identical to another CPU (like the NES's 6502), of course, but it's clearly a working CPU to some 6502-compatible extent.

  • creposukre 34 minutes ago
    Omg what is this sorcery?!
  • mlmonkey 47 minutes ago
    Can someone give a TL;DR ? What's the input to the model? What's the output?
  • dizhn 58 minutes ago
    It's NES
    • someperson 55 minutes ago
      Yes, calling a Nintendo Entertainment System (NES) a "Nintendo" may have made sense in 1989 or 1990, but not in 2026.
    • rtkwe 51 minutes ago
      The title is very "grandma who doesn't know the tech" coded. Every game system is the Nintendo, controllers are remotes, etc.
  • woah 47 minutes ago
    This is like when people used to make tetris using only CSS or whatever in the 2010s. But it's less impressive because Claude Code can slop it out in an afternoon.
  • WoodenChair 48 minutes ago
    I guess I don't understand the point of this. Of course a set of digital logic circuits can be reduced to a set of weights. Am I missing something?
    • igravious 2 minutes ago
      Sometimes projects have no point other than to show what can be done – and the pure thrill of doing is an end in itself … but I agree with you in the "so what" sense here … I feel like with this project there is meant to be a point (other than play for the sake of play and art for the sake of art and coding for the sake of coding) but I'm not seeing it either?
    • WithinReason 32 minutes ago
      Apparently it's news to some people. It also helps combat the "LLMs ArE nOt DeTeRmInIsTiC" complaints.
      • recursive 15 minutes ago
        Doesn't help much
      • rvz 19 minutes ago
        > It also helps combat the "LLMs ArE nOt DeTeRmInIsTiC" complaints.

        Reality says otherwise, especially from those who run LLMs in production at a large scale. Hacks such as baking in the weights with tiny experiments doesn't disprove anything.

        The same LLM boosters also continue to repeat one of the biggest misconceptions: "sEt TeMperaTurE tO zERo tO aChiEvE fUlL dEterMinIsm."

    • lucasoshiro 42 minutes ago
      Because it's fun
    • jacquesm 47 minutes ago
      Not a climber then?
    • ansk 22 minutes ago
      This work, and the original qwenputer work it builds on, are both technically uninteresting slop. HN eats it up though.
      • rvz 12 minutes ago
        HN loves slop meetoo projects without questioning the details. With close inspection it is an overly complicated version of this paper [0] on neural turing machines.

        This concept was hyped up (because DeepMind) for a while at the time and in reality it amounted to nothing. This is just the second reincarnation of a similar concept but with added extra saturated slop and hype on top.

        [0] https://arxiv.org/abs/1410.5401

        • ansk 2 minutes ago
          That paper is great work. This qwenputer stuff is slop. The problem is that HN can't tell the difference.