Rectify and optimise code. Immediate requirement.

Job ID: 36554903

Budget: ₹1,500 – ₹12,500 INR

I have a BERT model with a KNN clustering function applied to it. The python model uses the publicly available Multinews dataset, but during the training, the ram is bieng overloaded, no matter what i do. I need someone to optimise the code to train the file and print the accuracy. This is an immediate requirement.