Abstract
While scaling laws have been continuously validated in large language models (LLMs) with increasing model parameters, the inherent tension between the inference demands of LLMs and the limited resources of edge devices poses a critical challenge to the development of edge intelligence. Recently, numerous small language models have emerged, aiming to distill the capabilities of LLMs into smaller footprints. However, these models often retain the fundamental architectural principles of their larger counterparts, still imposing considerable strain on the storage and bandwidth capacities of edge devices. In this paper, we introduce the PLM, a Peripheral Language Model, developed through a co-design process that jointly optimizes model architecture and edge system constraints. The PLM utilizes a Multi-head Latent Attention mechanism and employs the squared ReLU activation function to encourage sparsity, thereby reducing peak memory footprint during inference. During training, we collect and reorganize open-source datasets, implement a multi-phase training strategy, and empirically investigate the Warmup-Stable-Decay-Constant (WSDC) learning rate scheduler. Additionally, we incorporate Reinforcement Learning from Human Feedback (RLHF) by adopting the ARIES preference learning approach. Following a two-phase SFT process, this method yields performance gains of 2% in general tasks, 9% in the GSM8K task, and 11% in coding tasks. In addition to its novel architecture, evaluation results demonstrate that PLM outperforms existing small language models trained on publicly available data while maintaining the lowest number of activated parameters. Furthermore, deployment across various edge devices, including consumer-grade GPUs, mobile phones, and Raspberry Pis, validates PLM's suitability for peripheral applications.
1. Introduction
The rapid advancement of Large Language Models (LLMs) has revolutionized natural language processing, yet their deployment on edge devices remains constrained by significant hardware limitations. Most existing "Small Language Models" (SLMs) are essentially scaled-down versions of larger architectures, failing to address the specific bottlenecks of ubiquitous computing, such as limited VRAM and memory bandwidth.
We propose the Peripheral Language Model (PLM), a 1.8-billion parameter model designed from the ground up to operate efficiently on peripheral hardware. By focusing on hardware-software co-design, PLM minimizes the Key-Value (KV) cache and maximizes activation sparsity, allowing for high-performance reasoning within the strict resource envelopes of devices like the Raspberry Pi 5 and modern smartphones.
2. Methodology and Architecture
2.1 Hardware-Aware Architectural Choices
To optimize for edge inference, PLM incorporates two primary architectural innovations:
- Multi-head Latent Attention (MLA): By utilizing low-rank matrix decomposition to compress the KV cache, PLM significantly reduces the memory footprint required to store token history. This is critical for devices where memory bandwidth is the primary performance bottleneck.
- Squared ReLU ($ReLU^2$) Activations: Replacing standard functions like SwiGLU with $ReLU^2$ encourages high levels of activation sparsity. Empirical results show that PLM achieves approximately 90.9% sparsity in its MLP layers, allowing the hardware to bypass a vast majority of computations during inference.
2.2 Training Curriculum and Alignment
The model was trained on a 2.48 trillion token corpus using a three-phase strategy: a stable learning phase on general knowledge, a high-quality curated data integration phase, and a final "knowledge-intensive" push. For alignment, we employed a two-phase Supervised Fine-Tuning (SFT) process followed by ARIES, a novel preference learning approach for Reinforcement Learning from Human Feedback (RLHF).
3. Evaluation and Key Results
3.1 Performance Benchmarking
PLM-1.8B-Instruct demonstrates superior efficiency compared to contemporary SLMs. It achieved an average benchmark score of 57.29, surpassing models with higher activated parameter counts such as SmolLM2-1.7B and Index-1.9B. The ARIES RLHF process was particularly effective, yielding a 9% improvement in mathematical reasoning (GSM8K) and an 11% improvement in coding tasks (HumanEval) over the SFT base.
3.2 Edge Deployment
Validation on hardware including the NVIDIA Jetson Orin NX, Apple M3, and Raspberry Pi 5 confirms the model's efficiency. On the Raspberry Pi 5, PLM maintains a stable and usable token generation rate, whereas standard architectures often suffer from memory-induced latency or crashes.
4. Conclusion
PLM demonstrates that hardware-software co-design is essential for the future of edge intelligence. By prioritizing sparsity and KV cache efficiency, we have developed a model that performs like a much larger system while remaining compatible with ubiquitous computing hardware. Future work will focus on on-device personalization and expanding the architecture to support multimodal inputs such as audio and video.
Summary updated