Can i train my own text corpus
## ❓ Questions & Help

<!-- A clear and concise description of the question. -->
I get the idea of using `from_pretrained` but Can i train my own text corpus and then get the weights? If So how?
You can initialize the weights of your model as the ones of e.g. BERT, and after that you can fine-tune your model with _your own data_ (**transfer learning**). Please see [here](https://github.com/huggingface/transformers/blob/master/examples/run_lm_finetuning.py) for fine-tuning for a particular task.

Have i answered to you?

> ##  Questions & Help
> I get the idea of using `from_pretrained` but Can i train my own text corpus and then get the weights? If So how?<|||||>> You can initialize the weights of your model as the ones of e.g. BERT, and after that you can fine-tune your model with _your own data_ (**transfer learning**). Please see [here](https://github.com/huggingface/transformers/blob/master/examples/run_lm_finetuning.py) for fine-tuning for a particular task.
> 
> Have i answered to you?
> 
> > ## Questions & Help
> > I get the idea of using `from_pretrained` but Can i train my own text corpus and then get the weights? If So how?

Hey Thanks! I'll go through the source code you referred, also just wanted to confirm the same goes with gpt-2 model right?<|||||>Yeah, this particular script works with OpenAI GPT-2 too.
In general, the most part of the code is the same even changing the model chosen.

> > You can initialize the weights of your model as the ones of e.g. BERT, and after that you can fine-tune your model with _your own data_ (**transfer learning**). Please see [here](https://github.com/huggingface/transformers/blob/master/examples/run_lm_finetuning.py) for fine-tuning for a particular task.
> > Have i answered to you?
> > > ## Questions & Help
> > > I get the idea of using `from_pretrained` but Can i train my own text corpus and then get the weights? If So how?
> 
> Hey Thanks! I'll go through the source code you referred, also just wanted to confirm the same goes with gpt-2 model right?<|||||>Thanks for the quick response, i'll close this one then.