stellaathena avi-skowron commited on
Commit
4e49ead
1 Parent(s): 53bcd7e

Create README.md (#14)

Browse files

- Create README.md (2625cae71a80354c7e4190ef3ce16424a8371a4a)


Co-authored-by: Aviya Skowron <avi-skowron@users.noreply.huggingface.co>

Files changed (1) hide show
  1. README.md +183 -0
README.md ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - pytorch
6
+ - causal-lm
7
+ license: apache-2.0
8
+ datasets:
9
+ - the_pile
10
+ ---
11
+
12
+ GPT-NeoX-20B is a 20 billion parameter autoregressive language model trained
13
+ on [the Pile](https://pile.eleuther.ai/) using the [GPT-NeoX
14
+ library](https://github.com/EleutherAI/gpt-neox). Its architecture intentionally
15
+ resembles that of GPT-3, and is almost identical to that of [GPT-J-
16
+ 6B](https://huggingface.co/EleutherAI/gpt-j-6B). Its training dataset contains
17
+ a multitude of English-language texts, reflecting the general-purpose nature
18
+ of this model. See the [accompanying paper](https://arxiv.org/abs/2204.06745)
19
+ for details about model architecture (including how it differs from GPT-3),
20
+ training procedure, and additional evaluations.
21
+
22
+ ### Model details
23
+
24
+ - Developed by: [EleutherAI](http://eleuther.ai)
25
+ - Model type: Transformer-based Language Model
26
+ - Language: English
27
+ - Learn more: [GPT-NeoX-20B: An Open-Source Autoregressive Language
28
+ Model](https://arxiv.org/abs/2204.06745). For details about the training dataset,
29
+ see [the Pile paper](https://arxiv.org/abs/2101.00027), and [its data
30
+ sheet](https://arxiv.org/abs/2201.07311).
31
+ - License: Apache 2.0
32
+ - Contact: to ask questions about this model, join the [EleutherAI
33
+ Discord](https://discord.gg/zBGx3azzUn), and post them in `#release-discussion`.
34
+ Please read the existing GPT-NeoX-20B documentation before asking about the model
35
+ on Discord. For general correspondence: [contact@eleuther.
36
+ ai](mailto:contact@eleuther.ai).
37
+
38
+ <figure style="width:30em">
39
+
40
+ | Hyperparameter | Value |
41
+ | ---------------------- | ----------- |
42
+ | n<sub>parameters</sub> | 20554567680 |
43
+ | n<sub>layers</sub> | 44 |
44
+ | d<sub>model</sub> | 6144 |
45
+ | n<sub>heads</sub> | 64 |
46
+ | d<sub>head</sub> | 96 |
47
+ | n<sub>vocab</sub> | 50257 |
48
+ | Sequence Length | 2048 |
49
+ | Learning Rate | 0.97 x 10<sup>-5</sup> |
50
+ | Positional Encoding | [Rotary Position Embedding (RoPE)](https://arxiv.org/abs/2104.09864) |
51
+ </figure>
52
+
53
+ ### Uses and limitations
54
+
55
+ #### Intended use
56
+
57
+ GPT-NeoX-20B was developed primarily for research purposes. It learns an inner
58
+ representation of the English language that can be used to extract features
59
+ useful for downstream tasks.
60
+
61
+ In addition to scientific uses, you may also further fine-tune and adapt
62
+ GPT-NeoX-20B for deployment, as long as your use is in accordance with the
63
+ Apache 2.0 license. This model works with the [Transformers
64
+ Library](https://huggingface.co/docs/transformers/index). If you decide to use
65
+ pre-trained GPT-NeoX-20B as a basis for your fine-tuned model, please note that
66
+ you need to conduct your own risk and bias assessment.
67
+
68
+ #### Out-of-scope use
69
+
70
+ GPT-NeoX-20B is **not** intended for deployment as-is. It is not a product
71
+ and cannot be used for human-facing interactions without supervision.
72
+
73
+ GPT-NeoX-20B has not been fine-tuned for downstream tasks for which language
74
+ models are commonly deployed, such as writing genre prose, or commercial
75
+ chatbots. This means GPT-NeoX-20B will likely **not** respond to a given prompt
76
+ the way products such as ChatGPT do. This is because, unlike GPT-NeoX-20B,
77
+ ChatGPT was fine-tuned using methods such as Reinforcement Learning from Human
78
+ Feedback (RLHF) to better “understand” human instructions and dialogue.
79
+
80
+ This model is English-language only, and thus cannot be used for translation
81
+ or generating text in other languages.
82
+
83
+ #### Limitations and biases
84
+
85
+ The core functionality of GPT-NeoX-20B is to take a string of text and predict
86
+ the next token. Remember that the statistically most likely next token need
87
+ not result in the most “accurate” text. Never rely on GPT-NeoX-20B to produce
88
+ factually accurate output.
89
+
90
+ This model was trained on [the Pile](https://pile.eleuther.ai/), a dataset
91
+ known to contain profanity and texts that are lewd or otherwise offensive.
92
+ See [Section 6 of the Pile paper](https://arxiv.org/abs/2101.00027) for a
93
+ discussion of documented biases with regards to gender, religion, and race.
94
+ GPT-NeoX-20B may produce socially unacceptable or undesirable text, *even if*
95
+ the prompt itself does not include anything explicitly offensive.
96
+
97
+ We recommend curating the outputs of this model before presenting it to a human
98
+ reader. Please inform your audience that you are using artificially generated
99
+ text.
100
+
101
+ #### How to use
102
+ If you simply want to try out some prompts, check out [this
103
+ playground](https://20b.eleuther.ai/).
104
+
105
+ GPT-NeoX-20B can be loaded using the `AutoModelForCausalLM` functionality:
106
+ ```python
107
+ from transformers import AutoTokenizer, AutoModelForCausalLM
108
+
109
+ tokenizer = AutoTokenizer.from_pretrained("EleutherAI/gpt-neox-20b")
110
+ model = AutoModelForCausalLM.from_pretrained("EleutherAI/gpt-neox-20b")
111
+ ```
112
+
113
+ ### Training
114
+
115
+ #### Training dataset
116
+
117
+ The Pile is a 825GiB general-purpose dataset in English. It was created by
118
+ EleutherAI specifically for training large language models. It contains texts
119
+ from 22 diverse sources, roughly broken down into five categories: academic
120
+ writing (e.g. arXiv), internet (e.g. CommonCrawl), prose (e.g. Project
121
+ Gutenberg), dialogue (e.g. YouTube subtitles), and miscellaneous (e.g. GitHub,
122
+ Enron Emails). See [the Pile paper](https://arxiv.org/abs/2101.00027) for
123
+ a breakdown of all data sources, methodology, and a discussion of ethical
124
+ implications. Consult [the datasheet](https://arxiv.org/abs/2201.07311) for
125
+ more detailed documentation about the Pile and its component datasets. The
126
+ Pile can be downloaded from the [official website](https://pile.eleuther.ai/),
127
+ or from a [community mirror](https://the-eye.eu/public/AI/pile/).
128
+
129
+ The Pile was **not** deduplicated before being used to train GPT-NeoX-20B.
130
+
131
+ #### Training procedure
132
+
133
+ GPT-NeoX-20B was trained with a batch size of approximately 3.15M tokens
134
+ (1538 sequences of 2048 tokens each), for a total of 150,000 steps. Tensor
135
+ parallelism and pipeline parallelism were used to distribute the model across
136
+ GPUs. Additional details about the training procedure are in [Section 3 of
137
+ the accompanying paper](https://arxiv.org/abs/2204.06745).
138
+
139
+
140
+ ### Evaluations
141
+
142
+ <figure style="width:55em">
143
+
144
+ | Model | OpenAI’s LAMBADA | SciQ | PIQA | TriviaQA | ARC (Challenge) |
145
+ | ------------- | :--------------: | :-----------: | :-----------: | :-----------: | :-------------: |
146
+ | GPT-J-6B | 0.683 ± 0.006 | 0.910 ± 0.009 | 0.752 ± 0.010 | 0.170 ± 0.004 | 0.340 ± 0.014 |
147
+ | FairSeq 6.7B | 0.673 ± 0.007 | 0.895 ± 0.010 | 0.762 ± 0.010 | 0.221 ± 0.004 | 0.329 ± 0.014 |
148
+ | GPT-3 Curie | 0.693 ± 0.006 | 0.918 ± 0.009 | 0.767 ± 0.010 | 0.196 ± 0.004 | 0.334 ± 0.014 |
149
+ | FairSeq 13B | 0.709 ± 0.006 | 0.910 ± 0.009 | 0.769 ± 0.010 | 0.270 ± 0.004 | 0.345 ± 0.014 |
150
+ | GPT-NeoX-20B | 0.720 ± 0.006 | 0.928 ± 0.008 | 0.779 ± 0.010 | 0.259 ± 0.004 | 0.380 ± 0.014 |
151
+ | GPT-3 DaVinci | 0.752 ± 0.006 | 0.949 ± 0.007 | 0.791 ± 0.009 | 0.409 ± 0.005 | 0.435 ± 0.014 |
152
+ <figcaption>Zero-shot performance on selected natural language tasks.</figcaption>
153
+ </figure>
154
+
155
+ This is a heavily abridged version of the evaluation results. Appendix D of the
156
+ [GPT-NeoX-20B paper](https://arxiv.org/abs/2204.06745) compares more model
157
+ sizes, and contains additional evaluations, including on: zero and five-shot
158
+ natural language tasks, zero and five-shot Basic Arithmetic and MATH,
159
+ and zero-shot Hendrycks tasks.
160
+
161
+ ### BibTeX
162
+
163
+ To cite the GPT-NeoX-20B paper:
164
+
165
+ ```
166
+ @misc{https://doi.org/10.48550/arxiv.2204.06745,
167
+ doi = {10.48550/ARXIV.2204.06745},
168
+
169
+ url = {https://arxiv.org/abs/2204.06745},
170
+
171
+ author = {Black, Sid and Biderman, Stella and Hallahan, Eric and Anthony, Quentin and Gao, Leo and Golding, Laurence and He, Horace and Leahy, Connor and McDonell, Kyle and Phang, Jason and Pieler, Michael and Prashanth, USVSN Sai and Purohit, Shivanshu and Reynolds, Laria and Tow, Jonathan and Wang, Ben and Weinbach, Samuel},
172
+
173
+ keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
174
+
175
+ title = {GPT-NeoX-20B: An Open-Source Autoregressive Language Model},
176
+
177
+ publisher = {arXiv},
178
+
179
+ year = {2022},
180
+
181
+ copyright = {Creative Commons Attribution 4.0 International}
182
+ }
183
+ ```