In the beginning, computer programmers translated their desires into the language of machines. Now, those machines are becoming conversant in the language of their programmers. OpenAI’s newly released Codex, a machine learning algorithm that can parse everyday language and computer code, sits between these worlds.
This week, in a blog post and demo, OpenAI showed off Codex’s skills.
The algorithm can turn written prompts into computer code with, at times, impressive results. OpenAI believes Codex will prove a worthy sidekick for coders, accelerating their work.
What Is Codex?
Codex is a descendent of OpenAI’s GPT-3, a sprawling natural-language machine learning algorithm released last year. After digesting and analyzing billions of words, GPT-3 could write (sometimes eerily) passable text with nary but a simple prompt.
But when OpenAI released GPT-3 to developers, they quickly learned it could do more. One fascinating discovery was that GPT-3 could write simple code from prompts. But it wasn’t very good at it, so the team decided to fine-tune the algorithm with coding in mind from the start. They took a version of GPT-3 and trained it on billions of lines of publicly available code, and Codex was born.
According OpenAI, Codex is proficient in over a dozen computer languages, but it’s particularly good at Python and, of course, everyday language. These skills in hand, Codex can digest a prompt like, “Add this image of a rocket ship,” and spit out the code necessary to embed an image (provided by the programmer) on the screen.
In a demo, the OpenAI team showed how to code a simple video game—from blank screen to playable—using naught but a series of chatty prompts.
The demos are impressive, but Codex is not about to replace programmers.
OpenAI researchers say Codex currently completes around 37 percent of requests. That’s an improvement on an earlier iteration called Copilot, a kind of autocomplete for coders released as a product on Github, which had a success rate of 27 percent. But it took some manual labor in the form of supervised learning with labeled data sets to get it there. (GPT-3, by contrast, was trained on unlabeled data.) So, there’s room for improvement.
And like any demo, it’s difficult to predict how useful Codex will be in the real world. OpenAI acknowledges this is just a start, calling it a “taste of the future.” They expect it will get better over time, but part of their motivation for this week’s release was to get Codex into the hands of developers, a strategy that paid off richly for GPT-3.
Even with improvements, OpenAI doesn’t see tools like this as a replacement for coders. Rather, they hope to speed up programming and remove some of the drudgery. In the live demo, for example, OpenAI CEO Sam Altman casually noted Codex completed a step in seconds that would have taken him a half hour back when he was programming.
Further, writing good software isn’t only about the actual coding bit, they suggest. “Programming is really about having a dream,” OpenAI CTO Greg Brockman told Wired, “It’s about having this picture of what you want to build, understanding your user, asking yourself, ‘How ambitious should we make this thing, or should we get it done by the deadline?’i” Codex doesn’t come up with what to design or how to design it. It will need significant direction, oversight, and quality control for the foreseeable future. (Which is true of its sibling GPT-3 as well.)
For now, these kinds of programs will be more like sidekicks as opposed to the story’s hero. They may also be a next step in the long-running evolution of computer languages.
In a companion op-ed in TechCrunch, Brockman and Hadi Partovi, founder and CEO of Code.org, emphasize how far we’ve come from the days when a select few scientists laboriously programmed computers with punch cards and machine code. In a long progression, computer language has evolved from what suited machines to what suits us.
“With Al-generated code, one can imagine an evolution in every programming tool, in every programming class, and a Cambrian explosion of new software,” they wrote. “Does this mean coding is dead? No! It doesn’t replace the need for a programmer to understand code. It means coding just got much easier, higher impact and thus more important, just as when punch cards were replaced by keyboards, or when Grace Hopper invented the compiler.”
Given its potential, it’s likely OpenAI will eventually make Codex a paid product developers can access and build apps on (like GPT-3). And it’s possible this proves controversial. After Copilot’s release, some in the developer community cried foul, noting the makers of the algorithm would profit on the work of others without compensating them. OpenAI argues the data is protected under “fair use” laws. Brockman told The Verge OpenAI welcomes the debate and is open to adjusting course. Still, he argues the community will benefit overall.
“The real net effect is a lot of value for the ecosystem,” he said.
In the meantime, if GPT-3 was any indication, it’ll be fascinating to see what the developer community discovers as they get their hands on Codex for the first time. Stay tuned.
Image Credit: Sigmund / Unsplash
* This article was originally published at Singularity Hub
0 Comments