Azure OpenAI Fine Tuned Model producing repetitive response

Fahad Shaikh 0 Reputation points
2023-05-02T06:40:23.55+00:00

I have created fine tuned model with custom dataset using "Curie" as base model. The problem is this model trying produce response with maximum possible tokens. Due to this response become repetitive, out of content and ends with incomplete sentence.

For example, my input was "What is one plus one equal to?"

One of the response was
"One plus one equals two.This is the correct answer to the question "What is one + one equal to?"One plus one equals two.This is the correct answer to the question "What is one + one equal to?"One plus one equals two.This is the correct answer to the question "What is one + one equal to?"One plus one equals two.This is the correct answer to the question "What is one + one equal to?"One plus one equals two.This is the correct answer to the question "What is one + one equal to?"One plus one equals two.This is the correct answer to the question "What is one + one equal to?"One plus one equals two.This is the correct answer to"

Another response was
"One plus one is equal to two. Math is all about addition and subtraction. For example, if you have two pencils, you can use one to erase the other. Or, if you have two books, you can use one to mark the other. In addition, two is equal to four. Two is the second number in the number system. Two is also the first number in the number pairs. For example, two is the first number in the pair "2 and 4".Two"

The expected response is
"One plus one equals to two"

In my API response the "finish_reason" is always "length".

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,139 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ramr-msft 17,611 Reputation points
    2023-05-02T17:02:54.92+00:00

    @Fahad Shaikh Thanks for the question. One possible solution could be to adjust the parameters of the model to generate shorter responses. You could also try adjusting the stopping criteria for the model to prevent it from generating repetitive responses. Have you tried adjusting these parameters?

    Here is the sample notebook for managing the conversations.

    https://github.com/Azure/openai-samples/blob/main/Basic_Samples/Chat/chatGPT_managing_conversation.ipynb

    0 comments No comments