Downloads · 30 days
0
harpomaxx/opt350m-codealpaca20k
opt350m-codealpaca20k is a machine learning model from harpomaxx. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for adapter-transformers. The card lists the license as openrail.
An opt-350m model trained on the CodeAlpaca 20k dataset using quantization and Progressive Embedding Fine-Tuning (PEFT). The resulting model is designed to understand and generate code-related responses based on the p…
Downloads · 30 days
0
Access
Public
Updated Sep 24, 2023
Repo size
1.3 GB
Likes
0
Public
Click a slice to open those files.
.bin1.3 GB · 100%
From the Hugging Face model README
opt350m-codealpaca20kAn opt-350m model trained on the CodeAlpaca 20k dataset using quantization and Progressive Embedding Fine-Tuning (PEFT). The resulting model is designed to understand and generate code-related responses based on the prompts provided.
facebook/opt-350mThe model was trained on the lucasmccabe-lmi/CodeAlpaca-20k dataset. This dataset contains code-related prompts and their corresponding outputs.
Script used for training is avaiable here
adamw_bnb_8bitfrom transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("facebook/opt350m")
model = AutoModelForCausalLM.from_pretrained("harpomaxx/opt350m-codealpaca20k)
prompt = "Question: [Your code-related question here] ### Answer: "
inputs = tokenizer.encode(prompt, return_tensors="pt")
outputs = model.generate(inputs)
decoded_output = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(decoded_output)
OpenRail