一、环境安装

              

conda create --name opencompass python=3.10 pytorch torchvision pytorch-cuda -c nvidia -c pytorch -y
conda activate opencompass
git clone https://gitee.com/open-compass/opencompass.git
cd opencompass
pip install -e .
# 下载数据集到 data/ 处
wget https://github.com/open-compass/opencompass/releases/download/0.1.1/OpenCompassData.zip
unzip OpenCompassData.zip

      二、数据集

# 解压评测数据集到 data/ 处
cd ~/opencompass

cp /share/temp/datasets/OpenCompassData-core-20231110.zip .


unzip OpenCompassData-core-20231110.zip

# 将会在opencompass下看到data文件夹

python tools/list_configs.py internlm ceval

三、下载模型

apt-get install git-lfs
git init
git lfs install
git clone https://www.modelscope.cn/Shanghai_AI_Laboratory/internlm2-chat-7b.git

四、测试性能

python run.py --datasets ceval_gen --hf-path /root/model/Shanghai_AI_Laboratory/internlm2-chat-7b/ --tokenizer-path /root/model/Shanghai_AI_Laboratory/internlm2-chat-7b/ --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

就问这些个error,你怕不怕,小心脏你抖不抖。

重新来一遍吧


conda create --name opencompass --clone=/root/share/conda_envs/internlm-base
conda activate opencompass
git clone https://gitee.com/open-compass/opencompass.git
cd opencompass
pip install -e .

python tools/list_configs.py internlm ceval

python run.py --datasets ceval_gen --hf-path /root/model/Shanghai_AI_Laboratory/internlm2-chat-7b/ --tokenizer-path /root/model/Shanghai_AI_Laboratory/internlm2-chat-7b/ --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

激动吧

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐