With Microsoft Ignite in November 2021, Microsoft brings a brand new Azure OpenAI Service that provides access to OpenAI's powerful GPT-3 model through the new Azure Cognitive Service. Although Microsoft has not officially opened the Open AI Service, GitHub and OpenAI have launched a new GPT-3 model Codex-based tool - Copilot, through which software developers can write code more efficiently. I believe that many partners have begun to use Copilot in Visual Studio Code / Visual Studio to feel the power of GPT-3. As a developer, I hope Microsoft can open relevant documents as soon as possible and master relevant skills as soon as possible. In order to meet your requirements, today I will take you to OpenAI.
Introduction to GPT-3
In May 2020, Open AI published a seminal paper titled Language Models Are Few-Shot Learners. They show the GPT-3 language model, which uses a neural network with 175 billion parameters. GPT-3 is trained using data from CommonCrawl, WebText, Wikipedia, and book corpora, and shows impressive performance on a variety of natural language processing tasks, including translation, question answering, and cloze tasks. GPT-3 is also very good in performance, surpassing many existing models. In July 2020, two months after the paper was published, OpenAI opened a beta API playground, where you can access the GPT-3 model through API.
Several key features of GPT-3
- Zero/one/few-shot learning : Typically, deep learning is trained and tested on a specific set of classes. If computer vision classifies BB8, R2D2, C3PO in Star Wars, it can only be done for these three classes during testing. But in a zero-shot learning setting, the system can use classes that were not in training (for example, test with Manuda) when testing. One-shot and few-shot learning is also true. During testing, the system will see one or several new categories, respectively.
- Zero/one/few-shot task transfer : This integrates the concepts of zero/one/few-shot learning and multi-task learning. New tasks (or examples showing zero, one, or several new tasks) can be executed at any time, rather than showing new classes at test time. For example, enter "I love you -> I love you. I miss you -> ____." GPT-3 can perform the English-to-Chinese task that has not been trained before through single-sample task transfer.
- Transformers : Transformers is a framework for solving machine translation problems, with a simple network structure based on a self-attention mechanism that does not rely on recursion and convolution at all. Transformer is highly efficient through parallel computing and requires less training time.
- Generative models : There are two types of models for classification tasks in statistics - discriminative models and generative models. A discriminant model encodes the conditional probability of a given pair of observable and target variables: p(y|x). The generative model encodes the joint probability: p(x,y). The generative model can "generate new data similar to existing data", and the GPT-3 model is the application of the generative model.
- Multitask learning : Most deep learning systems are single-task and only target specific scenarios. Multitasking systems overcome this limitation. They are trained to solve different tasks for a given input. For example, if I input an apple, he can help me translate it into English Apple, find a picture of apple, and find some features of apple, etc.
- Semi-supervised learning : is training a model with a very large dataset in an unsupervised manner, and then adapting the model to different tasks by using supervised training on a smaller dataset.
Call GPT-3 via OpenAI API
Since Microsoft has not yet opened the GPT-3 function of OpenAI, we can only use GPT-3 through the API provided by OpenAI at this stage. (Of course you need a US phone number to activate this feature), OpenAI has very rich documentation, as well as examples, allowing developers to get started using the API very quickly.
▌ Several necessary steps for Python to call API
1. Install the openai library
pip install openai
- Request API key
- You can test it with Notebook
▌⼏ Points to note
- Model engine, there are now 2 main models for GPT-3
- For some examples, you can learn more application scenarios by visiting the links below
- You can do some testing through the Playground provided by OpenAI
- You can define the GPT-3 model for your own business, you can learn more through the link below
Outlook
GPT-3 is powerful and makes AI application scenarios closer to real life. I very much hope that Microsoft's OpenAI Service can be opened as soon as possible so that more developers can use it. Also, the support of OpenAI GPT-3 in Chinese is still very limited. I also hope that the Microsoft version of the service will have better Chinese support.
Relevant information
- Learn about Azure OpenAI Service capabilities at
- For an introduction to Azure OpenAI Service, please visit
- OpenAI related blogs
Microsoft Build 2022 has officially started registration!
Scan the code to register for the conference now
Sessions can be booked after May 11
Pay attention to Microsoft China MSDN public account to learn more
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。