Skip to content
Other

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_cuda server via API and is compatible with both full-precision weights and the w8a16 quantized 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-plugin for 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_cuda with the w8a16 quantized base and switch agent add-ons on the fly via the /v1/adapters endpoint.

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 moreDetails
Public 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.
Discuss Telegram 1

Will it run?

Runs in BF16

Fits without quantisation.

  • BF16weights 0.3 GB · ready files0.8 GB
  • FP8 / INT8recommendedweights 0.1 GB0.7 GB
  • 4-bitweights 0.1 GB0.6 GB

Tip: go 8-bit.FP8 / INT8 is within about a percent of full precision in quality, takes half the memory and runs faster on RTX 40/50 and H100. Full precision only pays off for fine-tuning.

What to get for this model

Massed ComputeOpen Massed Compute

Your own GPU: FP8 / INT8 — from RTX 2060 · BF16 — from RTX 2060

Massed Compute hourly prices, November 2026. The discounted price applies with the coupon at checkout.

Estimate: weights plus working memory. Long videos, high resolutions and long contexts need more.

Run it on Massed Compute

The script downloads the model to the rented machine. How to run it is in the model card.

  1. 1. Rent a machine with a fitting GPU

    Open Massed Compute
  2. 2. Paste the script into the machine's terminal

    Connect over SSH (the Massed Compute panel shows the command) or open a terminal on the machine's desktop.

    HF_TOKEN / CIVITAI_TOKENThe script starts with token lines: paste yours between the quotes. The Hugging Face token is for gated models, the Civitai one for Civitai models.

    # RWKV-Agent-Lab/RWKV7-DSH-7.2B
    mkdir -p ~/models
    curl -LsSf https://astral.sh/uv/install.sh | sh
    source "$HOME/.local/bin/env"
    uv tool install "huggingface_hub[cli]"
    hf download RWKV-Agent-Lab/RWKV7-DSH-7.2B --local-dir ~/models/RWKV7-DSH-7.2B
    # The model is in ~/models. How to run it is in the model card (link above).
    Add more LoRAs to RWKV7-DSH-7.2B
  3. 3. Use it

    The model is in ~/models. How to run it is in the model card (link above).

Stop the machine in the panel when you are done: it bills by the minute while it runs.

How to speed it up

Picked for this model type. Choose your hardware above to see what fits you exactly.

  • FlashAttention 44.0.0b41from November 25, 2026new release

    fastest exact attention on B200

    Kernels for Blackwell (beta). Exact attention without quantisation — fine for everything, LLMs included.

    How to enable: pip install flash-attn-4; vLLM and SGLang pick it up themselves.

    Earlier generations (2)
    • FlashAttention 3 — The Hopper (H100/H200) version with FP8.
    • FlashAttention 2 — The standard for RTX 30/40/50 and A100: exact attention without the memory cost of long contexts.
  • torch.compile2.15.0from October 28, 2026

    10–30% for free

    Compiles the model for your GPU. Slower first run, faster afterwards.

    How to enable: model = torch.compile(model); in ComfyUI the TorchCompileModel node.

Model family

New posts about versions of RWKV7-Agent-7.2B (quants, finetunes, LoRAs) will show up under the bell.

Fine-tunes 2All on Hugging Face

About the model

RWKV-Agent-Lab/RWKV7-DSH-7.2B
Author
RWKV-Agent-Lab
Category
Other
Released
Posted

On NeyroLearn

Hugging Face

01

Ask AI about this model

Answered by Gemini 4 · the chat is kept only in this tab

Comments