huggingface / transformers

🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
https://huggingface.co/transformers
Apache License 2.0
134.72k stars 26.94k forks source link

Fine-tuning for paraphrasing tasks #3725

Closed anmoljagetia closed 4 years ago

anmoljagetia commented 4 years ago

❓ Questions & Help

I asked on SO and was downvoted since it is considered "off-site" and is against their Terms of Service. My question is somewhat simple. How do I fine-tune a GPT-2 model for the task of paraphrasing like the paper: https://www.aclweb.org/anthology/D19-5623.pdf

A link to my SO question : https://stackoverflow.com/questions/61115488/how-to-fine-tune-gpt-2-for-paraphrasing?noredirect=1#comment108120354_61115488

Details

My question is somewhat simple. How do I fine-tune a GPT-2 model for the task of paraphrasing like the paper: https://www.aclweb.org/anthology/D19-5623.pdf

Is there a way to achieve this with huggingface-transformers ?

janniks commented 4 years ago

This might help: https://huggingface.co/transformers/usage.html#sequence-classification

anmoljagetia commented 4 years ago

^^ These are inference examples. Do you know how can I retrain ?

kormilitzin commented 4 years ago

I would stress that this topic is quite interesting and useful. A good generative model for paraphrasing may help with text classification with small datasets. Backtranslation (for example) has shown as an effective way to augment the training data and boost performance of a classifier. However, echoing the @anmoljagetia, fine-tuning on the target domain may also bee important.

beyhangl commented 4 years ago

@anmoljagetia did you find any method to retrain the model to generate paraphrase sentence?

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.