The model follows instructions provided in the input. We recommend prefacing your input with "def has_close_elements(numbers: List[float], threshold: float) -> bool:\n for idx, elem in enumerate(numbers):\n for idx2, elem2 in enumerate(numbers):\n if idx != idx2:\n distance = elem - elem2\n if distance < threshold:\n return True\n\n return FalseFix bugs in has_close_elements."
Feel free to share your generations in the Community tab!
Generation
# pip install -q transformersfrom transformers import AutoModelForCausalLM, AutoTokenizer
checkpoint = "bigcode/santacoderpack"
device = "cuda"# for GPU usage or "cpu" for CPU usage
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device)
inputs = tokenizer.encode("Q<commit_before>def has_close_elements(numbers: List[float], threshold: float) -> bool:\n for idx, elem in enumerate(numbers):\n for idx2, elem2 in enumerate(numbers):\n if idx != idx2:\n distance = elem - elem2\n if distance < threshold:\n return True\n\n return False<commit_message>Fix bugs in has_close_elements.<commit_after>", return_tensors="pt").to(device)
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))
Training
Model
Architecture:
GPT-2 model with multi-query attention
@article{muennighoff2023octopack,
title={OctoPack: Instruction Tuning Code Large Language Models},
author={Niklas Muennighoff and Qian Liu and Armel Zebaze and Qinkai Zheng and Binyuan Hui and Terry Yue Zhuo and Swayam Singh and Xiangru Tang and Leandro von Werra and Shayne Longpre},
journal={arXiv preprint arXiv:2308.07124},
year={2023}
}
Runs of bigcode santacoderpack on huggingface.co
175
Total runs
0
24-hour runs
-1
3-day runs
-32
7-day runs
0
30-day runs
More Information About santacoderpack huggingface.co Model
santacoderpack huggingface.co is an AI model on huggingface.co that provides santacoderpack's model effect (), which can be used instantly with this bigcode santacoderpack model. huggingface.co supports a free trial of the santacoderpack model, and also provides paid use of the santacoderpack. Support call santacoderpack model through api, including Node.js, Python, http.
santacoderpack huggingface.co is an online trial and call api platform, which integrates santacoderpack's modeling effects, including api services, and provides a free online trial of santacoderpack, you can try santacoderpack online for free by clicking the link below.
bigcode santacoderpack online free url in huggingface.co:
santacoderpack is an open source model from GitHub that offers a free installation service, and any user can find santacoderpack on GitHub to install. At the same time, huggingface.co provides the effect of santacoderpack install, users can directly use santacoderpack installed effect in huggingface.co for debugging and trial. It also supports api for free installation.