Views
No views yet
StableCode-Instruct-Alpha-3BStableCode-Instruct-Alpha-3B is a 3 billion parameter decoder-only instruction tuned code model pre-trained on diverse set of programming languages that topped the stackoverflow developer survey.StableCode-Instruct-Alpha-3B by using the following code snippet:1from transformers import AutoModelForCausalLM, AutoTokenizer
2tokenizer = AutoTokenizer.from_pretrained("stabilityai/stablecode-instruct-alpha-3b")
3model = AutoModelForCausalLM.from_pretrained(
4 "stabilityai/stablecode-instruct-alpha-3b",
5 trust_remote_code=True,
6 torch_dtype="auto",
7)
8model.cuda()
9inputs = tokenizer("###Instruction\nGenerate a python function to find number of CPU cores###Response\n", 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-Instruct-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 | 4096 |
StableCode-Instruct-Alpha-3B is the instruction finetuned version on StableCode-Completion-Alpha-3B with code instruction datasets.1@misc{StableCodeInstructAlpha,
2 url={[https://huggingface.co/stabilityai/stablecode-instruct-alpha-3b](https://huggingface.co/stabilityai/stablecode-instruct-alpha-3b)},
3 title={Stable Code Instruct Alpha},
4 author={Adithyan, Reshinth and Phung, Duy and Cooper, Nathan and Pinnaparaju, Nikhil and Laforte, Christian}
5}