included DALL.E to the lessons
This commit is contained in:
parent
f900907d8c
commit
156b7225c6
|
|
@ -10,7 +10,7 @@ The idea of a neural network being able to do general tasks without downstream t
|
|||
|
||||
> Understanding and being able to produce text also entails knowing something about the world around us. People also learn by reading to the large extent, and GPT network is similar in this respect.
|
||||
|
||||
Text generation networks work by predicting probability of the next word $P(w_N)$. However, unconditional probability of the next word equals to the frequency of the this word in the text corpus. GPT is able to give us **conditional probability** of the next word, given the previous ones $P(w_N | w_{n-1}, ..., w_0)$.
|
||||
Text generation networks wor;k by predicting probability of the next word $$P(w_N)$$ However, unconditional probability of the next word equals to the frequency of the this word in the text corpus. GPT is able to give us **conditional probability** of the next word, given the previous ones: $$P(w_N | w_{n-1}, ..., w_0)$$
|
||||
|
||||
> You can read more about probabilities in our [Data Science for Beginers Curriculum](https://github.com/microsoft/Data-Science-For-Beginners/tree/main/1-Introduction/04-stats-and-probability)
|
||||
|
||||
|
|
@ -25,9 +25,12 @@ $$
|
|||
|
||||
GPT is not a single model, but rather a collection of models developed and trained by [OpenAI](https://openai.com).
|
||||
|
||||
Under the GPT models, we have GPT-2, GPT-3, GPT-3.5 and now, GPT-4. [GPT-2](https://huggingface.co/docs/transformers/model_doc/gpt2#openai-gpt2), has up to 1.5 billion parameters. Next we have the GPT-3 model has up to 175 billion parameters which is 116 times larger than GPT-2.
|
||||
Under the GPT models, we have:
|
||||
|
||||
| [GPT-2](https://huggingface.co/docs/transformers/model_doc/gpt2#openai-gpt2) | [GPT 3](https://openai.com/research/language-models-are-few-shot-learners) | [GPT-4](https://openai.com/gpt-4) |
|
||||
| -- | -- | -- |
|
||||
|Language model with upto 1.5 billion parameters. | Language model with up to 175 billion parameters | 100T parameters and accepts both image and text inputs and outputs text. |
|
||||
|
||||
The latest model openly available is [GPT-4](https://openai.com/gpt-4), which is a large multimodal model. GPT-4 accepts both image and text inputs and outputs text. The difference between GPT-3.5 and GPT-4 is subtle, but GPT-4 offere more reliable and creative output as well as is able to handle more nuanced instructions compared to GPT-3.5. [Learn more about GPT-4](https://openai.com/research/gpt-4)
|
||||
|
||||
The GPT-3 and GPT-4 models are available [as a cognitive service from Microsoft Azure](https://azure.microsoft.com/en-us/services/cognitive-services/openai-service/#overview?WT.mc_id=academic-77998-cacaste), and as [OpenAI API](https://openai.com/api/).
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Multi-Modal Networks
|
||||
|
||||
After the success of transformer models for solving NLP tasks, there were many attempts to apply the same or similar architectures to computer vision tasks. Also, there is a growing interest in building models that would *combine* vision and natural language capabilities. One of such attempts was done by OpenAI, and it is called CLIP.
|
||||
After the success of transformer models for solving NLP tasks, the same or similar architectures have been applied to computer vision tasks. There is a growing interest in building models that would *combine* vision and natural language capabilities. One of such attempts was done by OpenAI, and it is called CLIP and DALL.E.
|
||||
|
||||
## Contrastive Image Pre-Training (CLIP)
|
||||
|
||||
|
|
@ -32,7 +32,7 @@ We can also do the opposite. If we have a collection of images, we can pass this
|
|||
|
||||
Open the [Clip.ipynb](Clip.ipynb) notebook to see CLIP in action.
|
||||
|
||||
## Image Generation with VQGAN + CLIP
|
||||
## Contrastive Image Pre-Training (CLIP)
|
||||
|
||||
CLIP can also be used for **image generation** from a text prompt. In order to do this, we need a **generator model** that will be able to generate images based on some vector input. One of such models is called [VQGAN](https://compvis.github.io/taming-transformers/) (Vector-Quantized GAN).
|
||||
|
||||
|
|
@ -56,6 +56,20 @@ Picture generated from prompt *a closeup watercolor portrait of young male teach
|
|||
|
||||
> Pictures from **Artificial Teachers** collection by [Dmitry Soshnikov](http://soshnikov.com)
|
||||
|
||||
## DALL-E
|
||||
### [DALL-E 1](https://openai.com/research/dall-e)
|
||||
DALL-E is a version of GPT-3 trained to generate images from prompts. It has been trained with 12-billion parameters.
|
||||
|
||||
Unlike CLIP, DALL-E receives both text and image as a single stream of tokens for both images and text. Therefore, from multiple prompts, you can generate images based on the text.
|
||||
|
||||
### [DALL-E 2](https://openai.com/dall-e-2)
|
||||
The main difference between DALL.E 1 and 2, is that it generates more realistic images and art.
|
||||
|
||||
Examples of image genrations with DALL-E:
|
||||
 |  | 
|
||||
----|----|----
|
||||
Picture generated from prompt *a closeup watercolor portrait of young male teacher of literature with a book* | Picture generated from prompt *a closeup oil portrait of young female teacher of computer science with a computer* | Picture generated from prompt *a closeup oil portrait of old male teacher of mathematics in front of blackboard*
|
||||
|
||||
## References
|
||||
|
||||
* VQGAN Paper: [Taming Transformers for High-Resolution Image Synthesis](https://compvis.github.io/taming-transformers/paper/paper.pdf)
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 1.5 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.5 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.8 MiB |
Loading…
Reference in New Issue