Implementation and Performance Analysis of a Transformer Architecture on Resource-Constrained Microcontrollers
In this study, the feasibility of implementing a encoder-only Transformer architecture, which reduces resource consumption through quantization methods, was experimentally investigated on microcontrollers with limited memory and processing capacity. In the case study, a scenario involving the classification of human activities using data obtained from accelerometer and gyroscope sensors was employed. For the classification problem, the Transformer model was trained on a computer and transferred to an Xtensa LX6-based ESP32 microcontroller after applying various quantization methods. Weight values were represented as 8-bit integers, and integer-based multiply-accumulate operations were performed on the activations using the quantized weights during the transfer of the trained model to the microcontroller. Quantized models were evaluated in terms of inference times, program memory, and RAM usage by comparing them with a 32-bit floating-point reference implementation. Experimental results showed that quantization reduced program memory usage of the microcontroller by approximately 7%, but did not result in any improvement in static RAM usage.
Authors
- Okan Duymazlar (ORCID: https://orcid.org/0000-0002-1327-7493)
Institutions
- Ege University (TR)
Publication Details
- Journal
- International journal of research and scientific innovation
- Published
- 2026-12-02
- DOI
- https://doi.org/10.51244/ijrsi.2026.1311000101
- Primary Topic
- Advanced Neural Network Applications
- Type
- article
- Field-Weighted Citation Impact
- 0.00