Views
No views yet
StableLM-3B-4E1TStableLM-3B-4E1T is a 3 billion parameter decoder-only language model pre-trained on 1 trillion tokens of diverse English and code datasets for 4 epochs.StableLM-3B-4E1T by using the following code snippet:1from transformers import AutoModelForCausalLM, AutoTokenizer
2tokenizer = AutoTokenizer.from_pretrained("stabilityai/stablelm-3b-4e1t")
3model = AutoModelForCausalLM.from_pretrained(
4 "stabilityai/stablelm-3b-4e1t",
5 torch_dtype="auto",
6)
7model.cuda()
8inputs = tokenizer("The weather is always wonderful", return_tensors="pt").to(model.device)
9tokens = model.generate(
10 **inputs,
11 max_new_tokens=64,
12 temperature=0.75,
13 top_p=0.95,
14 do_sample=True,
15)
16print(tokenizer.decode(tokens[0], skip_special_tokens=True))1from transformers import AutoModelForCausalLM, AutoTokenizer
2tokenizer = AutoTokenizer.from_pretrained("stabilityai/stablelm-3b-4e1t")
3model = AutoModelForCausalLM.from_pretrained(
4 "stabilityai/stablelm-3b-4e1t",
5 torch_dtype="auto",
6 attn_implementation="flash_attention_2",
7)
8model.cuda()
9inputs = tokenizer("The weather is always wonderful", return_tensors="pt").to(model.device)
10tokens = model.generate(
11 **inputs,
12 max_new_tokens=64,
13 temperature=0.75,
14 top_p=0.95,
15 do_sample=True,
16)
17print(tokenizer.decode(tokens[0], skip_special_tokens=True))StableLM-3B-4E1T models are auto-regressive language models based on the transformer decoder architecture.lm@stability.ai| Parameters | Hidden Size | Layers | Heads | Sequence Length |
|---|---|---|---|---|
| 2,795,443,200 | 2560 | 32 | 32 | 4096 |
bfloat16 precision, optimized with AdamW, and trained using the NeoX tokenizer with a vocabulary size of 50,257. We outline the complete hyperparameters choices in the project's GitHub repository - config.StableLM-3B-4E1T was trained on the Stability AI cluster across 256 NVIDIA A100 40GB GPUs (AWS P4d instances). Training began on August 23, 2023, and took approximately 30 days to complete.gpt-neox (EleutherAI, 2021), train under 2D parallelism (Data and Tensor Parallel) with ZeRO-1 (Rajbhandari et al., 2019), and rely on flash-attention as well as SwiGLU and Rotary Embedding kernels from FlashAttention-2 (Dao et al., 2023)1@misc{StableLM-3B-4E1T,
2 url={[https://huggingface.co/stabilityai/stablelm-3b-4e1t](https://huggingface.co/stabilityai/stablelm-3b-4e1t)},
3 title={StableLM 3B 4E1T},
4 author={Tow, Jonathan and Bellagente, Marco and Mahan, Dakota and Riquelme, Carlos}
5}| Metric | Value |
|---|---|
| Avg. | 46.58 |
| AI2 Reasoning Challenge (25-Shot) | 46.59 |
| HellaSwag (10-Shot) | 75.94 |
| MMLU (5-Shot) | 45.23 |
| TruthfulQA (0-shot) | 37.20 |
| Winogrande (5-shot) | 71.19 |
| GSM8k (5-shot) | 3.34 |