From the course: Hugging Face Transformers: Introduction to Pretrained Models

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Training a custom model

Training a custom model

- [Instructor] Having used pre-trained transformers through pipelines in our previous examples, let's look at the process for training a custom model with Hugging Face Artifacts. This process is similar, irrespective of the specific model or use case that needs to be customized. We will use transfer learning for the process. Here, we will use a smaller data set that is specific to the use case. We then take the base model from Hugging Face, freeze or retrain the encoder decoder weights, and then train a specific classifier or sequence generator as required by the use case. During this process, we can choose to reuse some or all of the following from Hugging Face. We can reuse the tokenizer to create embeddings. We can reuse the model to take the base language model and customize. We can also use data sets from Hugging Face for customizing the model. In this chapter, we will build a custom model for sentiment analysis following this process. Here are the steps needed for model…

Contents