TrainDeeploy: Hardware-Accelerated Parameter-Efficient Fine-Tuning of Small Transformer Models at the Extreme Edge
Organizations: Integrated Systems Laboratory (IIS), ETH Zurich, Switzerland · Department of Electrical, Electronic and Information Engineering (DEI), University of Bologna, Italy · Department of Control and Computer Engineering (DAUIN), Politecnico di Torino, Italy
Abstract
On-device tuning of deep neural networks enables long-term adaptation at the edge while preserving data privacy. However, the high computational and memory demands of backpropagation pose significant challenges for ultra-low-power, memory-constrained extreme-edge devices. These challenges are further amplified for attention-based models due to their architectural complexity and computational scale. We present TrainDeeploy, a framework that unifies efficient inference and on-device training on heterogeneous ultra-low-power System-on-Chips (SoCs). TrainDeeploy provides the first complete on-device training pipeline for extreme-edge SoCs supporting both Convolutional Neural Networks (CNNs) and Transformer models, together with multiple training strategies such as selective layer-wise fine-tuning and Low-Rank Adaptation (LoRA). On a RISC-V-based heterogeneous SoC, we demonstrate the first end-to-end on-device fine-tuning of a Compact Convolutional Transformer (CCT), achieving up to 11 trained images per second. We show that LoRA reduces dynamic memory usage by 23%, decreases the number of trainable parameters and gradients by 15x, and reduces memory transfer volume by 1.6x compared to full backpropagation. TrainDeeploy achieves up to 4.6 FLOP/cycle on CCT (0.28M parameters, 71-126M FLOPs) and up to 13.4 FLOP/cycle on Deep-AE (0.27M parameters, 0.8M FLOPs), while expanding the scope of prior frameworks to support both CNN and Transformer models with parameter-efficient tuning on extreme-edge platforms.
Figures & tables
| Strategy | Training Components | LoRA | Accuracy (50-Shot Transfer) | Cost | ||
| CIFAR-10 MNIST | CIFAR-10 EuroSAT | FLOPs (M) | Trained Param(MB) | |||
| Full FT | Entire model | ✗ | 92.83 0.91 | 64.85 3.11 | 201 | 1.12 |
| LP | Classifier head | ✗ | 88.34 0.42 | 76.70 0.55 | 71 | 0.005 |
| FT-1 | Last attention block | ✗ | 93.54 0.38 | 78.94 0.44 | 96 | 0.38 |
| LoRA-1 | Last attention block | ✓ | 95.38 0.29 | 77.00 0.47 | 86 | 0.026 |
| FT-2 | Last 2 attention blocks | ✗ | 94.62 0.33 | 81.52 0.36 | 126 | 0.76 |
| System | Hardware | Model | Memory Layout 2 | Params | FW+BW FLOP 1 | FLOP/cyc | Training Memory 2 |
| PULP-TrainLib [ 9 ] | PULP-SoC | Deep-AE / DS-CNN | 64 KB | 270K / 52.5K | 0.8M / 7.6M | 5.6 | 64 KB |
| POET [ 19 ] | NRF-52840 | ResNet-18 | 256 KB + 32 GB 3 | 11M | 4.5G | N/A | 256 KB + N/A 4 |
| MiniLearn [ 10 ] | NRF-52840 | CNNs | 256 KB + 1 MB | 79K / 47K / 12K | 1.9M / 2.9M / 0.11M 5 | 0.59 / 1.52 / 0.09 | 196 KB + 439 KB |
| TTE [ 8 ] | STM32F7 | MCUNet | 320 KB + 1 MB | 0.48M | 69M 6 | 0.43 | 173 KB |
| Ours | PULP-SoC | CCT | 128 KB + 32 MB | 0.28M | 71M–126M | 4.6 | 128 KB + 2.5 MB |
| Ours | PULP-SoC | Deep-AE | 128 KB + 32 MB | 270K | 0.8M | 13.4 | 128 KB |
On-Device Training
On-device training develops methods and systems for adapting or learning models directly on phones, sensors, and edge hardware.
See all 38 papers