Skip to content

Commit 139c4cd

Browse files
修改Opencompass中的模型名称错误以及解决本地评测环境报错问题 (#2854)
1 parent efcdf9b commit 139c4cd

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

docs/L1/Evaluation/readme.md

+15-4
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ for d in cmmlu_datasets:
105105
如果你想要评测本地部署的大语言模型,首先需要获取到完整的模型权重文件。以开源模型为例,你可以从 Hugging Face 等平台下载模型文件。接下来,你需要准备足够的计算资源,比如至少一张显存够大的 GPU,因为模型文件通常都比较大。有了模型和硬件后,你需要在评测配置文件中指定模型路径和相关参数,然后评测框架就会自动加载模型并开始评测。这种评测方式虽然前期准备工作相对繁琐,需要考虑硬件资源,但好处是评测过程完全在本地完成,不依赖网络状态,而且你可以更灵活地调整模型参数,深入了解模型的性能表现。这种方式特别适合需要深入研究模型性能或进行模型改进的研发人员。
106106

107107

108-
我们接下以评测 InternLM2-Chat-1.8B 在 C-Eval 数据集上的性能为例,介绍如何评测本地模型。
108+
我们接下以评测 InternLM2.5-1.8B-Chat 在 C-Eval 数据集上的性能为例,介绍如何评测本地模型。
109109

110110
### 相关配置
111111

@@ -115,11 +115,22 @@ for d in cmmlu_datasets:
115115
```bash
116116
cd /root/opencompass
117117
conda activate opencompass
118-
conda install pytorch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 pytorch-cuda=12.1 -c pytorch -c nvidia -y
118+
conda install pytorch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 pytorch-cuda=12.1 -c pytorch -c nvidia -y
119119
apt-get update
120120
apt-get install cmake
121121
pip install protobuf==4.25.3
122-
pip install huggingface-hub==0.23.2
122+
```
123+
124+
为了解决一些本地评测时出现的报错问题,我们还需要重装一些 python 库
125+
126+
```bash
127+
pip uninstall numpy -y
128+
pip install "numpy<2.0.0,>=1.23.4"
129+
pip uninstall pandas -y
130+
pip install "pandas<2.0.0"
131+
pip install onnxscript
132+
pip uninstall transformers -y
133+
pip install transformers==4.39.0
123134
```
124135

125136
为了方便评测,我们首先将数据集下载到本地:
@@ -160,7 +171,7 @@ models = [
160171
# python run.py --datasets ceval_gen --models hf_internlm2_5_1_8b_chat --debug
161172
```
162173

163-
可以通过以下命令评测 InternLM2-Chat-1.8B 模型在 C-Eval 数据集上的性能。由于 OpenCompass 默认并行启动评估过程,我们可以在第一次运行时以 --debug 模式启动评估,并检查是否存在问题。在 --debug 模式下,任务将按顺序执行,并实时打印输出。
174+
可以通过以下命令评测 InternLM2.5-1.8B-Chat 模型在 C-Eval 数据集上的性能。由于 OpenCompass 默认并行启动评估过程,我们可以在第一次运行时以 --debug 模式启动评估,并检查是否存在问题。在 --debug 模式下,任务将按顺序执行,并实时打印输出。
164175

165176
```bash
166177
python run.py --datasets ceval_gen --models hf_internlm2_5_1_8b_chat --debug

docs/L1/Evaluation/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
## 基础任务(完成此任务即完成闯关)
66

77
- 使用 OpenCompass 评测浦语 API 记录复现过程并截图。(注意:写博客提交作业时切记删除自己的 api_key!)
8-
- 使用 OpenCompass 评测 internlm2.5-chat-1.8b 模型在 ceval 数据集上的性能,记录复现过程并截图。(可选)
8+
- 使用 OpenCompass 评测 InternLM2.5-1.8B-Chat 模型在 ceval 数据集上的性能,记录复现过程并截图。(可选)
99

1010
## 进阶任务(闯关不要求完成此任务)
1111

0 commit comments

Comments
 (0)