Wonjun Kang1,2*, Kevin Galim2*, Yuchen Zeng3*, Minjae Lee2, Hyung Il Koo2,4, Nam Ik Cho1
1Seoul National University, 2FuriosaAI, 3UW-Madison, 4Ajou University
Paper Link: arXiv
State Space Models (SSMs) have emerged as efficient alternatives to Transformers, mitigating their quadratic computational cost. However, the application of Parameter-Efficient Fine-Tuning (PEFT) methods to SSMs remains largely unexplored. In particular, prompt-based methods like Prompt Tuning and Prefix-Tuning, which are widely used in Transformers, do not perform well on SSMs. To address this, we propose state-based methods as a superior alternative to prompt-based methods. This new family of methods naturally stems from the architectural characteristics of SSMs. State-based methods adjust state-related features directly instead of depending on external prompts. Furthermore, we introduce a novel state-based PEFT method: State-offset Tuning. At every timestep, our method directly affects the state at the current step, leading to more effective adaptation. Through extensive experiments across diverse datasets, we demonstrate the effectiveness of our method.
- [03/05/25] Code released.
-
Install dependencies
# Create env conda create -n mamba-ssm python=3.10 conda activate mamba-ssm # Install pytorch, e.g., conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.6 -c pytorch -c nvidia pip install "numpy<2" # Install mamba pip install "causal-conv1d==1.2.0.post2" cd src/mamba pip install -e . --no-build-isolation cd - # Install requirements pip install -r requirements.txt pip install peft==0.9.0 accelerate --no-deps
-
For Spider evaluation, download Spider and extract to "data/xlangai_spider/spider"
# train
python run_all.py train.py --device 0 --cfg cfg/final/exps/mamba-*/*/*.yaml