kp-forks / starcoder2-15b

huggingface.co
Total runs: 1
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: June 06 2024
text-generation

Introduction of starcoder2-15b

Model Details of starcoder2-15b

StarCoder2

SC2
Table of Contents
  1. Model Summary
  2. Use
  3. Limitations
  4. Training
  5. License
  6. Citation
Model Summary

StarCoder2-15B model is a 15B parameter model trained on 600+ programming languages from The Stack v2 , with opt-out requests excluded. The model uses Grouped Query Attention , a context window of 16,384 tokens with a sliding window attention of 4,096 tokens , and was trained using the Fill-in-the-Middle objective on 4+ trillion tokens.
The model was trained with NVIDIA NeMo™ Framework using the NVIDIA Eos Supercomputer built with NVIDIA DGX H100 systems.

Use
Intended use

The model was trained on GitHub code as well as additional selected data sources such as Arxiv and Wikipedia. As such it is not an instruction model and commands like "Write a function that computes the square root." do not work well.

Generation

Here are some examples to get started with the model. You can find a script for fine-tuning in StarCoder2's GitHub repository .

First, make sure to install transformers from source:

pip install git+https://github.com/huggingface/transformers.git
Running the model on CPU/GPU/multi GPU
  • Using full precision
# pip install git+https://github.com/huggingface/transformers.git # TODO: merge PR to main
from transformers import AutoModelForCausalLM, AutoTokenizer

checkpoint = "bigcode/starcoder2-15b"
device = "cuda" # for GPU usage or "cpu" for CPU usage

tokenizer = AutoTokenizer.from_pretrained(checkpoint)
# for multiple GPUs install accelerate and do `model = AutoModelForCausalLM.from_pretrained(checkpoint, device_map="auto")`
model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device)

inputs = tokenizer.encode("def print_hello_world():", return_tensors="pt").to(device)
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))
  • Using torch.bfloat16
# pip install accelerate
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

checkpoint = "bigcode/starcoder2-15b"
tokenizer = AutoTokenizer.from_pretrained(checkpoint)

# for fp16 use `torch_dtype=torch.float16` instead
model = AutoModelForCausalLM.from_pretrained(checkpoint, device_map="auto", torch_dtype=torch.bfloat16)

inputs = tokenizer.encode("def print_hello_world():", return_tensors="pt").to("cuda")
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))
>>> print(f"Memory footprint: {model.get_memory_footprint() / 1e6:.2f} MB")
Memory footprint: 32251.33 MB
Quantized Versions through bitsandbytes
  • Using 8-bit precision (int8)
# pip install bitsandbytes accelerate
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig

# to use 4bit use `load_in_4bit=True` instead
quantization_config = BitsAndBytesConfig(load_in_8bit=True)

checkpoint = "bigcode/starcoder2-15b"
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
model = AutoModelForCausalLM.from_pretrained(checkpoint, quantization_config=quantization_config)

inputs = tokenizer.encode("def print_hello_world():", return_tensors="pt").to("cuda")
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))
>>> print(f"Memory footprint: {model.get_memory_footprint() / 1e6:.2f} MB")
# load_in_8bit
Memory footprint: 16900.18 MB
# load_in_4bit
>>> print(f"Memory footprint: {model.get_memory_footprint() / 1e6:.2f} MB")
Memory footprint: 9224.60 MB
Attribution & Other Requirements

The pretraining dataset of the model was filtered for permissive licenses and code with no license only. Nevertheless, the model can generate source code verbatim from the dataset. The code's license might require attribution and/or other specific requirements that must be respected. We provide a search index that let's you search through the pretraining data to identify where generated code came from and apply the proper attribution to your code.

Limitations

The model has been trained on source code from 600+ programming languages. The predominant language in source is English although other languages are also present. As such the model is capable to generate code snippets provided some context but the generated code is not guaranteed to work as intended. It can be inefficient, contain bugs or exploits. See the paper for an in-depth discussion of the model limitations.

Training

Model
  • Architecture: Transformer decoder with grouped-query and sliding window attention and Fill-in-the-Middle objective
  • Pretraining steps: 1 million
  • Pretraining tokens: 4+ trillion
  • Precision: bfloat16
Hardware
  • GPUs: 1024 x H100
Software

License

The model is licensed under the BigCode OpenRAIL-M v1 license agreement. You can find the full agreement here .

Citation

@misc{lozhkov2024starcoder,
      title={StarCoder 2 and The Stack v2: The Next Generation}, 
      author={Anton Lozhkov and Raymond Li and Loubna Ben Allal and Federico Cassano and Joel Lamy-Poirier and Nouamane Tazi and Ao Tang and Dmytro Pykhtar and Jiawei Liu and Yuxiang Wei and Tianyang Liu and Max Tian and Denis Kocetkov and Arthur Zucker and Younes Belkada and Zijian Wang and Qian Liu and Dmitry Abulkhanov and Indraneil Paul and Zhuang Li and Wen-Ding Li and Megan Risdal and Jia Li and Jian Zhu and Terry Yue Zhuo and Evgenii Zheltonozhskii and Nii Osae Osae Dade and Wenhao Yu and Lucas Krauß and Naman Jain and Yixuan Su and Xuanli He and Manan Dey and Edoardo Abati and Yekun Chai and Niklas Muennighoff and Xiangru Tang and Muhtasham Oblokulov and Christopher Akiki and Marc Marone and Chenghao Mou and Mayank Mishra and Alex Gu and Binyuan Hui and Tri Dao and Armel Zebaze and Olivier Dehaene and Nicolas Patry and Canwen Xu and Julian McAuley and Han Hu and Torsten Scholak and Sebastien Paquet and Jennifer Robinson and Carolyn Jane Anderson and Nicolas Chapados and Mostofa Patwary and Nima Tajbakhsh and Yacine Jernite and Carlos Muñoz Ferrandis and Lingming Zhang and Sean Hughes and Thomas Wolf and Arjun Guha and Leandro von Werra and Harm de Vries},
      year={2024},
      eprint={2402.19173},
      archivePrefix={arXiv},
      primaryClass={cs.SE}
}

Runs of kp-forks starcoder2-15b on huggingface.co

1
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About starcoder2-15b huggingface.co Model

More starcoder2-15b license Visit here:

https://choosealicense.com/licenses/bigcode-openrail-m

starcoder2-15b huggingface.co

starcoder2-15b huggingface.co is an AI model on huggingface.co that provides starcoder2-15b's model effect (), which can be used instantly with this kp-forks starcoder2-15b model. huggingface.co supports a free trial of the starcoder2-15b model, and also provides paid use of the starcoder2-15b. Support call starcoder2-15b model through api, including Node.js, Python, http.

starcoder2-15b huggingface.co Url

https://huggingface.co/kp-forks/starcoder2-15b

kp-forks starcoder2-15b online free

starcoder2-15b huggingface.co is an online trial and call api platform, which integrates starcoder2-15b's modeling effects, including api services, and provides a free online trial of starcoder2-15b, you can try starcoder2-15b online for free by clicking the link below.

kp-forks starcoder2-15b online free url in huggingface.co:

https://huggingface.co/kp-forks/starcoder2-15b

starcoder2-15b install

starcoder2-15b is an open source model from GitHub that offers a free installation service, and any user can find starcoder2-15b on GitHub to install. At the same time, huggingface.co provides the effect of starcoder2-15b install, users can directly use starcoder2-15b installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

starcoder2-15b install url in huggingface.co:

https://huggingface.co/kp-forks/starcoder2-15b

Url of starcoder2-15b

starcoder2-15b huggingface.co Url

Provider of starcoder2-15b huggingface.co

kp-forks
ORGANIZATIONS

Other API from kp-forks

huggingface.co

Total runs: 35
Run Growth: 19
Growth Rate: 57.58%
Updated:January 08 2024
huggingface.co

Total runs: 25
Run Growth: -19
Growth Rate: -79.17%
Updated:April 11 2024
huggingface.co

Total runs: 21
Run Growth: 21
Growth Rate: 100.00%
Updated:August 15 2025
huggingface.co

Total runs: 11
Run Growth: 0
Growth Rate: 0.00%
Updated:August 16 2024
huggingface.co

Total runs: 6
Run Growth: 2
Growth Rate: 33.33%
Updated:October 31 2025
huggingface.co

Total runs: 3
Run Growth: 3
Growth Rate: 100.00%
Updated:April 24 2023
huggingface.co

Total runs: 3
Run Growth: 3
Growth Rate: 100.00%
Updated:April 04 2025
huggingface.co

Total runs: 3
Run Growth: 3
Growth Rate: 100.00%
Updated:April 03 2025
huggingface.co

Total runs: 2
Run Growth: 2
Growth Rate: 100.00%
Updated:October 23 2025
huggingface.co

Total runs: 2
Run Growth: 2
Growth Rate: 100.00%
Updated:April 23 2024
huggingface.co

Total runs: 1
Run Growth: -1
Growth Rate: -100.00%
Updated:March 01 2025
huggingface.co

Total runs: 1
Run Growth: -2
Growth Rate: -100.00%
Updated:July 11 2025
huggingface.co

Total runs: 1
Run Growth: 0
Growth Rate: 0.00%
Updated:January 28 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:November 28 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:March 24 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:November 28 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:September 03 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:September 03 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:August 29 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:January 09 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:November 28 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:September 20 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:September 30 2024