norahsakal / fine-tune-gpt3-model

How you can fine-tune a GPT-3 model with Python with your own data
118 stars 33 forks source link

How do you train the model to the desired effect? #1

Open liuyuanjun520 opened 1 year ago

liuyuanjun520 commented 1 year ago

I trained according to about one hundred training sets about a certain new product, but the training results are very poor, why? How do you train the model to the desired effect?

norahsakal commented 1 year ago

I appreciate you reaching out about the issues you've been facing with fine-tuning a GPT-3 model. It sounds like you've been putting in the effort, but the results haven't been as good as you hoped.

Let me share a different approach that might work better for you: the Search-Ask method.

Instead of fine-tuning the GPT-3 model, this method allows you to leverage a library of reference texts to help GPT generate more accurate responses.

The process involves two steps:

Search: Look through your collection of text for sections relevant to your specific topic or product.

Ask: Include the retrieved text sections in a message to GPT, and then ask your question.

Here's a great analogy I found:

When you fine-tune a model, it's like the model is trying to memorize information for an exam that's a week away. By the time the "exam" comes, the model might forget some details or mix up facts it never really learned. This is similar to how our long-term memory works.

On the other hand, when you use the Search-Ask method and insert knowledge into a message, it's like giving the model open notes during the "exam." With the information right in front of it, the model is more likely to provide correct answers. This is more like our short-term memory.

You can learn more about this method and how to implement it by checking out this resource from OpenAI: https://github.com/openai/openai-cookbook/blob/main/examples/Question_answering_using_embeddings.ipynb

I hope this helps you achieve better results! Don't hesitate to reach out if you have any more questions.

liuyuanjun520 commented 1 year ago

I appreciate you reaching out about the issues you've been facing with fine-tuning a GPT-3 model. It sounds like you've been putting in the effort, but the results haven't been as good as you hoped.

Let me share a different approach that might work better for you: the Search-Ask method.

Instead of fine-tuning the GPT-3 model, this method allows you to leverage a library of reference texts to help GPT generate more accurate responses.

The process involves two steps:

Search: Look through your collection of text for sections relevant to your specific topic or product.

Ask: Include the retrieved text sections in a message to GPT, and then ask your question.

Here's a great analogy I found:

When you fine-tune a model, it's like the model is trying to memorize information for an exam that's a week away. By the time the "exam" comes, the model might forget some details or mix up facts it never really learned. This is similar to how our long-term memory works.

On the other hand, when you use the Search-Ask method and insert knowledge into a message, it's like giving the model open notes during the "exam." With the information right in front of it, the model is more likely to provide correct answers. This is more like our short-term memory.

You can learn more about this method and how to implement it by checking out this resource from OpenAI: https://github.com/openai/openai-cookbook/blob/main/examples/Question_answering_using_embeddings.ipynb

I hope this helps you achieve better results! Don't hesitate to reach out if you have any more questions.

Wow, It's a great idea!!!!🐱‍👓

I have tried gpt_index + langchain to embeddings my knowledge base and then local literalization. Every time I need to call, I call this processed file and use langchain to access chatgpt3.5 and return, which is great.

Thank you so much for your thoughts. It was great.