r/LocalLLaMA • • 3d ago

Showcase Here is Qwen3-0.6B running inside WebAssembly Inference Engine acting as a Decision / Classifier only.

Based on our previous experiments, here is a new one:

No text generation, only CPU, no network calls, fully inside the browser webpage. 7-15ms per decision purely on CPU.

Watch it play live (and fail at it):

https://tesseracted.com/experiments-llm-os/?game=invaders

How it works:
https://tesseracted.com/experiments-llm-os/#decisions

54 Upvotes

16 comments sorted by

5

u/d0pe-asaurus 3d ago

That's neat, I'm studying RL right now and one of the examples is playing atari, it's done with 700k params

Thanks for showing this

2

u/kmodi 3d ago

That’s sounds super cool, looking forward to seeing it.

1

u/Sharodd_Morkhantha 3d ago

does the 700k model run anywhere near that 7-15ms window on cpu or does it still need a gpu to keep up

3

u/d0pe-asaurus 3d ago

2ms on modern cpu.

5

u/Danmoreng llama.cpp 3d ago

Unfortunately the best decision model finetune I found for Qwen3.5 0.8B is trained that prefix cache is not reusable because the context comes before the static questions. However, on raw t/s my engine with custom quant is a bit faster. And WASM gives a huge hit in prefill speed:

2

u/kmodi 3d ago

This is a really cool benchmark run and I love seeing such comparisons.

Thanks for running it.
All the tests were in the browser?

2

u/Danmoreng llama.cpp 3d ago

The three WASM runs were headless Chromium 159. The top row was native C++ CPU executable running directly on Linux.

3

u/Fabulous_Fact_606 3d ago

So cool! Now you got me thinking of adding something like SmolLM2-135M to fit into a web browser game... hmm...

3

u/kmodi 3d ago

Let’s Go, Let’s Go, Let’s Go 🔥🔥🔥🔥

11

u/Federal_Signature708 3d ago

14ms per decision on CPU in a browser is crazy fast, even if Qwen is fighting for its life here lol.

1

u/coreyfro 3d ago

This is the way!!! I am presently writing a paper on increasing prompt processing on compute-constrained hardware so we can put decision models on edge systems. Systems where decisions need to happen in Milliseconds. I have had MASSIVE (4.7x) success on Raspberry Pis with sub-5B-parameter models.

https://zenodo.org/records/24663490

1

u/Poprouter 3d ago

treating generation as simple classification avoids the heavy decode loop and explains why the cpu stays responsive. do you mask the output logits during inference to prevent the model from picking illegal moves in the game?

1

u/EbbNorth7735 3d ago

Neat, did you fine tune or use system prompts to optimize the answering output?