Views
No views yet
rwkv7-g1d-0.1b-20260129-ctx8192.pth. Release v0.9.0 contains the complete readable,
pure-PyTorch reference implementation next to the weights. Normal inference
does not require rwkv7-hf, FLA, a custom CUDA wheel, JIT, or CUDA Graphs.python -m pip install torch transformers1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4model_id = "wangyue114514/rwkv7-g1d-0.1b-hf"
5revision = "v0.9.0"
6tokenizer = AutoTokenizer.from_pretrained(
7 model_id, revision=revision, trust_remote_code=True
8)
9model = AutoModelForCausalLM.from_pretrained(
10 model_id, revision=revision, trust_remote_code=True, torch_dtype="auto"
11).eval()
12device = "cuda" if torch.cuda.is_available() else "cpu"
13model = model.to(device)
14inputs = tokenizer("The future of recurrent language models is", return_tensors="pt")
15inputs = {key: value.to(device) for key, value in inputs.items()}
16with torch.inference_mode():
17 tokens = model.generate(**inputs, max_new_tokens=32)
18print(tokenizer.decode(tokens[0], skip_special_tokens=True))trust_remote_code=True loads the checked-in files
configuration_rwkv7.py, cache_rwkv7.py, ops_rwkv7.py,
modeling_rwkv7.py, and tokenization_rwkv7.py. The recurrent state has the
canonical [batch, heads, key, value] layout. Cache lifecycle, loss, padding,
generation, gradients, and the layer structure are visible in those files.AutoModelForCausalLM contract and supports
Trainer, Accelerate, PEFT LoRA, TRL SFT/DPO/GRPO, and lm_eval through the
ordinary Transformers path. Set model.config.use_cache = False during
training. Reproducible examples and evaluation manifests are in
123123213weqw/hf-adapter.v0.9.0 model code intentionally favors readability and compatibility.
It is the correctness/reference path, not a peak-throughput benchmark backend.
Optional CUDA Graph and Triton work is maintained separately on
perf/optional-native-backend-v0.10; older CUDA/JIT/quantization and KV-v2
experiments remain on perf/native-kernels-v0.8. Neither branch changes this
model repository's public HF contract.e10d7b1930c2644c5c6b194444774d6d82ec8212a78763493149de09aac7d83fb8438cab0dc7d11238942efca4c05135d53fcaf8v0.9.0conversion_manifest.json retains the immutable original conversion and
weight provenance. v0.9.0 changes the checked-in runtime code and config only;
the safetensors bytes are not rewritten or re-uploaded.LICENSE.