Skip to content

Blog

Finetune Transformers

Learning how to finetune a BERT model using PyTorch/TensorFlow from HuggingFace for your usecase is a art in itself because there are so many ways and methods to do it that you will not able to figure out which is the best for my usecase. BTW, you can always refer to HuggingFace documentation.

For example!
  1. Choose between PyTorch and TensorFlow. (let choose )
  2. If you are importing your dataset with pandas or polars then need to create a custom class by inheriting torch.utils.data.Dataset class.
  3. Then need to tokenize the data and need to use DataLoader and Data Collator.
  4. Then use a for-loop to train and validate the model.

But there is a easy way to finetune, by using objects like transformers.TrainingArguments and transformers.Trainer which reduces the manual looping complexity.

Intro to Deep Learning

Machine Learning VS Deep Learning

  1. As the shape of data increases the ML models cannot able to capture its underlying patterns but deep learning algorithms capture the complex relationship very well.
  2. ML algorithms uses different techniques to learn patterns from data like linear line, spliting criteria, etc. but Perceptron is the building block of DL algorithms which helps to capture almost every patterns of the data.

Perceptron

Perceptron the building block of Deep Learning.

Resume Tips

NOTE: I am writing this article from the POV of Data Scientists.

📝 Important Points To Follow

By implementing these strategies, you can elevate your Resume/CV to effectively communicate your qualifications and stand out among the competition in today's job market.

How To Perform EDA

image for eda - realpython

Source: https://realpython.com/polars-python/

Performing EDA on a dataset is very difficult and time taking process because there is many thing you can do while performing EDA on your dataset.