RichardErkhov commited on
Commit
8b38697
1 Parent(s): 14e9334

uploaded readme

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