Skip to content

Guide · Agent skill

How to use the RWKV Architecture Guide agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The rwkv-architecture skill is a reference guide that teaches an AI agent about RWKV, a neural network design that trains in parallel like a GPT model but runs step by step like an RNN. Once it is installed, the agent can explain how RWKV differs from Transformers and write code for loading models, streaming generation, carrying state across long inputs, and planning fine-tuning or hardware. This page covers what the skill does, how to install it, how to trigger it, and what it needs to run.

RWKV Architecture GuideOrchestra-Research/AI-Research-SKILLs · MIT

Quick start

  1. 1Download the ZIP. Download the rwkv-architecture ZIP file from this page.
  2. 2Unzip into a skills folder. Place the rwkv-architecture folder in ~/.claude/skills/ for personal use, or in your project's .claude/skills/ folder.
  3. 3Or upload in the Claude apps. In the Claude apps, open Settings, go to Capabilities, then Skills, and upload the skill.
  4. 4Install the Python packages. Install torch, rwkv, transformers and the other packages listed in the skill, with an NVIDIA GPU or CPU available.
  5. 5Download model weights. Download an RWKV weight file from Hugging Face or a similar source and note its absolute path.
  6. 6Ask a specific RWKV question. Request an explanation, code or comparison that names RWKV so the agent loads the skill.

What an agent skill is and what this one does

An agent skill is a folder of instructions and reference files that an AI agent loads when a request matches the skill's description. This skill is built around a main SKILL.md file plus three reference documents on architecture details, RWKV-7 changes and state management.

The skill shapes the agent's answers and code. It gives the agent background on RWKV's time-mixing and channel-mixing blocks, the WKV operation, the recurrent state, and code patterns for the RWKV Python package. It does not run a model itself. To generate text you still need to download RWKV model weight files separately, for example from Hugging Face.

  • Explains how RWKV differs from Transformers, including linear-time inference and no KV cache
  • Writes code to load RWKV models with the rwkv package
  • Shows streaming, token-by-token generation and how to pass state between calls
  • Covers long-context processing, fine-tuning setup and hardware sizing

Install the rwkv-architecture skill

Download the ZIP file from this page. Unzip it so that the rwkv-architecture folder, containing SKILL.md, is placed in one of the skill locations below. For a personal skill available across projects, use ~/.claude/skills/. For a skill that only applies to one project, put it in that project's .claude/skills/ folder.

If you use the Claude apps instead of a folder on disk, open Settings, go to Capabilities, then Skills, and upload the skill there.

  • Personal: ~/.claude/skills/rwkv-architecture/
  • Project only: .claude/skills/rwkv-architecture/ inside your project

Trigger the skill with natural requests

You do not need a special command. Ask in plain language about RWKV, linear-time inference, RNN-style generation or the RWKV Python package, and the agent can load the skill when the request matches its description. Being specific helps: name RWKV and the task you want done.

The skill covers several kinds of request. Ask for explanations, for code, or for a comparison, and the agent can draw on the matching reference file for detail.

  • Explain how RWKV's time-mixing differs from attention
  • Write Python that loads an RWKV model and streams output token by token
  • Show how to pass the recurrent state between two forward calls
  • Compare RWKV memory use with a Transformer KV cache for long inputs
  • Outline a fine-tuning setup with pytorch-lightning and DeepSpeed
  • Estimate VRAM needed for a 3B or 7B RWKV model in FP16

Example: streaming generation and state handling

The skill includes a pattern for generating text token by token. The prompt is fed through the model one token at a time while the state is carried forward, then the agent samples and prints new tokens. The skill also warns about a common mistake: passing None as the state on every call discards earlier context.

Ask the agent something like: "Using RWKV, show me how to keep state between chunks so a long document is read in order." The answer should include the state-passing pattern from the skill, with the reminder that the state must be passed into each following forward call.

  • Wrong: discarding the returned state and passing None to the next call
  • Correct: passing the returned state into the next forward call
out1, state = model.forward(tokens1, None) out2, state = model.forward(tokens2, state)

What you need before running the code

The skill documents code, but the code only runs if your environment is ready. You need Python and the packages the skill lists: torch, rwkv, pytorch-lightning 1.9.5, deepspeed, wandb, ninja and transformers. The skill suggests an NVIDIA GPU with CUDA 11.6 or newer, though CPU is supported. Some fine-tuning examples assume multiple GPUs.

You also need RWKV model weight files. The skill does not include them, and the code expects a path to a downloaded model file. The skill's own install commands are the source for the package list, so check them against the current rwkv documentation before you use them.

  • Python with torch, rwkv, transformers, pytorch-lightning==1.9.5, deepspeed, wandb, ninja
  • NVIDIA GPU with CUDA 11.6+ recommended, or a CPU (use strategy 'cpu fp32')
  • Downloaded RWKV weight files, for example from Hugging Face
  • Approximate FP16 VRAM by size: 1GB for 169M, 4GB for 1.5B, 16GB for 7B, 32GB for 14B

Safety notes: scripts and network

According to the skill's metadata, it does not run scripts and does not use the network. It is a set of documents and code patterns. The code it shows you, however, is yours to run. Loading a model from Hugging Face or installing packages with pip will involve the network, and those steps are part of your own setup, not the skill.

Review any code the agent writes before you run it, especially training scripts, since they can use large amounts of GPU memory and disk. Check the source of model weight files you download.

  • The skill metadata lists no scripts and no network use
  • Installing packages and downloading weights are your own actions
  • Review generated training code before running it on shared hardware

Tips for better results

Name the exact RWKV version or model size you use, since the guide covers RWKV-4 style examples as well as RWKV-7 changes. Tell the agent your hardware, such as GPU VRAM or CPU only, so it can pick a suitable strategy and size.

Treat the comparisons as rough. The skill's memory and speed comparisons are illustrative, and some figures such as the 1,000,000x memory example and the 400GB KV cache example are estimates rather than benchmarks. Measure on your own model and hardware before making decisions.

  • State your model size and whether you have a GPU or only a CPU
  • Ask for the reference detail you need: architecture, RWKV-7 changes or state management
  • Verify performance claims yourself before relying on them

What people use it for

  • Explaining to a team why RWKV's constant per-token memory differs from a Transformer's growing KV cache
  • Writing a script that streams generated text from a downloaded RWKV model token by token
  • Processing a long document in chunks while carrying the recurrent state forward
  • Sketching a fine-tuning configuration with pytorch-lightning and DeepSpeed
  • Estimating whether a 3B or 7B RWKV model fits on a given GPU in FP16

Frequently asked questions

Is the RWKV Architecture Guide skill free to use?

The skill is listed under the MIT licence, as stated in its metadata. The RWKV model weights are downloaded separately, so check the licence of any weight file you choose.

How do I install the rwkv-architecture skill?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder. In the Claude apps, you can instead upload it under Settings, Capabilities, Skills.

Does this skill include an RWKV model?

No. The skill documents RWKV and provides code patterns, but you must download model weight files separately, for example from Hugging Face, and give the code their path.

What do I need to run the RWKV code?

You need Python and the packages listed in the skill, including torch, rwkv, transformers and pytorch-lightning 1.9.5. An NVIDIA GPU with CUDA 11.6+ is recommended, but CPU is supported.

Does the skill run scripts or use the internet?

The skill metadata says it runs no scripts and uses no network. Installing packages and downloading model weights are steps you perform yourself.

How does RWKV compare with Transformers, Mamba or RetNet?

The skill says RWKV has linear-time inference, no KV cache and parallel training like GPT, while Transformers may suit those who need the best performance and have compute. It lists Mamba, RetNet and Hyena as alternatives for other goals, but its comparisons are rough estimates, so test them yourself.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This skill suits developers, engineers and researchers who want an agent that can explain and write code for RWKV, especially for long-stream or memory-limited inference. It is not a chatbot and does not include a model, so people who just want a ready-made assistant or verified benchmarks should choose something else.

Download the skill