Saved in:
Bibliographic Details
Main Authors: Xu, Hongjun, Xia, Junxi, Yang, Weisi, Sui, Yueyuan, Xia, Stephen
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2509.05488
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866914025812525056
author Xu, Hongjun
Xia, Junxi
Yang, Weisi
Sui, Yueyuan
Xia, Stephen
author_facet Xu, Hongjun
Xia, Junxi
Yang, Weisi
Sui, Yueyuan
Xia, Stephen
contents Deploying Mamba models on microcontrollers (MCUs) remains challenging due to limited memory, the lack of native operator support, and the absence of embedded-friendly toolchains. We present, to our knowledge, the first deployment of a Mamba-based neural architecture on a resource-constrained MCU, a fully C-based runtime-free inference engine: MambaLite-Micro. Our pipeline maps a trained PyTorch Mamba model to on-device execution by (1) exporting model weights into a lightweight format, and (2) implementing a handcrafted Mamba layer and supporting operators in C with operator fusion and memory layout optimization. MambaLite-Micro eliminates large intermediate tensors, reducing 83.0% peak memory, while maintaining an average numerical error of only 1.7x10-5 relative to the PyTorch Mamba implementation. When evaluated on keyword spotting(KWS) and human activity recognition (HAR) tasks, MambaLite-Micro achieved 100% consistency with the PyTorch baselines, fully preserving classification accuracy. We further validated portability by deploying on both ESP32S3 and STM32H7 microcontrollers, demonstrating consistent operation across heterogeneous embedded platforms and paving the way for bringing advanced sequence models like Mamba to real-world resource-constrained applications.
format Preprint
id arxiv_https___arxiv_org_abs_2509_05488
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle MambaLite-Micro: Memory-Optimized Mamba Inference on MCUs
Xu, Hongjun
Xia, Junxi
Yang, Weisi
Sui, Yueyuan
Xia, Stephen
Machine Learning
Artificial Intelligence
Operating Systems
C.3; I.2.6; D.2.13; D.4.7
Deploying Mamba models on microcontrollers (MCUs) remains challenging due to limited memory, the lack of native operator support, and the absence of embedded-friendly toolchains. We present, to our knowledge, the first deployment of a Mamba-based neural architecture on a resource-constrained MCU, a fully C-based runtime-free inference engine: MambaLite-Micro. Our pipeline maps a trained PyTorch Mamba model to on-device execution by (1) exporting model weights into a lightweight format, and (2) implementing a handcrafted Mamba layer and supporting operators in C with operator fusion and memory layout optimization. MambaLite-Micro eliminates large intermediate tensors, reducing 83.0% peak memory, while maintaining an average numerical error of only 1.7x10-5 relative to the PyTorch Mamba implementation. When evaluated on keyword spotting(KWS) and human activity recognition (HAR) tasks, MambaLite-Micro achieved 100% consistency with the PyTorch baselines, fully preserving classification accuracy. We further validated portability by deploying on both ESP32S3 and STM32H7 microcontrollers, demonstrating consistent operation across heterogeneous embedded platforms and paving the way for bringing advanced sequence models like Mamba to real-world resource-constrained applications.
title MambaLite-Micro: Memory-Optimized Mamba Inference on MCUs
topic Machine Learning
Artificial Intelligence
Operating Systems
C.3; I.2.6; D.2.13; D.4.7
url https://arxiv.org/abs/2509.05488