Qwenx86-4B: A Qwen model with an x86 computer compiled into its weights

An experimental model by Quazim0t0, based on the Qwenputer project (by divagr1925): It adds 13 "chip layers" before the existing layers of Qwen3.5-4B, where weights are directly computed by a compiler (without training), implementing a 64-bit x86 core with 64 KB of memory stored in the Gated DeltaNet state. After Qwen issues a tool call, this computer embedded in the weights executes it: an exact calculator, MicroPython, a small C compiler named qcc, note storage, as well as scientific constants and Python documentation retrieval are all written into the checkpoint as firmware. Version v2 added memory features such as files, a fact base, and verbatim recall, while v3 allows Qwen to decide autonomously during conversation when to store or retrieve memories. The author claims that on the first 28 problems of GSM8K, the model answered 26 correctly using the calculator tool, whereas Qwen without tools answered 23 correctly.

Original title: Quazim0t0/Qwenx86-4B-compact

An experimental model by Quazim0t0, based on the Qwenputer project (by divagr1925): It adds 13 "chip layers" before the existing layers of Qwen3.5-4B, where weights are directly computed by a compiler (without training), implementing a 64-bit x86 core with 64 KB of memory stored in the Gated DeltaNet state. After Qwen issues a tool call, this computer embedded in the weights executes it: an exact calculator, MicroPython, a small C compiler named qcc, note storage, as well as scientific constants and Python documentation retrieval are all written into the checkpoint as firmware. Version v2 added memory features such as files, a fact base, and verbatim recall, while v3 allows Qwen to decide autonomously during conversation when to store or retrieve memories. The author claims that on the first 28 problems of GSM8K, the model answered 26 correctly using the calculator tool, whereas Qwen without tools answered 23 correctly.

Why it matters Demonstrates the concept of running programs via the model's own weights without relying on external sandboxes; it can run on a single 16 GB GPU

Upvotes 52 · Likes 52 · Downloads 121

Reasons

  • Tools are not calls to external services but are executed within the model's own forward pass; the author also provides a debugging Space that allows step-by-step replay of registers, memory, and machine output
  • The compact version occupies approximately 9 GB of VRAM and can run on a 16 GB GPU; weights are licensed under Apache-2.0, while the compiler component is under MIT

Usage

  • Run pip install -r requirements.txt, then execute python -m qwenx86.run --tool calc "question" in the repository directory; the tool can be changed to c, python, science, pydoc, or notes
  • Experience the memory features using python -m qwenx86.memory chat

Risks

  • This is a research-oriented demonstration: Qwen itself was not trained on these tools and sometimes rewrites the format of tool return values
  • Slow speed: The machine produces only 1 tokens per step, and a single C compilation and run requires 10 to 600 ten thousand machine tokens
  • The x86 translator does not support indirect jumps, and MicroPython is a stripped-down version; a CUDA GPU is required
  • This entry has not been run; refer to the model card for actual performance

Open

Hugging Face Trending

Explore the latest AI Radar updates