LLM Fine-tuning: Day 1
Simulating/testing
Before diving into the project, I tested out gpt-2 using the pipeline method on Google Colab.
First, I installed all required libraries to run the model
pip install transformers datasets accelerate -q
Then, I ran a quick test to check whether confirm the program is running in colabs and the GPU (I selected T4 GPU for convenience)
After that, I implemented a simple program to test gpt-2’s text generation, summarization, etc capabilities. Below is a snippet of the text generation code:
The model was able to properly generate texts according to the 3 given prompts
The model also produced confident responses for sentimental analysis, Q&A, and summarization.
Now that I have a good idea of how llms work, I will begin working on my project.