MoLoRA: Composable Specialization via Per-Token Adapter Routing
Abstract
Multi-adapter serving systems route entire sequences to a single adapter, forcing a choice when requests span multiple domains. This assumption fails in two important settings: (1) multimodal generation, where text and image tokens require different adapters within the same sequence, and (2) mixed-capability requests like "write code to solve this equation," which need expertise from multiple specialized adapters. We introduce per-token routing, which routes individual tokens to adapters based on either vocabulary structure (for multimodal models) or learned gating (for semantic specialization). Per-token routing is provably optimal, achieving work N for N tokens versus K \cdot N for per-sequence routing with K adapter types. Our key contribution is MoLoRA (Mixture of LoRA), which enables composable specialization: load multiple domain-specific adapters and let a learned router select the appropriate adapter per-token. We demonstrate that specialization dramatically beats scale: MoLoRA enables Qwen3-1.7B to exceed Qwen3-8B across four reasoning benchmarks while being 4.7x smaller. This enables modular expertise at inference time: train focused LoRAs independently, combine them without retraining, and add new capabilities by simply loading new adapters.
Figures & tables
| Component | Vocabulary Routing | MoLoRA |
|---|---|---|
| Routing decision | ||
| Routing cost | ||
| Identical Infrastructure (Reused) | ||
| Histogram computation | ✓ | ✓ |
| Pointer arrays | ✓ | ✓ |
| Grouped GEMM dispatch | ✓ | ✓ |
| Adapters | Indirect | Direct | Speedup |
|---|---|---|---|
| 4 | 0.215ms | 0.196ms | 1.10 |
| 8 | 0.228ms | 0.194ms | 1.17 |
| 16 | 0.227ms | 0.201ms | 1.13 |
| 32 | 0.232ms | 0.207ms | 1.12 |
| 64 | 0.258ms | 0.218ms | 1.18 |
| Average | 1.14 |
| Routing | Passes | Latency | Latency/Pass |
|---|---|---|---|
| Per-sequence ( =4) | 4 | 5.88ms | 1.47ms |
| Per-token | 1 | 1.43ms | 1.43ms |
| Speedup | 4 | 4.1 | — |
| Configuration | Latency | vs Baseline | Incremental | Source |
|---|---|---|---|---|
| Per-seq + Paging | 7.48ms | 1.0 | — | Baseline |
| Per-seq + Hot-set | 5.88ms | 1.3 | 1.3 | Paging eliminated |
| Per-token + Hot-set | 1.43ms | 5.2 | 4.1 | Passes: |
| Per-token + Graph | 1.36ms | 5.5 | 1.05 | Launch overhead |
| Scenario | Batch | Seq | Per-Seq | Per-Token | Speedup |
|---|---|---|---|---|---|
| Diverse adapters | 4 | 128 | 179.0ms | 41.5ms | 4.3 |
| Diverse adapters | 8 | 128 | 178.7ms | 43.4ms | 4.1 |
| Uniform (best S-LoRA) | 8 | 256 | 178.1ms | 79.8ms | 2.2 |
| Single adapter | 8 | 256 | 80.3ms | 80.0ms | 1.0 |
| Distribution | Per-Token | Per-Sequence | Speedup |
|---|---|---|---|
| Interleaved, text-heavy | 0.23ms | 5.94ms | 26.0 |
| Interleaved, balanced | 0.24ms | 12.79ms | 52.7 |
| Separated (control) | 0.24ms | 1.81ms | 7.5 |
| Average | 28.7 |
| Config | Batch | Per-Token | Per-Seq Sim | Speedup |
|---|---|---|---|---|
| =1024, =2 | 16 512 | 14.5ms | 57.7ms | 4.0 |
| =2048, =4 | 4 512 | 17.3ms | 68.8ms | 4.0 |
| =4096, =4 | 16 512 | 121.6ms | 488.0ms | 4.0 |
| Method | Passes | Latency | Speedup |
|---|---|---|---|
| Per-Sequence ( =2) | 2 | 5.18ms | 1.0 |
| Per-Token | 1 | 3.14ms | 1.65 |
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
| Distribution | Fixed (64 64) | Adaptive | Speedup |
|---|---|---|---|
| Uniform (25% each) | 0.412ms | 0.398ms | 1.04 |
| Skewed (80/10/5/5) | 0.456ms | 0.389ms | 1.17 |
| Extreme (95/2/2/1) | 0.521ms | 0.372ms | 1.40 |
| Concept | MoE | Multi-Adapter |
|---|---|---|
| Routing function | or | |
| Routing cost | (learned) | (deterministic) |
| Routing decision | Per-token, learned | Per-sequence or per-token |
| Targets | Experts | Adapters |
| Weight shape | for ; for | |
| Capacity | Expert capacity | Adapter memory budget |
| Batch | Eager CV | Graph CV | Paging CV |
|---|---|---|---|
| 32 | 0.52 | 0.03 | 0.63 |
| 64 | 0.68 | 0.33 | 0.32 |
| 128 | 0.34 | 0.12 | 0.12 |
| 256 | 0.01 | 0.07 | 0.18 |
| Scenario | Vocab Routing | MoLoRA |
|---|---|---|
| Chameleon-style (disjoint vocab) | ✓ | ✓ |
| Encoder-based multimodal (LLaVA, Flamingo) | ✗ | ✓ |
| Semantic specialization (code/math/prose) | ✗ | ✓ |
| Sub-modality granularity (photo/diagram/chart) | ✗ | ✓ |
| Multi-attribute routing (modality domain) | ✗ | ✓ |
| Model | Adapters | top- | Train Loss | Val Loss |
|---|---|---|---|---|
| Single Adapter | 1 | – | 3.008 | 3.435 |
| Fixed (Oracle) | 3 | 1 | 2.588 | 3.819 |
| MoLoRA | 4 | 2 | 2.861 | 3.555 |
| MoLoRA-L | 8 | 3 | 2.783 | 3.599 |
| Epoch | ARI | NMI | Routing Entropy |
|---|---|---|---|
| 0 (random) | 0.27 | 0.37 | 1.35 |
| 20 | 0.72 | 0.86 | 0.09 |
| 99 (converged) | 0.71 | 0.84 | 0.18 |
| Domain | Adapter 0 | Adapter 1 | Adapter 2 |
|---|---|---|---|
| Code | 0.0% | 100% | 0.0% |
| Math | 0.0% | 0.0% | 100% |
| Prose | 100% | 0.0% | 0.0% |
| Model | Latency (ms) | Throughput (M tok/s) | Overhead |
|---|---|---|---|
| Single Adapter | 0.082 | 49.7 | 1.0 |
| Fixed Routing | 0.894 | 4.6 | 10.9 |
| MoLoRA | 0.995 | 4.1 | 12.1 |
| MoLoRA | 2.267 | 1.8 | 27.6 |
| MoLoRA | 4.001 | 1.0 | 48.8 |
| Content Type | Adapter 0 | Adapter 1 | Adapter 2 | Adapter 3 |
|---|---|---|---|---|
| Code | 98.6% | 0.0% | 0.0% | 1.4% |
| Math | 0.0% | 96.6% | 0.5% | 3.0% |
| Creative | 0.0% | 0.0% | 98.8% | 1.2% |
| Technical | 0.3% | 0.3% | 0.2% | 99.2% |
LLM Routing
Large language model routing selects models, tools, experts, or inference strategies to balance answer quality, cost, latency, and deployment constraints.
See all 349 papers