书生浦语实战营第七节课:OpenCompass‐作业及笔记 - robinlubin12/InternLM2-OpenCamp GitHub Wiki

大模型开源开放评测体系 “司南” (OpenCompass2.0),用于为大语言模型、多模态模型等提供一站式评测服务。基模选择非常重要,掌握一个评测模型就很重要。

image 配置、推理和评估(涉及标准、效率、对比参数等)、可视化(可读性) image

“司南” (OpenCompass2.0)的基础步骤:

环境安装

git clone -b 0.2.4 https://github.com/open-compass/opencompass pip install protobuf 遇到错误mkl-service + Intel(R) MKL MKL_THREADING_LAYER=INTEL is incompatible with libgomp.so.1 ... 解决方案: export MKL_SERVICE_FORCE_INTEL=1 #或 export MKL_THREADING_LAYER=GNU `python run.py

--datasets ceval_gen \

--hf-path /share/new_models/Shanghai_AI_Laboratory/internlm2-chat-1_8b \ # HuggingFace 模型路径

--tokenizer-path /share/new_models/Shanghai_AI_Laboratory/internlm2-chat-1_8b \ # HuggingFace tokenizer 路径(如果与模型路径相同,可以省略)

--tokenizer-kwargs padding_side='left' truncation='left' trust_remote_code=True \ # 构建 tokenizer 的参数

--model-kwargs device_map='auto' trust_remote_code=True \ # 构建模型的参数

--max-seq-len 1024 \ # 模型可以接受的最大序列长度

--max-out-len 16 \ # 生成的最大 token 数

--batch-size 2 \ # 批量大小

--num-gpus 1 # 运行模型所需的 GPU 数量

--debug`

基础作业

使用 OpenCompass 评测 internlm2-chat-1_8b 模型在 C-Eval 数据集上的性能. image

一次评测的项目较多,耗时比较旧,要耐心等待! image

提交指南:https://mp.weixin.qq.com/s/_s0a9nYRye0bmqVdwXRVCg