代码调酒师:构建代码混合LLM的从业者指南
Code Mixologist : A Practitioner's Guide to Building Code-Mixed LLMs
AI总结:
本文探讨了代码混合和切换在大语言模型中的挑战,提出统一的分类体系和实用指南,涵盖数据、建模和评估方法,分析现有评估实践并讨论安全问题。
摘要:
代码混合和切换(CSW)仍然是大型语言模型(LLMs)面临的挑战。尽管多语言建模取得进展,LLMs在混合语言设置中仍表现出语法、事实性和安全性行为的系统退化。本文全面概述了现代大语言模型中的CSW研究。我们引入了一个统一的分类体系,按数据、建模和评估维度组织先前工作,并将这些发现提炼成构建、适应和评估CSW能力LLM的实用指南。我们回顾了从CSW定制预训练和任务特定后训练到提示策略和上下文学习的建模方法。我们分析了当前的评估实践,突出了不稳定性和可重复性有限的来源,并列举了现有基准,同时批判性地考察其语言覆盖和英语中心偏见。最后,我们讨论了新兴的安全问题,包括使用代码混合作为绕过模型安全措施的机制,并识别了开放的研究挑战。
英文摘要:
Code-mixing and code-switching (CSW) remain challenging phenomena for large language models (LLMs). Despite recent advances in multilingual modeling, LLMs often struggle in mixed-language settings, exhibiting systematic degradation in grammaticality, factuality, and safety behavior. This work provides a comprehensive overview of CSW research in modern large language model settings. We introduce a unifying taxonomy that organizes prior work along dimensions of data, modeling, and evaluation, and we distill these findings into a practical playbook of actionable recommendations for building, adapting, and evaluating CSW-capable LLMs. We review modeling approaches ranging from CSW-tailored pre-training and task-specific post-training to prompting strategies and in-context learning. We analyze current evaluation practices, highlighting sources of instability and limited reproducibility, and we catalog existing benchmarks while critically examining their linguistic coverage and English-centric biases. Finally, we discuss emerging safety concerns, including use of code-mixing as a mechanism for bypassing model safeguards, and identify open research challenges.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。