RWKV7-DSH-7.2B: A compact coding agent built on the linear RWKV-7 architecture
2 min readupdated
RWKV7-DSH-7.2B is a specialized autonomous programming adapter by the RWKV-Agent-Lab team, built on the 7.2-billion model rwkv7-g1l-7.2b-20261031-ctx34304 and the RWKV7-Agent-7.2B agent framework. Unlike classical Transformers, the RWKV-7 architecture uses a linear state with $O(1)$ memory cost per token, enabling efficient handling of large codebases. The model can examine repositories in a multi-step workflow, perform targeted file editing, run console commands, manage git operations, and execute tests inside isolated sandboxes via the dsh-rwkv-plugin plugin. Weighing just 289 MB, the adapter noticeably outperforms the base version in long-term development tasks. This release is ideal for developers looking for lightweight local AI agents to automate routine coding tasks.
Key features
- Compact NoRA (r64) format: The adapter weighs only 289 MB (BF16 format) while preserving 98.71% singular value decomposition (SVD) energy without unnecessary changes to non-target tensors.
- Linear O(1) memory: Thanks to the RWKV-7 architecture, the model avoids quadratic memory growth as the context increases (supporting a base of up to 34,304 tokens).
- Hot-loading: The adapter easily connects to a running
rwkv_lighting_cudaserver via API and is compatible with both full-precision weights and thew8a16quantized base. - Noticeable quality boost: On a private benchmark of 200 complex tasks, the model scored 49.04%, compared to 13.96% for the base version and 36.42% for the intermediate agent build.
What you can do
- Automate code editing and bug fixing: Connect the model via
dsh-rwkv-pluginfor multi-step error hunting in projects, line-specific edits, and test verification. - Delegate terminal and Git tasks: Run the agent in an isolated sandbox to execute shell commands, create commits, and manage repository branches.
- Deploy a local server with hot-swappable adapters: Spin up
rwkv_lighting_cudawith thew8a16quantized base and switch agent add-ons on the fly via the/v1/adaptersendpoint.
Example
export RWKV_ADAPTER_STAGING_MIB=512
./rwkv_lighting_cuda \
--model-path ./rwkv7-g1l-7.2b-20261031-ctx34304.w8a16.rwkvq \
--vocab-path ./rwkv_vocab_v20230424.txt \
--host 127.0.0.1 --port 8060
curl -sf -F "adapter_id=rwkv7-dsh-7.2b-v0.1-r64" \
-F "file=@./RWKV7-DSH-7.2B-v0.1-adapter-r64.pth" [http://127.0.0.1:8060/v1/adapters](http://127.0.0.1:8060/v1/adapters)Read more
DetailsPublic benchmarks (k=1, max_steps=30): HumanEvalFix — 48.78% (80/164), EditBench-zh — 22.22% (24/108), EditBench (en) — 17.59% (19/108), QuixBugs — 5.00%, Aider Polyglot — 4.44%.
Private benchmark PB-20261120-200-Coding: 980.83 / 2000 points (49.04%), including 100/150 in codefix-15 and 243.35/350 in git-eval-35.
Requirements and buffers: To run the r64 adapter in rwkv_lighting_cuda, setting RWKV_ADAPTER_STAGING_MIB=512, GPU_MIB=2048, and RAM_MIB=4096 is recommended.
Languages: English and Chinese. License: Apache-2.0.










Comments