Views
No views yet
StableLM-Base-Alpha is a suite of 3B and 7B parameter decoder-only language models pre-trained on a diverse collection of English and Code datasets with a sequence length of 4096 to push beyond the context window limitations of existing open-source language models.StableLM-Base-Alpha by using the following code snippet:1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3tokenizer = AutoTokenizer.from_pretrained("StabilityAI/stablelm-base-alpha-3b")
4model = AutoModelForCausalLM.from_pretrained("StabilityAI/stablelm-base-alpha-3b")
5model.half().cuda()
6
7inputs = tokenizer("What's your mood today?", return_tensors="pt").to("cuda")
8tokens = model.generate(
9 **inputs,
10 max_new_tokens=64,
11 temperature=0.7,
12 do_sample=True,
13)
14print(tokenizer.decode(tokens[0], skip_special_tokens=True))lm@stability.ai| Parameters | Hidden Size | Layers | Heads | Sequence Length |
|---|---|---|---|---|
| 3B | 4096 | 16 | 32 | 4096 |
| 7B | 6144 | 16 | 48 | 4096 |
StableLM-Base-Alpha is pre-trained on a new experimental dataset built atop The Pile and is threes times larger at approximately 1.5T tokens.1@software{gpt-neox-library,
2 title = {{GPT-NeoX: Large Scale Autoregressive Language Modeling in PyTorch}},
3 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},
4 url = {https://www.github.com/eleutherai/gpt-neox},
5 doi = {10.5281/zenodo.5879544},
6 month = {8},
7 year = {2021},
8 version = {0.0.1},
9}