轻量级模型LFM2实现高效端侧推理,兼顾速度与性能。
LFM2 Technical Report
- 采用硬件感知架构搜索,融合门控卷积与分组注意力,提升推理效率。
- 2.6B模型在IFEval达79.56%,GSM8K达82.41%,多任务表现强。
- 支持视觉、语音、检索等多模态应用,适合边缘设备部署。
我们提出LFM2,一类面向高效端侧部署的液态基础模型,具备强大任务能力。通过在边缘延迟和内存约束下进行硬件感知的架构搜索,得到一个紧凑的混合骨干网络,结合门控短卷积与少量分组查询注意力模块,在CPU上实现预填充和解码速度提升最多2倍。LFM2家族涵盖3.5亿至83亿参数,包括密集模型(3.5亿、7亿、12亿、26亿)和一个混合专家变体(总83亿,活跃15亿),均支持32K上下文长度。其训练流程包含温控解耦的Top-K知识蒸馏、按难度排序的课程学习,以及三阶段后训练:监督微调、长度归一化偏好优化和模型合并。在10-12万亿标记数据上预训练,LFM2模型在多样基准测试中表现优异;例如,LFM2-2.6B在IFEval上达到79.56%,GSM8K达82.41%。我们进一步构建了多模态与检索变体:用于视觉语言任务的LFM2-VL,支持可调精度-延迟权衡;用于语音的LFM2-Audio,分离输入输出路径,实现实时语音到语音交互,性能媲美大3倍的模型;以及用于检索的LFM2-ColBERT,提供低延迟的多语言查询与文档编码器。所有模型均开源权重与部署包,支持ExecuTorch、llama.cpp、vLLM,为需要快速、内存高效推理与强任务能力的边缘应用提供实用基础。
原文摘要 · Abstract (English)
We present LFM2, a family of Liquid Foundation Models designed for efficient on-device deployment and strong task capabilities. Using hardware-in-the-loop architecture search under edge latency and memory constraints, we obtain a compact hybrid backbone that combines gated short convolutions with a small number of grouped query attention blocks, delivering up to 2x faster prefill and decode on CPUs compared to similarly sized models. The LFM2 family covers 350M-8.3B parameters, including dense models (350M, 700M, 1.2B, 2.6B) and a mixture-of-experts variant (8.3B total, 1.5B active), all with 32K context length. LFM2's training pipeline includes a tempered, decoupled Top-K knowledge distillation objective that avoids support mismatch; curriculum learning with difficulty-ordered data; and a three-stage post-training recipe of supervised fine-tuning, length-normalized preference optimization, and model merging. Pre-trained on 10-12T tokens, LFM2 models achieve strong results across diverse benchmarks; for example, LFM2-2.6B reaches 79.56% on IFEval and 82.41% on GSM8K. We further build multimodal and retrieval variants: LFM2-VL for vision-language tasks, LFM2-Audio for speech, and LFM2-ColBERT for retrieval. LFM2-VL supports tunable accuracy-latency tradeoffs via token-efficient visual processing, while LFM2-Audio separates audio input and output pathways to enable real-time speech-to-speech interaction competitive with models 3x larger. LFM2-ColBERT provides a low-latency encoder for queries and documents, enabling high-performance retrieval across multiple languages. All models are released with open weights and deployment packages for ExecuTorch, llama.cpp, and vLLM, making LFM2 a practical base for edge applications that need fast, memory-efficient inference and strong task capabilities.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。