{"id":46290,"library":"rwkv","title":"RWKV Language Model","description":"Python library for the RWKV language model, a RNN with transformer-level performance. Current version 0.8.32. Stable release cadence.","status":"active","version":"0.8.32","language":"python","source_language":"en","source_url":"https://github.com/BlinkDL/ChatRWKV","tags":["rwkv","llm","transformer","rnn"],"install":[{"cmd":"pip install rwkv","lang":"bash","label":"PyPI stable"}],"dependencies":[{"reason":"Required for model inference","package":"torch","optional":false}],"imports":[{"wrong":"from rwkv.model import RWKV","symbol":"RWKV","correct":"import rwkv"}],"quickstart":{"code":"import os\nimport torch\nfrom rwkv.model import RWKV\nfrom rwkv.utils import PIPELINE, PIPELINE_ARGS\n\n# Use environment variable for model path, with fallback\nmodel_path = os.environ.get('RWKV_MODEL_PATH', './RWKV-4-World-0.4B-v1-20230806-ctx4096.pth')\ntokenizer_path = os.environ.get('RWKV_TOKENIZER_PATH', './20B_tokenizer.json')\n\nmodel = RWKV(model=model_path, strategy='cuda fp16')\npipeline = PIPELINE(model, tokenizer_path)\n\n# Run inference\ncontext = \"\\nThe universe is\"\nstate = None\nout_tokens = []\nfor i in range(100):\n    tokens = pipeline.encode(context) if i == 0 else [token]\n    out, state = model.forward(tokens, state)\n    token = pipeline.sample_logits(out, temperature=1.0, top_p=0.85)\n    out_tokens += [token]\n    context = pipeline.decode(out_tokens)\nprint(context)","lang":"python","description":"Basic text generation with RWKV model. Requires a .pth model file and tokenizer.json."},"warnings":[{"fix":"Use 'cuda fp16' for Int8 quantization is no longer supported; use 'cuda fp16' or 'cuda fp32'.","message":"Strategy argument changed: from 'cuda fp16i8' to 'cuda fp16' or 'cuda fp32'. The 'fp16i8' strategy was removed in v0.7.","severity":"breaking","affected_versions":">=0.7"},{"fix":"Download updated model files from Hugging Face or the official repository.","message":"Model file format changed: old .pth files from v0.4 are incompatible with v0.8+.","severity":"breaking","affected_versions":">=0.8"},{"fix":"Download '20B_tokenizer.json' from https://github.com/BlinkDL/ChatRWKV and provide path.","message":"Tokenizer file path must be absolute or relative to current working directory. The default tokenizer.json is not bundled; you need to download it separately.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.8.32':20 'cadenc':23 'current':18 'languag':2,9 'level':16 'librari':5 'llm':25 'model':3,10 'perform':17 'python':4 'releas':22 'rnn':12,27 'rwkv':1,8,24 'stabl':21 'transform':15,26 'transformer-level':14 'version':19","created_at":"2026-06-07T12:59:12.328402+00:00","updated_at":"2026-06-07T12:59:12.328402+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/BlinkDL/ChatRWKV","github":"https://github.com/BlinkDL/ChatRWKV","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}