Views
No views yet
Stable LM 2 1.6BStable LM 2 1.6B is a 1.6 billion parameter decoder-only language model pre-trained on 2 trillion tokens of diverse multilingual and code datasets for two epochs.Stable LM 2 1.6B by using the following code snippet:1from transformers import AutoModelForCausalLM, AutoTokenizer
2tokenizer = AutoTokenizer.from_pretrained("stabilityai/stablelm-2-1_6b")
3model = AutoModelForCausalLM.from_pretrained(
4 "stabilityai/stablelm-2-1_6b",
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.70,
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-2-1_6b")
3model = AutoModelForCausalLM.from_pretrained(
4 "stabilityai/stablelm-2-1_6b",
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.70,
14 top_p=0.95,
15 do_sample=True,
16)
17print(tokenizer.decode(tokens[0], skip_special_tokens=True))Stable LM 2 1.6B models are auto-regressive language models based on the transformer decoder architecture.lm@stability.ai| Parameters | Hidden Size | Layers | Heads | Sequence Length |
|---|---|---|---|---|
| 1,644,417,024 | 2048 | 24 | 32 | 4096 |
tiktoken.cl100k_base. We split digits into individual tokens following findings by Liu & Low (2023).Stable LM 2 1.6B for your downstream tasks.bfloat16 precision, optimized with AdamW, and trained using the Arcade100k tokenizer with a vocabulary size of 100,352. We outline the complete hyperparameters choices in the project's GitHub repository - config*. The final checkpoint of pre-training, before cooldown, is provided in the global_step420000 branch.Stable LM 2 1.6B was trained on the Stability AI cluster across 512 NVIDIA A100 40GB GPUs (AWS P4d instances).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@article{bellagente2024stable,
2 title={Stable LM 2 1.6 B Technical Report},
3 author={Bellagente, Marco and Tow, Jonathan and Mahan, Dakota and Phung, Duy and Zhuravinskyi, Maksym and Adithyan, Reshinth and Baicoianu, James and Brooks, Ben and Cooper, Nathan and Datta, Ashish and others},
4 journal={arXiv preprint arXiv:2402.17834},
5 year={2024}
6}