Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 1.14 KB

README.md

File metadata and controls

38 lines (27 loc) · 1.14 KB

Finetuning a Model on Replicate

Official Replicate Documentation

  1. Create a model

  2. Create a training data file.

For an instruction tuned model like llama-2-7b-chat.

{
  "prompt": "Why did the chicken cross the road?",
  "completion": "To get to the other side."
}

For a "base" completion model like llama-2-7b.

{
  "text": "Why did the chicken cross the road? To get to the other side."
}
  1. Upload the training file with upload-file.js and save the data url for the next step. (This is not required if you host your data file elsewhere.)

  2. Run finetune-model.js with the model you created, your training data url, and the model you want to finetune.

const destination = 'shiffman/your-model';
const trainingDataUrl = 'your-training-data-ur';
const modelOwner = 'meta';
const modelName = 'llama-2-7b';
const modelVersion = '77dde5d6c56598691b9008f7d123a18d98f40e4b4978f8a72215ebfc2553ddd8';
  1. Test the model with test-model.js.