Consolidating TinyML Lifecycle with Large Language Models: Reality, Illusion, or Opportunity?
Guanghan Wu, Sasu Tarkoma, Roberto Morabito
TL;DR
The paper investigates automating the TinyML lifecycle on resource-constrained edge devices using a lifecycle middleware that integrates GPT-4o-based automation with traditional TinyML toolchains. It presents a two-fold framework: (i) a structured, prompt-driven workflow guiding data processing, model conversion/quantization, and deployment sketch generation, and (ii) an orchestrator layer that coordinates LLM interactions, embedded libraries, and device constraints with iterative error handling. A case study on fruit classification on an Arduino board demonstrates improved efficiency in data preprocessing and quantization, while revealing Sketch Generation as the main bottleneck due to high resource and reliability costs, underscoring the need for refined prompts, hybrid approaches, and potential local LLMs. Overall, the work highlights a promising path for AI-assisted embedded development, complemented by practical roadmap and open questions around generalization across hardware and long-term reliability.
Abstract
The evolving requirements of Internet of Things (IoT) applications are driving an increasing shift toward bringing intelligence to the edge, enabling real-time insights and decision-making within resource-constrained environments. Tiny Machine Learning (TinyML) has emerged as a key enabler of this evolution, facilitating the deployment of ML models on devices such as microcontrollers and embedded systems. However, the complexity of managing the TinyML lifecycle, including stages such as data processing, model optimization and conversion, and device deployment, presents significant challenges and often requires substantial human intervention. Motivated by these challenges, we began exploring whether Large Language Models (LLMs) could help automate and streamline the TinyML lifecycle. We developed a framework that leverages the natural language processing (NLP) and code generation capabilities of LLMs to reduce development time and lower the barriers to entry for TinyML deployment. Through a case study involving a computer vision classification model, we demonstrate the framework's ability to automate key stages of the TinyML lifecycle. Our findings suggest that LLM-powered automation holds potential for improving the lifecycle development process and adapting to diverse requirements. However, while this approach shows promise, there remain obstacles and limitations, particularly in achieving fully automated solutions. This paper sheds light on both the challenges and opportunities of integrating LLMs into TinyML workflows, providing insights into the path forward for efficient, AI-assisted embedded system development.
