Train LLMs in just 50 lines of code! @abhishekkrthakur
Train LLMs in just 50 lines of code!  @abhishekkrthakur
Uploaded July 2023 | Updated November 2026, 3 hours ago
In this video, i'll show you how you can train or finetune your own LLM in the least amount of code possible. In addition, as a bonus, ill also show you how you can do the same without writing any code at all.

For the coding part, we will be using torch, transformers, peft and trl libraries.
For the no-code solution, we will be using autotrain-advanced. You can install autotrain-advanced using pip: "pip install autotrain-advanced"

I'll be using my home machine. No cloud needed!

Please subscribe and like the video to help me keep motivated to make awesome videos like this one. :)

My book, Approaching (Almost) Any Machine Learning problem, is available for free here: bit.ly/approachingml

Follow me on:
Twitter: twitter.com/abhi1thakur
LinkedIn: linkedin.com/in/abhi1thakur
Kaggle: kaggle.com/abhishek
Train LLMs in just 50 lines of code!Kaggles 30 Days Of ML (Day-7): Working with external libraries in Python (final python day)Kaggles 30 Days Of ML (Day-9): First Machine Learning Model and ValidationHow to train & deploy transformer models (BERT, RoBERTa, XLNet, etc.) without writing any code!Run LLAMA-v2 chat locallyHow to train a deep learning model using docker?Building a recommendation system using deep learningBuilding an entity extraction model using BERTHow to serve any machine learning or deep learning model using FastAPITips N Tricks #2: Setting up development environment for machine learningKaggles 30 Days Of ML (Day-4): Python Booleans and ConditionalsTips N Tricks #4: Using joblib to speed up almost any function (example 1)
Abhishek Thakur |

Train LLMs in just 50 lines of code!

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER