question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unrecognized configuration class GPT2Config for AutoModelForSeq2SeqLM | Microsoft DialoGPT no longer working

See original GitHub issue

Information

Model I am using: Microsoft’s DialoGPT

The problem arises when using:

  • the official example scripts:

Since the morning of July 14th, the inference API has been outputting errors on Microsoft’s DialoGPT. It was working fine before July 14th.

Error

{'error': "Unrecognized configuration class <class 'transformers.models.gpt2.configuration_gpt2.GPT2Config'> 

for this kind of AutoModel: AutoModelForSeq2SeqLM.\nModel type should be one of 

BigBirdPegasusConfig, M2M100Config, LEDConfig, BlenderbotSmallConfig, MT5Config, T5Config, PegasusConfig, MarianConfig, MBartConfig, BlenderbotConfig, BartConfig, FSMTConfig, EncoderDecoderConfig, XLMProphetNetConfig, ProphetNetConfig."}

Query script as given on Hugging Face’s site:

import requests

API_URL = "https://api-inference.huggingface.co/models/microsoft/DialoGPT-medium"
headers = {"Authorization": "Bearer API_TOKEN"}

def query(payload):
	response = requests.post(API_URL, headers=headers, json=payload)
	return response.json()

output = query({
    "inputs": {
		"past_user_inputs": ["Which movie is the best ?"],
		"generated_responses": ["It's Die Hard for sure."],
		"text": "Can you explain why ?",
	},
})

@patrickvonplaten, @LysandreJik I’m mentioning these two people as the guide says they are working on gpt2. Sorry if I pinged the wrong people!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Narsilcommented, Jul 15, 2021

Hi everyone.

Not really sure what happened here (the error is pretty confusing). It is fixed now anyway.

0reactions
Narsilcommented, Aug 1, 2022

dbmdz/german-gpt2 seems to be working https://huggingface.co/dbmdz/german-gpt2?text=Heute+ist+sehr+schönes+Wetter+in

It doesn’t seem to be defined as conversation, is that what you’re referring to ? I am not sure how this model was defined and so if it actually works with conversation, but it doesn’t seem to be the case.

The API works with text-generation for this model and it works fine.

benjamin/gerpt2 seems to be exactly the same.

If you want to mark them as conversational you need to update the pipeline_tag https://huggingface.co/docs/hub/models-widgets#enabling-a-widget

Otherwise do you mind creating a new issue with the new error you’re receiving to be able to reproduce (you can ping me) ?

Hope this helps.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unrecognized configuration class in mT5-small-finetuned ...
Hi, I tried to run the multilingual question-answering with the mt5 model at https://huggingface.co/mrm8488/mT5-small-finetuned-tydiqa-for-xqa.
Read more >
How should I format my dataset to avoid this? "Input is not ...
I'm training dialoGPT on my own dataset, following this tutorial. ... .com/models.huggingface.co/bert/microsoft/DialoGPT-small/config.json ...
Read more >
Unrecognized configuration class <class 'transformers.models ...
Describe the bug I want to use a german GPT-2 model of answer genereting. So I use a code like this: from haystack.nodes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found