[论文解读] LLaMAntino: LLaMA 2 Models for Effective Text Generation in Italian Language
本论文将 LLaMA 2 适应到意大利语,使用语言适应、PEFT/LoRA 和 QLoRA 技术,生成 LLaMAntino 模型(7B/13B 及聊天变体),用于研究发布。
Large Language Models represent state-of-the-art linguistic models designed to equip computers with the ability to comprehend natural language. With its exceptional capacity to capture complex contextual relationships, the LLaMA (Large Language Model Meta AI) family represents a novel advancement in the field of natural language processing by releasing foundational models designed to improve the natural language understanding abilities of the transformer architecture thanks to their large amount of trainable parameters (7, 13, and 70 billion parameters). In many natural language understanding tasks, these models obtain the same performances as private company models such as OpenAI Chat-GPT with the advantage to make publicly available weights and code for research and commercial uses. In this work, we investigate the possibility of Language Adaptation for LLaMA models, explicitly focusing on addressing the challenge of Italian Language coverage. Adopting an open science approach, we explore various tuning approaches to ensure a high-quality text generated in Italian suitable for common tasks in this underrepresented language in the original models' datasets. We aim to release effective text generation models with strong linguistic properties for many tasks that seem challenging using multilingual or general-purpose LLMs. By leveraging an open science philosophy, this study contributes to Language Adaptation strategies for the Italian language by introducing the novel LLaMAntino family of Italian LLMs.
研究动机与目标
- 解决意大利语在大语言模型训练数据中的代表性不足,并提高意大利语文本生成质量。
- 通过语言适应和 PEFT 方法开发意大利语适配的 LLaMA 2 模型(包括聊天变体)
- 评估并发布模型,以支持意大利语自然语言处理任务和更广泛的研究使用。
- 提供一个可复现的适配管线,可应用于其他语言。
提出的方法
- 采用语言适应在微调前将 LLaMA 2 模型定制为意大利语。
- 使用 PEFT 技术(LoRA/QLoRA),结合 4 位量化(NF4),以降低内存和训练成本。
- 在意大利语数据上进行训练(Filtered Oscar Italian 子集;对话任务的 UltraChat 翻译;与 EVALITA 相关的数据)。
- 在翻译的对话数据集上进行 SFT(有监督微调),以提升意大利语的指令遵循能力。
- 使用 4-bit NF4 量化,64-dim LoRA 注意力(lora_r=64),lora_alpha=16,lora_dropout=0.1。
- 在 Leonardo HPC 上进行分布式训练,跨三个节点使用 12 块 A100 GPU,采用 FSDP 和梯度累积。
实验结果
研究问题
- RQ1如何有效地将 LLaMA 2 模型适应为意大利语以进行生成任务?
- RQ2语言适应 + PEFT(LoRA/QLoRA)和 4-bit 量化对意大利语文本生成质量与指令遵循有何影响?
- RQ3意大利专用数据集(翻译的 UltraChat、EVALITA 任务)能否支撑 LLaMAntino 模型的高质量对话与指令微调?
- RQ4通过 PEFT 将大型 LLaMA 模型适应为意大利语时,实际部署需要考虑哪些因素(内存、延迟)?
主要发现
- 引入了 LLaMAntino 2-Chat 和非聊天模型,具备意大利语语言适配(7B 和 13B 变体)。
- 在翻译的 UltraChat 数据和与 EVALITA 相关的指令的基础上,先应用语言适应再进行有监督微调。
- 采用 QLoRA,使用 4-bit NF4 量化并谨慎配置 LoRA 参数(lora_r=64, lora_alpha=16, lora_dropout=0.1)。
- 使用来自 Filtered Oscar Italian 数据集的意大利语数据以及更大的意大利语文本语料用于适配。
- 在 Leonardo HPC 上进行大规模训练,采用多节点多 GPU 设置(总共 12 个 A100 GPU)以及某些阶段的 25k 训练步长;在适配期间最大序列长度为 1024。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。