divagr1925 commited on
Commit
23fc6bc
路
verified 路
1 Parent(s): 5c83706

card: why the chip ships beside Qwen

Browse files
Files changed (1) hide show
  1. README.md +70 -68
README.md CHANGED
@@ -1,68 +1,70 @@
1
- ---
2
- license: apache-2.0
3
- base_model: Qwen/Qwen3.5-4B
4
- base_model_relation: adapter
5
- tags:
6
- - qwenputer
7
- - risc-v
8
- - compiled-weights
9
- - coding-agent
10
- - fx
11
- ---
12
-
13
- <p align="center">
14
- <img src="qwenfx-banner.svg" alt="QwenFX: a coding agent, running inside the weights of the model it drives." width="100%">
15
- </p>
16
-
17
- Code: [GitHub](https://github.com/divagr18/QwenFX)
18
- Part of [Qwenputer](https://github.com/divagr18/qwenputer), the computer compiled into Qwen3.5's weights.
19
-
20
- **QwenFX runs [fx](https://github.com/vercel-labs/fx), Vercel's coding agent, as its exact compiled
21
- binary on a RISC-V CPU compiled into weights that run beside Qwen3.5-4B, with that same Qwen as fx's
22
- model.** fx solved 15 of 15 small coding tasks, each checked by a hidden test, and opened five pull
23
- requests on GitHub by itself
24
- ([#6](https://github.com/divagr18/fxputer-sandbox/pull/6)-[#10](https://github.com/divagr18/fxputer-sandbox/pull/10)).
25
- Every chip token in every run was checked against a reference machine. None was wrong.
26
-
27
- This repository holds the chip: the CPU's weights, with fx's boot state in them. Qwen3.5-4B is not
28
- included; use [Qwen/Qwen3.5-4B](https://huggingface.co/Qwen/Qwen3.5-4B) unchanged.
29
-
30
- ## Files
31
-
32
- | file | what | bytes | sha256 |
33
- |---|---|---|---|
34
- | `fx-live-u13-f4096.safetensors` | the chip: 162 layers, 4,096 RAM frames, the 13 hot-code units, fx's boot state | 124,960,497 | `48ddb06c鈥 |
35
- | `fx-live-u13-f4096-text.safetensors` | the same, plus the text bridge that carries Qwen's text through the circuit (`--text`) | 129,060,613 | `fda824ef鈥 |
36
- | `fx-fastcopy.elf` | fx's RV32IM+Zba ELF, built from fx's unmodified source at `757bdb9` | 75,606,908 | `282e53d4鈥 |
37
- | `imports.json` | the ELF's import table | | |
38
-
39
- The chip file is a sparse safetensors file: 19.07M nonzero bf16 weights, plus the machine's state
40
- after fx's boot. Executor v4 lifts the circuit from these weights at load. With base Qwen beside it,
41
- a live task peaks at 10-14 GB of GPU memory on an L4.
42
-
43
- ## Use
44
-
45
- ```bash
46
- git clone https://github.com/divagr18/QwenFX && cd QwenFX && uv sync --extra hf
47
- uv run python qwenfx.py setup
48
- uv run hf download divagr1925/QwenFX fx-live-u13-f4096.safetensors --local-dir chip
49
- uv run python qwenfx.py task t1_bug
50
- ```
51
-
52
- `qwenfx.py chip` builds the same file from the Python circuit instead (about 3 minutes, 6.4 GB of
53
- RAM); the arrays are identical. The GitHub README has the issue-to-pull-request flow, what runs on
54
- the chip and what runs on the host, and the checks.
55
-
56
- ## Not a merged checkpoint
57
-
58
- The chip and Qwen are two sets of weights in one process on one GPU. Qwen's own weights are
59
- unchanged. The host still renders the chat template, tokenizes, parses tool calls, keeps the file
60
- store fx reads and writes, and does the git and GitHub work of a pull request. fx's own code, all of
61
- it, runs on the chip.
62
-
63
- ## License
64
-
65
- Apache-2.0. fx is by Vercel, Apache-2.0: `LICENSE` is fx's license, and `THIRD_PARTY_NOTICES.md` is
66
- fx's, unchanged. The ELF and the chip files' boot state are fx-derived; `NOTICE` in the GitHub
67
- repository's `third_party/fx/` (and here) says how the ELF was built and what else it contains. Qwen3.5-4B is
68
- Apache-2.0 and is not redistributed here.
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: Qwen/Qwen3.5-4B
4
+ base_model_relation: adapter
5
+ tags:
6
+ - qwenputer
7
+ - risc-v
8
+ - compiled-weights
9
+ - coding-agent
10
+ - fx
11
+ ---
12
+
13
+ <p align="center">
14
+ <img src="qwenfx-banner.svg" alt="QwenFX: a coding agent, running inside the weights of the model it drives." width="100%">
15
+ </p>
16
+
17
+ Code: [GitHub](https://github.com/divagr18/QwenFX) 路 Mirror: [ModelScope](https://www.modelscope.ai/models/Spartan1925/QwenFX)
18
+ Part of [Qwenputer](https://github.com/divagr18/qwenputer), the computer compiled into Qwen3.5's weights.
19
+
20
+ **QwenFX runs [fx](https://github.com/vercel-labs/fx), Vercel's coding agent, as its exact compiled
21
+ binary on a RISC-V CPU compiled into weights that run beside Qwen3.5-4B, with that same Qwen as fx's
22
+ model.** fx solved 15 of 15 small coding tasks, each checked by a hidden test, and opened five pull
23
+ requests on GitHub by itself
24
+ ([#6](https://github.com/divagr18/fxputer-sandbox/pull/6)-[#10](https://github.com/divagr18/fxputer-sandbox/pull/10)).
25
+ Every chip token in every run was checked against a reference machine. None was wrong.
26
+
27
+ This repository holds the chip: the CPU's weights, with fx's boot state in them. Qwen3.5-4B is not
28
+ included; use [Qwen/Qwen3.5-4B](https://huggingface.co/Qwen/Qwen3.5-4B) unchanged.
29
+
30
+ ## Files
31
+
32
+ | file | what | bytes | sha256 |
33
+ |---|---|---|---|
34
+ | `fx-live-u13-f4096.safetensors` | the chip: 162 layers, 4,096 RAM frames, the 13 hot-code units, fx's boot state | 124,960,497 | `48ddb06c鈥 |
35
+ | `fx-live-u13-f4096-text.safetensors` | the same, plus the text bridge that carries Qwen's text through the circuit (`--text`) | 129,060,613 | `fda824ef鈥 |
36
+ | `fx-fastcopy.elf` | fx's RV32IM+Zba ELF, built from fx's unmodified source at `757bdb9` | 75,606,908 | `282e53d4鈥 |
37
+ | `imports.json` | the ELF's import table | | |
38
+
39
+ The chip file is a sparse safetensors file: 19.07M nonzero bf16 weights, plus the machine's state
40
+ after fx's boot. Executor v4 lifts the circuit from these weights at load. With base Qwen beside it,
41
+ a live task peaks at 10-14 GB of GPU memory on an L4.
42
+
43
+ ## Use
44
+
45
+ ```bash
46
+ git clone https://github.com/divagr18/QwenFX && cd QwenFX && uv sync --extra hf
47
+ uv run python qwenfx.py setup
48
+ uv run hf download divagr1925/QwenFX fx-live-u13-f4096.safetensors --local-dir chip
49
+ uv run python qwenfx.py task t1_bug
50
+ ```
51
+
52
+ `qwenfx.py chip` builds the same file from the Python circuit instead (about 3 minutes, 6.4 GB of
53
+ RAM); the arrays are identical. The GitHub README has the issue-to-pull-request flow, what runs on
54
+ the chip and what runs on the host, and the checks.
55
+
56
+ ## Not a merged checkpoint
57
+
58
+ The chip and Qwen are two sets of weights in one process on one GPU. Qwen's own weights are
59
+ unchanged. A merged checkpoint is very possible, since the chip uses Qwen3.5's own layer types and
60
+ Qwenputer already ships its CPU merged, but at fx's size it would be about 25-37 GB (estimated),
61
+ mostly zero padding, against 8.5 GB for base Qwen plus this 125 MB file. So I chose this layout. The host still renders the chat template, tokenizes, parses tool calls, keeps the file
62
+ store fx reads and writes, and does the git and GitHub work of a pull request. fx's own code, all of
63
+ it, runs on the chip.
64
+
65
+ ## License
66
+
67
+ Apache-2.0. fx is by Vercel, Apache-2.0: `LICENSE` is fx's license, and `THIRD_PARTY_NOTICES.md` is
68
+ fx's, unchanged. The ELF and the chip files' boot state are fx-derived; `NOTICE` in the GitHub
69
+ repository's `third_party/fx/` (and here) says how the ELF was built and what else it contains. Qwen3.5-4B is
70
+ Apache-2.0 and is not redistributed here.