jon-tow commited on
Commit
223c0c5
1 Parent(s): f685de0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +76 -35
README.md CHANGED
@@ -1,41 +1,82 @@
1
- Model Info (Interal):
2
- - Size: 7B
3
- - Dataset: The Pile v2
4
- - `contaminated(P3) + lower_code(5%) + wiki(fixed) + books3(fixed & broken)`
5
- - Batch size (in tokens): 8M
6
- - Checkpoint Step: 69,000 (552B tokens)
7
- - Checkpoint path (AWS East): `/fsx/ckpts/7b_tok=neox_data=pilev2-recontam_lower-code_bs=8m_tp=4_pp=1_init=wang-small-init/global_step69000_hf`
8
 
9
- Notes:
10
- - Trained for 36k steps with incorrectly tokenized Books3 dataset (GPT-2 tokenizer instead of NeoX tokenizer)
11
- - tp=2 (not 4)
12
 
13
- W&B Report: https://stability.wandb.io/stability-llm/stable-lm/reports/StableLM-7B-alpha---Vmlldzo2MjA
14
 
15
- Usage:
 
 
 
 
16
 
17
  ```python
18
- import transformers
19
-
20
- model = transformers.AutoModelForCausalLM.from_pretrained("CarperAI/7b-alpha")
21
- tokenizer = transformers.AutoTokenizer.from_pretrained("EleutherAI/gpt-neox-20b")
22
- tokenizer.pad_token = tokenizer.eos_token
23
- tokenizer.paddding_side = "left"
24
-
25
- prompts = [
26
- "User1: The dog sat on a man's lap and barked 3 times.\nUser2: How many times did the dog bark?"
27
- "Curious Person Question: A group of genetically identical individuals is called what?\nSmart Person Answer: a clone\n\nCurious Person Question: Who proposed the theory of evolution by natural selection?\nSmart Person Answer:"
28
- ]
29
- batch_encoding = tokenizer(prompts, return_tensors="pt", padding=True)
30
-
31
- print(f"Generating {len(prompts)} prompts...")
32
- samples = model.generate(
33
- **batch_encoding,
34
- max_new_tokens=64,
35
- temperature=0.0,
36
- do_sample=False,
37
  )
38
- samples = tokenizer.batch_decode(samples, skip_special_tokens=True)
39
- for prompt, sample in zip(prompts, samples):
40
- print(f"Prompt: {prompt}\nSample: {sample}\n")
41
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - causal-lm
6
+ license: cc-by-nc-4.0
7
+ ---
8
 
9
+ # StableLM-Base-Alpha
 
 
10
 
11
+ ## Model Description
12
 
13
+ `StableLM-Base-Alpha` is a suite of 3B and 7B parameter decoder-only language models pre-trained on a diverse collection of English datasets with a sequence length of 4096 to push beyond the context window limitations of existing open-source language models.
14
+
15
+ ## Usage
16
+
17
+ Get started generating text with `StableLM-Base-Alpha` by using the following code snippet:
18
 
19
  ```python
20
+ from transformers import AutoModelForCausalLM, AutoTokenizer
21
+
22
+ tokenizer = AutoTokenizer.from_pretrained("StabilityAI/stablelm-base-alpha-7b")
23
+ model = AutoModelForCausalLM.from_pretrained("StabilityAI/stablelm-base-alpha-7b")
24
+ model.half().cuda()
25
+
26
+ inputs = tokenizer("What's your mood today?", return_tensors="pt")
27
+ tokens = model.generate(
28
+ **inputs,
29
+ max_new_tokens=64,
30
+ temperature=0.7,
31
+ do_sample=True,
 
 
 
 
 
 
 
32
  )
33
+ print(tokenizer.decode(tokens[0], skip_special_tokens=True))
34
+ ```
35
+
36
+ ## Model Details
37
+
38
+ * **Developed by**: [Stability AI](https://stability.ai/)
39
+ * **Model type**: StableLM-Base-Alpha models are auto-regressive language models based on the NeoX transformer architecture.
40
+ * **Language(s)**: English
41
+ * **Library**: [GPT-NeoX](https://github.com/EleutherAI/gpt-neox)
42
+ * **License**: [CC BY-SA-4.0](https://creativecommons.org/licenses/by-sa/4.0/)
43
+ * **Contact**: For questions and comments about the model, please email **{TODO: FILL IN CONTACT ADDRESS}**
44
+
45
+ ## Training
46
+
47
+ | Parameters | Hidden Size | Layers | Heads | Sequence Length |
48
+ |------------|-------------|--------|-------|-----------------|
49
+ | 3B | 4096 | 16 | 32 | 4096 |
50
+ | 7B | 6144 | 16 | 48 | 4096 |
51
+
52
+ ### Training Dataset
53
+
54
+ `StableLM-Base-Alpha` is pre-trained on a new experimental dataset built atop [The Pile](https://huggingface.co/datasets/EleutherAI/the_pile) and is threes times larger at approximately 1.5T tokens.
55
+
56
+ ### Training Procedure
57
+
58
+ Models are pre-trained on the aforementioned dataset in mixed-precision (FP16) and optimized with Adam. We outline the complete hyperparameters choices in the project's GitHub repository **{TODO: FILL IN LINK}**.
59
+
60
+ ## Use and Limitations
61
+
62
+ ### Intended Use
63
+
64
+ These models are intended to be used by all individuals as foundational models for application-specific fine-tuning without strict limitations on commercial use.
65
+
66
+ ### Limitations and bias
67
+
68
+ The pre-training dataset may contain offensive or inappropriate content even after applying data cleansing filters which can be reflected in generated text. We recommend users exercise reasonable caution when using these models in production systems. Do not use the models for any applications that may cause harm or distress to individuals or groups.
69
+
70
+ ## Citations
71
+
72
+ ```bibtext
73
+ @software{gpt-neox-library,
74
+ title = {{GPT-NeoX: Large Scale Autoregressive Language Modeling in PyTorch}},
75
+ author = {Andonian, Alex and Anthony, Quentin and Biderman, Stella and Black, Sid and Gali, Preetham and Gao, Leo and Hallahan, Eric and Levy-Kramer, Josh and Leahy, Connor and Nestler, Lucas and Parker, Kip and Pieler, Michael and Purohit, Shivanshu and Songz, Tri and Phil, Wang and Weinbach, Samuel},
76
+ url = {https://www.github.com/eleutherai/gpt-neox},
77
+ doi = {10.5281/zenodo.5879544},
78
+ month = {8},
79
+ year = {2021},
80
+ version = {0.0.1},
81
+ }
82
+ ```