Research paper: LoRA placement determines continual learning outcomes in hybrid SSM-attention models (Qwen3.5, Jamba). Attention-only LoRA → 9x lower perplexity, 5.6x fewer params.
0
stars
2
commits
Python
primary language
Apr 26, 2026
updated

Research paper on where to place LoRA adapters when fine-tuning hybrid state-space-model + attention architectures (Qwen3.5, Jamba) for continual learning.
Paper: main.pdf · LaTeX source: main.tex
Hybrid architectures like Qwen3.5 (DeltaNet + attention) and Jamba (Mamba + attention) are increasingly common. When you LoRA-finetune them for continual learning across multiple domains, which layer types should get adapters?
We tested four strategies across two models, two hardware platforms, and three seeds:
Findings:
SSM and attention layers appear to play fundamentally different roles in hybrid models. For continual learning, adapt the attention layers; for preserving general capability, don't.
Models:
Continual-learning protocol: Train sequentially on four domains — Code (The Stack), Science (arXiv abstracts), Conversation (ShareGPT), Math (GSM8K) — evaluating perplexity on all four after each.
Platforms: Apple MLX (M-series) and NVIDIA CUDA (H100 via Modal), to rule out platform-specific artifacts.
Evaluation: Per-domain perplexity + MMLU for general-knowledge retention.
![]() | ![]() |
| Main result: placement drives CL outcomes | Forgetting trajectory by layer target |
![]() | ![]() |
| MMLU retention vs placement | Plasticity-stability tradeoff |
# Install
pip install modal torch transformers peft datasets
# Run on Modal (H100)
modal run modal_peft_paper.py --model qwen # Qwen3.5-0.8B, ~30 min, ~$2
modal run modal_peft_paper.py --model jamba # Jamba-3B, ~90 min, ~$6
Raw results land in results/modal/. Aggregated results in results_cache/.
To regenerate figures from the results:
python generate_figures.py
| Path | What it is |
|---|---|
main.tex, main.pdf | The paper (NeurIPS 2023 preprint format) |
figures/ | 5 final figures |
neurips_2023.sty | Style file |
modal_peft_paper.py | Main experiment runner on Modal |
experiments/run_real_data.py | Local/pod experiment variant |
experiments/setup_pod.sh | Pod provisioning script |
generate_figures.py | Regenerate figures from JSON results |
results/, results_cache/ | Experiment outputs (JSON) |
KEY_CITATIONS.md | Citations with notes |
peft-hybrid-paper-arxiv-*.tar.gz | Arxiv submission bundle |
If this work is useful to you:
@misc{gouru2026lora_placement,
title = {Stop Tuning the Dynamics: LoRA Placement Determines Continual Learning Outcomes in Hybrid SSM-Attention Models},
author = {Gouru, Sri Harsha},
year = {2026},
note = {arXiv preprint}
}
Paper complete and packaged for arXiv submission. This repo is the working directory; the arXiv bundle is peft-hybrid-paper-arxiv-20260318.tar.gz.
Code: MIT. Paper text: CC-BY-4.0.
2 commits
Python
54.4%
TeX
44.3%
Shell
1.3%
Research paper: LoRA placement determines continual learning outcomes in hybrid SSM-attention models (Qwen3.5, Jamba). Attention-only LoRA → 9x lower perplexity, 5.6x fewer params.
0
stars
2
commits
Python
primary language
Apr 26, 2026
updated

Research paper on where to place LoRA adapters when fine-tuning hybrid state-space-model + attention architectures (Qwen3.5, Jamba) for continual learning.
Paper: main.pdf · LaTeX source: main.tex
Hybrid architectures like Qwen3.5 (DeltaNet + attention) and Jamba (Mamba + attention) are increasingly common. When you LoRA-finetune them for continual learning across multiple domains, which layer types should get adapters?
We tested four strategies across two models, two hardware platforms, and three seeds:
Findings:
SSM and attention layers appear to play fundamentally different roles in hybrid models. For continual learning, adapt the attention layers; for preserving general capability, don't.
Models:
Continual-learning protocol: Train sequentially on four domains — Code (The Stack), Science (arXiv abstracts), Conversation (ShareGPT), Math (GSM8K) — evaluating perplexity on all four after each.
Platforms: Apple MLX (M-series) and NVIDIA CUDA (H100 via Modal), to rule out platform-specific artifacts.
Evaluation: Per-domain perplexity + MMLU for general-knowledge retention.
![]() | ![]() |
| Main result: placement drives CL outcomes | Forgetting trajectory by layer target |
![]() | ![]() |
| MMLU retention vs placement | Plasticity-stability tradeoff |
# Install
pip install modal torch transformers peft datasets
# Run on Modal (H100)
modal run modal_peft_paper.py --model qwen # Qwen3.5-0.8B, ~30 min, ~$2
modal run modal_peft_paper.py --model jamba # Jamba-3B, ~90 min, ~$6
Raw results land in results/modal/. Aggregated results in results_cache/.
To regenerate figures from the results:
python generate_figures.py
| Path | What it is |
|---|---|
main.tex, main.pdf | The paper (NeurIPS 2023 preprint format) |
figures/ | 5 final figures |
neurips_2023.sty | Style file |
modal_peft_paper.py | Main experiment runner on Modal |
experiments/run_real_data.py | Local/pod experiment variant |
experiments/setup_pod.sh | Pod provisioning script |
generate_figures.py | Regenerate figures from JSON results |
results/, results_cache/ | Experiment outputs (JSON) |
KEY_CITATIONS.md | Citations with notes |
peft-hybrid-paper-arxiv-*.tar.gz | Arxiv submission bundle |
If this work is useful to you:
@misc{gouru2026lora_placement,
title = {Stop Tuning the Dynamics: LoRA Placement Determines Continual Learning Outcomes in Hybrid SSM-Attention Models},
author = {Gouru, Sri Harsha},
year = {2026},
note = {arXiv preprint}
}
Paper complete and packaged for arXiv submission. This repo is the working directory; the arXiv bundle is peft-hybrid-paper-arxiv-20260318.tar.gz.
Code: MIT. Paper text: CC-BY-4.0.
2 commits
Python
54.4%
TeX
44.3%
Shell
1.3%