{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/eagle-and-finch-rwkv-with-matrix-valued","title":"Eagle and Finch: RWKV with Matrix-Valued States and Dynamic Recurrence","arxiv_id":"2404.05892","date":"2024-04-08","proceeding":null,"authors":["Bo Peng","Daniel Goldstein","Quentin Anthony","Alon Albalak","Eric Alcaide","Stella Biderman","Eugene Cheah","Xingjian Du","Teddy Ferdinan","Haowen Hou","Przemysław Kazienko","Kranthi Kiran GV","Jan Kocoń","Bartłomiej Koptyra","Satyapriya Krishna","Ronald McClelland Jr.","Jiaju Lin","Niklas Muennighoff","Fares Obeid","Atsushi Saito","Guangyu Song","Haoqin Tu","Cahya Wirawan","Stanisław Woźniak","Ruichong Zhang","Bingchen Zhao","Qihang Zhao","Peng Zhou","Jian Zhu","Rui-Jie Zhu"],"abstract":"We present Eagle (RWKV-5) and Finch (RWKV-6), sequence models improving upon the RWKV (RWKV-4) architecture. Our architectural design advancements include multi-headed matrix-valued states and a dynamic recurrence mechanism that improve expressivity while maintaining the inference efficiency characteristics of RNNs. We introduce a new multilingual corpus with 1.12 trillion tokens and a fast tokenizer based on greedy matching for enhanced multilinguality. We trained four Eagle models, ranging from 0.46 to 7.5 billion parameters, and two Finch models with 1.6 and 3.1 billion parameters and find that they achieve competitive performance across a wide variety of benchmarks. We release all our models on HuggingFace under the Apache 2.0 license. Models at: https://huggingface.co/RWKV Training code at: https://github.com/RWKV/RWKV-LM Inference code at: https://github.com/RWKV/ChatRWKV Time-parallel training code at: https://github.com/RWKV/RWKV-infctx-trainer","url_abs":"https://arxiv.org/abs/2404.05892v4","url_pdf":"https://arxiv.org/pdf/2404.05892v4.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"eagle-and-finch-rwkv-with-matrix-valued","repo_url":"https://github.com/rwkv/rwkv-lm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"eagle-and-finch-rwkv-with-matrix-valued","repo_url":"https://github.com/rwkv/rwkv-infctx-trainer","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"eagle-and-finch-rwkv-with-matrix-valued","repo_url":"https://github.com/BlinkDL/RWKV-LM","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"eagle-and-finch-rwkv-with-matrix-valued","repo_url":"https://github.com/blinkdl/chatrwkv","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"eagle-and-finch-rwkv-with-matrix-valued","repo_url":"https://github.com/howard-hou/visualrwkv","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"eagle-and-finch-rwkv-with-matrix-valued","repo_url":"https://github.com/sustcsonglin/flash-linear-attention","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[{"method_slug":"finch","method_name":"FINCH"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2404.05892","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2404.05892"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/blinkdl/chatrwkv","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/sustcsonglin/flash-linear-attention","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/howard-hou/visualrwkv","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/BlinkDL/RWKV-LM","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/rwkv/rwkv-infctx-trainer","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/rwkv/rwkv-lm","reach":null}],"summary":{"ran_honours":2,"ran":6,"ran_draft_wrong":2,"ran_violates":1,"unverified":7},"by_repo_kind":{"official":{"samples":8,"ran":7,"repositories":1},"listed":{"samples":8,"ran":3,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":2,"samples":[{"code_sha256_prefix":"6dbf1b2a5b901370","entry":"atoi","repo":"rwkv/rwkv-infctx-trainer","repo_kind":"official","path":"RWKV-v4neo/export_checkpoint.py","file_url":"https://github.com/rwkv/rwkv-infctx-trainer/blob/HEAD/RWKV-v4neo/export_checkpoint.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6dbf1b2a5b901370"}},{"code_sha256_prefix":"7e9cf65e078afda5","entry":"batch","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"7e9cf65e078afda5"}},{"code_sha256_prefix":"11c5ed2fecc546bc","entry":"extract_model_sizing","repo":"rwkv/rwkv-infctx-trainer","repo_kind":"official","path":"RWKV-v5/merge_model.py","file_url":"https://github.com/rwkv/rwkv-infctx-trainer/blob/HEAD/RWKV-v5/merge_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"11c5ed2fecc546bc"}},{"code_sha256_prefix":"42a46570620cd9fa","entry":"get_chunk","repo":"howard-hou/visualrwkv","repo_kind":"listed","path":"VisualRWKV-v7/v7.10/evaluate_imagenet.py","file_url":"https://github.com/howard-hou/visualrwkv/blob/HEAD/VisualRWKV-v7/v7.10/evaluate_imagenet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"42a46570620cd9fa"}},{"code_sha256_prefix":"724ff294a540dd58","entry":"get_model_state_file","repo":"rwkv/rwkv-infctx-trainer","repo_kind":"official","path":"RWKV-v4neo/export_checkpoint.py","file_url":"https://github.com/rwkv/rwkv-infctx-trainer/blob/HEAD/RWKV-v4neo/export_checkpoint.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"724ff294a540dd58"}},{"code_sha256_prefix":"bae18947b56f2be1","entry":"is_none","repo":"howard-hou/visualrwkv","repo_kind":"listed","path":"VisualRWKV-v7/v7.10/evaluate_imagenet.py","file_url":"https://github.com/howard-hou/visualrwkv/blob/HEAD/VisualRWKV-v7/v7.10/evaluate_imagenet.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bae18947b56f2be1"}},{"code_sha256_prefix":"ebc8c0c4b0dd08d7","entry":"is_torch_version_above","repo":"rwkv/rwkv-infctx-trainer","repo_kind":"official","path":"RWKV-v5/merge_model.py","file_url":"https://github.com/rwkv/rwkv-infctx-trainer/blob/HEAD/RWKV-v5/merge_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ebc8c0c4b0dd08d7"}},{"code_sha256_prefix":"7052cf0436949e37","entry":"natural_keys","repo":"rwkv/rwkv-infctx-trainer","repo_kind":"official","path":"RWKV-v4neo/export_checkpoint.py","file_url":"https://github.com/rwkv/rwkv-infctx-trainer/blob/HEAD/RWKV-v4neo/export_checkpoint.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7052cf0436949e37"}},{"code_sha256_prefix":"9be3b38229ea83f1","entry":"remove_arg","repo":"rwkv/rwkv-infctx-trainer","repo_kind":"official","path":"RWKV-v4neo/lightning_trainer.py","file_url":"https://github.com/rwkv/rwkv-infctx-trainer/blob/HEAD/RWKV-v4neo/lightning_trainer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9be3b38229ea83f1"}},{"code_sha256_prefix":"d5c10826ac434df9","entry":"safe_getmtime","repo":"rwkv/rwkv-infctx-trainer","repo_kind":"official","path":"RWKV-v4neo/lightning_trainer.py","file_url":"https://github.com/rwkv/rwkv-infctx-trainer/blob/HEAD/RWKV-v4neo/lightning_trainer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d5c10826ac434df9"}},{"code_sha256_prefix":"076c252c52cbb161","entry":"split_list","repo":"howard-hou/visualrwkv","repo_kind":"listed","path":"VisualRWKV-v7/v7.10/evaluate_imagenet.py","file_url":"https://github.com/howard-hou/visualrwkv/blob/HEAD/VisualRWKV-v7/v7.10/evaluate_imagenet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"076c252c52cbb161"}},{"code_sha256_prefix":"4ba3321ca44d1608","entry":"RUN_CUDA_RWKV7g","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"4ba3321ca44d1608"}},{"code_sha256_prefix":"104b35c3b39791a5","entry":"mm8","repo":"howard-hou/visualrwkv","repo_kind":"listed","path":"VisualRWKV-v5/v5.0/app/modeling_rwkv.py","file_url":"https://github.com/howard-hou/visualrwkv/blob/HEAD/VisualRWKV-v5/v5.0/app/modeling_rwkv.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"104b35c3b39791a5"}},{"code_sha256_prefix":"8eac478d61506b5f","entry":"postprocess_response","repo":"howard-hou/visualrwkv","repo_kind":"listed","path":"VisualRWKV-v4/visualrwkv/utlis.py","file_url":"https://github.com/howard-hou/visualrwkv/blob/HEAD/VisualRWKV-v4/visualrwkv/utlis.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8eac478d61506b5f"}},{"code_sha256_prefix":"318323826333116c","entry":"process_image_tokens_in_conversations","repo":"howard-hou/visualrwkv","repo_kind":"listed","path":"VisualRWKV-v5/v5.0/src/dataset.py","file_url":"https://github.com/howard-hou/visualrwkv/blob/HEAD/VisualRWKV-v5/v5.0/src/dataset.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"318323826333116c"}},{"code_sha256_prefix":"cc677555aff432ba","entry":"process_tokens_in_conversations","repo":"howard-hou/visualrwkv","repo_kind":"listed","path":"VisualRWKV-v5/v5.0/src/dataset.py","file_url":"https://github.com/howard-hou/visualrwkv/blob/HEAD/VisualRWKV-v5/v5.0/src/dataset.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"cc677555aff432ba"}},{"code_sha256_prefix":"53e7893ddf933fd7","entry":"tokenize_with_image_token","repo":"howard-hou/visualrwkv","repo_kind":"listed","path":"VisualRWKV-v5/v5.0/src/dataset.py","file_url":"https://github.com/howard-hou/visualrwkv/blob/HEAD/VisualRWKV-v5/v5.0/src/dataset.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"53e7893ddf933fd7"}},{"code_sha256_prefix":"c0225dc209938689","entry":"torch_load_model","repo":"rwkv/rwkv-infctx-trainer","repo_kind":"official","path":"RWKV-v5/merge_model.py","file_url":"https://github.com/rwkv/rwkv-infctx-trainer/blob/HEAD/RWKV-v5/merge_model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c0225dc209938689"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}