为回答阿拉伯法律问题高效微调Llama 3.1:对约旦法律的案例研究
Parameter Efficient Fine Tuning Llama 3.1 for Answering Arabic Legal Questions: A Case Study on Jordanian Laws
AI总结:
本研究通过高效微调Llama 3.1模型,针对阿拉伯法律问题进行案例研究,展示了在资源效率和法律推理准确性方面的改进。
摘要:
本研究以约旦法律为案例,探讨对Llama-3.1大语言模型进行阿拉伯问题回答的微调。两个版本的模型——Llama-3.1-8B-bnb-4bit和Llama-3.1-8B-Instruct-bnb-4bit——使用参数高效微调(PEFT)与LoRA适配器和4位量化模型进行微调,利用Unsloth框架实现加速和资源高效的训练。一个包含6000个法律问题-答案对的定制数据集从约旦法律中编纂,并格式化为结构化提示。通过BLEU和ROUGE指标评估微调模型与相应基础模型的性能。结果表明,在实现量化和优化微调策略的资源效率的同时,提高了法律推理和准确性。本工作强调了为阿拉伯法律领域适配大语言模型的潜力,并突显了为特定领域任务微调的有效技术。
英文摘要:
This study uses Jordanian law as a case study to explore the fine-tuning of the Llama-3.1 large language model for Arabic question-answering. Two versions of the model - Llama-3.1-8B-bnb-4bit and Llama-3.1-8B-Instruct-bnb-4bit - were fine-tuned using parameter-efficient fine-tuning (PEFT) with LoRA adapters and 4-bit quantized models, leveraging the Unsloth framework for accelerated and resource-efficient training. A custom dataset of 6000 legal question-answer pairs was curated from Jordanian laws and formatted into structured prompts. Performance was evaluated using the BLEU and the ROUGE metrics to compare the fine-tuned models to their respective base versions. Results demonstrated improved legal reasoning and accuracy while achieving resource efficiency through quantization and optimized fine-tuning strategies. This work underscores the potential of adapting large language models for Arabic legal domains and highlights effective techniques for fine-tuning domain-specific tasks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。