Qwenputer: a computer, compiled into the weights of a language model.

A computer, compiled into the weights of a language model.

Code on GitHub · RISC-V Qwenputer · Base model: Qwen/Qwen3.5-4B · Apache-2.0

Qwenputer Filesystem is Qwen3.5-4B with a real filesystem inside its Gated DeltaNet layers. Files are written, read, listed and deleted by compiled weights, inside the forward pass, with no Python and no runtime. Save the state at the end of a conversation and the files are still there in the next one.

It's the RISC-V Qwenputer, with a filesystem added. The full RV32IM CPU and its calc tool are still there, unchanged, and the filesystem lives next to them in the same layers.

It isn't a vector database, a plugin or a tool executor. The filesystem is a hashed directory and up to 512 files, about 53,000 tokens of text, kept in the same DeltaNet state the model already carries. A lookup hashes the name to a slot and takes two or three trace tokens. None of its weights are learned: a compiler computes every one.

Qwen gets five tools for it, next to calc: put, append, get, list and delete. It calls them in its own tool-call format, and the computer layers take the name and the text as Qwen writes them, look the name up, and write the <tool_response> themselves, token for token. Any token Qwen can write, the filesystem stores and prints back exactly.

Benchmarks

Greedy decoding. Both tool columns use one system prompt, which tells Qwen it has a memory, to save facts about the user with put and to look in its memory before answering a question about the user. The Python-tool column is base Qwen with the same five tools, run by Python on the host.

Benchmark Base Qwen3.5-4B Qwenputer Filesystem Python tool (host)
Multi-session recall, 90 questions 7.8 83.3 78.9
Facts that changed in a later session, 30 questions 3.3 90.0 83.3
Recall of 50 stored strings in a new session n/a 100 100
Recall of 200 stored strings in a new session n/a 100 100

Multi-session recall is a synthetic LongMemEval-style test. Four past sessions mention eight facts about the user and change two of them, and each question comes in a new session. With the past sessions pasted into the prompt, base Qwen gets 76.7, but only 30.0 on the facts that changed. Inside one long conversation, Qwen answers from its context and doesn't look in the filesystem.

We checked every token the filesystem printed against a reference model, live and in replay, and found zero mismatches. Qwen's text behaviour matches base: KL 5.5e-4, against a noise floor of 5.1e-4. The arithmetic matches the main model: every calc result is exact, and DeepMind mul_big scores 97.5 on both.

Quickstart

git clone -b rv-store https://github.com/divagr18/qwenputer && cd qwenputer/experimental/riscv && uv sync --extra hf
hf download divagr1925/Qwen3.5-4B-Qwenputer-Filesystem --local-dir qwenputer-filesystem
uv run python -m chipformer.rv.chat qwenputer-filesystem --memory memory.npz \
    --ask "Remember that my locker code is 4471-AZ."
uv run python -m chipformer.rv.chat qwenputer-filesystem --memory memory.npz \
    --ask "What's my locker code?"

The model loads as a stock Qwen3_5ForCausalLM. --memory saves the filesystem after each answer and loads it into the next session, so the second command starts with an empty context and still finds the code. In Python, RvChat.save_store() and load_store() do the same. The checkpoint is 22.3 GB and runs in about 18 GB of GPU memory, so it fits a 24 GB GPU.

Gated DeltaNet as RAM

Gated DeltaNet state used as RAM: a one-hot key overwrites one row, a one-hot query reads it back, and the CPU's registers, memory and program counter live in DeltaNet heads.

Model details

Base Qwen/Qwen3.5-4B, Qwen's own weights unchanged
Architecture stock Qwen3_5ForCausalLM (text only); config-only changes
Computer 12 compiled layers before Qwen's 32; RV32IM + Zba + bignum coprocessor + filesystem
Filesystem 1,024-slot hashed directory, 512 files, about 53k tokens of text
Hidden size 4608 (Qwen's 2560 plus the computer's dims)
Vocabulary Qwen's, plus 236,469 trace tokens
Size 22.3 GB in bf16, mostly zero padding; about 18 GB of GPU memory in use
Precision exact in bf16

Citation

@software{agrawal2026qwenputer,
  author  = {Agrawal, Divyansh},
  title   = {{Qwenputer}: a computer compiled into the weights of a language model},
  year    = {2026},
  version = {0.2.0},
  url     = {https://github.com/divagr18/qwenputer},
  license = {MIT}
}

License

Apache-2.0. This is a modified version of Qwen/Qwen3.5-4B: the config is widened and computer layers are added, but Qwen's own weights are unchanged.

Downloads last month
69
Safetensors
Model size
11B params
Tensor type
BF16
·
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for divagr1925/Qwen3.5-4B-Qwenputer-Filesystem

Merge model
this model

Collection including divagr1925/Qwen3.5-4B-Qwenputer-Filesystem