[RWKV] Align module names with Transformers conventions - #11
Merged
Conversation
Cai-z-us
force-pushed
the
fix/rwkv-community-integration-contracts
branch
from
August 27, 2026 09:08
49b17d4 to
38fd0b2
Compare
|
Thank you for your contribution 🤗! CI Security Gate — automatic approval blockedThis PR was not automatically approved for CI because the security gate failed. Possible reasons:
See the workflow run for the exact violations. A maintainer can review and manually approve CI if a finding is a false positive. |
|
[For maintainers] Suggested jobs to run (before merge) run-slow: rwkv |
CI recapDashboard: View test results in Grafana
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Follows up on #10 by making the RWKV-7 model layout native to the current Transformers and FLA ecosystem. Canonical BlinkDL names now exist only at the
.pthconversion boundary; the Transformers model and serialized state dict use standard decoder/module names without duplicate aliases.embed_tokens,embedding_norm,layers,norm, andlm_headRwkvDecoderLayer,linear_attn, andmlpr_proj,k_proj,v_proj,o_proj,up_proj, anddown_projg_normattention_shift,recurrent_state, andmlp_shifttemp/rwkv_pth2st.py, includingblocks.0.ln0.* -> model.embedding_norm.*The RWKV math, raw formula parameters, canonical
head_size=64, FlashRWKV2 provider calls, Git-pinned tokenizer dependency, and support boundaries are unchanged. Qwen2Rwkv remains out of scope. External consumers such as vLLM will be updated separately to consume the new state-dict contract.Coordination
No repository issue owns this follow-up, and the repository owner requested the rename directly. Duplicate-work checks found no overlapping open PR in this repository. Upstream already has huggingface#47780 and issue huggingface#47787, so this PR targets only the rwkv-rs integration repository and does not create competing upstream work.
Validation
50 passed, 1 skipped11 passed1 passedrwkv-sha-pro6000x8, exact commit38fd0b212a1e, official pinned vocabulary:63 passed, 9 subtests passedmake typingmake check-repository-consistencyrwkvextra adds onlyFlashRWKV2==0.1.0a8make stylegit diff --checkBefore submitting