baichuan-inc / Baichuan-7B

A large-scale 7B pretraining language model developed by BaiChuan-Inc.
https://huggingface.co/baichuan-inc/baichuan-7B
Apache License 2.0
5.67k stars 506 forks source link

LLaMA-Vicuna-13B 和 Baichuan-Vicuna-7B 的对比评测数据(由GPT4打分,供大家参考) #51

Open 0xDing opened 1 year ago

0xDing commented 1 year ago

Required prerequisites

Questions

首先,分别感谢百川团队以及baichuan-vicuna-7b的工作。 考虑到大家可能对于经过SFT后的模型性能感兴趣(#37 ),在此分享一下使用 FastChat 的评估集由 GPT4 进行打分后的 Baichuan Vicuna 7b的评测结果:

https://baichuan-vicuna-eval.pleisto.app/

考虑到 baichuan-vicuna-7b 主要是用 ShareGPT 数据集做的训练,中文数据占比相对较小,因此直接拿 FastChat 的英文评估集进行评测,并和同样基于 ShareGPT数据集训练的 LLaMA Vicuna 13B 进行横向对比,可能是比较有实际意义的。

由GPT4生成的评测总结如下:

根据提供的评分数据,我们可以对两个LLM模型baichuan-vicuna-7bllama-vicuna-13b进行详细分析。首先,我们将分别计算每个任务的平均分,然后对模型进行总体评价。

写作任务:

baichuan-vicuna-7b:(9 + 9 + 9 + 9 + 9 + 8 + 7 + 9 + 7 + 8) / 10 = 8.5 llama-vicuna-13b:(8.5 + 9 + 9 + 10 + 9 + 9 + 9 + 9 + 8 + 9) / 10 = 9.05

角色扮演任务:

baichuan-vicuna-7b:(8 + 5 + 4 + 9 + 9 + 8 + 8 + 8 + 8 + 8) / 10 = 7.5 llama-vicuna-13b:(9 + 10 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9) / 10 = 9.1

常识知识:

baichuan-vicuna-7b:(9 + 8 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9) / 10 = 8.9 llama-vicuna-13b:(8.5 + 9 + 9 + 8.5 + 9 + 8.5 + 8.5 + 10 + 8.5 + 9) / 10 = 8.85

费米问题:

baichuan-vicuna-7b:(5 + 4 + 5 + 4 + 7 + 2 + 6 + 5 + 4 + 6) / 10 = 4.8 llama-vicuna-13b:(8 + 8 + 7 + 9 + 9 + 8 + 8 + 8 + 7 + 8) / 10 = 8

反常识问题:

baichuan-vicuna-7b:(4 + 9 + 8 + 8 + 8 + 9 + 9 + 8 + 6 + 8) / 10 = 7.7 llama-vicuna-13b:(8 + 9 + 9 + 9 + 9.5 + 8.5 + 9 + 9 + 9 + 9) / 10 = 8.9

编程:

baichuan-vicuna-7b:(4 + 3 + 7.5 + 3 + 4 + 4 + 5) / 7 = 4.36 llama-vicuna-13b:(2 + 2 + 6.5 + 5 + 5 + 2 + 6) / 7 = 4

数学:

baichuan-vicuna-7b:(2 + 4 + 4) / 3 = 3.33 llama-vicuna-13b:(4 + 5 + 2) / 3 = 3.67

一般性开放问答:

baichuan-vicuna-7b:(9 + 8 + 6 + 9 + 9 + 9 + 9 + 9 + 9 + 9) / 10 = 8.7 llama-vicuna-13b:(8.5 + 9 + 8 + 9 + 9 + 8.5 + 9 + 8.5 + 7 + 10) / 10 = 8.65

专业知识:

baichuan-vicuna-7b:(9 + 9 + 7 + 8 + 8 + 8 + 9 + 9 + 9 + 9) / 10 = 8.5 llama-vicuna-13b:(8.5 + 9 + 9 + 9 + 9 + 9 + 9 + 8 + 8.5 + 9.5) / 10 = 8.85

根据以上计算得出的平均分,我们可以看到,在10个任务中,llama-vicuna-13b在7个任务上的表现优于baichuan-vicuna-7b(写作任务、角色扮演任务、费米问题、反常识问题、编程、数学和专业知识),而baichuan-vicuna-7b在3个任务上的表现优于llama-vicuna-13b(常识知识、一般性开放问答和编程任务)。

总的来说,llama-vicuna-13b的表现更优,因为其在更多任务中的平均得分高于baichuan-vicuna-7b。然而,根据提供的数据,我们也可以看出,两个模型在某些任务上的表现相当接近,例如常识知识、一般性开放问答和专业知识。llama-vicuna-13b在费米问题、反常识问题和角色扮演任务上的表现显著优于baichuan-vicuna-7b,而baichuan-vicuna-7b在编程任务上的表现略优于llama-vicuna-13b

考虑到baichuan-vicuna-7b(7B参数)和llama-vicuna-13b(13B参数)之间的参数量差异,我们需要重新评估它们的性能。一般来说,参数量较大的模型在性能上可能更好,但同时计算资源消耗也更高,因此在实际应用中需要权衡。

由于在上述10个任务中,模型B在7个任务上的表现优于baichuan-vicuna-7b,而baichuan-vicuna-7b在3个任务上的表现优于llama-vicuna-13b。尽管llama-vicuna-13b在多数任务中表现较好,但在某些任务上,如常识知识、一般性开放问答和编程任务,两者的表现相差不大。这意味着在这些任务中,baichuan-vicuna-7b在性价比方面可能更具优势。

对于不同的应用场景,我们可以根据以下建议选择合适的模型:

  1. 如果计算资源充足,且需要在各个任务上都获得较好的性能,可以选择参数量较大的模型B。
  2. 如果计算资源有限,或者需要在特定任务(如常识知识、一般性开放问答和编程任务)上优化性价比,可以考虑选择参数量较小的baichuan-vicuna-7b
  3. 对于费米问题、反常识问题和角色扮演任务等,llama-vicuna-13b具有明显优势,因此在这些任务上可以优先考虑llama-vicuna-13b

总之,在考虑参数量差异后,我们可以得出结论:模型B在性能上优于baichuan-vicuna-7b,但计算资源消耗也更高。在实际应用中,根据任务需求和计算资源限制,可以在baichuan-vicuna-7bllama-vicuna-13b之间进行权衡。

Checklist

Nipi64310 commented 1 year ago

Hi @0xDing ,感谢分享,这2天刷了好多次终于等到评测了,有评测对比7b或chatgpt的吗,毕竟7b跟13b模型大小也差挺多

0xDing commented 1 year ago

Hi @0xDing ,感谢分享,这2天刷了好多次终于等到评测了,有评测对比7b或chatgpt的吗,毕竟7b跟13b模型大小也差挺多

由于GPT4 token比较贵,所以暂时没有做直接评测。 可以在查看https://baichuan-vicuna-eval.pleisto.app/ 上 chatgpt和 llama-vicuna 的答案来做间接比较。

EricLingRui commented 1 year ago

@0xDing 感谢工作分享,方便分享下其在sharegpt数据上的训练损失情况吗?

0xDing commented 1 year ago

@0xDing 感谢工作分享,方便分享下其在sharegpt数据上的训练损失情况吗?

我只对权重做了评测的工作,baichuan-vicuna-7b的权重文件由 fireballoon 训练,可以在 https://huggingface.co/fireballoon/baichuan-vicuna-7b/discussions 找到

mutefrank commented 1 year ago

不错啊,一个7b的中英文模型,在英文评测集上也跑出跟llama 13b接近的效果

GuWei007 commented 1 year ago

mark

Data2Me commented 1 year ago

请问LLaMA-Vicuna-13B的权重在哪里下载?有相应的微调代码吗?

0xDing commented 1 year ago

请问LLaMA-Vicuna-13B的权重在哪里下载?有相应的微调代码吗?

https://huggingface.co/lmsys/vicuna-13b-delta-v1.1 https://github.com/lm-sys/FastChat