sahil2801/CodeAlpaca-20k
Viewer โข Updated โข 20k โข 25.8k โข 242
Run monsterapi/CodeAlpaca_LLAMA2_7B 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:
Use HF Jobs to fine-tune https://huggingface.co/monsterapi/CodeAlpaca_LLAMA2_7B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to run batch inference with https://huggingface.co/monsterapi/CodeAlpaca_LLAMA2_7B 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.
How to use monsterapi/CodeAlpaca_LLAMA2_7B with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-2-7b-hf")
model = PeftModel.from_pretrained(base_model, "monsterapi/CodeAlpaca_LLAMA2_7B")We finetuned Llama2-7B on Code-Alpaca-Instruct Dataset (sahil2801/CodeAlpaca-20k) for 5 epochs or ~ 25,000 steps using MonsterAPI no-code LLM finetuner.
This dataset is HuggingFaceH4/CodeAlpaca_20K unfiltered, removing 36 instances of blatant alignment.
The finetuning session got completed in 4 hours and costed us only $16 for the entire finetuning run!
Base model
meta-llama/Llama-2-7b-hf
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-2-7b-hf") model = PeftModel.from_pretrained(base_model, "monsterapi/CodeAlpaca_LLAMA2_7B")