安裝
pip install openai
export OPENAI_API_KEY=sk-xxxx
寫一個jsonl文件openai.jsonl
{"prompt": "你是誰", "completion": "我是智能助手"}
{"prompt": "你的gpt版本是多少", "completion": "我是智能助手,沒有gpt版本"}
{"prompt": "你和openai什麼關係", "completion": "我是智能助手,與openai沒有關係"}
格式化檢查
openai tools fine_tunes.prepare_data -f openai.jsonl
提交訓練:
openai api fine_tunes.create -t openai_prepared.jsonl -m davinci --suffix eqs
感覺微調效果並不好