Palm
收藏Palm 数据集概述
数据集简介
Palm 数据集是一个针对阿拉伯语言的大型语言模型(LLM)的性能评估的全面基准,涵盖了多种方言和文化背景。该数据集旨在评估LLM在阿拉伯语言任务上的表现。
数据集获取
数据集可以通过Hugging Face访问: python from datasets import load_dataset dataset = load_dataset("UBC-NLP/palm")
环境要求
- Python 3.8+
- PyTorch
- vLLM
- 4x A100 GPUs(实验中使用)
安装所需包: bash pip install -r requirements.txt
评估流程
评估流程包括两个主要步骤:
- 使用LLM生成响应
- 使用LLM-as-Judge方法判断响应质量
步骤0:启动LLM服务
运行主脚本之前,需要使用vLLM启动LLM服务: bash ./serve_llm.sh "llm_path" num_gpus port
步骤1:生成响应
使用gen_responses.py脚本为测试集中的指令生成响应:
bash
python gen_responses.py
--model_path models/Qwen2.5-7B-Instruct
--vllm_model_id models/Qwen2.5-7B-Instruct
--data_path data/test.jsonl
--max_length 4096
--vllm_port 8000
步骤2:判断响应
使用与步骤0相同的serve_llm.sh脚本启动判断LLM,然后评估生成的响应:
bash
python judge.py
--output_judgements Qwen2.5-7B-Instruct
--vllm_model_id models/Qwen2.5-72B-Instruct
--preds_file responses/Qwen2.5-7B-Instruct.jsonl
--max_length 2048
--vllm_port 8000
示例工作流程
bash
1. 启动响应生成LLM
./serve_llm.sh "models/Qwen2.5-7B-Instruct" 4 8000
2. 生成响应
python gen_responses.py --model_path models/Qwen2.5-7B-Instruct --vllm_model_id models/Qwen2.5-7B-Instruct --data_path data/test.jsonl --max_length 4096 --vllm_port 8000
3. 停止第一个LLM服务器并启动判断LLM
./serve_llm.sh "models/Qwen2.5-72B-Instruct" 4 8000
4. 判断响应
python judge.py --output_judgements Qwen2.5-7B-Instruct --vllm_model_id models/Qwen2.5-72B-Instruct --preds_file responses/Qwen2.5-7B-Instruct.jsonl --max_length 2048 --vllm_port 8000
引用
如果在研究中使用此数据集或代码,请引用以下信息: bibtex @misc{alwajih2025palmculturallyinclusivelinguistically, title={Palm: A Culturally Inclusive and Linguistically Diverse Dataset for Arabic LLMs}, author={Fakhraddin Alwajih and Abdellah El Mekki and Samar Mohamed Magdy and Abdelrahim A. Elmadany and Omer Nacar and El Moatez Billah Nagoudi and Reem Abdel-Salam and Hanin Atwany and Youssef Nafea and others}, year={2025}, eprint={2503.00151}, archivePrefix={arXiv}, primaryClass={cs.CL}, url={https://arxiv.org/abs/2503.00151}, }
许可
本项目遵循CC-BY-NC-ND-4.0许可证。
联系方式
如有问题或反馈,请在仓库中提出问题。




