该章节比较简单,主要有两个需要注意的点
1.最好新建一个环境,不然会出现各种奇怪的bug
2.使用30%算例的A100,10%的会出现很大一部分结果为 '-'
首先创建一个环境
conda create -n opencompass python=3.10
conda activate opencompass
依序安装
conda install pytorch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 pytorch-cuda=12.1 -c pytorch -c nvidia -y
git clone -b 0.2.4 https://github.com/open-compass/opencompass
cd opencompass
pip install -r requirements.txt
pip install -e .
pip install protobuf
export MKL_SERVICE_FORCE_INTEL=1
运行
cp /share/temp/datasets/OpenCompassData-core-20231110.zip /root/opencompass/
unzip OpenCompassData-core-20231110.zip
python run.py --datasets ceval_gen --hf-path /share/new_models/Shanghai_AI_Laboratory/internlm2-chat-1_8b --tokenizer-path /share/new_models/Shanghai_AI_Laboratory/internlm2-chat-1_8b --tokenizer-kwargs padding_side='left' truncation='left' trust_remote_code=True --model-kwargs trust_remote_code=True device_map='auto' --max-seq-len 2048 --max-out-len 16 --batch-size 4 --num-gpus 1 --debug
结果如下
本章节借鉴于 大佬 agem 的文章 书生大模型实战营第三期 | 基础岛第6关-OpenCompass 评测 InternLM-1.8B 实践 - 知乎 (zhihu.com)