跳转到主要内容

两周前,我们发布了Dolly,这是一个大型语言模型(LLM),经过不到30美元的训练,可以展示类似ChatGPT的人机交互(又称指令跟随)。今天,我们将发布Dolly 2.0,这是第一个开源的指令遵循LLM,它对授权用于研究和商业用途的人工生成指令数据集进行了微调。

Dolly 2.0是一个基于EleutherAI pythia模型家族的12B参数语言模型,专门针对Databricks员工众包的新的、高质量的人工生成指令跟踪数据集进行了微调。

我们正在开源Dolly 2.0的全部内容,包括训练代码、数据集和模型权重,所有这些都适合商业使用。这意味着任何组织都可以创建、拥有和定制功能强大的LLM,这些LLM可以与人对话,而无需为API访问或与第三方共享数据付费。

databricks-doolly-15k数据集

databricks-doolly-15k包含15000个高质量的人工生成提示/响应对,专门为指令调优大型语言模型而设计。根据databricks-doolly-15k(Creative Commons Attribution ShareAlike 3.0 Unported License)的许可条款,任何人都可以出于任何目的使用、修改或扩展此数据集,包括商业应用程序。

据我们所知,该数据集是第一个开源的、人工生成的指令数据集,专门设计用于使大型语言模型展示ChatGPT的神奇交互性。databricks-doolly-15k由5000多名databricks员工在2023年3月和4月期间撰写。这些培训记录是自然的、富有表现力的,旨在代表从头脑风暴、内容生成到信息提取和总结的广泛行为。

我们为什么要创建一个新的数据集?

我们一发布Dolly 1.0,就被想试用它的人的请求淹没了。我们一直在问的第一个问题是“我能在商业上使用这个吗?”

创建Dolly 1.0或LLM之后的任何指令的关键步骤是在指令和响应对的数据集上训练模型。Dolly 1.0是使用斯坦福大学Alpaca团队使用OpenAI API创建的数据集以30美元的价格培训的。该数据集包含来自ChatGPT的输出,正如斯坦福大学团队指出的那样,服务条款旨在阻止任何人创建与OpenAI竞争的模型。因此,不幸的是,这个常见问题的答案是,“可能不是!”

据我们所知,所有现有的众所周知的指令遵循模型(Alpaca、Koala、GPT4All、Vicuna)都受到这一限制,禁止商业使用。为了解决这个难题,我们开始寻找方法来创建一个不被商业使用“污染”的新数据集。

我们是怎么做到的?

我们从OpenAI的研究论文中知道,最初的InstructGPT模型是在由13000个指令跟随行为演示组成的数据集上训练的。受此启发,我们开始考虑是否可以在Databricks员工的领导下取得类似的结果。

事实证明,生成13000个问题和答案比看起来更难。每个答案都必须是原创的。它不能从ChatGPT或网络上的任何地方复制,否则会污染我们的数据集。这似乎令人望而生畏,但Databricks有5000多名员工对LLM非常感兴趣。因此,我们认为我们可以在他们中进行众包,以创建一个比40个标签商为OpenAI创建的数据集质量更高的数据集。但我们知道他们都很忙,都有全职工作,所以我们需要激励他们这样做。

我们举办了一场比赛,前20名的贴标工将获得一个大奖。我们还概述了7项非常具体的任务:

  • 公开问答:例如,“人们为什么喜欢喜剧电影?”或“法国首都是什么?”在某些情况下,没有正确的答案,而在另一些情况下,这需要借鉴对世界的了解。
  • 封闭式问答:这些问题只能使用参考文本中包含的信息来回答。例如,如果维基百科上有一段关于原子的话,人们可能会问,“原子核中质子和中子的比例是多少?”
  • 从维基百科中提取信息:在这里,注释者会从维基百科中复制一段文字,并从文章中提取实体或其他事实信息,如重量或测量值。
  • 总结维基百科的信息:为此,注释者提供了维基百科的一段文字,并被要求将其提炼成一个简短的摘要。
  • 脑力激荡:这项任务要求开放式思维和相关的可能选项列表。例如,“这个周末我可以和朋友们一起做一些有趣的活动吗?”。
  • 分类:在这项任务中,注释者被要求对类别成员做出判断(例如,列表中的项目是动物、矿物还是蔬菜),或者判断短文的属性,例如影评的情感。
  • 创造性写作:这项任务包括写一首诗或一封情书。

Example of Open QA in databricks-dolly-15k

How do I build a campfire?

Safety should always come first when starting a campfire. Ensure you have water or another way to extinguish your fire readily available. Use a campfire ring, pit, or clear a large area around your campfire location. Also, make sure campfires are permitted in your area.

With safety out of the way, all a fire needs are heat, fuel, and oxygen. Any combustible material will start a fire, but good campfire fuel sources include tinder, kindling, and dry logs.

Use stuff like dry pine needles, dry leaves, grasses, and wood shavings for tinder. You could also use newspaper (or any paper), dryer lint, or cardboard. For kindling, use smaller pieces of wood, such as twigs and sticks no thicker than 1 inch in diameter (about the thickness of your thumb).

Dry or well-seasoned logs will ensure a good burn. Stack the wood in a way that guarantees oxygen can easily reach your flame. Many prefer a teepee or log cabin stacking design. Now, use a heat source to create a flame or spark and apply this to your tinder. Once the tinder combusts, it should light the kindling, and the kindling should eventually ignite your logs. If all goes well, you should now be enjoying your campfire.

Example of Brainstorming in databricks-dolly-15k

Instead of making a peanut butter and jelly sandwich, what else could I combine peanut butter with in a sandwich? Give five ideas.

Instead of jelly, try one of the following with peanut butter in a sandwich:

1. Honey

2. Raisins

3. Fruit preserves

4. Bananas

5. Sliced apples

起初,我们对能否获得10000个结果持怀疑态度。但随着每晚排行榜的游戏化,我们在一周内打破了15000个结果。由于担心影响我们的生产力,我们结束了比赛。

我们创造商业可行模式的历程

我们还想生产一个可以在商业上使用的开源模型。尽管databricks-dolly-15k远小于训练dolly 1.0的数据集Alpaca,但基于 EleutherAI’s pythia-12b,的dolly 2.0模型表现出了高质量的指令跟随行为。事后看来,这并不奇怪。最近几个月发布的许多指令调优数据集都包含合成数据,其中通常包含幻觉和事实错误。

另一方面,databricks-doolly-15k是由专业人员生成的,质量很高,并且包含大多数任务的长答案。

您可以亲眼看到Dolly 2.0如何用于摘要和内容生成的一些示例。根据我们最初的客户反馈,很明显,这样的功能将在整个企业中得到广泛的应用。

Dolly 2.0总结了Databricks文档

Instruction

Response

What is the default configuration for new DBSQL warehouses?

Input:

Databricks SQL Serverless supports serverless compute. Admins can create serverless SQL warehouses (formerly SQL endpoints) that enable instant compute and are managed by Databricks. Serverless SQL warehouses use compute clusters in your Databricks account. Use them with Databricks SQL queries just like you normally would with the original customer-hosted SQL warehouses, which are now called classic SQL warehouses. Databricks changed the name from SQL endpoint to SQL warehouse because, in the industry, endpoint refers to either a remote computing device that communicates with a network that it's connected to, or an entry point to a cloud service. A data warehouse is a data management system that stores current and historical data from multiple sources in a business friendly manner for easier insights and reporting. SQL warehouse accurately describes the full capabilities of this compute resource. If serverless SQL warehouses are enabled for your account, note the following: New SQL warehouses are serverless by default when you create them from the UI. New SQL warehouses are not serverless by default when you create them using the API, which requires that you explicitly specify serverless. You can also create new pro or classic SQL warehouses using either method. You can upgrade a pro or classic SQL warehouse to a serverless SQL warehouse or a classic SQL warehouse to a pro SQL warehouse. You can also downgrade from serverless to pro or classic. This feature only affects Databricks SQL. It does not affect how Databricks Runtime clusters work with notebooks and jobs in the Data Science & Engineering or Databricks Machine Learning workspace environments. Databricks Runtime clusters always run in the classic data plane in your AWS account. See Serverless quotas. If your account needs updated terms of use, workspace admins are prompted in the Databricks SQL UI. If your workspace has an AWS instance profile, you might need to update the trust relationship to support serverless compute, depending on how and when it was created.

By default, when you create a new DBSQL warehouse using the UI, it will be a serverless SQL warehouse. However, when creating the same using the API, you will have to explicitly specify that it is a pro SQL warehouse.

 Dolly 2.0 generates content for a tweet

Instruction

Response

Write me a tweet about the launch of Dolly 2.0, our new LLM.

Dolly 2.0 is here 🤩

We've upgraded our LLM, making it more efficient, more powerful, and more accessible to a broader audience.

Learn more ⬇️

https://t.co/KxzT3HXCPb

真正开放的大型语言模型

我们多次从客户那里听说,拥有他们的模型将为他们提供最佳服务,使他们能够为特定领域的应用程序创建更高质量的模型,而无需将敏感数据移交给第三方。

我们还认为,偏见、问责制和人工智能安全等重要问题应该由广泛的不同利益相关者群体来解决,而不仅仅是少数大公司。开源数据集和模型鼓励评论、研究和创新,这将有助于确保每个人都能从人工智能技术的进步中受益。

作为一种技术和研究人工制品,我们不希望Dolly在有效性方面达到最先进的水平。然而,我们确实预计Dolly和开源数据集将作为大量后续工作的种子,这些工作可能有助于引导更强大的语言模型。

我今天该怎么开始?

要下载Dolly 2.0模型权重,只需访问Databricks Hugging Face页面,并访问Databricks实验室上的Dolly repo下载Databricks-doolly-15k数据集。加入我们的网络研讨会,了解如何为您的组织利用LLM。

资源