Computer Science ›› 2026, Vol. 53 ›› Issue (11A): 260300067-1046.doi: 10.11896/jsjkx.260300067

• Computer Software & Architecture • Previous Articles     Next Articles

Migration and Optimization of RWKV-7 Network for Ascend AI Platform

LI Enze1, SHI Tao1, WANG Fuping1,2, SHEN Shunan1, WANG Zhaotong1, LI Xuan1   

  1. 1 School of Electrical Engineering and Automation,Tianjin University of Technology,Tianjin 300380,China
    2 Guangdong Laboratory of Artificial Intelligence and Digital Economy(Shenzhen),Greater Bay Area Ascend Computing Power Application Innovation Research Institute,Shenzhen,Guangdong 518000,China
  • Online:2026-11-16 Published:2026-11-16
  • About author:LI Enze,born in 2004,undergraduate student,is a member of CCF(No.A34716G).His main research interests include natural language processing and deep learning.
    SHI Tao,born in 1980,Ph.D,associate professor,master’s supervisor.His main research interests include bio-inspired intelligent computing and computer vision.
  • Supported by:
    This work was supported by the National Natural Science Foundation of China(62103298) and National College Students Innovationand Entrepreneurship Training Program(202410060008).

Abstract: The inference process of the RWKV(Receptance Weighted Key Value) network satisfies parallelism and has a time complexity of O(n).RWKV-7,the latest iteration in this series,receives limited support on the Ascend AI platform,constraining the architecture’s development within the Ascend ecosystem.In terms of implementation,RWKV-7 contains multiple identical computational expressions,with vector and matrix operations executed concurrently.To address these challenges,this paper ports the RWKV-7 network to the Ascend AI platform and proposes a network tuning strategy.Specifically,it designs a custom fusion operator tailored for vector computations.Finally,multi-dimensional performance evaluation experimentsare conducted on the Ascend 910B1 NPU chip,validating the effectiveness of the proposed approach.Results demonstrate that the custom operator achieves a local acceleration ratio of 4.81.The throughput of the RWKV-7-World-0.4B model increases from 15.87 tokens per second to 20.12 tokens per second.Single-token latency decreases from 63.01 milliseconds to 49.70 milliseconds.Compared to graph reconstruction alone,overall inference performance improves by 27%.Compared to the A100 GPU,the 910B1 demonstrates superior scalability for larger batches,achieving up to 121% higher throughput than the A100 in scenarios involving extremely large batch sizes.

Key words: Receptance Weighted Key Value, Ascend neural network processing unit, Custom operator, Mindspore, Model acceleration

CLC Number: 

  • TP391.1
[1] KHURANA D,KOLI A,KHATTER K,et al.Natural languageprocessing:state of the art,current trends and challenges[J].Multimedia tools and applications,2023,82(3):3713-3744.
[2] XU M,DU H,NIYATOD,et al.Unleashing the power of edge-cloud generative AI in mobile networks:A survey of AIGC services[J].IEEE Communications Surveys & Tutorials,2024,26(2):1127-1170.
[3] CHENG J,KANG H,SHAO Y,et al.Survey on Efficient Large Language Models:Principles,Algorithms,Applications,and Open Issues[J].IEEE Transactions on Neural Networks and Learning Systems,2026,37(5):2025-2045.
[4] VASWANI A,SHAZEER N,PARMAR N,et al.Attention isAll you Need[C]//Advances in Neural Information Processing Systems.Curran Associates,Inc.,2017.
[5] PENG B,ALCAIDE E,ANTHONYQ G,et al.RWKV:Reinven-ting RNNs for the Transformer Era[C]//The 2023 Conference on Empirical Methods in Natural Language Processing.2023:14048-14077.
[6] LIU Z,DESAI A,LIAO F,et al.Scissorhands:Exploiting thePersistence of Importance Hypothesis for LLM KV Cache Compression at Test Time[C]//OH A,NAUMANN T,GLOBERSON A,et al.Advances in Neural Information Processing Systems:Vol.36.Curran Associates,Inc.,2023:52342-52364.
[7] CHEN T,MOREAU T,JIANG Z,et al.TVM:An Automated End-to-End Optimizing Compiler for Deep Learning[C]//13th USENIX Symposium on Operating Systems Design and Implementation(OSDI 18).Carlsbad,CA:USENIX Association,2018:578-594.
[8] ZHENG L,JIA C,SUN M,et al.Ansor:Generating High-Per-formance Tensor Programs for Deep Learning[C]//14th USENIX Symposium on Operating Systems Design and Implementation(OSDI 20).USENIX Association,2020:863-879.
[9] JIANG X,WANG H,CHEN Y,et al.MNN:A Universal and Efficient Inference Engine[C]//Proceedings of Machine Learning and Systems.2020:1-13.
[10] LI M,LIU Y,LIU X,et al.The Deep Learning Compiler:A Comprehensive Survey[J].IEEE Transactions on Parallel and Distributed Systems,2021,32(3):708-727.
[11] ZHENG Q,XIA X,ZOU X,et al.CodeGeeX:A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-X[C]//Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining.New York,NY,USA:Association for Computing Machinery,2023:5673-5684.
[12] ZENG W,REN X,SU T,et al.PanGu-α:Large-scale Auto-regressive Pretrained Chinese Language Models with Auto-parallel Computation[EB/OL].(2021-04-26) [2026-02-04].https://arxiv.org/abs/2104.12369.
[13] PENG B,ZHANG R,GOLDSTEIN D,et al.RWKV-7“Goose” with Expressive Dynamic State Evolution[C]//Second Conference on Language Modeling.2025.https://openreview.net/forum?id=ayB1PACN5j.
[14] GHEISARI M,EBRAHIMZADEH F,RAHIMI M,et al.Deeplearning:Applications,architectures,models,tools,and frameworks:A comprehensive survey[J].CAAI Transactions on Intelligence Technology,2023,8(3):581-606.
[15] SHUVO M H,ISLAM S K,CHENG J,et al.Efficient Acceleration of Deep Learning Inference on Resource-Constrained Edge Devices:A Review[J].Proceedings of the IEEE,2023,111(1):42-91.
[16] NGUYEN G,DLUGOLINSKY S,BOBAK M,et al.Machine Learning and Deep Learning frameworks and libraries for large-scale data mining:a survey[J].Artificial Intelligence Review,2019,52(1):77-124.
[17] TAYE M M.Understanding of Machine Learning with DeepLearning:Architectures,Workflow,Applications and Future Directions[J].Computers,2023,12(5):91.
[18] FLORIDI L,CHIRIATTI M.GPT-3:Its Nature,Scope,Limits,and Consequences[J].Minds and Machines,2020,30(4):681-694.
[19] DEVLIN J,CHANG M W,LEEK,et al.BERT:Pretraining of Deep Bidirectional Transformers for Language Understanding[C]//BURSTEIN J,DORAN C,SOLORIO T.Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics:Human Language Technologies,Volume 1(Long and Short Papers).Minneapolis,Minnesota:Association for Computational Linguistics,2019:4171-4186.
[20] ROMBACH R,BLATTMANN A,LORENZD,et al.High-Resolution Image Synthesis With Latent Diffusion Models[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition(CVPR).2022:10684-10695.
[21] DEEPSEEK-AI,GUO D,YANG D,et al.DeepSeek-R1:In-centivizing Reasoning Capability in LLMs via Reinforcement Learning[EB/OL].(2026-01-04) [2026-02-04].https://arxiv.org/abs/2501.12948.
[22] YANG A,LI A,YANG B,et al.Qwen3 Technical Report[EB/OL].(2025-05-14) [2026-02-04].https://arxiv.org/abs/2505.09388.
[23] ZENG A,XU B,WANG B,et al.ChatGLM:A Family of Large Language Models from GLM-130B to GLM-4 All Tools[EB/OL].(2024-01-30) [2026-02-04].https://arxiv.org/abs/2406.12793.
[24] DUAN Y,WANG W,CHEN Z,et al.Vision-rwkv:Efficient and scalable visual perception with rwkv-like architectures[C]//International Conference on Learning Representations.2025,2025:83166-83182.
[25] YANG Z,LI J,ZHANG H,et al.Restore-RWKV:Efficient and Effective Medical Image Restoration With RWKV[J].IEEE Journal of Biomedical and Health Informatics,2026,30(1):513-526.
[26] FEI Z,FAN M,YU C,et al.Diffusion-RWKV:Scaling RWKV-Like Architectures for Diffusion Models[EB/OL].(2024-04-06) [2026-02-04].https://arxiv.org/abs/2404.04478.
[27] LU W Z,ZHANG F,HE Y X,et al.Evaluation and Optimization for Huawei Ascend Neural Network Accelerator[J].Chinese Journal of Computers,2022,45(8):1618-1637.
[28] GE H B,WANG D X,ZHENG T,et al.Study on Model Migration of Natural Language Processing for Domestic Deep Learning Platform[J].Computer Science,2024,51(1):50-59.
[29] LUO J,WANG H,ZHU Y J,et al.Optimization and Deployment of a Lightweight Traffic Sign Recognition System Based on YOLOv8n[EB/OL].Computer Applications and Software,1-11(2025-12-11) [2026-02-04].https://link.cnki.net/urlid/31.1260.TP.20251210.1431.006.
[30] ZHAO D D,LAI L,CHEN P,et al.Design and implementation of edge-based human action recognition algorithm based on ascend processor[J].Opto-Electronic Engineering,2024,51(6):240072.
[31] LIAO H,TU J,XIA J,et al.Ascend:a Scalable and Unified Architecture for Ubiquitous Deep Neural Network Computing:Industry Track Paper[C]//2021 IEEE International Symposium on High-Performance Computer Architecture(HPCA).2021:789-801.
[32] OH C S,CHUN K C,BYUN Y Y,et al.22.1 A 1.1V 16GB 640GB/s HBM2E DRAM with a Data-Bus Window-Extension Technique and a Synergetic On-Die ECC Scheme[C]//IEEE International Solid-State Circuits Conference(ISSCC 2020).2020:330-332.
[33] HE J X,LI Y W,LI R,et al.Design and Implementation of FFTOperator for Neural Network Processor-Taking Ascend910 as an Example[J].Telecommunication Engineering,2025,65(12):2160-2172.
[1] XIAO Yuhang, LI Guanfeng, CHEN Yuyin, QIN Jing. Few-shot Relation Extraction Model with Prototype Representation Enhanced by Entity Boundary Features [J]. Computer Science, 2026, 53(11A): 250900080-144.
[2] ZHANG Haijun, REN Linhao, ZHAO Xinyuan. Kazakh Aspect-based Sentiment Analysis Method Based on Adversarial Training and Dynamic Masked Attention [J]. Computer Science, 2026, 53(11A): 260700056-251.
[3] JIA Zishuo, ZHANG Jian’ge, HE Haofeng, FENG Shizhong, LIU Yilin. Survey on Mutually Augmenting Technologies and Applications of Large Models and KnowledgeGraphs [J]. Computer Science, 2026, 53(8): 219-228.
[4] ZHANG Yan, ZHOU Jian, HAN Lei, CHENG Chunling. Gate-controlled Agent Attention Mechanism-based Soft Prompt Transfer Method [J]. Computer Science, 2026, 53(7): 139-145.
[5] FENG Guang, LIN Jianzhong, ZHONG Ting, ZHOU Yuanhua, ZHENG Runting, LIU Tianxiang. Triple Extraction Based on Pixel Difference Convolutional Network and Attention Mechanism [J]. Computer Science, 2026, 53(6A): 250400136-10.
[6] ZHENG Mingkun, PANG Chunjiang, WANG Xinying. SoftLexicon-BERT-GlobalPointer-based Approach for Chinese Named Entity Recognition in High-voltage Circuit Breaker [J]. Computer Science, 2026, 53(6A): 250500048-6.
[7] FU Yue, SHI Wei. Social Text MBTI Personality Feature Recognition Method Based on Data Fusion and Deep Learning [J]. Computer Science, 2026, 53(6A): 250500101-8.
[8] LIU Suyi, LIU Qi, GAO Weibo. Agent4Stu:Efficient LLM-based Student Answer Behavior Simulation Agent [J]. Computer Science, 2026, 53(4): 347-355.
[9] LI Hao, DING Lizhong, FU Jiarun, LINGHU Zhaohuan. Data Compression of Instruction Fine-tuning for Large Models:Refinement Based on Inference Contribution [J]. Computer Science, 2026, 53(3): 136-142.
[10] QIN Jing, LI Guanfeng, CHEN Yuyin, XIAO Yuhang. Embedding Model of Knowledge Graph via Jointly Modeling Ontology and Instances [J]. Computer Science, 2026, 53(3): 331-340.
[11] BU Yunyang, QI Binting, BU Fanliang. Multimodal Sentiment Analysis for Interactive Fusion of Dual Perspectives Under Cross-modalInconsistent Perception [J]. Computer Science, 2026, 53(1): 187-194.
[12] LIU Qian, SUN Hu, GUI Yaocheng, ZHOU Guoqiang. Tropical Cyclone Forecasting Based on Cross-modal Fusion and Multi-generators [J]. Computer Science, 2025, 52(12): 81-91.
[13] LIAO Jinchao, YANG Weizhe, QIN Yongbin, HUANG Ruizhang, CHEN Yanping, ZHOU Yulin. Method for Generating Judgment Documents Based on Trial Logic [J]. Computer Science, 2025, 52(11): 223-229.
[14] FENG Guang, LIN Yibao, ZHONG Ting, ZHENG Runting, HUANG Junhui, LIU Tianxiang, YANG Yanru. Multimodal Sentiment Analysis Based on Dominant Attention and Multi-space Domain Information Collaboration [J]. Computer Science, 2025, 52(11A): 250200022-9.
[15] HUANG Chao, CHENG Chunling, WANG Youkang. Source-free Domain Adaptation Method Based on Pseudo Label Uncertainty Estimation [J]. Computer Science, 2025, 52(9): 212-219.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!