Share transformer layers intelligently to slash model size while preserving accuracy.
Nice paper from @GoogleDeepMind
Recursive Transformers with layer-wise LoRA achieve full-model performance using half the parameters
π https://arxiv.org/abs/2410.20672
π― Original Problem:
Parameter sharing in LLMs has shown promise for reducing model size, but its effectiveness remains limited in modern architectures. Current approaches struggle to maintain performance while reducing parameters.
-----
π§ Solution in this Paper:
β’ Introduces Recursive Transformers that share parameters across recursively looped blocks of layers
β’ Adds layer-specific LoRA modules to allow flexibility in parameter sharing
β’ Proposes novel initialization techniques:
- Stepwise: Selects layers at intervals while keeping first/last fixed
- Average: Initializes by averaging tied layer weights
- Lower: Uses weights from first K layers
β’ Introduces Continuous Depth-wise Batching for parallel computation across depths
β’ Implements early-exiting mechanism for efficient inference
-----
π‘ Key Insights:
β’ Parameter sharing with careful initialization can maintain performance while reducing model size
β’ Layer-specific LoRA modules provide flexible trade-off between model size and accuracy
β’ Continuous batching across depths enables significant throughput improvements
β’ Early-exiting combined with recursive architecture amplifies serving efficiency
-----
π Results:
β’ Recursive Gemma 1B showed 13.5% accuracy improvement over non-recursive baselines
β’ Achieved 2-3x throughput improvement through continuous depth-wise batching
β’ Matched performance of original full-size model trained on 3T tokens using only 60B tokens
β’ Successfully reduced model size by 50% while maintaining competitive performance










