LysandreJik
commited on
Commit
•
63d9f33
1
Parent(s):
765fd74
Add model card
Browse files
README.md
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# GPT Neo 1.3B
|
2 |
+
|
3 |
+
The GPT Neo model is pretrained on the The Pile dataset: an 825GiB English text corpus targeted at training large-scale language models.
|
4 |
+
It is an open source replication of OpenAI's GPT-3 model and is released in several checkpoints: the 1.3B and 2.7B variants.
|
5 |
+
|
6 |
+
It was released on EleutherAI's [GitHub page](https://github.com/EleutherAI/gpt-neo) the 21st of March 2021.
|
7 |
+
|
8 |
+
## Model Description
|
9 |
+
|
10 |
+
GPT Neo is a transformers model pretrained on a very large corpus of English data in a self-supervised fashion. This means it was pretrained on the raw texts only, with no humans labelling them in any way (which is why it can use lots of publicly available data) with an automatic process to generate inputs and labels from those texts. More precisely, it was trained to guess the next word in sentences.
|
11 |
+
|
12 |
+
More precisely, inputs are sequences of continuous text of a certain length and the targets are the same sequence, shifted one token (word or piece of word) to the right. The model uses internally a mask-mechanism to make sure the predictions for the token i only uses the inputs from 1 to i but not the future tokens.
|
13 |
+
|
14 |
+
This way, the model learns an inner representation of the English language that can then be used to extract features useful for downstream tasks. The model is best at what it was pretrained for however, which is generating texts from a prompt.
|
15 |
+
|
16 |
+
It obtains a 6.159 perplexity on The Pile, and a 13.10 perplexity on Wikitext
|
17 |
+
|
18 |
+
It uses a mix of global and local attention across its layers. It was trained for 400000 steps.
|
19 |
+
|
20 |
+
## How to use
|
21 |
+
|
22 |
+
You can use this model directly with a pipeline for text generation. This example generates a different sequence each time it's run:
|
23 |
+
|
24 |
+
```py
|
25 |
+
>>> from transformers import pipeline, set_seed
|
26 |
+
>>> generator = pipeline('text-generation', model='EleutherAI/gpt_neo_xl')
|
27 |
+
>>> generator("EleutherAI has", do_sample=True, min_length=50)
|
28 |
+
|
29 |
+
[{'generated_text': 'EleutherAI has made a commitment to create new software packages for each of its major clients and has'}]
|
30 |
+
```
|