基础设施 4.0 · 优秀 2026-10-17 · 论文

First-Order LoRA Training with Phone NPUs

端上微调让模型从用户私有数据学习而不用上传数据,LoRA 压掉可训练参数,但每个一阶训练步仍要三次乘冻结权重(前向激活重算输入梯度),而手机 NPU 的推理接口只支持前向该系统把三次冻结权重乘法全部放进 NPU,训练图adapter 和优化器留在 CPU:输入梯度 kernel 复用 NPU 驻留的权重分块和前向反量化器,免转置拷贝且保证前后向同一份有效权重;按梯度敏感度选精度,FP16 输出加逐行 range guard运行时融合剩余 CPU 算子NPU 执行与 adapter 计算重叠,支持断点续跑和热节流,训练可作后台任务过夜进行在两代 Snapdragon 上用 Qwen/Llama 四个模型对照 CPU手机 GPU仅前向与 GPU 训练基线评测

打开原文回到归档

First-Order LoRA Training with Phone NPUs

URL: https://arxiv.org/abs/2610.24816
author: Xu Zheng, Wei Cheng, Zhuomin Chen, Dongkuan Xu, Mo Sha, Jingchao Ni, Dongsheng Luo
date: 2026-10-17
source: arxiv / paper
collected: 2026-10-23 (daily-intake-evening)

Summary

端上微调让模型从用户私有数据学习而不用上传数据,LoRA 压掉可训练参数,但每个一阶训练步仍要三次乘冻结权重(前向、激活重算、输入梯度),而手机 NPU 的推理接口只支持前向。该系统把三次冻结权重乘法全部放进 NPU,训练图、adapter 和优化器留在 CPU:输入梯度 kernel 复用 NPU 驻留的权重分块和前向反量化器,免转置拷贝且保证前后向同一份有效权重;按梯度敏感度选精度,FP16 输出加逐行 range guard。运行时融合剩余 CPU 算子、NPU 执行与 adapter 计算重叠,支持断点续跑和热节流,训练可作后台任务过夜进行。在两代 Snapdragon 上用 Qwen/Llama 四个模型对照 CPU、手机 GPU、仅前向与 GPU 训练基线评测。

On-device LoRA fine-tuning still needs three frozen-weight products per first-order step (forward, activation recomputation, input gradient), and phone NPU inference interfaces do not expose input gradients. This system runs all three products on the NPU while keeping the training graph, adapters and optimizer on the CPU: input-gradient kernels reuse resident weight tiles and the forward dequantizer, precision is chosen by gradient sensitivity with a per-row range guard for FP16 outputs, and resumable execution with thermal pacing lets training run overnight as a background job. Evaluated on two Snapdragon platforms with four Qwen and Llama models against CPU, phone-GPU, forward-only and GPU-trained baselines.

Source (fetched)

arXiv:2610.24816 | First-Order LoRA Training with Phone NPUs authors: Xu Zheng, Wei Cheng, Zhuomin Chen, Dongkuan Xu, Mo Sha, Jingchao Ni, Dongsheng Luo submitted: 2026-10-17 updated: 2026-10-17 categories: cs.LG, cs.AI link: https://arxiv.org/abs/2610.24816

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.

Obsidian evidence excerpt

from OpenClaw定时任务/论文流水线/2026-10-23-论文流水线.md:

2. First-Order LoRA Training with Phone NPUs:手机 NPU 上跑一阶 LoRA 训练

Xu Zheng 等 7 人,2026 年 10 月 17 日提交 arXiv(cs.LG),与上一篇 Tandem 出自同一团队。端上微调让模型从用户私有数据学习而不用上传数据,LoRA 压掉了可训练参数量,但每个一阶训练步仍要做三次冻结权重乘法(前向、激活重算、输入梯度),而手机 NPU 的推理接口只支持前向、不给输入梯度。这套系统把三次冻结权重乘法全部放进 NPU,训练图、adapter 和优化器留在 CPU:输入梯度 kernel 复用 NPU 里驻留的权重分块和前向反量化器,免去转置权重拷贝,也保证前后向用同一份有效权重;精度按梯度敏感度选择,FP16 输出加逐行 range guard 保住可用梯度。运行时融合剩余 CPU 算子、让 NPU 执行与 adapter 计算重叠,支持断点续跑和热节流,训练可以作为后台任务过夜进行。在两代 Snapdragon 上用 Qwen 和 Llama 两个家族共四个模型评测,负载覆盖手机本地打标的夜间个性化训练和公开的 LaMP-2 基准,对照了优化过的 CPU 训练器、手机 GPU 训练器、仅前向训练和 GPU 训练参考。端上训练从演示走向工程实现,约束也摆得很清楚:NPU 厂商推理接口不支持反向,绕开它的开销决定这条路能走多远。 https://arxiv.org/abs/2610.24816