Success, vibe coding a game with Qwen running on my laptop

My laptop has an RTX 5050 8GB.
I downloaded Qwen 3.5 4B Q6_K_L and got it running with llama.cpp.
I also installed QwenCode CLI.
And the sequentialthinking MCP.

The model takes up about 4GB of the GPU memory. I set llama.cpp to use one slot with a 64k context window. That consumes the rest of my GPU memory.

This setup was enough to vibe code the snake game.
After the first prompt, “Use pygame to make the snake game in python.” it almost worked. Maybe a dozen more prompts and it was playable. Then I wanted to add fancy stuff, like particle explosions and gradient colored snake tail. I’ve done at least 100 prompts now, across many cleared sessions.

Because of the smallish 64k-token context window, I was frequently clearing the context window and starting a fresh session. But I also regularly updated the QWEN.md file, and the new sessions would reference that as a compact hint to understand the project in one shot.

It did smart things I didn’t even ask for. It split my one program file into multiple modules (launch.py, ui.py, entities.py, game.py). It established classes (SnakeGame, Snake, Food, Particle, ScoreBoard). It found bugs.

For sure, Claude or any other frontier model could have done a better job with fewer prompts. Nevertheless, I was impressed that this was possible at all on an air-gapped laptop.

1 Like

edit 8/1: I’ve been improving this. It now gives you a choice of models (various quants of Qwen3.5-4B, choose what fits.) I added a few missing pieces.

The idea of this script is to download/install everything required to get Qwen Code CLI running… and run it.

1 Like

I had a chance to review this – localqwen/install.sh at main · marked23/localqwen · GitHub
if anyone thought the .sh calling an offsite .sh was sus, like I did, that’s actually the qwen url thats quasi official.

That plus the new github account was real sus, so I flagged it till I could investigate. It seems okay now that I’ve had a few more minutes to look at it. Hah!

Sorry about that @marked23

1 Like

No worries. I fully appreciate that our community cares enough to report, and that you followed up. I should have thought about that, but was just excited to share.

I’m not a fan of random remote shell scripts either. Was working on this as a contribution, along the same line as that one-shot HA proxy setup, from a few months ago. I have that on my GitHub too, after modifying it to work on my 6 GPU AMD rig.

It’s been hard to find AI tinkerers to collaborate with (in rdna-multi-gpu space). If you happen to have an assignment along those lines, I’d consider it. I’m freshly retired, and trying to help people understand that they can own their compute.

1 Like

im currently debugging tp=8 rdna. I got it working, but its slowwwwwww

2 Likes

What do you mean by slow? What would you expect, vs. what you are seeing? Did you run the bandwith test? There’s also the amd-smi topology check. There shouldn’t be more than 2 hops between GPUs.

Anyway… lots of things to double check. Let me know how I can help.

3t/s with tp=8. Models that fit in tp=4, any combo, are 30-100t/s

Try this command. Do you see two hops everywhere? Do you have DMA?

mark@wide:~$ amd-smi topology --dma --link-type --hops
HOPS TABLE:
             0000:03:00.0 0000:48:00.0 0000:83:00.0 0000:86:00.0 0000:c3:00.0 0000:c6:00.0
0000:03:00.0 0            2            2            2            2            2
0000:48:00.0 2            0            2            2            2            2
0000:83:00.0 2            2            0            2            2            2
0000:86:00.0 2            2            2            0            2            2
0000:c3:00.0 2            2            2            2            0            2
0000:c6:00.0 2            2            2            2            2            0
LINK TYPE TABLE:
             0000:03:00.0 0000:48:00.0 0000:83:00.0 0000:86:00.0 0000:c3:00.0 0000:c6:00.0
0000:03:00.0 SELF         PCIE         PCIE         PCIE         PCIE         PCIE
0000:48:00.0 PCIE         SELF         PCIE         PCIE         PCIE         PCIE
0000:83:00.0 PCIE         PCIE         SELF         PCIE         PCIE         PCIE
0000:86:00.0 PCIE         PCIE         PCIE         SELF         PCIE         PCIE
0000:c3:00.0 PCIE         PCIE         PCIE         PCIE         SELF         PCIE
0000:c6:00.0 PCIE         PCIE         PCIE         PCIE         PCIE         SELF
DMA TABLE:
             0000:03:00.0 0000:48:00.0 0000:83:00.0 0000:86:00.0 0000:c3:00.0 0000:c6:00.0
0000:03:00.0 SELF         T            T            T            T            T
0000:48:00.0 T            SELF         T            T            T            T
0000:83:00.0 T            T            SELF         T            T            T
0000:86:00.0 T            T            T            SELF         T            T
0000:c3:00.0 T            T            T            T            SELF         T
0000:c6:00.0 T            T            T            T            T            SELF

And try the bandwidth test. PCIe 4 should average 23 or more. (I’ve seen as much as 28)

mark@wide:~$ rocm_bandwidth_test run tb p2p

Bytes Per Direction 268435456

Unidirectional copy peak bandwidth GB/s [Local read / Remote write] (GPU-Executor: GFX)                           
--snip--
                           CPU->CPU  CPU->GPU  GPU->CPU  GPU->GPU
Averages (During UniDir):       N/A     14.38     20.02     23.90


Bidirectional copy peak bandwidth GB/s [Local read / Remote write] (GPU-Executor: GFX)
--snip--
                           CPU->CPU  CPU->GPU  GPU->CPU  GPU->GPU
Averages (During  BiDir):       N/A     10.83     11.11     24.60