On-device training speeds up large language model personalization on phones

First-Order LoRA Training with Phone NPUs

Machine LearningArtificial Intelligence

Summary

Training large language models on your phone keeps data private but is slow and hard because of big calculations needed. The authors made a system that uses the phone’s special neural processor (NPU) to do parts of the training more efficiently without needing extra copies of the model's data. This helps the phone learn from your data faster while keeping battery use and heat in check. They tested this system on popular phone chips and found it works better than training with the phone’s CPU or GPU alone.

What this means in practice

  • For mobile app developers: Enable apps to personalize large language models directly on phones without uploading user data, improving privacy and responsiveness.$Commercial implications: Makes selling privacy-preserving personalized AI features for mobile apps feasible using efficient on-device training.
  • For smartphone chip designers: Incorporate training support for frozen weights and input gradients in future NPUs to accelerate on-device AI model updates.

Authors

Xu Zheng, Wei Cheng, Zhuomin Chen, Dongkuan Xu, Mo Sha, Jingchao Ni, Dongsheng Luo

Abstract

On-device fine-tuning lets a large language model (LLM) learn from its user's private data without uploading it. Low-rank adaptation (LoRA) reduces the trainable parameters, but each first-order training step still multiplies by the frozen base-model weights during the forward pass, activation recomputation, and input-gradient computation. A phone's neural processing unit (NPU) already holds these weights for inference; using it for training also requires computing input gradients, which its inference interface does not support. We present a system that runs all three frozen-weight products on the NPU while keeping the training graph, adapters, and optimizer on the CPU. Its input-gradient kernels reuse the resident weight tiles and the forward dequantizer, avoiding a transposed weight copy and ensuring forward and backward use the same effective weights. To preserve usable gradients, the system selects precision by gradient sensitivity and applies a per-row range guard for half-precision (FP16) outputs. Its runtime fuses the remaining CPU operators and overlaps NPU execution with adapter computation, while resumable execution and thermal pacing let training proceed as a background job. We evaluate it on two Qualcomm Snapdragon platforms using four LLMs from the Qwen and Llama families. Our workloads cover nightly personalization with labels supplied on the phone and the public LaMP-2 benchmark; comparisons include an optimized CPU trainer, a phone-GPU trainer, forward-only training, and GPU-trained references.