architecture-reference
Explains RWKV-7 tensor shapes, checkpoint export, context-parallel state composition, and RWKV-7/Qwen comparison workflows.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- architecture-reference
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Explains RWKV-7 tensor shapes, checkpoint export, context-parallel state composition, and RWKV-7/Qwen comparison workflows.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/architecture-details.md2.3 KB
- 参考文档references/context-parallelism.md1.4 KB
- 参考文档references/qwen-export-and-comparison.md1.8 KB
- 参考文档references/troubleshooting.md1.8 KB
- 脚本scripts/export_qwen_text_state.py6.3 KB
03 SKILL.md 正文
RWKV architecture reference
Use this route when the request is about tensor names, state layout, checkpoint conversion, RWKV-7 versus Qwen3.5 comparisons, or why two implementations do not match numerically.
Route by task
- Understand model shape or state layout: read architecture-details.md.
- Export a Qwen text checkpoint: run export_qwen_text_state.py or read its help text first.
- Reason about chunk/state equivalence: read context-parallelism.md.
- Debug a mismatch: read troubleshooting.md before changing the tokenizer, tensor naming, or checkpoint path.
What this route owns
- RWKV-7 block names, layer/state shapes, and the role of
emb.weight,ln0,ln_out, and the per-block attention/FFN tensors. - Qwen3.5 text-only export and why vision/MTP tensors are excluded from that export path.
- The chunk-merging identity used by RWKV-7 context parallelism.
- Compatibility notes for the legacy v5/v6 code paths when they help explain a shape or naming difference.
What this route does not own
- Data conversion and
magic_primeselection belong totraining-data. - Prompt/sampling and MMLU evaluation belong to
inference-evaluation. - ROSA toy experiments belong to
rosa-experiments.
Bundled helper
scripts/export_qwen_text_state.pyaccepts a model id or local Hugging Face directory and writes a text-only checkpoint plus metadata file. It is the safe replacement for the repository's checkpoint-export example because it requires explicit output paths and has no hard-coded local checkpoint.
Handoff
Use this route when you need shapes, tensor names, or conversion/composition facts, not when you need to actually train or sample from the model.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).