[Paper Review] Dancing along Battery: Enabling Transformer with Run-time Reconfigurability on Mobile Devices
This paper proposes RT³, a two-level AutoML framework that combines block-structured pruning (BP) and reinforcement learning-based pattern pruning (PP) to enable run-time reconfigurability of Transformer models on mobile devices. By integrating hardware (DVFS) and software (dynamic pattern sets) reconfiguration, RT³ achieves over 4.9× battery life extension with less than 1% accuracy loss on Transformers and 1.5% on DistilBERT, while maintaining real-time performance through sub-45ms model switching.
A pruning-based AutoML framework for run-time reconfigurability, namely RT3, is proposed in this work. This enables Transformer-based large Natural Language Processing (NLP) models to be efficiently executed on resource-constrained mobile devices and reconfigured (i.e., switching models for dynamic hardware conditions) at run-time. Such reconfigurability is the key to save energy for battery-powered mobile devices, which widely use dynamic voltage and frequency scaling (DVFS) technique for hardware reconfiguration to prolong battery life. In this work, we creatively explore a hybrid block-structured pruning (BP) and pattern pruning (PP) for Transformer-based models and first attempt to combine hardware and software reconfiguration to maximally save energy for battery-powered mobile devices. Specifically, RT3 integrates two-level optimizations: First, it utilizes an efficient BP as the first-step compression for resource-constrained mobile devices; then, RT3 heuristically generates a shrunken search space based on the first level optimization and searches multiple pattern sets with diverse sparsity for PP via reinforcement learning to support lightweight software reconfiguration, which corresponds to available frequency levels of DVFS (i.e., hardware reconfiguration). At run-time, RT3 can switch the lightweight pattern sets within 45ms to guarantee the required real-time constraint at different frequency levels. Results further show that RT3 can prolong battery life over 4x improvement with less than 1% accuracy loss for Transformer and 1.5% score decrease for DistilBERT.
Motivation & Objective
- To address the challenge of deploying large, accurate Transformer models on energy-constrained mobile devices with real-time performance.
- To enable dynamic hardware and software reconfiguration at runtime to adapt to fluctuating power and performance demands.
- To jointly optimize model compression, energy efficiency, and inference latency for mobile deployment.
- To develop a scalable, automated framework that supports lightweight model switching across multiple frequency levels.
Proposed method
- RT³ employs block-structured pruning (BP) as a first-step compression to reduce model size and create a 'hot' search start for subsequent pattern pruning.
- It uses a heuristic to generate a shrunken search space of pattern sets based on the BP-processed model, reducing redundant RL training and search cost.
- Reinforcement learning (RL) is applied to search for optimal pattern sets with diverse sparsity levels, corresponding to available DVFS frequency levels.
- The framework enables runtime switching between lightweight pattern sets in under 45ms, satisfying real-time constraints.
- Hardware reconfiguration via DVFS is combined with software reconfiguration via pattern sets to maximize energy savings.
- The backbone model remains fixed after BP, ensuring consistent accuracy across all pattern sets during runtime switching.
Experimental results
Research questions
- RQ1Can a hybrid pruning strategy combining block-structured and pattern pruning effectively compress Transformer models while preserving accuracy?
- RQ2Can reinforcement learning efficiently search for optimal pattern sets within a reduced search space to enable lightweight software reconfiguration?
- RQ3How can hardware (DVFS) and software (pattern sets) reconfiguration be jointly optimized to maximize energy savings on mobile devices?
- RQ4To what extent can run-time reconfigurability maintain model accuracy while extending battery life in resource-constrained environments?
Key findings
- RT³ achieves a 4.96× improvement in battery lifetime on Transformer models with only 0.95% accuracy loss.
- For DistilBERT, RT³ reduces performance score by only 1.5% while extending battery life over 4.9×.
- The framework enables model switching between pattern sets in under 45ms, satisfying real-time constraints across different DVFS frequency levels.
- Block-structured pruning reduces accuracy loss to 0.64% on WikiText-2, outperforming random pruning (2.03% loss) and enabling effective search space reduction.
- The combination of BP and RL-based PP achieves better accuracy retention than random pattern pruning, with 4.88% loss vs. 11.07% for random approaches.
- Visualization confirms that the RL-identified patterns preserve structural characteristics across sparsity levels, indicating effective feature retention.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.