Model gpt2 return repeated sentences
I am using GPT2 model to generate some content but every time it return like
{"outline":"Generate an esssay on the topic 'Digital marketing in Canada'. \u00a0The topic can be found in the Forum here .\nThis is a great post as it describes the process of creating a digital marketing strategy. \u00a0The idea here is to create a digital marketing strategy that is unique to Canada and that is unique to the country. \u00a0The goal is to develop a digital marketing strategy that is unique to Canada and that is unique to the country. \u00a0The goal is to create a digital marketing strategy that is unique to Canada and that is unique to the"}
Laravel Model code:
$response = Http::withHeaders([
'Authorization' => 'Bearer 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',
])->post('https://api-inference.huggingface.co/models/gpt2', [
'inputs' => $prompt,
'parameters' => [
'max_length' => 3000, // adjust as needed
'temperature' => 0.5 // controls creativity
],
]);
I am facing similar scenario when I am training distilgpt2. @zeeskhan - what is your training dataset size ?