Run this model with HF Jobs
Run bigcode/starencoder on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/bigcode/starencoder. Ask me which dataset to train on, then push the fine-tuned model to a new private model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/bigcode/starencoder on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use bigcode/starencoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bigcode/starencoder with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForPreTraining tokenizer = AutoTokenizer.from_pretrained("bigcode/starencoder") model = AutoModelForPreTraining.from_pretrained("bigcode/starencoder", device_map="auto") - Notebooks
- Google Colab
- Kaggle
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForPreTraining
tokenizer = AutoTokenizer.from_pretrained("bigcode/starencoder")
model = AutoModelForPreTraining.from_pretrained("bigcode/starencoder", device_map="auto")You need to agree to share your Hugging Face information to access this model
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
Model License Agreement
Please read the BigCode OpenRAIL-M license agreement before accepting it.
Log in or Sign Up to review the conditions and access this model content.
StarEnCoder
Table of Contents
Model Summary
This is an encoder-only model (i.e., bi-directionally self-attentive Transformers) trained on The Stack dataset.
- Project Website: bigcode-project.org
- Point of Contact: contact@bigcode-project.org
- Languages: 80+ Programming languages
We leveraged the :
- Masked Language Modelling (MLM) and Next Sentence Prediction (NSP) objectives from BERT.
- Predicted masked-out tokens from an input sentence and whether a pair of sentences occur as neighbors in a document.
Training
We train for 100,000 steps with a global batch size of 4,096 sequences of a maximum length of 1,024 so that approximately 400B~tokens are observed. This takes roughly two days using 64 NVIDIA A100 GPUs. Details about the model architecture are reported in the table below.
| Hyperparameter | Value |
|---|---|
| Hidden size | 768 |
| Intermediate size | 3072 |
| Max. position embeddings | 1024 |
| Num. of attention heads | 12 |
| Num. of hidden layers | 12 |
| Attention | Multi-head |
| Num. of parameters | β125M |
Use
This model is trained on 86 programming languages from GitHub code including GitHub issues and Git Commits, and can be efficiently fine-tuned for both code- and text-related tasks. We fine-tuned on a token classification task to detect PII and have released StaPII model.
Limitations
There are limitations to consider when using StarEncoder. It is an encoder-only model, which limits its flexibility in certain code generation or completion tasks, and it was trained on data containing PII, which could pose privacy concerns. Performance may vary across the 80+ supported programming languages, particularly for less common ones, and the model might struggle with understanding domains outside programming languages.
License
The model is licensed under the BigCode OpenRAIL-M v1 license agreement. You can find the full agreement here.
- Downloads last month
- 231
# Gated model: Login with a HF token with gated access permission hf auth login