GPIoT: Tailoring Small Language Models for IoT Program Synthesis and Development
Preprint
Abstract
Code Large Language Models (LLMs) enhance software development efficiency by automatically generating code and documentation in response to user requirements. However, code LLMs cannot synthesize specialized programs when tasked with IoT applications that require domain knowledge. While Retrieval-Augmented Generation (RAG) offers a promising solution by fetching relevant domain knowledge, it necessitates powerful cloud LLMs (e.g., GPT-4) to process user requirements and retrieved contents, which raises significant privacy concerns. This approach also suffers from unstable networks and prohibitive LLM query costs. Moreover, it is challenging to ensure the correctness and relevance of the fetched contents. To address these issues, we propose GPIoT, a code generation system for IoT applications by fine-tuning locally deployable Small Language Models (SLMs) on IoT-specialized datasets. SLMs have smaller model sizes, allowing efficient local deployment and execution to mitigate privacy concerns and network uncertainty. Furthermore, by fine-tuning the SLMs with our IoT-specialized datasets, the SLMs' ability to synthesize IoT-related programs can be substantially improved. To evaluate GPIoT's capability in synthesizing programs for IoT applications, we develop a benchmark, IoTBench. Extensive experiments and user trials demonstrate the effectiveness of GPIoT in generating IoT-specialized code, outperforming state-of-the-art code LLMs with an average task accuracy increment of 64.7% and significant improvements in user satisfaction.Keywords
All Related Versions
This publication has 21 references indexed in Scilit:
- Improving Retrieval-Augmented Generation in Medicine with Iterative Follow-up QuestionsBiocomputing 2020, 2024
- Practical Gaze Tracking on Any Surface With Your PhoneIEEE Transactions on Mobile Computing, 2024
- Finger Tracking Using Wrist-Worn EMG SensorsIEEE Transactions on Mobile Computing, 2024
- LLMSense: Harnessing LLMs for High-level Reasoning Over Spatiotemporal Sensor Traces2024
- One Shot for All: Quick and Accurate Data Aggregation for LPWANsIEEE/ACM Transactions on Networking, 2024
- SwapNet: Efficient Swapping for DNN Inference on Edge AI Devices Beyond the Memory BudgetIEEE Transactions on Mobile Computing, 2024
- Implementing CUDA Unified Memory in the PyTorch Framework2021
- SciPy 1.0: fundamental algorithms for scientific computing in PythonNature Methods, 2020
- Wiar: A Public Dataset for Wifi-Based Activity RecognitionIEEE Access, 2019
- A Real-Time QRS Detection AlgorithmIEEE Transactions on Biomedical Engineering, 1985