Can AI Write Your React Code?
In a word: YES! But it could do much, much more than that. This disruptive language model is taking the internet by storm — it’s called GPT-3 (Generative Pre-trained Transformer 3). It is an autoregressive language model that uses deep learning to produce human-like text. It is the third-generation language prediction model in the GPT-n series created by OpenAI. OpenAI is an AI research and development company founded in late 2015, by one of THE tech innovators of our time — Elon Musk (along with Greg Brockman (CTO), Sam Altman (CEO) and 3 other gentlemen).
Why Is It The Most Powerful Language Model Ever Built?
TL;DR it is massive in size — 175 billion parameters. Parameters are required by the model when making predictions and they determine the skill of the model on your problem.
Here’s a comparison of some of the popular pre-trained models:
To put things into perspective, the human brain has an equivalent of 1000 billion parameters 🤯.
One architecture used in natural language processing (NLP) is a neural network based on a deep learning model that was first introduced in 2017 — the Transformer. GPT-n models are based on this Transformer-based deep learning neural network architecture.
GPT-3 has been training on some of the world’s largest supercomputers for the past 2 years. GPT-2 was released just last year (2019) and you can clearly see by the magnitude with which GPT-3 has surpassed its predecessor in such a short period of time. GPT-3 has scraped every bit of information available on the internet. Articles, researches, history, literature, every line of publicly available code. It is trained using all the information there is on the internet.
Some bad news follows. “With great power comes great responsibility”. Tools as powerful as GPT-3 can’t be handed out to everyone, right? You can join the waitlist here to be a beta tester for the API, or use it for academic research purposes.
The good news is, some of the lucky folks who got early access to it have much to show. Let’s have a look…
What Can It Do?
The thing with such powerful language models is that the possibilities are limitless. When combined with the creativity of humans, this AI can achieve things like:
- Write fiction, poems, humor (Transformer AI poetry: Poetry classics as reimagined and rewritten by artificial intelligence).
- Produce a fake blog post for a college student, that recently landed in the №1 spot on Hacker News (blog post).
- Write business memos (3-step process on how to recruit board members).
- Have profound conversations with itself or be used in chatbots.
- Write CODE!! 🧑💻
Write React Code
Sharif Shameem, one of the lucky few has experimented with the coding capabilities of GPT-3 by developing this platform — https://debuild.co/. Again, it is not accessible without explicit permissions to use it. So, let’s go through this guy’s twitter handle to see a few demos.
To-do List:
Component Performing Mathematical Operations:
Google Home Page:
It boils down to this: enter a detailed & clear description of what you want your app to do and click a button. That’s it 🔥. It will spit out some code for you in a matter of seconds.
Say Goodbye To Your Job As A Web Developer (?) 😉
Not so soon 😂. It appears to be like great, almighty Ultron which consumed Jarvis and moved ahead intending to rule us all.
But fortunately, that’s not the case. GPT-3 is a highly efficient NLP model. It can understand spoken & written language, extract context out of sentences. What it is not although, is a sentient AI. It is not as smart as it sounds. It can’t make new discoveries, it can’t invent new things.
As a developer, you can use it to generate boilerplate code, while you do the heavy lifting. You need not focus on smaller aspects of development, when you can delegate tasks like creating UI components, applying simple logic, etc to the AI. You can focus on the bigger picture, the architectural stuff, maybe direct & teach the AI to produce more optimal code based on your experience & practices. Maybe, you would like to replace day-to-day unit testing frameworks with a text-based-instruction-taking framework. You are only limited by your own imagination, really.
Ultimately, AIs like this can help to accelerate the development process and serve as your personal Jarvis so that you can develop even better applications, even faster.
In a more realistic world, OpenAI CEO Sam Altman made the same point on July 20 on Twitter: “The GPT-3 hype is way too much….AI is going to change the world, but GPT-3 is just a very early glimpse.”
Update: Sept 4, 2020
OpenAI has announced projected pricing plans for the API, which gives user access to GPT-3. Beta users will need to choose from 4 pricing plans, from October 1:
- Explore: Free tier: 100K tokens or a three-month trial, whichever you use up first.
- Create: $100 per month for 2M tokens, plus 8 cents for every additional 1k tokens.
- Build: $400 per month for 10M tokens, plus 6 cents for every additional 1k tokens.
- Scale: Contact OpenAI for pricing.
2M tokens are equivalent to nearly 3,000 pages of text. You can check this Reddit thread by Gwern Branwen, a researcher, for more details.
Credits:
- This awesome stream by Clever Programmer — Code 10x Faster With This CRAZY New AI Tool (GPT-3)
- Sharif
- OpenAI
- Wikipedia
- Forbes
- Gwern Branwen (Reddit)