跳到主内容
@wquguru
精选72Sequoia Capital(YouTube)产品与增长

Harvey 如何在预算内构建研究实验室:应用层公司的后训练实战手册

How Harvey Built a Research Lab on a Budget | Gabe Pereyra

原文
发到 X

Next up, we are honored to have Gabe with us. Gabe is co-founder and president of Harvey. Um you were a research scientist at DeepMind ages ago, um and then at Meta I think before you showed your college roommates uh what GPT-3 could do. And this duo uh then became Harvey. Um we're really excited to have you here. I think everybody here in the audience is an application company um thinking about how to start doing their own research, post-training their own models, um and uh create their own labs.

接下来,我们很荣幸请到Gabe。Gabe是Harvey的联合创始人兼总裁。嗯,你很久以前是DeepMind的研究科学家,嗯,然后在Meta,我想是在你向大学室友展示GPT-3的能力之前。然后这对搭档就成了Harvey。嗯,我们真的很高兴你能来。我想在座的各位都是应用层公司,正在思考如何开始做自己的研究,对自己的模型进行后训练,嗯,并创建自己的实验室。

And so I think Harvey has really set the example here, and we're really delighted to have you give a talk on how to how you guys built Harvey Labs.

所以我认为Harvey在这里确实树立了榜样,我们非常高兴你能来谈谈你们是如何建立Harvey Labs的。

Awesome.

太棒了。

[applause]

[掌声]

So the alternative title to this talk is building a research lab on a budget. And it's an unfair game competing with the frontier labs if you're an application layer company. There are rich teams, there [snorts] are poor teams, and then there's us in the application layer. The frontier labs have more money, more talent, more compute infrastructure, and data. So how do you compete? By using the frontier ecosystem. When we started Harvey 4 years ago, most of these companies either didn't exist or were just getting started.

所以这次演讲的另一个标题是“在预算有限的情况下建立研究实验室”。如果你是应用层公司,与前沿实验室竞争是一场不公平的游戏。有富有的团队,[哼]有贫穷的团队,然后还有我们这些应用层的。前沿实验室有更多的资金、更多的人才、更多的计算基础设施和数据。那么你如何竞争呢?通过利用前沿生态系统。当我们4年前创办Harvey时,这些公司中的大多数要么不存在,要么刚刚起步。

And so we either had to build everything ourselves or in most cases focus on something different. Like building our GTM org and a great product. But today using the frontier ecosystem I think you can compete with the frontier labs and build frontier intelligence. This talk is going to be our high-level playbook for doing this. And I'm going to talk about how we build benchmarks and training data, how we work with the Neo Labs to do post training and how we serve these models in production.

所以我们要么必须自己构建一切,要么在大多数情况下专注于不同的事情。比如建立我们的GTM组织和优秀的产品。但今天,利用前沿生态系统,我认为你可以与前沿实验室竞争,并构建前沿智能。这次演讲将是我们的高层策略手册。我将谈谈我们如何构建基准和训练数据,如何与Neo Labs合作进行后训练,以及如何在生产中服务这些模型。

To start, you want to build a benchmark. If you don't have a good benchmark, you can't train models, and if you can't train models, you don't need to serve them in production. So, this year we released three of these data sets that we built. We started by building Legal Agent Bench, which is a taxonomy of tasks that associates would do at a large law firm. And these cover multiple practice areas, and they're complex tasks like doing drafting complex fund formation documents, doing case law research, things like that.

首先,你要构建一个基准。如果你没有好的基准,你就无法训练模型,如果你无法训练模型,你就不需要在生产中服务它们。所以,今年我们发布了我们构建的三个数据集。我们首先构建了Legal Agent Bench,这是一个大型律师事务所中助理会执行的任务分类。这些任务涵盖多个实践领域,而且是复杂的任务,比如起草复杂的基金设立文件、进行判例法研究等等。

We followed this up by building a contracting data set. This teaches This allows us to teach agents to do negotiation like you would in an in-house department. And then the one I'm most excited about that we recently released is a large diligence data set. This is, I think, one of the largest RL environments that's been released. The largest data rooms here are 80 million tokens, and it lets us do research on long context, very complex tasks.

我们随后构建了一个合同数据集。这教会了我们,也让我们能够教智能体像内部部门那样进行谈判。而我最兴奋的是我们最近发布的一个大型尽职调查数据集。我认为这是已发布的最大的强化学习环境之一。这里最大的数据室有8000万个令牌,这让我们能够研究长上下文、非常复杂的任务。

And I think the most interesting thing about these data sets is how we built them. One challenge we always had at Harvey for training models is we can't train on our customers' data. We work with the largest law firms and enterprises, and their legal data is incredibly sensitive. It's privileged, and so you can't put it in generic models. We can't even put it in our models. And so, how do you train models given that?

我认为这些数据集最有趣的地方在于我们是如何构建它们的。在Harvey,训练模型时我们一直面临的一个挑战是我们不能使用客户的数据进行训练。我们与最大的律师事务所和企业合作,他们的法律数据极其敏感,具有特权,因此不能放入通用模型中,甚至不能放入我们自己的模型中。那么,在这种情况下,我们如何训练模型呢?

And the thing that started working really well this year is using domain experts to guide synthetic data generation. And uh Brendan from Reka had a good analogy that the same way that engineers now don't write code, they vibe code and guide these coding models. We're starting to do the same thing. And so, my younger brother is actually a lawyer at Harvey, and he's gotten very good at using the coding models. He's trained our other lawyers to do that, and they can generate incredibly realistic data sets that we can use for training and also evaluating our product.

今年开始效果很好的一个方法是使用领域专家来指导合成数据的生成。Reka的Brendan有一个很好的类比:就像现在工程师不再手动编写代码,而是通过“氛围编码”来指导这些编码模型一样,我们也开始做类似的事情。实际上,我的弟弟是Harvey的一名律师,他已经非常擅长使用编码模型。他训练了我们其他的律师这样做,他们能够生成极其逼真的数据集,我们可以用这些数据集来训练和评估我们的产品。

And once you've done that, synthetic data isn't good enough, but it's a way to get started. And so, we work with companies like Mercor and Snorkel, who let you scale up this process and build larger sets particularly for training. Once you've done that, you need to turn these data sets into efficient RL environments. It gets really expensive as these data sets get larger and evaluation gets very expensive. For example, in our diligence data set, we have over 1,000 unit tests that are grading model outputs using LLM as a judge.

一旦你做到了这一点,合成数据还不够好,但它是一个起步的方式。因此,我们与Mercor和Snorkel等公司合作,他们让你能够扩展这个过程,构建更大的数据集,特别是用于训练。一旦你做到了这一点,你需要将这些数据集转化为高效的强化学习环境。随着数据集变得越来越大,评估变得非常昂贵。例如,在我们的尽职调查数据集中,我们有超过1000个单元测试,使用LLM作为裁判来评估模型输出。

If you use the largest models and you want to do RL rollouts and things like this, it gets very expensive. And so, there's a lot of work, and here's some we did with LangChain, of making these very efficient. And then the last thing we did that I think was a little controversial at the time, was open-sourcing some of these data sets. And the motivation for this was it's very hard to know your data set is good unless a lot of people train on it.

如果你使用最大的模型,并且想要进行强化学习 rollout 之类的操作,这会变得非常昂贵。因此,有很多工作要做,这里有一些我们与LangChain合作完成的工作,使这些过程非常高效。然后我们做的最后一件事,当时我认为有点争议,就是开源了其中一些数据集。这样做的动机是,除非很多人对数据集进行训练,否则很难知道你的数据集是否好。

When I used to do research at Google Brain and DeepMind, the best data sets were open, like ImageNet, CIFAR, MNIST, and everyone used them, and you were able to find all of the issues, and we get a ton of pull requests, we get suggestions. Um and then I think increasingly we're having the labs when they report new models benchmark on our data set. And then most importantly, we had Elon retweet it. So, once you've built the benchmark, now you have something to train models against.

当我在Google Brain和DeepMind做研究时,最好的数据集都是开放的,比如ImageNet、CIFAR、MNIST,每个人都在用,你能发现所有的问题,我们会收到大量的拉取请求和建议。嗯,然后我认为越来越多的实验室在报告新模型时会在我们的数据集上进行基准测试。最重要的是,埃隆转发了它。所以,一旦你建立了基准,现在你就有东西可以训练模型了。

And the thing that is exciting now is open-source models are getting competitive. In the past, it wasn't worth doing post training because the models were improving so quickly from pre-training that any post training you did quickly got absorbed by the next pre-trained model. But now with models like Kimmy 3, GLM 5.2, NeMo-Megatron, Inkling, and others, it's possible to take these very strong open-source base models and post train them to levels of frontier intelligence.

现在令人兴奋的是开源模型正在变得有竞争力。过去,进行后训练不值得,因为模型通过预训练进步太快,你做的任何后训练很快就会被下一个预训练模型吸收。但现在有了像Kimmy 3、GLM 5.2、NeMo-Megatron、Inkling等模型,可以将这些非常强大的开源基础模型进行后训练,达到前沿智能的水平。

Maybe not general frontier intelligence, but if you have a specific task like us, they are competitive. And so, the way we recommend getting started is working with the NeMo labs. They have a bunch of expertise and infrastructure already in place to help you make sure that your training data sets are good. They have recipes. And usually, if you work with them and you're not able to get better results, there's probably something you're doing wrong with your data set, and this is a very good way to bootstrap it.

也许不是通用前沿智能,但如果你有像我们这样的特定任务,它们是有竞争力的。因此,我们建议的入门方式是使用NeMo实验室。他们拥有丰富的专业知识和基础设施,可以帮助你确保训练数据集的质量。他们有配方。通常,如果你与他们合作却无法获得更好的结果,那可能是你的数据集有问题,这是一个很好的入门方法。

And so, some of the interesting work we did with these different providers, um Fireworks, we got some very interesting results training GLM 5.1 to use Fable or maybe Opus 4.8 as an advisor model. Um Base 10, we did some interesting work on KB compaction. N gram, who I think is here, we're doing interesting work on enterprise search and firm knowledge. Trajectory, um we worked with them to train NeMo-Megatron models. And Applied Compute, we're doing some interesting work on our Vault product.

因此,我们与这些不同的提供商进行了一些有趣的工作,比如Fireworks,我们训练GLM 5.1使用Fable或Opus 4.8作为顾问模型,取得了一些非常有趣的结果。Base 10,我们在KB压缩方面做了一些有趣的工作。N gram,我想他在这里,我们在企业搜索和公司知识方面进行有趣的工作。Trajectory,我们与他们合作训练NeMo-Megatron模型。Applied Compute,我们在Vault产品上做了一些有趣的工作。

And I think one question we got is why work with multiple NeMo labs. Why not just pick one? And for us, as we're scaling the research lab, we have more research projects than we have bandwidth to do internally or just with a single Neo lab. And every Neo lab is taking a different bet. They have different ways they think about research. We have different open source models we want to train. And the more we work with, the more we learn.

我想我们收到的一个问题是为什么与多个NeMo实验室合作,为什么不只选一个?对我们来说,随着研究实验室的扩展,我们的研究项目超出了内部或仅与一个NeMo实验室合作的带宽。每个NeMo实验室都在进行不同的尝试,他们对研究有不同的看法。我们有不同的开源模型想要训练。我们合作得越多,学到的就越多。

And it's getting easier than ever to do post training. So one, working with the Neo labs, we're learning a lot in partnership with them. And then we're doing more and more post training ourselves internally with APIs like Tinker and the infrastructure Fireworks and Base 10 have built. It's never been easier to post train these models and then serve them. And there's increasingly more post training talent that we're hiring and is available.

而且,进行后训练比以往任何时候都更容易。首先,与Neo实验室合作,我们通过伙伴关系学到了很多。然后,我们越来越多地在内部使用像Tinker这样的API以及Fireworks和Base 10构建的基础设施来进行后训练。对这些模型进行后训练然后提供服务,从未如此简单。而且,我们正在招聘越来越多的后训练人才,这些人才也越来越多。

And inspired by Cursor, the goal of these efforts is for us to build our version of Composer one. How do we package all of the work we've done with synthetic data, scaling it with Mercor, the work with the Neo labs, into a model we can serve alongside the closed source models. Now, once you've post trained a model, you need to be able to serve it in production. And this is non-trivial. So I want to start first by talking about our model serving infrastructure because I think so

受Cursor的启发,这些努力的目标是构建我们自己的Composer one版本。我们如何将我们在合成数据方面所做的工作、通过Mercor进行扩展、以及与Neo实验室的合作,打包成一个可以与闭源模型一起提供的模型。现在,一旦你后训练了一个模型,你需要能够在生产环境中提供服务。这并非易事。所以,我想首先谈谈我们的模型服务基础设施,因为我认为……

原文超出正文长度上限,此处截断——上游还有内容,完整版见上方「原文 ↗」。

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

相似阅读

另一事件,读法相近