RWKVQuant: Quantizing the RWKV Family with Proxy Guided Hybrid of Scalar and Vector Quantization

Chen Xu, Yuxuan Yue, Zukang Xu, Xing Hu, Jiangyong Yu +4 more
5/2/2025
cs.LGcs.AI

No official code found. Best implementation: xuchen-dev/RWKVQuant (5 stars, last commit 2025-06-13).

Abstract

RWKV is a modern RNN architecture with comparable performance to Transformer, but still faces challenges when deployed to resource-constrained devices. Post Training Quantization (PTQ), which is a an essential technique to reduce model size and inference latency, has been widely used in Transformer models. However, it suffers significant degradation of performance when applied to RWKV. This paper investigates and identifies two key constraints inherent in the properties of RWKV: (1) Non-linear operators hinder the parameter-fusion of both smooth- and rotation-based quantization, introducing extra computation overhead. (2) The larger amount of uniformly distributed weights poses challenges for cluster-based quantization, leading to reduced accuracy. To this end, we propose RWKVQuant, a PTQ framework tailored for RWKV models, consisting of two novel techniques: (1) a coarse-to-fine proxy capable of adaptively selecting different quantization approaches by assessing the uniformity and identifying outliers in the weights, and (2) a codebook optimization algorithm that enhances the performance of cluster-based quantization methods for element-wise multiplication in RWKV. Experiments show that RWKVQuant can quantize RWKV-6-14B into about 3-bit with less than 1% accuracy loss and 2.14x speed up.

View on arXivView PDF

Code Implementations(1)

Code for Paper https://arxiv.org/abs/2505.03803

51C++, CudaJun 12, 20251 years ago

Similar Papers

Cite this paper

@article{xu2025rwkvquant,
  title  = {RWKVQuant: Quantizing the RWKV Family with Proxy Guided Hybrid of Scalar and Vector Quantization},
  author = {Chen Xu and Yuxuan Yue and Zukang Xu and Xing Hu and Jiangyong Yu and Zhixuan Chen and Sifan Zhou and Zhihang Yuan and Dawei Yang},
  year   = {2025},
  eprint = {2505.03803},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.03803v1},
  journal = {ICML 2025 2025}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.03803.svg)](https://codeofpaper.com/paper/2505.03803)

Discussion