Astraios-3B-P-Tuning is an instruction tuned model with 15.5B parameters created by finetuning StarCoderBase on CommitPackFT & OASST as described in the Astraios paper.
Datasets for security of code generation; We use DoW for evaluation
Use
Intended use
The model follows instructions provided in the input. You should always preface your input with "Question: " and finish it with "Answer:", for example: "Question: Please write a function in Python that performs bubble sort.
Answer:"
Feel free to share your generations in the Community tab!
Generation
# pip install -q transformers# pip install -e git+https://github.com/bigcode-project/astraios#subdirectory=peftfrom peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
peft_checkpoint = "bigcode/astraios-3b-ptuning"
checkpoint = "bigcode/starcoderbase-3b"
model = AutoModelForCausalLM.from_pretrained(checkpoint)
model = PeftModel.from_pretrained(model, peft_checkpoint)
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("Question: Please write a function in Python that performs bubble sort.Answer:", return_tensors="pt").to(device)
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))
Training
Model
Architecture:
GPT-2 model with multi-query attention and Fill-in-the-Middle objective
astraios-3b-ptuning huggingface.co is an AI model on huggingface.co that provides astraios-3b-ptuning's model effect (), which can be used instantly with this bigcode astraios-3b-ptuning model. huggingface.co supports a free trial of the astraios-3b-ptuning model, and also provides paid use of the astraios-3b-ptuning. Support call astraios-3b-ptuning model through api, including Node.js, Python, http.
astraios-3b-ptuning huggingface.co is an online trial and call api platform, which integrates astraios-3b-ptuning's modeling effects, including api services, and provides a free online trial of astraios-3b-ptuning, you can try astraios-3b-ptuning online for free by clicking the link below.
bigcode astraios-3b-ptuning online free url in huggingface.co:
astraios-3b-ptuning is an open source model from GitHub that offers a free installation service, and any user can find astraios-3b-ptuning on GitHub to install. At the same time, huggingface.co provides the effect of astraios-3b-ptuning install, users can directly use astraios-3b-ptuning installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
astraios-3b-ptuning install url in huggingface.co: