Phi-4-Mini Technical Report: Compact yet Powerful Multimodal Language Models via Mixture-of-LoRAs
这篇论文介绍了Phi-4-Mini和Phi-4-Multimodal,两种紧凑且高效的混合模态语言模型,它们在自然语言理解和生成、代码理解和生成以及多模态任务上表现出色。
更新于 2025-03-05。作者:Abdelrahman Abouelenin、Atabak Ashfaq、Adam Atkinson、Hany Awadalla、Nguyen Bach、Jianmin Bao、Alon Benhaim、Martin Cai、Vishrav Chaudhary、Congcong Chen、Dong Chen、Dongdong Chen、Junkun Chen、Weizhu Chen、Yen-Chun Chen、Yi-ling Chen、Qi Dai、Xiyang Dai、Ruchao Fan、Mei Gao、Min Gao、Amit Garg、Abhishek Goswami、Junheng Hao、Amr Hendy、Yuxuan Hu、Xin Jin、Mahmoud Khademi、Dongwoo Kim、Young Jin Kim、Gina Lee、Jinyu Li、Yunsheng Li、Chen Liang、Xihui Lin、Zeqi Lin、Mengchen Liu、Yang Liu、Gilsinia Lopez、Chong Luo、Piyush Madan、Vadim Mazalov、Ali Mousavi、Anh Nguyen、Jing Pan、Daniel Perez-Becker、Jacob Platin、Thomas Portet、Kai Qiu、Bo Ren、Liliang Ren、Sambuddha Roy、Ning Shang、Yelong Shen、Saksham Singhal、Subhojit Som、Xia Song、Tetyana Sych、Praneetha Vaddamanu、Shuohang Wang、Yiming Wang、Zhenghao Wang、Haibin Wu、Haoran Xu、Weijian Xu、Yifan Yang、Ziyi Yang、Donghan Yu、Ishmam Zabir、Jianwen Zhang、Li Lyna Zhang、Yunan Zhang、Xiren Zhou。
中文摘要
我们推出了Phi-4-Mini和Phi-4-Multimodal,这些语言和多模态模型既紧凑又功能强大。Phi-4-Mini是一个参数量为38亿的语模型,它是在高质量的网页和合成数据上训练的,显著优于近期类似规模的开放源代码模型,并在数学和需要复杂推理的编码任务上与参数量是其两倍的大型模型的表现相匹配。这一成就得益于精心策划的合成数据配方,强调高质量的数学和编码数据集。与它的前身Phi-3.5-Mini相比,Phi-4-Mini拥有200K个标记的扩展词汇量,以更好地支持多语言应用,以及用于更高效长序列生成的组查询注意力。Phi-4-Multimodal是一个多模态模型,它将文本、视觉和语音/音频输入模态集成到一个单一模型中。其新颖的模态扩展方法利用LoRA适配器和模态特定路由器,允许结合各种模态的多种推理模式而不会相互干扰。例如,它目前在OpenASR排行榜上名列第一,尽管语音/音频模态的LoRA组件仅有4.6亿个参数。Phi-4-Multimodal支持涉及(视觉+语言)、(视觉+语音)和(语音/音频)输入的场景,在广泛的任务上优于更大的视觉-语言和语音-语言模型。此外,我们还进行实验,进一步训练Phi-4-Mini以增强其推理能力。尽管其紧凑的38亿参数规模,这个实验版本在推理性能上与或显著超过DeepSeek-R1-Distill-Qwen-7B和DeepSeek-R1-Distill-Llama-8B等显著更大的模型。
英文摘要
We introduce Phi-4-Mini and Phi-4-Multimodal, compact yet highly capable language and multimodal models. Phi-4-Mini is a 3.8-billion-parameter language model trained on high-quality web and synthetic data, significantly outperforming recent open-source models of similar size and matching the performance of models twice its size on math and coding tasks requiring complex reasoning. This achievement is driven by a carefully curated synthetic data recipe emphasizing high-quality math and coding datasets. Compared to its predecessor, Phi-3.5-Mini, Phi-4-Mini features an expanded vocabulary size of 200K tokens to better support multilingual applications, as well as group query attention for more efficient long-sequence generation. Phi-4-Multimodal is a multimodal model that integrates text, vision, and speech/audio input modalities into a single model. Its novel modality extension approach leverages LoRA adapters and modality-specific routers to allow multiple inference modes combining various modalities without interference. For example, it now ranks first in the OpenASR leaderboard to date, although the LoRA component of the speech/audio modality has just 460 million parameters. Phi-4-Multimodal supports scenarios involving (vision + language), (vision + speech), and (speech/audio) inputs, outperforming larger vision-language and speech-language models on a wide range of tasks. Additionally, we experiment to further train Phi-4-Mini to enhance its reasoning capabilities. Despite its compact 3.8-billion-parameter size, this experimental version achieves reasoning performance on par with or surpassing significantly larger models, including DeepSeek-R1-Distill-Qwen-7B and DeepSeek-R1-Distill-Llama-8B.
解读
一句话总结
这篇论文介绍了Phi-4-Mini和Phi-4-Multimodal,两种紧凑且高效的混合模态语言模型,它们在自然语言理解和生成、代码理解和生成以及多模态任务上表现出色。
问题1:这篇论文想要解决什么具体问题?
- 问题背景:当前语言模型在处理多模态数据和复杂推理任务时存在性能瓶颈。
- 现有方案不足:现有模型通常需要大量参数和计算资源,且在多模态集成和推理能力上有限。
- 研究目标:设计并实现紧凑且高效的混合模态语言模型,在自然语言理解、代码生成和多模态任务上达到或超过现有模型的性能。
问题2:论文的核心创新点是什么?
- 技术创新:提出了一种“混合LoRAs”技术,通过集成模态特定的LoRAs扩展多模态能力,同时保持基础语言模型冻结。
- 方法改进:采用动态多裁剪策略优化视觉模态处理,以及多阶段训练流程来提高推理和音频/语音处理能力。
- 优势:在保持基础语言模型性能的同时,实现了高效的跨模态推理和多模态任务处理。
问题3:实验结果如何验证了方法的有效性?
- 关键实验:在多个自然语言理解、代码生成和多模态任务上进行评估。
- 性能提升:Phi-4-Mini在数学和编码任务上性能与参数量是其两倍的大型模型相当,Phi-4-Multimodal在多模态任务上优于大型视觉-语言和语音-语言模型。
- 对比结果:与基线模型相比,Phi-4-Mini和Phi-4-Multimodal在各项任务中均表现出显著性能提升。
问题4:这个研究的实际应用价值是什么?
- 应用场景:适用于多模态交互、代码生成、文本理解和语音识别等场景。
- 实施建议:结合实际应用需求,对模型进行微调和优化。
- 局限与展望:目前模型在处理特定事实和语言上的能力有限,未来研究方向包括提高模型的多语言能力和进一步优化安全性和鲁棒性。
来源
机器可读索引:llms.txt