Views
No views yet
StableCode-Completion-Alpha-3BStableCode-Completion-Alpha-3B is a 3 billion parameter decoder-only code completion model pre-trained on diverse set of programming languages that were the top used languages based on the 2023 stackoverflow developer survey.StableCode-Completion-Alpha-3B by using the following code snippet:1from transformers import AutoModelForCausalLM, AutoTokenizer
2tokenizer = AutoTokenizer.from_pretrained("stabilityai/stablecode-completion-alpha-3b")
3model = AutoModelForCausalLM.from_pretrained(
4 "stabilityai/stablecode-completion-alpha-3b",
5 trust_remote_code=True,
6 torch_dtype="auto",
7)
8model.cuda()
9inputs = tokenizer("import torch\nimport torch.nn as nn", return_tensors="pt").to("cuda")
10tokens = model.generate(
11 **inputs,
12 max_new_tokens=48,
13 temperature=0.2,
14 do_sample=True,
15)
16print(tokenizer.decode(tokens[0], skip_special_tokens=True))StableCode-Completion-Alpha-3B models are auto-regressive language models based on the transformer decoder architecture.lm@stability.ai| Parameters | Hidden Size | Layers | Heads | Sequence Length |
|---|---|---|---|---|
| 2,796,431,360 | 2560 | 32 | 32 | 16384 |
StableCode-Completion-Alpha-3B is pre-trained using a multi-stage context length extension schedule following similar work (Nijkamp et al. 2023); first pre-training at a context length of 4096 for 300 billion tokens, then fine-tuning at a context length of 16384 for another 200B tokens.starcoder-data dataset. We then finetune it on a longer context augmentation of starcoder-data dataset which increased the average token per sample to 20k.1@misc{StableCodeCompleteAlpha,
2 url={[https://huggingface.co/stabilityai/stablecode-complete-alpha-3b](https://huggingface.co/stabilityai/stablecode-complete-alpha-3b)},
3 title={Stable Code Complete Alpha},
4 author={Adithyan, Reshinth and Phung, Duy and Cooper, Nathan and Pinnaparaju, Nikhil and Laforte, Christian}
5}