Finetune other models for sentence-classification
# ❓ Questions & Help

I want to use run_glue.py to finetune pre-trained models for classification,but I find that the script can only be used for  BERT, XLM, XLNet and RoBERTa.I want to finetune other models like longformer ,what should I do?


Hi, there is a `LongformerForSequenceClassification` so you should be able to use `run_glue.py` with that model.

I've removed the misleading dosctring in https://github.com/huggingface/transformers/commit/1650130b0fd71eb80380c47c8ffed89d49ff3481.<|||||>thank you.I can finetune all models for downstream tasks<|||||>sorry to interrupt you, I have a question for new version of transformers.
I once used the old version, when I run the python "run_glue.py", I found the time for loading different models to GPU is defferent(the code is model.to_device()&nbsp; &nbsp;),the more layer the model has, the more time it takes to load the model to GPU
However, when I use the new version,when I run the python "run_glue.py", I found the time for loading different models to GPU is nearly the same . (I think the new script load the model to GPU when init the Trainer,&nbsp;)
can you explain the reason&nbsp;&nbsp;


cczhou
chenmodechenchen@qq.com



&nbsp;




------------------&nbsp;原始邮件&nbsp;------------------
发件人:                                                                                                                        "huggingface/transformers"                                                                                    <notifications@github.com&gt;;
发送时间:&nbsp;2020年9月7日(星期一) 晚上8:17
收件人:&nbsp;"huggingface/transformers"<transformers@noreply.github.com&gt;;
抄送:&nbsp;"沉默"<1658802578@qq.com&gt;;"Author"<author@noreply.github.com&gt;;
主题:&nbsp;Re: [huggingface/transformers] Finetune other models for sentence-classification (#6937)





 
Closed #6937.
 
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.