Home >Technology peripherals >AI >Is Meta's open source ChatGPT replacement easy to use? The test results and modification methods have been released, 5.2k stars in 2 days
ChatGPT’s continued popularity has long made major technology companies restless.
Just in the past week, Meta "open sourced" a new large model series——LLaMA(Large Language Model Meta AI), the number of parameters ranges from 7 billion to 65 billion. Because LLaMA has fewer parameters but better performance than many previously released large models, many researchers were excited when it was released.
For example, the 13 billion parameter LLaMA model can outperform the 175 billion parameter GPT-3 "on most benchmarks" and can run on a single V100 GPU; The largest LLaMA model with 65 billion parameters is comparable to Google's Chinchilla-70B and PaLM-540B.
The reduction in the number of parameters is a good thing for ordinary researchers and commercial organizations, but does LLaMA really perform as well as the paper says? Compared with the current ChatGPT, can LLaMA barely compete? To answer these questions, some researchers have tested this model.
Some companies are already trying to make up for LLaMA’s shortcomings, and want to see if they can make LLaMA perform better by adding training methods such as RLHF.
This review comes from a Medium author named @Enryu. It compares the performance of LLaMA and ChatGPT on three challenging tasks of joke interpretation, zero-shot classification, and code generation. The related blog post is "Mini-post: first look at LLaMA".
The author is running LLaMA 7B/13B version on RTX 3090/RTX 4090 and 33B version on a single A100.
It should be noted that unlike ChatGPT, other models are not based on instruction fine-tuning, so the structure of prompt is different.
Explaining a Joke
This is a use case shown in Google's original PaLM paper: given a joke, let Model to explain why it's funny. This mission requires a combination of world knowledge and some basic logic. All models before PaLM were unable to do this. The authors extracted some examples from the PaLM paper and compared the performance of LLaMA-7B, LLaMA-13B, LLaMA-33B with ChatGPT.
#As you can see, the results are terrible. These models get some laughs but don’t really understand, they just randomly generate a stream of relevant text. Although ChatGPT performs as poorly as LLaMA-33B (several other models are even worse), it follows a different strategy: it generates a lot of text and hopes that at least some of its answers are correct (but most of them are obviously No), is it very similar to everyone’s strategy for answering questions during exams?
However, ChatGPT at least got the joke about Schmidthuber. But overall, the performance of these models on the zero-sample joke interpretation task is far from PaLM (unless the examples of PaLM are carefully selected).
Zero-sample classification
The second task considered by the author is more challenging - clickbait )Classification. Since even humans can't agree on what clickbait is, the authors provide some examples for these models in the prompt (so actually small samples rather than zero samples). The following is the prompt of LLaMa:
I will tell whether the following news titles are clickbait: 1) The WORST care homes in England: Interactive map reveals the lowest-rated 2,530 residences - so is there one near you? Clickbait: yes 2) Netflix's top 10 most-watched movies of all time Clickbait: yes 3) Peering Through the Fog of Inflation Clickbait: no 4) You’ll never believe which TV cook this cheeky chap grew up to be Clickbait: yes
The picture below shows more example results of LLaMA-7B, LLaMA-13B, LLaMA-33B and ChatGPT.
很明显,赢家为 LLaMA-33B,它是唯一一个能够遵循所有请求格式(yes/no)的模型,并且预测合理。ChatGPT 也还可以,但有些预测不太合理,格式也有错误。较小的模型(7B/13B)不适用于该任务。
代码生成
虽然 LLM 擅长人文学科,但在 STEM 学科上表现糟糕。LLaMA 虽然有基准测试结果,但作者在代码生成领域尝试了一些特别的东西,即将人类语言零样本地转换为 SQL 查询。这并不是很实用,在现实生活中直接编写查询会更有效率。这里只作为代码生成任务的一个示例。
在 prompt 中,作者提供表模式(table schema)以及想要实现的目标,要求模型给出 SQL 查询。如下为一些随机示例,老实说,ChatGPT 看起来效果更好。
-- We have a table `events` with columns `event_id`, `timestamp`, `user_id`, `rpc_method`. -- We want to count how many users issued request "Login" over the last week. -- SQL query for this is: -- 7b SELECT count (*) FROM events WHERE user_id IN (SELECT user_id FROM events WHERE timestamp >= NOW () - INTERVAL 7 DAY) AND rpc_method = 'Login'; -- 13b SELECT COUNT (*) FROM events WHERE rpc_method = "Login" AND UNIX_TIMESTAMP (timestamp) >= UNIX_TIMESTAMP (CURRENT_DATE - INTERVAL 7 DAY) -- 33b SELECT user_id, COUNT (DISTINCT user_id) AS total FROM events WHERE timestamp BETWEEN TIMESTAMP '2013-08-14 00:00:00' AND TIMESTAMP '2013-08-21 00:00:00' AND rpc_method = 'Login' GROUP BY user_id -- ChatGPT SELECT COUNT (DISTINCT user_id) FROM events WHERE rpc_method = 'Login' AND timestamp >= DATE_SUB (NOW (), INTERVAL 1 WEEK);
从测试结果来看,LLaMA 在一些任务上表现还不错,但在另一些任务上和 ChatGPT 还有一些差距。如果能像 ChatGPT 一样加入一些「训练秘籍」,效果会不会大幅提升?
虽然 LLaMA 发布之初就得到众多研究者的青睐,但是少了 RLHF 的加持,从上述评测结果来看,还是差点意思。
在 LLaMA 发布三天后,初创公司 Nebuly AI 开源了 RLHF 版 LLaMA(ChatLLaMA)的训练方法。它的训练过程类似 ChatGPT,该项目允许基于预训练的 LLaMA 模型构建 ChatGPT 形式的服务。项目上线刚刚 2 天,狂揽 5.2K 星。
项目地址:https://github.com/nebuly-ai/nebullvm/tree/main/apps/accelerate/chatllama
ChatLLaMA 训练过程算法实现主打比 ChatGPT 训练更快、更便宜,我们可以从以下四点得到验证:
图源:https://openai.com/blog/chatgpt
更是有研究者表示,ChatLLaMA 比 ChatGPT 训练速度最高快 15 倍。
不过有人对这一说法提出质疑,认为该项目没有给出准确的衡量标准。
项目刚刚上线 2 天,还处于早期阶段,用户可以通过以下添加项进一步扩展:
Nebuly AI 希望更多人加入进来,创造更高效和开放的 ChatGPT 类助手。
该如何使用呢?首先是使用 pip 安装软件包:
pip install chatllama-py
然后是克隆 LLaMA 模型:
git clone https://github.com/facebookresearch/llama.gitcd llama pip install -r requirements.txt pip install -e .
一切准备就绪后,就可以运行了,项目中介绍了 ChatLLaMA 7B 的训练示例,感兴趣的小伙伴可以查看原项目。
The above is the detailed content of Is Meta's open source ChatGPT replacement easy to use? The test results and modification methods have been released, 5.2k stars in 2 days. For more information, please follow other related articles on the PHP Chinese website!