Downloads · 30 days
12
38% of all-time downloads
RichardErkhov/stabilityai_-_stablecode-completion-alpha-3b-4k-8bits
stabilityai_-_stablecode-completion-alpha-3b-4k-8bits is a machine learning model from RichardErkhov. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
12
38% of all-time downloads
All-time downloads
32
Public
Parameters
2.8B
3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors3 GB · 100%
How the weights are stored.
I82.5B · 91%
From the Hugging Face model README
Quantization made by Richard Erkhov.
stablecode-completion-alpha-3b-4k - bnb 8bits
datasets:
StableCode-Completion-Alpha-3B-4KStableCode-Completion-Alpha-3B-4K is a 3 billion parameter decoder-only code completion model pre-trained on diverse set of programming languages that topped the stackoverflow developer survey.
The model is intended to do single/multiline code completion from a long context window upto 4k tokens.
Get started generating code with StableCode-Completion-Alpha-3B-4k by using the following code snippet:
from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("stabilityai/stablecode-completion-alpha-3b-4k")
model = AutoModelForCausalLM.from_pretrained(
"stabilityai/stablecode-completion-alpha-3b-4k",
trust_remote_code=True,
torch_dtype="auto",
)
model.cuda()
inputs = tokenizer("import torch\nimport torch.nn as nn", return_tensors="pt").to("cuda")
tokens = model.generate(
**inputs,
max_new_tokens=48,
temperature=0.2,
do_sample=True,
)
print(tokenizer.decode(tokens[0], skip_special_tokens=True))
StableCode-Completion-Alpha-3B-4k models are auto-regressive language models based on the transformer decoder architecture.[email protected]| Parameters | Hidden Size | Layers | Heads | Sequence Length |
|---|---|---|---|---|
| 2,796,431,360 | 2560 | 32 | 32 | 4096 |
StableCode-Completion-Alpha-3B-4k is pre-trained at a context length of 4096 for 300 billion tokens on the bigcode/starcoder-data.
The first pre-training stage relies on 300B tokens sourced from various top programming languages occuring in the stackoverflow developer survey present in the starcoder-data dataset.
The model is pre-trained on the dataset mixes mentioned above in mixed-precision BF16), optimized with AdamW, and trained using the StarCoder tokenizer with a vocabulary size of 49k.
StableCode-Completion-Alpha-3B-4K independently generates new code completions, but we recommend that you use StableCode-Completion-Alpha-3B-4K together with the tool developed by BigCode and HuggingFace (huggingface/huggingface-vscode: Code completion VSCode extension for OSS models (github.com)), to identify and, if necessary, attribute any outputs that match training code.
This model is intended to be used responsibly. It is not intended to be used to create unlawful content of any kind, to further any unlawful activity, or to engage in activities with a high risk of physical or economic harm.
@misc{StableCodeCompleteAlpha4K,
url={[https://huggingface.co/stabilityai/stablecode-complete-alpha-3b-4k](https://huggingface.co/stabilityai/stablecode-complete-alpha-3b-4k)},
title={Stable Code Complete Alpha},
author={Adithyan, Reshinth and Phung, Duy and Cooper, Nathan and Pinnaparaju, Nikhil and Laforte, Christian}
}