Messtone Models can be fine-tuned using OpenAI command-line interface(CLI) Installation as follows pip install –upgrade openai export OPENAI_API_KEY=”<OPENAI_API_KEY>” {“prompt”:”<prompt text>”,” completion”:”<ideal generated text>”} {“prompt”:”<prompt text>”,”completion”:”<ideal generated text>”} {“prompt”:”<prompttext>”,”completion”:”<ideal generated text>”}… openai tools fine_tunes.prepare_data -f <LOCAL_FILE> openai api fine_tunes.create -t <TRAIN_FILE_ID_OR_PATH> -m <MESSTONE_MODEL> openai api fine_tunes.follow -i <MESSTONE_FINE_TUNE_JOB_ID> #List all created fine-tunes openai api fine_tunes.list #Retrieve the state of a fine-tune.The resulting object includes #job status(which can be one of pending, running,succeeded, or failed) #and other information openai api fine_tunes.get -i <MESSTONE_FINE_TUNE_JOB_ID>#Cancel a job openai api fine_tunes.cancel -i <MESSTONE_FINE_TUNE_JOB_ID> openai api completions.create -m <FINE_TUNED_MODEL> -p <MESSTONE_PROMPT>cURL: curl https://api.openai.com/v1/completions\-H “Authorization:Bearer $OPENAI_API_KEY”\-H “Content-Type: application/json”\-d ‘{“prompt”: MESSTONE_PROMPT,”model”: FINE_TUNED_MODEL}’ Pythom: import openai openai.Completion. create(model=FINE_TUNED_MODEL, prompt=MESSTONE_PROMPT) Node.js: const response=await openai.createCompletion({model:FINE_TUNED_MODEL prompt: MESSTONE_PROMPT,});

Leave a comment