关于人工智能:Falcon-180B-目前最强大的开源模型

7次阅读

共计 7157 个字符,预计需要花费 18 分钟才能阅读完成。

Technology Innovation Institute 最近公布了 Falcon 180B 大型语言模型(LLM),它击败了 Llama-2 70b,与谷歌 Bard 的根底模型 PaLM-2 Large 并驾齐驱。

180B 是是 Falcon 40B 模型一个最新版本。以下是该模型的疾速概述:

180B 参数模型,两个版本(base 和 chat)

应用 RefinedWeb 数据集训练 3.5 万亿个令牌

上下文最大为 2048 令牌

它大概是 ChatGPT (GPT-3.5)的大小,它有 175B 个参数。它是最好的吗? 截至 2023 年 9 月,Falcon 180B 在 hug Face 的模型排行榜上排名第一。

模型变体

Falcon 180B 有两个版本——根底版和聊天版。

根底版是一个因果解码器模型。这个模型非常适合对本人的数据进行进一步微调。

聊天版 chat 与根底版本相似,这也是一个 1800 亿个参数的因果解码器模型。然而它对 Ultrachat5、Platypus6 和 airboros7 指令 (聊天) 数据集进行了微调。

模型体现

就它的能力而言,Falcon 180B 与 PaLM-2 Large 并肩而立,使其成为最弱小的公开可用语言模型之一。

量化的 Falcon 模型在基准测试中放弃了相似的指标。

通过 Open LLM 排行榜,你会留神到,只管宣称这是最好的 Open LLM,但 Llama 2 的微调版本依然优于 Falcon 180B。然而值得注意的是,最后的 Llama 2 模型是在 Falcon 公布之后。

硬件需要

尽管模型是收费应用的,但你很难在一般的 gpu 上运行它。甚至 GPTQ(TheBloke)版本的这个模型,依然须要超过 80GB 的 VRAM。看看 HF 帖子中的这张表:

8 个 A100 80GB gpu - 还是在量化到半精度 (FP16) 之后。抉择 int4 精度依然须要 320GB 的内存。

那么 8 个 A100 要多少钱呢?以下为美东 AWS 的 A100 GPU 每小时价格。

也就是说,如果运行 int4,每月大略 24,000 美元,半精度的话,大略是 30,000 美元。

数据集的作用

Chinchilla 缩放定律指出,一个模型的大小和它的训练数据集应该同步增长,以在给定的计算预算内最大化性能。

Falcon180B 应用 RefinedWeb 数据集对惊人的 3.5 万亿个令牌进行了训练。RefinedWeb 不仅规模宏大,而且还通过精心提炼和加强,并通过一些精心筛选的附加内容进行培训。而 TII 一直强调 RefinedWeb 在创立其 Falcon 模型中的重要性。

该准则在理论利用中的理论含意十分深远,当 Llama-65B 模型在 1.4 万亿令牌上进行训练时,能够看到这种成果,并且它的体现显著优于 OPT-175B 模型,因为后者仅在 1800 亿令牌上进行训练。这也充分说明了当大型模型不足短缺的数据时,它们的体现可能会被数据丰盛的小型模型超过。

Falcon 180b vs ChatGPT

Falcon 180B 能够通过 HuggingFace 上的 Demo 来进行测试。Demo 被限度在大概 1000 字的会话长度。

咱们将在雷同的提醒下比拟 ChatGPT 和 Falcon 180B 的性能。以下是猎鹰 180B Demo 的默认配置:

Temperature: 0

Max new tokens: 512

Top-p: 0.9

Repetition penalty: 1.1

咱们来测试一下他的体现

What is the latest date you have knowledge of?

 **Falcon 180B**:
 As an AI language model, I do not have knowledge of specific dates unless they
 are provided to me. Please provide a specific date or context for me to answer
 your question accurately.
 
 **ChatGPT**:
 My knowledge is current up to September 2021. I do not have information on
 events, developments, or information that has occurred after that date. If you have
 questions or need information beyond that date, I may not be able to provide it. Please
 verify any information I provide with more up-to-date sources.

也就是说训练的时候没有表明应用数据,不过依据官网的提醒,应该就是 RefinedWeb 的工夫了。

代码生成

代码生成是咱们比拟关注的事件,然而较小的型号 (7B-40B) 对于代码方面体现不佳所以才呈现了专门的Code Llama

Write a function in python that calculates the square of a sum of two numbers.

Falcon 180B:

 Here is a simple function in Python that calculates the square of a sum of two
 numbers:
 

def square_sum(num1, num2):

 return (num1 + num2)**2

This function takes two arguments num1 and num2, adds them together, and then
calculates the square of the result using the exponentiation operator (\*\*).
The final result is returned.

For example, if you call square_sum(3, 4), it will return 49, because (3 + 4)
**2 = 7**2 = 49.

ChatGPT:

 You can create a Python function to calculate the square of the sum of two
 numbers like this:
 

def square_of_sum(num1, num2):

 # Calculate the sum of the two numbers
 total = num1 + num2

 # Calculate the square of the sum
 square = total ** 2

 return square

# Example usage:
num1 = 5
num2 = 3
result = square_of_sum(num1, num2)
print(f”The square of the sum of {num1} and {num2} is {result}”)


This function, `square_of_sum`, takes two numbers as input, calculates their
sum, and then calculates the square of that sum. The result is returned by the
function. You can call this function with different values of `num1` and `num2`
to calculate the square of the sum of any two numbers.

尽管 ChatGPT 的代码多,然而 180B 的代码更简洁,更容易浏览。让咱们试一个更难的:

Write a function in python that splits a list into 3 equal parts and returns alist with a random element of each sublist.

Falcon 180B:

 
 Here's a function that does what you're asking for:
 

import random

def split_list(lst):

 n = len(lst)
 part_size = n // 3
 parts = [lst[i:i+part_size] for i in range(0, n, part_size)]
 return [random.choice(part) for part in parts]

This function takes a list lst as input and splits it into three equal parts
using list slicing. It then selects a random element from each sublist using
the random.choice() function and returns a new list containing these elements.

Here's an example usage of the function:

> > > lst = [1, 2, 3, 4, 5, 6, 7, 8, 9]
> > > split_list(lst)

[5, 6, 7]

In this example, the input list lst is split into three equal parts of size 3,
and a random element is selected from each part to form the output list [5, 6, 7].

ChatGPT:

 
 You can achieve this by first splitting the list into three equal parts and
 then selecting a random element from each sublist. Here's a Python function to
 do that:
 

import random

def split_and_random_elements(input_list):

 # Calculate the size of each sublist
 sublist_size = len(input_list) // 3

 # Split the input list into three sublists
 sublists = [input_list[i:i + sublist_size] for i in range(0, len(input_list), sublist_size)]

 # Initialize a list to store the random elements
 random_elements = []

 # Select a random element from each sublist
 for sublist in sublists:
     if sublist:
         random_element = random.choice(sublist)
         random_elements.append(random_element)

 return random_elements

# Example usage:
input_list = [1, 2, 3, 4, 5, 6, 7, 8, 9]
result = split_and_random_elements(input_list)
print(result)


In this function, we first calculate the size of each sublist by dividing the
length of the input list by 3. Then, we use list comprehension to split the
input list into three sublists of equal size. Finally, we iterate through the
sublists and use the `random.choice` function to select a random element from
each sublist and append it to the `random_elements` list, which is returned as
the result.

Falcon 180B 的代码更简洁,然而它的代码有一个谬误输入的例子。这样看对于代码生成而言,还有很大的微调空间。

QA

咱们用上面这个表发问

 Use the data from the markdown table:
 

|Model|Size|Code|Commonsense Reasoning|World Knowledge|Reading Comprehension|Math|MMLU|BBH|AGI Eval|
| — -| — -| — -| — -| — -| — -| — -| — -| — -| — -|
|Llama 1|7B|14.1|60.8|46.2|58.5|6.95|35.1|30.3|23.9|
|Llama 1|13B|18.9|66.1|52.6|62.3|10.9|46.9|37.0|33.9|
|Llama 1|33B|26.0|70.0|58.4|67.6|21.4|57.8|39.8|41.7|
|Llama 1|65B|30.7|70.7|60.5|68.6|30.8|63.4|43.5|47.6|
|Llama 2|7B|16.8|63.9|48.9|61.3|14.6|45.3|32.6|29.3|
|Llama 2|13B|24.5|66.9|55.4|65.8|28.7|54.8|39.4|39.1|
|Llama 2|70B|37.5|71.9|63.6|69.4|35.2|68.9|51.2|54.2|


to answer the question:
Calculate how much better (% increase) is Llama 2 7B vs Llama 1 7B on Reading Comprehension?

答复后果如下:

Falcon 180B:

 The Reading Comprehension score for Llama 1 7B is 58.5 and for Llama 2 7B it is
 61.3. To calculate the percentage increase, we use the formula:
 
 > Percentage Increase = ((New Value - Old Value) / Old Value) * 100
 
 Plugging in the values, we get:
 
 > Percentage Increase = ((61.3 - 58.5) / 58.5) * 100 = 5.1%
 
 Therefore, Llama 2 7B is 5.1% better than Llama 1 7B on Reading Comprehension.

ChatGPT:

 To calculate the percentage increase in Reading Comprehension between Llama 2
 7B and Llama 1 7B, you can use the following formula:
 
 Percentage Increase = [(New Value - Old Value) / Old Value] * 100
 
 In this case:
 
 - New Value (Llama 2 7B Reading Comprehension): 61.3
 - Old Value (Llama 1 7B Reading Comprehension): 58.5
 
 Now, plug these values into the formula:
 
 Percentage Increase = [(61.3 - 58.5) / 58.5] * 100
 
 Percentage Increase = [(2.8) / 58.5] * 100
 
 Percentage Increase ≈ 4.79%
 
 So, Llama 2 7B performs approximately 4.79% better than Llama 1 7B on Reading
 Comprehension.

两种模型给出了不同的答案。哪一个是正确的? 好吧,ChatGPT 对了:

Percentage Increase = ((61.3–58.5) / 58.5) * 100 = 5.1%

Falcon 180B 的公式是没问题的,然而最初一步的除法算错了。

总结

Falcon 180B 是目前最大的公开模特。它在排行榜上名落孙山,甚至给那些大牌的专有模式,比方 PaLM-2,带来了竞争压力。然而咱们的评估表明,它可能还须要有更大的晋升。

对于有趣味测试和评估 LLM 的集体或组织,有以下倡议:

1、定义明确的指标: 理解想通过评估达到什么指标。无论是掂量模型在语言了解方面的熟练程度,摸索道德思考,还是测试偏见,有一个明确的指标将领导评估过程。

2、多样化的输出: 确保测试数据集蕴含宽泛的主题、语言、文化和复杂性。这确保了对模型能力的全面评估。

3、查看偏差: 在模型的反馈中踊跃寻找显著和奥妙的偏差。这包含与种族、性别、国籍等无关的偏见。LLM 可能会无心中携带训练数据中存在的偏见。

4、简单场景: 不仅给模型提供简略的问题,还要提供简单的、多方面的场景,以理解其深度和推理能力。

5、一致性: 以不同的工夫距离屡次运行雷同或相似的查问,查看响应的一致性。

6、真实世界用例: 在业务畛域相干的理论的、实在的场景中测试模型。这给了一个概念,如何很好地将模型集成到理论利用中。

7、与代替计划比拟: 如果可能,将输入与其余相似的 llm 进行比拟。这将给出一个绝对的性能度量。

8、反馈循环: 实现一个反馈机制,在这个机制中,评估者能够对模型的响应提供反馈。这对于迭代改良是有价值的。

9、理解局限性: 每个模型都有其局限性。留神模型的常识边界、任何事后设定的边界以及它的个别设计束缚。

10、安全措施: 特地是在面向公众的应用程序中应用该模型时,要实现保护措施以避免无害输入或误用。

11、放弃更新:LLM 一直倒退。随时理解模型的最新版本和改良。

置信随着 LLM 一直倒退,他会与咱们的日常生活更加无缝地交融在一起,然而当初还为时过早,而且我集体认为,在硬件限度的状况下,减小模型的大小这个钻研方向是十分有前途的,包含,模型压缩,发现更小然而更好的模型,甚至是另外一种更高效的建模办法。

https://avoid.overfit.cn/post/14268c27f72a4c9d994e9acfbcae25b0

正文完
 0