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.

How to finetune ELECTRA on glue?

See original GitHub issue

After pretraining my own electra model, I wanted to test it out in Glue using run_glue.py. However I got this:

ValueError: Unrecognized configuration class <class 'transformers.configuration_electra.ElectraConfig'> for this kind of AutoModel: AutoModelForSequenceClassification.
Model type should be one of DistilBertConfig, AlbertConfig, CamembertConfig, XLMRobertaConfig, BartConfig, RobertaConfig, BertConfig, XLNetConfig, FlaubertConfig, XLMConfig.

After taking a look at the source code, It seems like ElectraConfig isn’t available for sequence classification, is there a reason for that? Did anyone finetune electra on glue?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
elyesmanaicommented, May 22, 2020

awesome, it works perfectly, thank you very much!

0reactions
cktsangalcommented, Jul 14, 2020

This problem happened again, when I use ELECTRA on question-answering pipeline. My Transformers version is 2.11.0.

from transformers import pipeline, AutoTokenizer, AutoModelForQuestionAnswering

tokenizer = AutoTokenizer.from_pretrained(“ahotrod/electra_large_discriminator_squad2_512”)

model = AutoModelForQuestionAnswering.from_pretrained(“ahotrod/electra_large_discriminator_squad2_512”)

albert_qa = pipeline(‘question-answering’, model=model, tokenizer=tokenizer)

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

anirudh21/electra-base-discriminator-finetuned-rte
This model is a fine-tuned version of google/electra-base-discriminator on the glue dataset. It achieves the following results on the evaluation ...
Read more >
Tutorial: How to pre-train ELECTRA for Spanish from Scratch
At a small scale, ELECTRA-small can be trained on one GPU for 4 days to outperform GPT on the GLUE benchmark. At a...
Read more >
Solve GLUE tasks using BERT on TPU | Text - TensorFlow
Load a BERT model from TensorFlow Hub · Choose one of GLUE tasks and download the dataset · Preprocess the text · Fine-tune...
Read more >
Pretrain & Finetune MLM - fastai dev - fast.ai Course Forums
Pretrain & Finetune MLM - 6: Reproduce GLUE finetuning results ; ELECTRA-Small, 54.6, 89.1 ; ELECTRA-Small (finetuned with fastai), 52.8, 89.8 ...
Read more >
Understanding ELECTRA and Training an ELECTRA ...
All scores are GLUE benchmark scores given in the ELECTRA paper unless stated otherwise. Loss defined over all input tokens vs only masked ......
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