EdgeFlex-Transformer: Transformer Inference for Edge Devices

Shoaib Mohammad, Guanqun Song, Ting Zhu
12/17/2025
cs.LG

No official code found. Best implementation: Shoaib-git20/EdgeFlex (1 star, last commit 2025-04-29).

Abstract

Deploying large-scale transformer models on edge devices presents significant challenges due to strict constraints on memory, compute, and latency. In this work, we propose a lightweight yet effective multi-stage optimization pipeline designed to compress and accelerate Vision Transformers (ViTs) for deployment in resource-constrained environments. Our methodology combines activation profiling, memory-aware pruning, selective mixed-precision execution, and activation-aware quantization (AWQ) to reduce the model's memory footprint without requiring costly retraining or task-specific fine-tuning. Starting from a ViT-Huge backbone with 632 million parameters, we first identify low-importance channels using activation statistics collected via forward hooks, followed by structured pruning to shrink the MLP layers under a target memory budget. We further apply FP16 conversion to selected components and leverage AWQ to quantize the remaining model weights and activations to INT8 with minimal accuracy degradation. Our experiments on CIFAR-10 demonstrate that the fully optimized model achieves a 76% reduction in peak memory usage and over 6x lower latency, while retaining or even improving accuracy compared to the original FP32 baseline. This framework offers a practical path toward efficient transformer inference on edge platforms, and opens future avenues for integrating dynamic sparsity and Mixture-of-Experts (MoE) architectures to further scale performance across diverse tasks.

View on arXivView PDF

Code Implementations(1)

Framework for optimization the Transformer Inference on Edge devices

10Jupyter NotebookApr 29, 20251 years ago

Similar Papers

Cite this paper

@article{mohammad2025edgeflextransformer,
  title  = {EdgeFlex-Transformer: Transformer Inference for Edge Devices},
  author = {Shoaib Mohammad and Guanqun Song and Ting Zhu},
  year   = {2025},
  eprint = {2512.19741},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2512.19741v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2512.19741.svg)](https://codeofpaper.com/paper/2512.19741)

Discussion