Hi everyone, excited to post here!
I have been trying to fine-tune a GPT-3 model, and even after reading the documentation and API reference upside down (and following the notebooks), I still cannot achieve what I’m aiming for.
Essentially, my goal is to set up a chatbot that would do Q&A from a knowledge base (KB) of articles. And when I follow the default Q&A recipe in the playground, the chatbot works quite as expected, even with Curie—see my customized preset for the fictional “MyPetLove” company:
However, when trying to fine-tune a model feeding it with Q&A’s (as will eventually be the case for a large KB), the results for the prompts are complete nonsense, even with low temperature (more deterministic); so I must surely be doing something wrong.
I have tried a number of JSONL training sets (again, based on the playground testing that worked as expected).
A “vanilla” format:
{"prompt": "MyPetLove history", "completion": "MyPetLove was found in 1979 in Buenos Aires, Argentina. It opened two branches in the Unites States, in Chicago in 1982 and in New York City in 1989. It expanded to Europe, opening a branch in Berlin in 2005, and another one in Singapore in 2015 when it expanded to Asia."}
{"prompt": "What are MyPetLove main products?", "completion": "MyPetLove sells the brand Kitty Ultra for very high quality food (the best in the market, really), and Doggie Care, a premium family of products for dogs, including food, pest control, and toys."}
{"prompt": "Does MyPetLove have a line of bird products?", "completion": "Not at the moment, but we are thinking in creating one."}
{"prompt": "Who are MyPetLove key people?", "completion": "Emiliano Bastardez, the CEO and Founder; Ricky Ricardez, the Head of Marketing; and Sancha Sánchez, the spokesperson."}
Preformatted with \n\n###\n\n
for prompts, white spaces
and END
separators for completions:
{"prompt": "MyPetLove Q&A\nCompany history\n\n###\n\n", "completion": " MyPetLove was found in 1979 in Buenos Aires, Argentina. It opened two branches in the Unites States, in Chicago in 1982 and in New York City in 1989. It expanded to Europe, opening a branch in Berlin in 2005, and another one in Singapore in 2015 when it expanded to Asia. END"}
{"prompt": "MyPetLove Q&A\nWhat are the main products?\n\n###\n\n", "completion": " MyPetLove sells the brand Kitty Ultra for very high quality food (the best in the market, really), and Doggie Care, a premium family of products for dogs, including food, pest control, and toys. END"}
{"prompt": "MyPetLove Q&A\nIs there a line of bird products?\n\n###\n\n", "completion": " Not at the moment, but we are thinking in creating one. END"}
{"prompt": "MyPetLove Q&A\nWho are the key people?\n\n###\n\n", "completion": " Emiliano Bastardez, the CEO and Founder; Ricky Ricardez, the Head of Marketing; and Sancha Sánchez, the spokesperson. END"}
And it doesn’t matter how I prompt the resulting model (with or without --stop
, with an extra line stating that it’s a MyPetLove Q&A, or without), all I get is complete nonsense, as if the model wasn’t fine tuned at all.
$ openai api completions.create --max-tokens 128 --temperature 0.25 --stop "\n" -m curie:ft-personal-2022-07-26-14-12-06 -p "MyPetLove Q&A\nCompany history\n"
MyPetLove Q&A\nCompany history\nPetco was founded in San Diego, California in 1994 by John and Marsha Coelho. The company was originally called Petco Animal Supplies, but was renamed in 1996 to reflect the company’s broader focus on pets.
$ openai api completions.create --max-tokens 128 --temperature 0.25 --stop "\n" -m curie:ft-personal-2022-07-26-14-12-06 -p "Where are MyPetLove branches"
Where are MyPetLove branches?
We have branches in the following locations:
Brisbane, Australia
Melbourne, Australia
Perth, Australia
Sydney, Australia
Canberra, Australia
Adelaide, Australia
Brisbane, Australia
We have a branch in Brisbane, Australia.
Where can I find MyPetLove in the media?
You can find us in the media in the following ways:
We are listed in the following directories:
We are listed in the following magazines:
We are listed in the following newspapers:
What am I missing?