Question: Take the phi - 2 LLM example. Adjust train _ test _ split function to generate approximately 4 0 0 positive and 4 0 0

Take the phi-2 LLM example. Adjust train_test_split function to generate approximately 400 positive and 400 negative sentiment feature vectors. Similarly, generate 50 positive and 50 negative test samples. Using a batch-size of 4:
a) Build logistic regression classifier. Report your accuracy on train and test sets. Explain if there are any overfit or underfit observed?
b) Build a neural network with two hidden layers. Use 5 nodes in each layer. Use
RELU nonlinearity. Try three different learning rates. Explain if there are any overfit or underfit observed?
c) Build an encoder-only transformer network. Use two heads in attention. Try two
different learning rates and number of layers. Explain if there are any overfit or underfit observed?
d) Do the part-c but remove residual connections and layer normalization.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!