用推理引擎加速大模型零阶微调,速度提升8倍以上。
LLM Zeroth-Order Fine-Tuning is an Inference Workload
- 将零阶微调的重复评分转为推理式执行,突破训练循环瓶颈。
- OPT-13B在SST-2上0.51小时完成2万步微调,准确率达92.2%。
- 适合需快速轻量适配的场景,如推理时在线更新模型。
零阶(ZO)微调因无需反向传播而吸引人,现有实现仍使用传统训练循环,但其主要工作是邻近参数状态下的重复评分,造成工作负载与运行时不匹配。本文表明,大语言模型的ZO微调本质上是推理主导型任务,通过服务运行时执行重复评分阶段。在OPT-13B和SST-2数据集上,新路径在仅使用LoRA设置下,2万步的LoZO运行仅需0.51小时,相比官方基线4.15小时提速8.13倍,最终评估准确率达92.2%,全验证准确率93.1%。在OPT-1.3B至OPT-13B的缩放实验中,相同运行时重构带来2.34倍至7.72倍加速。高秩分解的MeZO类实验也证明该范式可追踪类似损失轨迹,且最快达2.55倍加速。更广泛地,将ZO更新表示为动态适配器状态,为推理时训练提供了实用路径——轻量适配可作为推理式任务调度,而非独立训练作业。
原文摘要 · Abstract (English)
Zeroth-order (ZO) fine-tuning is attractive for large language models because it replaces backpropagation with forward objective evaluations. Existing implementations nevertheless execute ZO algorithms inside conventional training loops, even though their dominant work is repeated scoring under nearby parameter states. This creates a workload-runtime mismatch: the algorithm asks for structured inference-style scoring, while the system exposes a sequence of fragmented training-loop steps. We show that LLM ZO fine-tuning is an inference-dominated workload and execute its repeated scoring phase through a serving runtime. On OPT-13B SST-2, the resulting vLLM execution path completes the 20k-step LoZO run in 0.51 estimated training hours versus 4.15 hours for the official LoZO baseline under the matched LoRA-only setting, an 8.13x speedup, while reaching 0.922 final evaluation accuracy and 0.931 final full-validation accuracy. In core-step scaling experiments across OPT-1.3B to OPT-13B, the same runtime reorganization gives 2.34x--7.72x speedups. A MeZO-style high-rank factorized experiment shows that the same runtime paradigm can track a MeZO-like loss trajectory while running up to 2.55x faster. More broadly, representing ZO updates as dynamic adapter states suggests a practical path toward inference-time training, where lightweight adaptation can be scheduled as an inference-like workload rather than as a separate training job.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。