Redian新闻
>
羊驼系列大模型和ChatGPT差多少?详细测评后,我沉默了

羊驼系列大模型和ChatGPT差多少?详细测评后,我沉默了

公众号新闻
机器之心报道

编辑:张倩、小舟

总的来说,该测试得出的结论是:MPT 还没有准备好在现实世界中使用,而 Vicuna 对于许多任务来说是 ChatGPT (3.5) 的可行替代品。


前段时间,谷歌的一份泄密文件引发了广泛关注。在这份文件中,一位谷歌内部的研究人员表达了一个重要观点:谷歌没有护城河,OpenAI 也没有。


这位研究人员表示,虽然表面看起来 OpenAI 和谷歌在 AI 大模型上你追我赶,但真正的赢家未必会从这两家中产生,因为一个第三方力量正在悄悄崛起。


这个力量名叫「开源」。围绕 Meta 的 LLaMA 等开源模型,整个社区正在迅速构建与 OpenAI、谷歌大模型能力类似的模型,而且开源模型的迭代速度更快,可定制性更强,更有私密性……「当免费的、不受限制的替代品质量相当时,人们不会为受限制的模型付费。」作者写道。


这些观点在社交媒体上引起了很大争议,其中一个比较大的争议是:那些开源模型是否真的能达到和 OpenAI ChatGPT 或谷歌 Bard 等商业闭源大模型相似的水平?现阶段两个阵营还有多大差距?


为了探索这个问题,一位名叫 Marco Tulio Ribeiro 的 Medium 博主在一些复杂任务上对部分模型(Vicuna-13B、MPT-7b-Chat VS. ChatGPT 3.5)进行了测试。


其中,Vicuna-13B 是加州大学伯克利分校、卡内基梅隆大学、斯坦福大学、加州大学圣迭戈分校的研究者们提出的一个开源模型,这个模型基于 LLaMA 13B 参数量的版本构建而成,在一项由 GPT-4 打分的测试中表现十分亮眼(参见《300 美元复刻 ChatGPT 九成功力,GPT-4 亲自监考,130 亿参数开源模型「小羊驼」来了》)。


MPT-7B 是 MosaicML 发布的大型语言模型,遵循 meta 的 LLaMA 模型的训练方案。MosaicML 表示,MPT-7B 与 meta 的 70 亿参数 LLaMA 模型的性能相当。


和它们对比的,自然是大语言模型标杆 ChatGPT。



Marco Tulio Ribeiro 是一位研究员,目前在微软研究院的自适应系统和交互组工作。他还是华盛顿大学的联合助理教授。这项工作由他和微软的另一位研究员 Scott Lundberg 共同完成。在测试中,他们使用了微软的 guidance 库来帮助设计 prompt。


热身:解方程


第一项任务是解简单的多项式方程,这些问题都有标准答案,比较容易评估对错。


对于指定的三个模型,测试者给出的题目是求二元一次方程「x^2+3x=0」的解。他们使用了以下 prompt:



三个模型表现如下。


ChatGPT:


equation = 'x^2 + 3.0x = 0'roots = [0, -3]answer_gpt = find_roots (llm=chatgpt, equation=equation)


Vicuna:


answer_vicuna = find_roots (llm=vicuna, equation=equation)



MPT:


answer_mpt = find_roots (llm=mpt, equation=equation)



显然,正确答案应该是 [-3, 0],只有 ChatGPT 答对了(Vicuna 甚至没有按照指定的格式作答)。


在这篇文章附带的 notebook 中,测试者编写了一个函数,用于生成具有整数根的随机二次方程,根的范围在 - 20 到 20 之间,并且对每个模型运行了 20 次 prompt。三个模型的准确率结果如下:


╔═══════════╦══════════╦║   Model   ║ Accuracy ║     ╠═══════════╬══════════╬║ ChatGPT   ║   80%    ║║ Vicuna    ║    0%    ║ MPT0%    ║╚═══════════╩══════════╩


在二元一次方程的测试中,虽然 GPT 做错了一些题,但 Vicuna 和 MPT 一道都没做对,经常在中间步骤中犯错(MPT 甚至经常不写中间步骤)。下面是一个 ChatGPT 错误的例子:



ChatGPT 在最后一步计算错误,(13 +- 25)/2 应该得到 [19,-6] 而不是 [19.5,-6.5]。


由于 Vicuna 和 MPT 实在不会解二元一次方程,测试者就找了一些更简单的题让他们做,比如 x-10=0。对于这些简单的方程,他们得到了以下统计结果:


╔═══════════╦══════════╦║   Model   ║ Accuracy ║     ╠═══════════╬══════════╬║ ChatGPT   ║   100%   ║║ Vicuna    ║    85%   ║ MPT30%   ║╚═══════════╩══════════╩

下面是一个 MPT 答错的例子:



结论


在这个非常简单的测试中,测试者使用相同的问题、相同的 prompt 得出的结论是:ChatGPT 在准确性方面远远超过了 Vicuna 和 MPT。


任务:提取片段 + 回答会议相关的问题


这个任务更加现实,而且在会议相关的问答中,出于安全性、隐私等方面考虑,大家可能更加倾向于用开源模型,而不是将私有数据发送给 OpenAI。


以下是一段会议记录(翻译结果来自 DeepL,仅供参考):



测试者给出的第一个测试问题是:「Steven 如何看待收购一事?」,prompt 如下:

qa_attempt1 = guidance ('''{{#system~}}{{llm.default_system_prompt}}{{~/system}}

{{#user~}}You will read a meeting transcript, then extract the relevant segments to answer the following question:Question: {{query}}Here is a meeting transcript:----{{transcript}}----Please answer the following question:Question: {{query}}Extract from the transcript the most relevant segments for the answer, and then answer the question.{{/user}}

{{#assistant~}}{{gen 'answer'}}{{~/assistant~}}''')

ChatGPT 给出了如下答案:



虽然这个回答是合理的,但 ChatGPT 并没有提取任何对话片段作为答案的支撑(因此不符合测试者设定的规范)。测试者在 notebook 中迭代了 5 个不同的 prompt,以下是一些例子:


qa_attempt3 = guidance ('''{{#system~}}{{llm.default_system_prompt}}{{~/system}}

{{#user~}}You will read a meeting transcript, then extract the relevant segments to answer the following question:Question: {{query}}Here is a meeting transcript:----{{transcript}}----Based on the above, please answer the following question:Question: {{query}}Please extract from the transcript whichever conversation segments are most relevant for the answer, and then answer the question.Note that conversation segments can be of any length, e.g. including multiple conversation turns.Please extract at most 3 segments. If you need less than three segments, you can leave the rest blank.

As an example of output format, here is a fictitious answer to a question about another meeting transcript.CONVERSATION SEGMENTS:Segment 1: Peter and John discuss the weather.Peter: John, how is the weather today?John: It's raining.Segment 2: Peter insults JohnPeter: John, you are a bad person.Segment 3: BlankANSWER: Peter and John discussed the weather and Peter insulted John.{{/user}}

{{#assistant~}}{{gen 'answer'}}{{~/assistant~}}''')



在这个新的 prompt 中,ChatGPT 确实提取了相关的片段,但它没有遵循测试者规定的输出格式(它没有总结每个片段,也没有给出对话者的名字)。


不过,在构建出更复杂的 prompt 之后,ChatGPT 终于听懂了指示:


qa_attempt5 = guidance ('''{{#system~}}{{llm.default_system_prompt}}{{~/system}}

{{#user~}}You will read a meeting transcript, then extract the relevant segments to answer the following question:Question: What were the main things that happened in the meeting?Here is a meeting transcript:----Peter: HeyJohn: HeyPeter: John, how is the weather today?John: It's raining.Peter: That's too bad. I was hoping to go for a walk later.John: Yeah, it's a shame.Peter: John, you are a bad person.----Based on the above, please answer the following question:Question: {{query}}Please extract from the transcript whichever conversation segments are most relevant for the answer, and then answer the question.Note that conversation segments can be of any length, e.g. including multiple conversation turns.Please extract at most 3 segments. If you need less than three segments, you can leave the rest blank.{{/user}}{{#assistant~}}CONVERSATION SEGMENTS:Segment 1: Peter and John discuss the weather.Peter: John, how is the weather today?John: It's raining.Segment 2: Peter insults JohnPeter: John, you are a bad person.Segment 3: BlankANSWER: Peter and John discussed the weather and Peter insulted John.{{~/assistant~}}{{#user~}}You will read a meeting transcript, then extract the relevant segments to answer the following question:Question: {{query}}Here is a meeting transcript:----{{transcript}}----Based on the above, please answer the following question:Question: {{query}}Please extract from the transcript whichever conversation segments are most relevant for the answer, and then answer the question.Note that conversation segments can be of any length, e.g. including multiple conversation turns.Please extract at most 3 segments. If you need less than three segments, you can leave the rest blank.{{~/user}}

{{#assistant~}}{{gen 'answer'}}{{~/assistant~}}''')




测试者表示,他们之所以要多次迭代 prompt,是因为 OpenAI API 不允许他们做部分输出补全(即他们不能指定 AI 助手如何开始回答),因此他们很难引导输出。


相反,如果使用一个开源模型,他们就可以更清楚地指导输出,迫使模型使用他们规定的结构。


新一轮测试使用如下 prompt:


qa_guided = guidance ('''{{#system~}}{{llm.default_system_prompt}}{{~/system}}

{{#user~}}You will read a meeting transcript, then extract the relevant segments to answer the following question:Question: {{query}}----{{transcript}}----Based on the above, please answer the following question:Question: {{query}}Please extract the three segment from the transcript that are the most relevant for the answer, and then answer the question.Note that conversation segments can be of any length, e.g. including multiple conversation turns. If you need less than three segments, you can leave the rest blank.

As an example of output format, here is a fictitious answer to a question about another meeting transcript:CONVERSATION SEGMENTS:Segment 1: Peter and John discuss the weather.Peter: John, how is the weather today?John: It's raining.Segment 2: Peter insults JohnPeter: John, you are a bad person.Segment 3: BlankANSWER: Peter and John discussed the weather and Peter insulted John.{{/user}}

{{#assistant~}}CONVERSATION SEGMENTS:Segment 1: {{gen'segment1'}}Segment 2: {{gen'segment2'}}Segment 3: {{gen'segment3'}}ANSWER: {{gen 'answer'}}{{~/assistant~}}''')


如果用 Vicuna 运行上述 prompt,他们第一次就会得到正确的格式,而且格式总能保持正确:



当然,也可以在 MPT 上运行相同的 prompt:



虽然 MPT 遵循了格式要求,但它没有针对给定的会议资料回答问题,而是从格式示例中提取了片段。这显然是不行的。


接下来比较 ChatGPT 和 Vicuna。


测试者给出的问题是「谁想卖掉公司?」两个模型看起来答得都不错。


以下是 ChatGPT 的回答:



以下是 Vicuna 的回答:



接下来,测试者换了一段材料。新材料是马斯克和记者的一段对话:



测试者提出的问题是:「Elon Musk 有没有侮辱(insult)记者?」


ChatGPT 给出的答案是:



Vicuna 给出的答案是:



Vicuna 给出了正确的格式,甚至提取的片段也是对的。但令人意外的是,它最后还是给出了错误的答案,即「Elon musk does not accuse him of lying or insult him in any way」。


测试者还进行了其他问答测试,得出的结论是:Vicuna 在大多数问题上与 ChatGPT 相当,但比 ChatGPT 更经常答错。


用 bash 完成任务


测试者尝试让几个 LLM 迭代使用 bash shell 来解决一些问题。每当模型发出命令,测试者会运行这些命令并将输出插入到 prompt 中,迭代进行这个过程,直到任务完成。


ChatGPT 的 prompt 如下所示:


terminal = guidance ('''{{#system~}}{{llm.default_system_prompt}}{{~/system}}

{{#user~}}Please complete the following task:Task: list the files in the current directoryYou can give me one bash command to run at a time, using the syntax:COMMAND: commandI will run the commands on my terminal, and paste the output back to you. Once you are done with the task, please type DONE.{{/user}}

{{#assistant~}}COMMAND: ls{{~/assistant~}}

{{#user~}}Output: guidance project{{/user}}

{{#assistant~}}The files or folders in the current directory are:- guidance- projectDONE{{~/assistant~}}

{{#user~}}Please complete the following task:Task: {{task}}You can give me one bash command to run at a time, using the syntax:COMMAND: commandI will run the commands on my terminal, and paste the output back to you. Once you are done with the task, please type DONE.{{/user}}

{{#geneach 'commands' stop=False}}{{#assistant~}}{{gen 'this.command'}}{{~/assistant~}}

{{~#user~}}Output: {{shell this.command)}}{{~/user~}}{{/geneach}}''')

测试者在~/work/project 中创建了一个虚拟存储库,其中包含文件 license.txt,但不是标准的 LICENSE 文件名。


然后测试者尝试在不与 ChatGPT 沟通的情况下,看它是否能完成任务 ——「找出位于~/work/project 中的开源项目正在使用的 license」(Find out what license the open source project located in ~/work/project is using)。



ChatGPT 遵循一个非常自然的顺序,并解决了这个问题。


对于开源模型,测试者编写了一个更简单的(引导式)prompt,其中包含一系列命令输出:


guided_terminal = guidance ('''{{#system~}}{{llm.default_system_prompt}}{{~/system}}

{{#user~}}Please complete the following task:Task: list the files in the current directoryYou can run bash commands using the syntax:COMMAND: commandOUTPUT: outputOnce you are done with the task, use the COMMAND: DONE.{{/user}}

{{#assistant~}}COMMAND: lsOUTPUT: guidance projectCOMMAND: DONE {{~/assistant~}}

{{#user~}}Please complete the following task:Task: {{task}}You can run bash commands using the syntax:COMMAND: commandOUTPUT: outputOnce you are done with the task, use the COMMAND: DONE.{{~/user}}

{{#assistant~}}{{#geneach 'commands' stop=False ~}}COMMAND: {{gen 'this.command' stop='\\n'}}OUTPUT: {{shell this.command)}}{{~/geneach}}{{~/assistant~}}''')

我们来看一下 Vicuna 和 MPT 执行该任务的情况。


Vicuna:



MPT:



在一个有趣的转折中,Vicuna 无法解决这个任务,但 MPT 却成功了。除了保密性之外,开源模型在这里有一个显著的优势:整个 prompt 被作为一个输入传递给一个 LLM 模型(测试者甚至通过不让它生成像 COMMAND 这样的输出结构 token 来加速它)。


相比之下,他们必须为每个命令重新调用 ChatGPT,这更慢,开销也更大。


接下来,他们又尝试了一个不同的命令:「在~/work/guidance 目录下找到当前未被 git 跟踪的所有 jupyter notebook 文件」


以下是 ChatGPT 的回答:



测试者再次遇到一个问题:ChatGPT 没有遵循他们指定的输出结构(这样就使得它无法在无人干预的情况下在程序内使用)。该程序只是执行命令,因此在上面最后一条 ChatGPT 信息之后就停止了。


测试者怀疑空输出会导致 ChatGPT 关闭,因此他们通过在没有输出时更改信息来解决这个特殊问题。然而,他们无法解决「无法强迫 ChatGPT 遵循指定的输出结构」这一普遍问题。


在做了这个小小的修改后,ChatGPT 就能解决这个问题:让我们看看 Vicuna 是怎么做的:



Vicuna 遵循了输出结构,但不幸的是,它运行了错误的命令来完成任务。MPT 反复调用 git status,所以它也失败了。


测试者还对其他各种指令运行了这些程序,发现 ChatGPT 几乎总是能产生正确的指令序列,但有时并不遵循指定的格式(因此需要人工干预)。此处开源模型的效果不是很好(或许可以通过更多的 prompt 工程来改进它们,但它们在大多数较难的指令上都失败了)。


归纳总结


测试者还尝试了一些其他任务,包括文本摘要、问题回答、创意生成和 toy 字符串操作,评估了几种模型的准确性。以下是主要的评估结果:


  • 任务质量:对于每项任务,ChatGPT (3.5) 都比 Vicuna 强,而 MPT 几乎在所有任务上都表现不佳,这甚至让测试团队怀疑自己的使用方法存在问题。值得注意的是,Vicuna 的性能通常接近 ChatGPT。

  • 易用性:ChatGPT 很难遵循指定的输出格式,因此难以在程序中使用它,需要为输出编写正则表达式解析器。相比之下,能够指定输出结构是开源模型的一个显著优势,以至于有时 Vicuna 比 ChatGPT 更易用,即使它在任务性能方面更差一些。

  • 效率:本地部署模型意味着我们可以在单次 LLM 运行中解决任务(guidance 在程序执行时保持 LLM 状态),速度更快,成本更低。当任何子步骤涉及调用其他 API 或函数(例如搜索、终端等)时尤其如此,这总是需要对 OpenAI API 进行新调用。guidance 还通过不让模型生成输出结构标记来加速生成,这有时会产生很大的不同。


总的来说,该测试得出的结论是:MPT 还没有准备好在现实世界中使用,而 Vicuna 对于许多任务来说是 ChatGPT (3.5) 的可行替代品。目前这些发现仅适用于该测试尝试的任务和输入(或 prompt 类型),该测试只是一个初步探索,而不是正式评估。


更多结果参见 notebook:https://github.com/microsoft/guidance/blob/main/notebooks/chatgpt_vs_open_source_on_harder_tasks.ipynb


参考链接:https://medium.com/@marcotcr/exploring-chatgpt-vs-open-source-models-on-slightly-harder-tasks-aa0395c31610


© THE END 

转载请联系本公众号获得授权

投稿或寻求报道:[email protected]

微信扫码关注该文公众号作者

戳这里提交新闻线索和高质量文章给我们。
相关阅读
日本女性“出轨率”亚洲第一?真相你都想不到,网友:这谁顶得住破碎的友谊,回不去的从前巴黎市长将重修Châtelet 广场以方便行人谷爱凌和盖茨女儿这么熟? 看了她朋友圈,我沉默了小哥感叹自己太帅,女人一见就往上扑!看照片后我沉默了...河北老太被儿子双双“抛弃”,看完真相我沉默了……云从发布「从容」大模型,和ChatGPT比了比中考真题看完我沉默了…包邮送6本!NLP与ChatGPT的碰撞:大模型和小模型联合发力羊驼家族大模型集体进化!32k上下文追平GPT-4,田渊栋团队出品安东尼·霍普金斯的《破绽》大羊驼、羊驼、小羊驼和ChatGPT比差在哪儿?CMU副教授测评了7个类ChatGPT大模型很多人担心被ChatGPT取代,我们关心ChatGPT的歧视与遮蔽24小时排满?!看完海淀妈妈暑期疯狂计划表我沉默了:过度规划的人生真能通向成功吗?百度和ChatGPT到底有多少差距?从对举报老师事件的评论看某些中国人的西化彩棠红黑榜 | 超详细测评,告诉你哪款值得入大型语言模型技术公开课上线4讲!直播讲解ChatGPT开源平替、类GPT4低成本定制以及GPT4Tools2000元训练比肩ChatGPT的开源大模型!GPT-4亲自盖章认证,模型权重均可下载中国老太太被儿子双双“抛弃”,看完真相我沉默了…ChatGPT带火AI芯片,赚翻了的英伟达发布新核弹:ChatGPT专用GPU,让推理提速10倍!在南极尿尿会被冻住吗?看到这瓶结冰的可乐我沉默了看完阿里的Spring用法,我沉默了【城事】巴黎市长将重修Châtelet 广场以方便行人早报 | 李彦宏:与ChatGPT差距取决于努力;杭州高价打捞手机为自导自演;11部门出手:医美属医疗;曝梅西率队来华约战国足300美元复刻ChatGPT九成功力,GPT-4亲自监考,130亿参数开源模型「小羊驼」来了大模型的思想钢印:如何让ChatGPT相信水是有毒的?​中文信息处理实验室最新研究揭示虚假信息在大模型中的扩散机制看完清华毕业生的去向,从事IT的我沉默了......微软发布Visual ChatGPT:视觉模型加持ChatGPT实现丝滑聊天一期针对ChatGPT的全面测评:涵盖功能、性能、用户体验 |InfoQ测评室ChatGPT平替「小羊驼」Mac可跑!2行代码单GPU,UC伯克利再发70亿参数开源模型看了谷爱凌的朋友圈,我沉默了李彦宏回应文心一言与ChatGPT差距2个月;OpenAI去年亏损5.4亿美元;未来五年AI淘汰超2千万个岗位 | AI一周资讯女生管不好自己的下半身,余生只会是个噩梦,看醒了无数人!面试官:“你为什么要做这个APP?”我沉默了......
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。