|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
不久前,LLM(大型语言模型)还不可能重写代码。每个法学硕士都有一个令牌限制,它确定了它可以吸收和应用的字数。由于令牌限制较低,模型无法吸收执行代码转换等复杂任务所需的信息量。
Software development company Mantle recently faced a common challenge: they had built a next-generation equity management platform prototype in a specific coding language that was perfect for speedy interaction in response to feedback from customers.
软件开发公司Mantle最近面临着一个共同的挑战:他们用特定的编码语言构建了下一代股权管理平台原型,该原型非常适合快速交互以响应客户的反馈。
However, the code used in their production tech stack was different, and to ship the product, Mantle would need to convert the codebase from one language to another. This is a notoriously onerous task that is regularly faced by software teams and enterprises.
然而,他们的生产技术堆栈中使用的代码不同,为了交付产品,Mantle 需要将代码库从一种语言转换为另一种语言。这是软件团队和企业经常面临的一项极其繁重的任务。
“The effort is justified, but the process is painful,” said Dwayne Forde, Mantle co-founder and CTO. “Instead of moving a customer-facing roadmap forward, you are now going to spend a significant portion of valuable engineering time recreating existing functionality.”
Mantle 联合创始人兼首席技术官 Dwayne Forde 表示:“这种努力是合理的,但过程很痛苦。” “您现在将花费大量宝贵的工程时间来重新创建现有功能,而不是向前推进面向客户的路线图。”
Wondering if AI could help, Forde—a trusted industry leader with more than 20 years of engineering experience in roles with companies including VMware and Xtreme Labs—chronicled the process recently in a blog post on Mantle called “Working with AI: Code Conversion.”
Forde 想知道 AI 是否可以提供帮助,Forde 是一位值得信赖的行业领导者,在 VMware 和 Xtreme Labs 等公司拥有 20 多年的工程经验,最近在 Mantle 上发表的一篇名为“使用 AI:代码转换”的博客文章中记录了这一过程。
He hopes the case study will serve as a useful resource to other tech teams, helping them save time and effort.
他希望该案例研究能够成为其他技术团队的有用资源,帮助他们节省时间和精力。
It is the second in a series of instructional guides Forde has written for technical teams, as part of an effort to advance the collective interests of the sector by showing how AI can accelerate and enhance their work.
这是福特为技术团队编写的一系列指导指南中的第二份,作为通过展示人工智能如何加速和增强他们的工作来促进该行业集体利益的努力的一部分。
“Our goal wasn’t to achieve 100% perfectly crafted code,” Forde noted. “The goal was to get 80% of the boilerplate and repeated patterns out of the way so that engineers could focus on high-value validation and verification and we could ship the product.”
“我们的目标不是实现 100% 完美编写的代码,”Forde 指出。 “我们的目标是消除 80% 的样板文件和重复模式,以便工程师可以专注于高价值的验证和验证,并且我们可以交付产品。”
Not too long ago, it wasn’t possible for LLMs (Large Language Models) to rewrite code. Each LLM has a token limit, which establishes how many words it can absorb and apply. With lower token limits, the models are unable to absorb the amount of information required to perform complex tasks like code conversions.
不久前,LLM(大型语言模型)还不可能重写代码。每个法学硕士都有一个令牌限制,它确定了它可以吸收和应用的字数。由于令牌限制较低,模型无法吸收执行代码转换等复杂任务所需的信息量。
But with rapid advancements in LLM software came higher token limits, and Forde realized his team had exciting new options in front of them. Higher limits meant that models could increase their reasoning, perform more complex math and inference, and input and output context in dramatically larger sizes.
但随着 LLM 软件的快速进步,代币限制也随之提高,Forde 意识到他的团队面前有令人兴奋的新选择。更高的限制意味着模型可以增强推理能力,执行更复杂的数学和推理,以及以更大的尺寸输入和输出上下文。
One million tokens means, according to Medium, that a model can do the equivalent of reading 20 novels or 1000 legal case briefs.
根据 Medium 的说法,100 万个代币意味着一个模型相当于阅读 20 本小说或 1000 个法律案件摘要。
Forde and his team understood that this dramatically larger token limit would allow them to feed entire coding languages into an LLM, essentially teaching it to be bilingual.
福特和他的团队明白,这种极大的令牌限制将使他们能够将整个编码语言输入到法学硕士中,本质上是教它双语。
Because converting code is extremely labour-intensive, Mantle knew that having an LLM convert even small amounts of code from one language to another would be hugely beneficial to the delivery time of the engineering project.
由于转换代码是极其耗费人力的工作,Mantle 知道,让法学硕士将少量代码从一种语言转换为另一种语言,将极大地缩短工程项目的交付时间。
“We developed an approach that reduced the scope of work by two-thirds and saved months of developer time,” Forde wrote in his post.
“我们开发了一种方法,将工作范围缩小了三分之二,并节省了开发人员数月的时间,”福特在他的帖子中写道。
Converting the Mantle prototype project into a new code language would have normally taken months of manual labour.
将 Mantle 原型项目转换为新的代码语言通常需要数月的体力劳动。
Instead, Forde said his engineers focused their time experimenting with how to best prompt an LLM to do much of the work for them.
相反,福特表示,他的工程师将时间集中在试验如何最好地促使法学硕士为他们完成大部分工作。
It wasn’t just as simple as feeding the code languages into the LLM and asking it to translate.
这不仅仅是将代码语言输入 LLM 并要求其翻译那么简单。
Under Forde’s watch, the Mantle team went through a process of innovation and discovery to figure out the best instructions, context and guidance to provide the LLM in its work.
在 Forde 的监督下,Mantle 团队经历了一个创新和发现的过程,以找出在其工作中提供法学硕士的最佳说明、背景和指导。
They fed the model code snippets from their prototype source language, as well as existing production code patterns, descriptions of their target architecture, and provided the LLM with context about specific libraries and utilities used in Mantle’s own tech stack.
他们从原型源语言以及现有的生产代码模式、目标架构的描述中提供模型代码片段,并向法学硕士提供有关 Mantle 自己的技术堆栈中使用的特定库和实用程序的上下文。
“We have certain libraries that we prefer, so adding a section of context was very helpful to make sure the LLM output code was compatible with what we use,” said Forde.
“我们有某些我们喜欢的库,因此添加上下文部分对于确保 LLM 输出代码与我们使用的代码兼容非常有帮助,”Forde 说。
The team even fed the LLM screenshots to demonstrate how they wanted the information to be presented, something that would not be obvious to AI from the code language alone.
该团队甚至提供了法学硕士屏幕截图来演示他们希望如何呈现信息,而仅从代码语言来看,这对于人工智能来说并不明显。
“Screenshots of the existing application give the LLM a visual layout of the application,” said Forde. “The context and direction you provide don’t have to be all verbal. You can use visual reference points as well to get the output you’re after.”
“现有应用程序的屏幕截图为法学硕士提供了应用程序的可视化布局,”福特说。 “你提供的背景和方向不必都是口头的。您也可以使用视觉参考点来获得您想要的输出。”
In his blog post, Forde breaks down the step-by-step process Mantle used to convert their code. The process is innovative, iterative and – at times – playful.
在他的博客文章中,Forde 详细介绍了 Mantle 用于转换代码的分步过程。这个过程是创新的、迭代的,有时还很有趣。
At one point, the Mantle team instructed the LLM to “act like a software engineer who could only answer in source code.”
Mantle 团队一度指示法学硕士“像一名只能用源代码回答的软件工程师一样”。
The Mantle team asked the LLM to convert only small sections of code at a time, checked its work, corrected any misinterpretations, and then moved on.
Mantle 团队要求法学硕士一次只转换一小部分代码,检查其工作,纠正任何误解,然后继续前进。
The step-by-step experimentation allowed the Mantle team to refine and improve its work over time, and create an effective process that can now be replicated in future projects.
逐步的实验使 Mantle 团队能够随着时间的推移完善和改进其工作,并创建一个可以在未来项目中复制的有效流程。
“Once the file was generated, our team either reviewed and adjusted the output manually or adjusted the
“文件生成后,我们的团队要么手动审查并调整输出,要么调整
免责声明:info@kdj.com
所提供的信息并非交易建议。根据本文提供的信息进行的任何投资,kdj.com不承担任何责任。加密货币具有高波动性,强烈建议您深入研究后,谨慎投资!
如您认为本网站上使用的内容侵犯了您的版权,请立即联系我们(info@kdj.com),我们将及时删除。
-
- ZetaChain 和 Google Cloud 联手推动 Web3 的采用
- 2024-11-14 20:55:02
- 根据详细的好处,它还将促进可跨多个区块链运行的应用程序的开发。
-
- 特朗普任命埃隆·马斯克和维韦克·拉马斯瓦米改革联邦官僚机构
- 2024-11-14 20:30:01
- 美国当选总统唐纳德·特朗普周二就其精简联邦官僚机构的雄心勃勃的计划发表声明