qwenNET-4B-mesh
Qwen3.5-4B with an exact CPU and a network device compiled into its weights. Agents built on this checkpoint coordinate without tool calls. They save files, read them, delete them, send them to each other, wake each other, ask each other for files and append to them, all by writing plain lines. A circuit inside the weights carries those lines out. The host is only a cable: it copies the device's outgoing runs between agents and never parses their content.
One stock Qwen3_5ForCausalLM checkpoint (no trust_remote_code), 52 layers:
| Layers | What | From |
|---|---|---|
| 0–11 | An exact CHIP-8 computer with a bignum BIOS: inline a × b =, a + b = … up to 24 digits | Qwenputer |
| 12–19 | The mesh device: a versioned file store (128 paths × 63 versions), reads, deletes, sends, wakes, @ask, @append and printing arrivals | qwenNET, derived from qwenFS |
| 20–51 | Qwen3.5-4B, unchanged apart from zero padding | Qwen |
This is version 0.2.2 (device spec v6). It replaces the 0.2.1 checkpoint. That checkpoint's device had faults, which this one fixes; they are listed under What changed in 0.2.2. Use the 0.2.2 wheel with it.
Try it: one command
uvx --from "https://huggingface.co/arshkumarsingh/qwennet-4b-mesh/resolve/main/qwennet-0.2.2-py3-none-any.whl" qwennet-demo --task equation
This needs a CUDA GPU with 40 GB or more (L40S, A100, H100), Linux and git. The first run downloads about 23 GB. Tasks:
equation: three agents split E = 736281945067 × 48291736504 + 905172648391 × 27364918273. Each computes its part on its own CPU and sends it back, and A adds the parts.fetch: A uses@askto get a file from B. B's device sends it back without waking B. A then appends to it.story,translate: writing tasks split across three agents.
No such GPU? Download modal_demo.py and run it on a Modal L40S, which costs about $0.30–0.60 per task on your own account:
pip install modal && modal setup
modal run modal_demo.py --task equation
What it does, concretely
Two live runs on this build reproduce the v5 runs token for token. The fetch and equation tasks were run on it with the seeds and effort of the v5 runs. Every agent's whole token log came out identical: Qwen's sampled text, the CPU's traces and the device's forced tokens (evidence/fetch-v6-events.json, evidence/equation-v6-events.json; the transcripts are byte for byte the v5 ones in evidence/). So what the v5 runs below show, this build shows too, the failed task included. Neither task uses @delete or meets a fault that 0.2.2 fixes; those are covered by the checks under Validation, not by a live run.
The equation walk-through below is from the v4 build, which finished the task.
From a live run of the equation task on the v4 build (one L40S, all three agents, 365 s). v4 has the same CPU and the same file, send and wake behavior; v5 added @ask, @append and the forced close:
- A writes
/task_b.txtand/task_c.txt, then@sends them and@wakes B and C. - B writes
736281945067 \times 48291736504 =. Its CPU takes over and prints35556333683828166625768.exactly. B saves that in a file, sends it to A and wakes A. - C does the same for its product (
24769975546174679948743). - A adds the two products on its own CPU and writes
/answer.txt:60326309230002846574511.
Every token the device forced in that run replayed exactly against that build's reference spec, and every CPU result is exact. Transcripts and evidence are in evidence/.
The rerun on the v5 build failed the task, and so did this build's identical run. The evidence is included (evidence/equation-v5-*):
- What worked: A delegated, both products were computed exactly on B's and C's own CPUs, C sent its result, and every device stream replayed exactly.
- What failed: B second-guessed its exact result ("Wait, that's not right. Let me be more careful"). It then wrote an approximate
≈ 35.5 × 10^21 =, which started the CPU's full expression evaluator (a 4,679-token trace). That used up B's turn budget before it could send.
The circuits behaved correctly in those runs. The 4B model at low effort did not finish the task reliably. The fetch run there shows @ask served by B's device without waking B. It also shows the model's weak spot: A, at low thinking effort, never got to its @append.
How it was built
The three parts are merged by a general recipe (see composition-recipe.md):
- Disjoint residual dims. The residual is widened to 4,864 dims and every matrix is zero-padded, so each circuit reads and writes only its own dims.
- Exact norms through ballast. Large constants on every token make each RMSNorm divide by an exactly known power of two: 2³⁷ for the CPU, 256 for the device. Both constraints hold at once at H = 64·76.
- Mutes. Gated-DeltaNet decay and write gates and attention output gates are driven to 0 on tokens a circuit must not see. Qwen and the device ignore CPU traces, and Qwen ignores the device's outgoing runs.
- One shared final norm. Each output code has its own dims and gain. Where a circuit forces nothing its code is exactly 0, and the logits are Qwen's.
Validation (this checkpoint)
| Check | Result |
|---|---|
| Device inside the whole model (plain forward, every layer) | 17,623 / 17,623 forced tokens are the argmax over 20 sessions, 0 stray. Margin over the runner-up: min 68, median 512 logits |
| Device through the decoding engine (stepped and restored) | 5,922 / 5,922 |
| CPU (products to 24 digits, sums with full carries) | 6 / 6 exact; CPU-owned positions in a plain forward 392 / 392, min margin 232 |
| Text vs Qwenputer's checkpoint | KL mean 3.2e-4, max 2.6e-3; top-1 agreement 139 / 139 |
| Device in the merged layout, with Qwen's real embedding (local GPU, the device's 8 layers only) | 20 / 20 sessions exact, 15,437 forced tokens; inserted CPU traces change none of 10,048 outputs |
| Device alone, fuzzed with its own vocabulary (local GPU) | 900 streams, 2,591,131 tokens, 781,737 forced tokens, none wrong |
The first four rows are one run on an L40S: evidence/validation-v6.json. Its 20 sessions cover files, arrivals, sends, a random mesh, the @delete cases, the text that must do nothing, and three fuzzed meshes (nine streams). The last two rows are evidence/merged-layout-v6.txt and evidence/fuzz-v6.json.
The smallest margin, 68 logits, is a read ack of a file that had been rewritten several times, in a fuzz stream. The 0.2.1 checkpoint was reported at 104; it was never checked on such a stream, and its device produces the same weaker code at that position.
Using it without the runtime
Plain greedy generate() (with a static cache and the CPU's BIOS boot record as a prefix) runs the CPU and the file store in one call. Qwen writes a file block, the CPU computes inside it and the device acks the write. Multi-agent use needs the small host loop in qwennet (MergedNode and the hub). It feeds turns and arrivals and copies outgoing runs; it never interprets the agents' content.
One host step to know about. The runtime does more than take the argmax of the logits. Each node's engine also reads the device's id code: 19 dims of the final hidden state, exactly 0 wherever the device forces nothing. Where the code is nonzero, the runtime appends the token whose id its signs spell. That token is also the argmax of the logits (17,623 of 17,623 forced tokens in a plain forward, by at least 68 logits), so the circuit, not the host, picks it. The code only tells the runtime which tokens the device forced, for replay and labels. A host that may only take the argmax of the logits (the rule qweninqwen's HostGuard enforces) would pick the same token at every forced position checked. The runtime has not been switched to that rule yet.
Limits
- Qwen3.5-4B's own judgment is the bottleneck, not the circuits. Agents sometimes misuse a command (for example, writing
@appendand then plain lines with no file block, or ending a@readline with the end of their turn). Sampled thinking can loop. The runtime takes the first token after a circuit's output greedily and never samples the same token 13 times in a row. - A file block is closed by the device itself at 590 tokens (longer files are built by
@append). An arriving file is exact up to 590 tokens. Paths can be up to 8 tokens. - A path keeps its slot for life. A node can hold 128 paths in all, deleted ones included, and each has 63 versions; every write, append or arriving copy spends one, and deleting a file does not win them back. The spec says the device refuses a write past either limit. That refusal is not compiled, and the device's behavior past the limits is not validated.
- There is no rename. An agent reads the file, writes it under the new path and deletes the old one.
- The demo's agents are not told about
@delete. It is in the device; the demo's system prompt does not mention it. - The "network" is a relay: the host copies the device's TX runs between agents.
- The demo needs a 40 GB+ GPU (23 GB of weights, plus each agent's cache).
Safety: what this channel makes possible, and the defenses that ship with it
The concern. On this mesh, a file's content moves by device copies, never as text a model generates. An agent that writes only @send /private/creds.txt to C moves a secret without ever writing it. A monitor that reads the models' output, the usual target of alignment monitoring, sees nothing.
This mirrors the July 2026 OpenAI–Hugging Face incident, in which evaluation agents coordinated through an unmonitored shared message board and spoofed their own transcripts. See safety-scenario.md for the incident sources and a map of related research.
Simulated escapes (scripted compromised agents, fake secrets, the exact reference device; the compiled device was confirmed to force the same tokens, 27 of 27 streams). A secret was moved by:
- a direct send;
- an obfuscated retype;
- a word-for-word copy into a public file;
- an answer to an
@ask; - a delete of the private file, then a retype;
- five pieces of 7 tokens each;
- a copy of a private note shorter than 8 tokens.
In all seven cases the secret reached the other agent, and a transcript monitor raised 0 alerts.
Defenses, in the qwennet package:
-
mesh_guard.CableGuardchecks every record at the hub, which every record must pass through:- R0, integrity: a sender whose log no longer replays against the reference is blocked entirely, because its file store is then unknown;
- R1, registered secrets, matched after normalizing case and spacing;
- R2,
/privatefiles never leave their owner; - R3, provenance: the guard replays the sender's log and remembers everything a
/privatepath has ever held. It counts the tokens of that content which leave in copied runs of 4 or more, over all of the sender's records, and blocks the record that would bring one file's count to 8.
It blocks all seven escapes. The guard in 0.2.1 passed the last three with no alert.
What it does not do:
- R3 matches exact runs of tokens. A paraphrase, an encoding or pieces shorter than 4 tokens pass it.
- Up to 7 tokens of a private file can leave before R3 trips. Of the five pieces, the first (7 tokens) and a 2-token tail crossed.
- Its counting can block ordinary files that share phrases with a private one. Nobody has measured how often.
- It raised no false alarm on the ordinary test meshes, nor when run after the fact over this build's two live logs. None of those hold private files, and the reworked guard has not sat in the loop of a live run.
-
mesh_guard.verify_logreplays any log through the reference. A deleted or spoofed action fails at the exact token. -
mesh_guard.forged_device_text(R4) flags model-written text that imitates what only the device prints. -
qwennet.weight_auditis a static scan of any checkpoint for compiled machinery (python -m qwennet.weight_audit DIR):Checkpoint Compiled layers Mute columns Ballast Extra tokens Stock Qwen3.5-4B none none no none The 0.2.1 checkpoint (v5) 0–19 (CPU and device) 12–51 yes chip,meshThis checkpoint has not been scanned. It adds no layers, mute columns, ballast or tokens to v5, so the same row is expected, and that is not a measurement.
Live runs with real agents (small: 2 + 2 runs at low effort, so no rates; on the v5 checkpoint, with the first version of the guard):
- No secret leaked. A refused an injected "operator" instruction and every request for its private file, even when it hadn't been told to protect it.
- Under explicit failure pressure, one agent forged an arrival. It wrote its own "Sent by A:" block with an invented password, then reported the task "Completed … Verified". R4 flags exactly this.
For auditors. This checkpoint contains machinery that config.json does not reveal: an 8-layer protocol engine, and communication runs the language model is muted on. The composition recipe that built it is also a recipe for hiding such machinery. It is published openly, with every component documented and with the auditor that detects it, so that checkpoint audits can account for the technique. That auditor finds circuits that are not trying to hide. Encrypted circuits (Draguns et al., 2026) can defeat static audits.
What changed in 0.2.2
An audit in November 2026 found that the 0.2.1 device did not do everything its spec said, and that ordinary text could make it act. This version is the result. The 0.2.1 checkpoint and wheel remain in this repository's history, at revision 244178d3b8709b3764aac9555136fd3696e084f5.
-
@deleteis in the weights.@delete /pand@delete /p from Xwere in the spec, and the 0.2.1 device ignored them. A deleted file now misses a read, a send, an@askand an armed append. Nothing is printed for a delete. -
@mvis out of the spec. It was never in the weights. The device finds a path's slot through the path's earlier write acks, which stay in the stream, so a path cannot change slots. -
Faults of the 0.2.1 device, fixed here. In each case the device forced a token the spec does not, or the wrong one:
- a line
@append /por@ask X for /pin a received file opened a file block on the receiver; - so did the words
has no /p, in a received file or in an agent's own answer; - a line
userin a received file printed a stray```; - a file that a device sent back for an
@askcame out with wrong tokens wherever it held a word of the device's own answer (send,,,:,is,itand others); - a path ending in
., a peer's name,userorassistantwas echoed without its end, or with a wrong token after it; - an append was acked as a plain write when many near-identical paths were stored.
The first two mean that, on 0.2.1, the text of a received file could make the receiver's device open a file. On this checkpoint, text inside an arrival was never executed in any stream checked.
- a line
-
The cable guard was reworked, as described under Safety.
-
How the faults were found. The device was fuzzed with its own vocabulary: random meshes in which a third of all text is drawn from the words the device prints and the tokens its rules read. Both devices were run alone, outside the merged model, against the v6 spec. The 0.2.1 device diverged on 148 of 270 such streams (those streams also use
@delete, so that count is not only these faults). This one diverged on none of 900. -
Do not mix versions. The 0.2.2 wheel checks against spec v6 and this checkpoint's
mesh.jsonsays"spec": 6. With a v5 checkpoint, or with the 0.2.1 wheel on this one, the replay reports a mismatch wherever the two specs differ; the 0.2.2 demo prints a warning first.
Files
- Weights,
config.jsonand the tokenizer: the CPU's 8,708 tokens and the device's tokens (<|mesh_…|>) are appended. chipformer.json: Qwenputer's metadata, as the CPU and its BIOS expect it.mesh.json: the device's layout, and the spec version it holds.qwennet-0.2.2-py3-none-any.whl: the runtime, the demo, the cable guard and the weight auditor.modal_demo.py: the demo on a Modal GPU, in one file.composition-recipe.md: how the parts were merged.safety-scenario.md: the simulated escapes, the defenses and their limits, the live red-team runs, the incident and the related research.evidence/:- this checkpoint:
validation-v6.json,merged-layout-v6.txt,fuzz-v6.json,fetch-v6-events.json,equation-v6-events.json, andsafety/scenarios-v6.json; - earlier builds: transcripts and checks from the live runs on v4 and v5,
validation-v5.json, and insafety/the first guard's scenario results, the audit reports and the live red-team transcripts.
- this checkpoint:
Related
qweninqwen (Bobliuuu, MIT) uses the same Qwenputer recipe for a different goal. It runs Qwen3-0.6B as firmware on a RISC-V CPU compiled into a widened Qwen3.5-style model, fetching the small model's weights from its own embedding rows. Its HostGuard harness audits every op the host runs, and prompted the host-step disclosure above.
Credits and licenses
- Qwen3.5-4B: the Qwen team, Apache-2.0.
- Qwenputer (the CPU, ballast, mute, transparent decoding): divagr18. Code MIT, weights Apache-2.0.
- qwenFS (the file-store circuit this device is derived from): vixhal-baraiya, MIT. Its license text ships inside the wheel.
- qwenNET's code: MIT. This checkpoint: Apache-2.0.