lmms-eval--微调实战笔记
lmms-eval--大模型调用平台,方便新手上手大模型微调
lmms-eval的更多用法,没有mathversehttps://github.com/EleutherAI/lm-evaluation-harness.git
单卡运行,模型gpt-j-6B,数据集hellaswag
git clone --depth 1 https://github.com/EleutherAI/lm-evaluation-harness
cd lm-evaluation-harness
pip install -e . -i https://pypi.tuna.tsinghua.edu.cn/simple#国内需要转镜像
export HF_ENDPOINT=https://hf-mirror.com#单卡运行,模型deepseek-math-7b,数据集MathVerse
lm_eval --model hf --model_args pretrained=deepseek-ai/deepseek-math-7b-base --tasks MathVerse --device cuda:0 --batch_size 8#单卡运行,模型PUMA_DeepSeek-math-7b,数据集MathVerse
lm_eval --model hf --model_args pretrained=Math-PUMA/Math-PUMA_DeepSeek-Math-VL-7B --tasks MathVerse --device cuda:1 --batch_size 8#多卡运行
accelerate launch -m lm_eval --model hf \--tasks MathVerse\--model_args pretrained=deepseek-ai/deepseek-math-7b-base\--batch_size 16--output_path /root/output.jsonl
将数据集改为hf上的任意数据集,需要在lm_eval/tasks/里面插入一个文件夹(命名为数据集的名字)放yaml文件,例如我要创建的是MathVerse文件夹,里面放着MathVerse.yaml。例如我自开发的:
https://github.com/Wchenjiahaoo/Mathverse--lm-evaluation-harness.githttps://github.com/Wchenjiahaoo/Mathverse--lm-evaluation-harness.git