arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.19782cs.CL
收藏

通过模型合并使多语言模型适应代码混合任务

Adapting Multilingual Models to Code-Mixed Tasks via Model Merging

IIIT Hyderabad;MBZUAI

Prashant Kodali, Vaishnavi Shivkumar, Swarang Joshi, Monojit Choudhary, Ponnurangam Kumaraguru, Manish Shrivastava

AI总结:

本研究提出通过持续预训练检查点与基础模型合并来适应代码混合任务,在情感和仇恨言论分类上优于完全微调,并展现出更强的跨语言迁移能力。

摘要:

我们研究模型合并作为代码混合自然语言处理中传统适应策略的实用替代方案。从多语言基础模型出发,我们:(i)在无标签的代码混合文本上进行持续预训练(CPT)以获得适应后的检查点,(ii)将该检查点与基础模型合并,以及(iii)在下游任务数据上进行微调(FT)。我们使用XLM-R和Llama-3.2-1B模型,针对英语-印地语(En-Hi)和英语-西班牙语(En-Es)的句子分类(情感和仇恨言论)任务评估了我们的方法。结果表明,合并模型始终优于完全微调和CPT->FT。我们观察到,与完全微调相比,F1分数提高了2-5个百分点,与CPT->FT相比提高了约1-2个百分点,这表明通过合并比单独使用CPT能更有效地利用无标签数据。使用更大LLM(如Llama-3.3-70B)进行的零样本/少样本提示在微调和合并检查点之后表现落后,这凸显了上下文学习在代码混合输入上的局限性。我们进一步通过训练En-Hi并评估En-Ta和En-Ml来测试跨语言对迁移:合并检查点的迁移能力比单语英语基线更强(例如,TV/TIES变体达到0.65-0.68的F1,而完全微调为0.61-0.63),这表明代码混合知识是低资源语言对更可靠的基底。最后,我们总结了与常见数据场景(仅标签;标签+无标签;仅迁移)相匹配的适应方案,并讨论了在更广泛任务和更大模型上的局限性和扩展考虑。

英文摘要:

We study model merging as a practical alternative to conventional adaptation strategies for code-mixed NLP. Starting from a multilingual base model, we: (i) perform continued pre-training (CPT) on unlabeled code-mixed text to obtain an adapted checkpoint, (ii) merge checkpoint with the base model, and (iii) fine-tune (FT) on the downstream task data. We evaluate our approach for sentence classification (sentiment and hate speech) task in English-Hindi (En-Hi) and English-Spanish (En-Es) using XLM-R and Llama-3.2-1B models. Our results show that merged models consistently outperform full fine-tuning and CPT->FT. We observe gains of 2--5 points in F1 over full fine-tuning and ~1-2 points over CPT->FT, indicating that unlabeled data is leveraged more effectively via merging than via CPT alone. Zero-/few-shot prompting with larger LLMs (e.g., Llama-3.3-70B) lags behind fine-tuned and merged checkpoints, underscoring limits of in-context learning for code-mixed inputs. We further test cross-pair transfer by training on En-Hi and evaluating on En-Ta and En-Ml: merged checkpoints transfer more strongly than monolingual-English baselines (e.g., TV/TIES variants reaching 0.65-0.68 F1 vs 0.61-0.63 for full fine-tuning), suggesting that code-mixed knowledge is a more reliable substrate for low-resource pairs. We conclude with adaptation recipes matched to common data regimes (labeled only; labeled+unlabeled; transfer-only) and discuss limitations and scaling considerations for broader tasks and larger models.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑