ML, Deep Learning & Transformers
AI, Machine Learning, Deep Learning and Transformers
From first Python script to building a mini GPT and fine-tuning LLMs.
Overview
What this course is about
In 20 weeks (5 months), students go from writing their first Python script to training neural networks, building a small GPT from scratch and fine-tuning modern Transformer models. Every week ends with a project on GitHub, and key algorithms are built from scratch once before students use libraries, so nothing is a black box.
- No prior Python or ML needed - Class 12 maths is enough
- Key algorithms built from scratch before using libraries
- Build a mini GPT and fine-tune small LLMs with QLoRA
- 19 portfolio projects plus a deployed team capstone
Who it's for
Undergraduate students from any branch. No prior Python or ML required. Class 12 maths is enough; ML maths is taught in Week 5.
Format
Two 90-minute theory + live-coding sessions and one 3-hour lab each week (about 6 contact hours), plus 3-4 hours of self-study and project work.
What you need
Any laptop with 8 GB RAM. GPU work runs on free Google Colab / Kaggle notebooks.
You walk away with
A portfolio of 19 projects on GitHub / Hugging Face Hub and one deployed capstone model with a demo video.
Learning outcomes
By the end, you will be able to
- LO1Write clean Python and use NumPy, Pandas and Matplotlib to clean, explore and visualise data.
- LO2Explain the linear algebra, calculus and probability behind ML, and implement gradient descent from scratch.
- LO3Build, tune, evaluate and explain classical ML models with scikit-learn (regression, classification, ensembles, clustering, PCA).
- LO4Build neural networks from scratch and in PyTorch, including CNNs for images and RNNs / LSTMs for sequences.
- LO5Explain attention and the Transformer architecture, and build a small GPT from scratch.
- LO6Use and fine-tune pretrained Transformers (BERT, ViT, small LLMs) with Hugging Face, including LoRA / QLoRA.
- LO7Track experiments, deploy models as apps or APIs, and check models for bias, errors and failure cases.
Syllabus
20-week roadmap
Four phases, each ending in a phase gate you prove with a project. Open any week to see topics, the lab and the project you'll ship.
Python and data foundations
Most of an ML engineer's time goes into data. This phase builds fluent Python, fast array programming with NumPy, and the Pandas and plotting skills needed to clean and explore real datasets.
Load a messy real dataset, clean it, and explain it with clear charts and written insights.
01Python basicsStudent report-card generator+
Topics
- Course intro: what AI, ML, DL and Transformers are, with live demos
- Installing Python 3.12+, VS Code, Jupyter; using Google Colab
- Variables, data types, operators, strings and f-strings
- Input and output
- Conditionals and loops
- Functions: parameters, return values, scope
- Git and GitHub basics
- Using AI coding assistants responsibly
You will
- Set up Python, Jupyter, Colab and Git.
- Write programs with variables, conditionals, loops and functions.
- Use AI coding assistants while understanding every line.
Lab · 3 hours
Pair-program a number-guessing game, then refactor it into functions. Push to GitHub.
Project: Student report-card generator
Reads marks for a class, calculates totals, percentages, grades and rank, and prints formatted report cards.
- • At least 4 functions with clear names
- • Handles invalid marks without crashing
- • Class topper and subject averages shown
- • Repo with README
Stretch: Export report cards to a text file per student.
02Data structures, files, OOP and GitPersonal expense tracker+
Topics
- Lists, tuples, dictionaries, sets, comprehensions
- Reading / writing CSV and JSON
- Exceptions and error handling
- Modules and packages; pip and virtual environments
- Classes, objects, methods, inheritance
- Dataclasses and type hints
- Project structure across files
- Git branches and pull requests
You will
- Choose the right data structure for a problem.
- Read and write CSV and JSON files.
- Model problems with classes and dataclasses.
Lab · 3 hours
Build a contact book with add / search / delete saved to JSON.
Project: Personal expense tracker
A class-based app to add, filter and summarise expenses by category and month, stored in CSV.
- • Expense modelled as a class or dataclass
- • Data persists between runs
- • Monthly and category summaries
- • Input validation
Stretch: Add a monthly bar chart (preview of Week 4).
03NumPy and vectorised thinkingImage filters with NumPy+
Topics
- Arrays, dtypes, shapes, reshaping
- Indexing, slicing, boolean masks
- Broadcasting rules
- Vectorised maths vs loops (timing demo)
- Matrix operations: dot, matmul, transpose
- Random numbers and basic statistics
- Images as 3D arrays (height x width x channels)
- Saving and loading arrays
You will
- Create and manipulate arrays of any shape.
- Replace Python loops with fast vectorised operations.
- Treat images and datasets as arrays.
Lab · 3 hours
Speed challenge: rewrite five loop-based functions in NumPy and measure the speed-up.
Project: Image filters with NumPy
Load a photo as an array and implement filters without image libraries.
- • Grayscale, flip, crop, brightness and blur
- • No Python loops over pixels
- • Before / after images in README
- • Timing comparison vs a loop version
Stretch: Implement edge detection with a Sobel filter (preview of convolutions).
04Pandas, cleaning, visualisation and EDAEDA report on a real dataset (Phase 1 project)+
Topics
- Series and DataFrames; loading CSV / Excel
- Selecting, filtering, sorting, groupby, merge, pivot
- Cleaning: missing values, duplicates, types, outliers
- Matplotlib and Seaborn: histograms, box, scatter, line, heatmaps
- EDA workflow: questions -> charts -> insights
- Telling a story with data
You will
- Load, clean and reshape real-world data with Pandas.
- Choose the right chart for a question.
- Run an exploratory data analysis and communicate insights.
Lab · 3 hours
Clean a deliberately messy dataset and produce 5 charts that answer given questions.
Project: EDA report on a real dataset
Pick an Indian open dataset (IPL, air quality, crop production, census, etc.) and produce an EDA notebook.
- • Documented cleaning steps
- • At least 8 well-labelled charts
- • 10 written insights backed by the data
- • Live 5-minute presentation in lab
Stretch: Publish the notebook on Kaggle.
Maths for ML and classical ML
Students learn the maths behind learning, implement key algorithms from scratch, then master scikit-learn: regression, classification, ensembles, clustering and deployment, which still solve most real-world tabular problems.
Take a tabular problem from raw data to a tuned, explained and deployed ML model.
05Maths for ML (taught with code)Gradient descent visualiser + probability simulations+
Topics
- Vectors, dot products, norms; matrices as transformations
- Matrix multiplication with NumPy
- Derivatives, partial derivatives, gradients, chain rule
- Gradient descent: learning rate, convergence, local minima
- Probability: distributions, expectation, variance, Bayes' rule
- Sampling, correlation vs causation
You will
- Use vectors and matrices to represent data and models.
- Compute gradients and explain gradient descent.
- Reason with probability and basic statistics.
Lab · 3 hours
Implement numerical gradients and compare with hand-derived ones.
Project: Gradient descent visualiser + probability simulations
Animate gradient descent on 2D functions and run Monte Carlo simulations.
- • Gradient descent written from scratch
- • Effect of 3 learning rates shown
- • Monte Carlo for at least 3 problems (e.g. birthday problem)
- • Short write-up of what was learned
Stretch: Add momentum and compare convergence.
06ML fundamentals and linear regressionHouse price predictor+
Topics
- What ML is; supervised vs unsupervised; features and labels
- Train / validation / test splits
- Overfitting, underfitting, bias-variance
- Linear regression from scratch with gradient descent
- scikit-learn API: fit, predict, score
- Metrics: MAE, RMSE, R^2; polynomial features; Ridge and Lasso
You will
- Explain supervised learning, training and generalisation.
- Implement linear regression from scratch and with scikit-learn.
- Diagnose overfitting and apply regularisation.
Lab · 3 hours
Fit models of increasing complexity and plot training vs validation error.
Project: House price predictor
Predict house prices with a from-scratch model and scikit-learn, and compare.
- • From-scratch and scikit-learn versions agree closely
- • Proper train / test split
- • RMSE and R^2 reported
- • Residual plot and discussion
Stretch: Add regularisation and tune its strength.
07ClassificationSMS spam or placement predictor+
Topics
- Logistic regression and decision boundaries
- k-nearest neighbours, decision trees
- Naive Bayes; SVM intuition
- Confusion matrix, precision, recall, F1, ROC-AUC
- Choosing metrics when classes are imbalanced
- Text features: bag-of-words, TF-IDF
You will
- Train and compare common classifiers.
- Pick evaluation metrics that match the problem.
- Turn text into features.
Lab · 3 hours
Build a decision tree by hand on a tiny dataset, then check with scikit-learn.
Project: SMS spam or placement predictor
Train at least 3 classifiers, compare them, and analyse the mistakes.
- • 3+ models compared on the same split
- • Metric choice justified
- • Confusion matrix and 10 misclassified examples discussed
- • Saved best model
Stretch: Try a simple threshold tuning to trade precision for recall.
08Ensembles, feature engineering and tuningIn-class Kaggle-style competition (teams)+
Topics
- Bagging and random forests
- Boosting: XGBoost, LightGBM
- Feature importance
- Feature engineering: encoding, scaling, dates, interactions
- scikit-learn Pipelines and ColumnTransformer
- Cross-validation, grid / random search, Optuna
You will
- Use random forests and gradient boosting.
- Engineer useful features and build pipelines.
- Tune hyperparameters with cross-validation.
Lab · 3 hours
Competition kick-off: teams explore the data and submit a baseline.
Project: In-class Kaggle-style competition
Teams compete on a private leaderboard (e.g. loan default prediction).
- • At least 5 leaderboard submissions
- • Pipeline with cross-validation
- • Short write-up: what worked and what did not
- • Top teams present their approach
Stretch: Try model stacking.
09Unsupervised learningCustomer segmentation+
Topics
- k-means and choosing k (elbow, silhouette)
- Hierarchical clustering, DBSCAN
- Evaluating clusters
- PCA: intuition and maths link to Week 5
- t-SNE / UMAP for visualisation
- Anomaly detection (Isolation Forest)
You will
- Group data with clustering algorithms.
- Reduce dimensions for modelling and visualisation.
- Detect unusual data points.
Lab · 3 hours
Compress images with PCA and see how many components are needed.
Project: Customer segmentation
Cluster retail customers and describe each segment.
- • Two clustering methods compared
- • PCA visualisation of clusters
- • Business profile for each segment
- • Recommendations for each segment
Stretch: Flag unusual customers with anomaly detection.
10ML in practice and deploymentEnd-to-end deployed ML app (Phase 2 project)+
Topics
- Data leakage and how to spot it
- Class imbalance: class weights, SMOTE
- Calibration; explaining models with SHAP
- Saving models (joblib); FastAPI prediction endpoint
- Quick UIs with Streamlit / Gradio; Hugging Face Spaces
- Model cards and fairness checks
You will
- Avoid common real-world ML mistakes.
- Explain individual predictions.
- Deploy a model as an app or API.
Lab · 3 hours
Find the leakage in three deliberately broken notebooks.
Project: End-to-end deployed ML app
From raw data to a deployed app (e.g. crop recommendation, loan approval, student dropout risk).
- • Clean pipeline from raw data to model
- • SHAP explanation shown for each prediction
- • Deployed public app
- • Model card with limits and fairness notes
- • Live 5-minute demo
Stretch: Add input validation and logging to the API.
Deep learning with PyTorch
Students build a neural network by hand, then use PyTorch on free GPUs to train CNNs for images and RNNs / LSTMs for sequences, with good training practice and experiment tracking.
Train, debug and deploy a PyTorch image or text model, and explain backpropagation.
11Neural networks from scratchNumPy neural network on MNIST+
Topics
- Perceptron and its limits (XOR)
- Layers, activations: sigmoid, tanh, ReLU, softmax
- Loss functions: MSE, cross-entropy
- Backpropagation with the chain rule, step by step
- Mini-batch SGD
- Weight initialisation; debugging with gradient checks
You will
- Explain neurons, layers and activation functions.
- Derive and implement backpropagation.
- Train a network with mini-batch SGD.
Lab · 3 hours
Hand-compute one backprop step on paper, then verify in code.
Project: NumPy neural network on MNIST
A 2-layer network in pure NumPy that recognises handwritten digits.
- • No deep learning libraries used
- • Over 90% test accuracy
- • Loss and accuracy curves
- • Gradient check passes
Stretch: Add a third layer and momentum.
12PyTorch fundamentalsFashion-MNIST classifier+
Topics
- Tensors and GPU basics
- Autograd: how PyTorch computes gradients
- nn.Module, layers, loss functions
- Dataset and DataLoader
- Optimisers (SGD, Adam), learning-rate schedules
- Saving and loading checkpoints; Colab / Kaggle GPUs
You will
- Use tensors and autograd.
- Write a clean, reusable training loop.
- Train on a GPU.
Lab · 3 hours
Port the Week 11 network to PyTorch and confirm it matches.
Project: Fashion-MNIST classifier
Train and improve an MLP in PyTorch.
- • Reusable train / evaluate functions
- • Over 88% test accuracy
- • CPU vs GPU timing comparison
- • Checkpoint saved and reloaded
Stretch: Add a learning-rate finder.
13CNNs and transfer learningPlant disease or Indian food classifier+
Topics
- Convolutions, filters, stride, padding, pooling
- Classic architectures: LeNet, VGG, ResNet
- Data augmentation
- Transfer learning with torchvision / timm
- Grad-CAM visualisations
- Intro to object detection (YOLO) and segmentation
You will
- Explain convolutions and pooling.
- Fine-tune pretrained vision models.
- Interpret what a CNN has learned.
Lab · 3 hours
Build a small CNN on CIFAR-10, then beat it with a pretrained model.
Project: Plant disease or Indian food classifier
Fine-tune a pretrained CNN on a real image dataset.
- • Train / validation / test split without leakage
- • Per-class accuracy and confusion matrix
- • Grad-CAM for correct and wrong predictions
- • Simple demo app
Stretch: Run YOLO on campus photos and count objects.
14Sequence modelsReview sentiment analyser+
Topics
- Word embeddings: word2vec, GloVe
- Tokenising text, padding, vocabularies
- RNNs and the vanishing-gradient problem
- LSTM and GRU
- Text classification with LSTMs
- Simple time-series forecasting; limits of RNNs
You will
- Represent words as vectors.
- Build RNN / LSTM models for text.
- Explain why RNNs led to attention.
Lab · 3 hours
Explore word-embedding analogies (king - man + woman).
Project: Review sentiment analyser
An LSTM classifier for movie or product reviews (English or a regional language).
- • LSTM beats or matches the Week 7 TF-IDF baseline
- • Accuracy and F1 reported
- • 10 wrong predictions analysed
- • Demo that scores any typed review
Stretch: Try pretrained embeddings and compare.
15Training deep models wellDeployed deep learning app (Phase 3 project)+
Topics
- Dropout, weight decay, batch norm, early stopping
- Weights & Biases or MLflow experiment tracking
- Hyperparameter search
- Autoencoders; VAEs, GANs and diffusion (intuition)
- Mixed precision and free-GPU tips
- Capstone kick-off: teams and ideas
You will
- Prevent and diagnose overfitting.
- Track and compare experiments.
- Explain the main generative model families.
Lab · 3 hours
Train an autoencoder to denoise images.
Project: Deployed deep learning app
Train a vision or text model with tracked experiments and deploy it on Hugging Face Spaces.
- • At least 5 tracked experiments compared
- • Deployed Gradio / Streamlit app
- • Failure cases presented honestly
- • Capstone proposal submitted (1 page)
Stretch: Export the model to ONNX and compare speed.
Transformers, LLMs and capstone
Students build attention and a mini GPT from scratch, fine-tune pretrained Transformers with Hugging Face, fine-tune a small LLM with LoRA, and finish with MLOps, responsible AI and capstone demo day.
Explain and implement attention, fine-tune a pretrained Transformer, and ship a capstone.
16Attention and the TransformerTransformer block from scratch+
Topics
- Seq2seq and the attention idea
- Scaled dot-product attention, step by step
- Multi-head attention
- Positional encodings, residuals, layer norm
- Encoder vs decoder (BERT vs GPT vs T5)
- Reading 'Attention Is All You Need' together
You will
- Explain self-attention with queries, keys and values.
- Implement a Transformer block.
- Compare encoder, decoder and encoder-decoder models.
Lab · 3 hours
Compute attention by hand for a 3-word sentence, then in code.
Project: Transformer block from scratch
Implement attention and a full Transformer block in PyTorch.
- • Matches nn.MultiheadAttention output
- • Causal mask implemented
- • Attention heatmaps visualised
- • Explained in the README
Stretch: Train the block on a toy sequence-reversal task.
17Tokenisation and building a mini GPTMini GPT+
Topics
- Tokenisation: characters, words, subwords
- Byte-pair encoding (BPE) from scratch
- Language modelling as next-token prediction
- Building and training a mini GPT
- Sampling: temperature, top-k, top-p
- Scaling laws and what changes at large scale
You will
- Explain subword tokenisation.
- Train a decoder-only Transformer.
- Control text generation with sampling settings.
Lab · 3 hours
Train a BPE tokenizer on a local-language corpus and inspect the tokens.
Project: Mini GPT
Train a small GPT on a text corpus (e.g. Thirukkural, Tamil / Hindi news, Shakespeare) and generate text.
- • Model and training loop written by the student
- • Training and validation loss curves
- • Samples at 3 temperatures
- • Parameter count and training time reported
Stretch: Compare character-level vs BPE versions.
18Hugging Face and fine-tuning pretrained modelsFine-tuned BERT model+
Topics
- Transformers, Datasets, Tokenizers, Hub
- Pipelines for quick inference
- Pretrained BERT, T5 and Vision Transformer (ViT)
- Fine-tuning with the Trainer API
- Named-entity recognition
- Sentence embeddings and semantic search
You will
- Use pretrained models from the Hugging Face Hub.
- Fine-tune Transformers for classification and NER.
- Build semantic search with sentence embeddings.
Lab · 3 hours
Fine-tune a ViT on the Week 13 dataset and compare with the CNN.
Project: Fine-tuned BERT model
Fine-tune DistilBERT or a multilingual model (e.g. IndicBERT) for news classification or NER.
- • Beats the Week 14 LSTM on the same task
- • Model and model card published on the Hub
- • Evaluation on a held-out set
- • Demo on Hugging Face Spaces
Stretch: Add semantic search over a document collection.
19Large language modelsLoRA fine-tuned domain assistant (Phase 4 project)+
Topics
- Pretraining, instruction tuning, RLHF / DPO (overview)
- LoRA and QLoRA with PEFT
- Preparing instruction datasets
- Prompting vs RAG vs fine-tuning
- Evaluating LLMs; hallucination
- Multimodal: CLIP, vision-language models, diffusion overview
You will
- Explain how LLMs are pretrained and aligned.
- Fine-tune a small LLM with LoRA / QLoRA.
- Choose between prompting, RAG and fine-tuning.
Lab · 3 hours
QLoRA fine-tune a 1B model on a small instruction set on a free GPU.
Project: LoRA fine-tuned domain assistant
Fine-tune a small open LLM (1-3B) on a domain dataset (e.g. college FAQs) and compare approaches.
- • Instruction dataset of 300+ examples
- • QLoRA fine-tune completed on free GPU
- • Fine-tuned vs prompting vs RAG compared on 30 questions
- • Live 5-minute demo
Stretch: Merge and quantise the model for faster inference.
20MLOps, responsible AI and demo day+
Topics
- Model serving; quantisation and ONNX
- Monitoring and data drift
- Responsible AI: bias audits, privacy, explainability
- When not to use ML
- Portfolio building; careers in ML engineering and research
- Demo day: teams present their deployed capstone model to a panel (10-minute live demo + 5-minute Q&A; evaluation and bias report; public app, GitHub repo, model card and demo video)
You will
- Serve and monitor models in production.
- Audit a model for bias and misuse.
- Present an ML product to a panel.
Lab · 3 hours
Final dry runs, then demo day.
Capstone
Your team capstone
Teams of 2-4 train or fine-tune a model and deploy it to solve a real problem. The capstone is worth 35% of the final grade and is the centrepiece of each student's portfolio. Minimum requirements: a real dataset (public or collected) with its source and licence documented; a simple baseline and at least one deep learning or Transformer model that beats it; tracked experiments (W&B or MLflow) with a clear evaluation metric; error analysis and a basic bias / fairness check; and a deployed app or API, a GitHub repo with README, a model card and a demo video. Teams may propose their own idea if it meets the minimum requirements.
Crop disease detector
identifies plant diseases from leaf photos and suggests actions (CNNs, transfer learning, mobile-friendly app)
Regional-language news classifier
classifies Tamil / Hindi news by topic and flags fake-news signals (multilingual Transformers, fine-tuning)
Regional speech-to-text
fine-tunes a speech model (e.g. Whisper) on local accents (audio models, fine-tuning, WER)
Traffic and helmet detection
counts vehicles and detects helmet violations from road video (object detection (YOLO), video)
Resume-job matcher with bias audit
ranks resumes against job descriptions and audits for bias (embeddings, ranking, fairness)
Domain assistant with LoRA
a fine-tuned small LLM for college, legal-aid or agriculture FAQs (QLoRA, RAG, LLM evaluation)
Sign-language recognition
recognises hand signs from webcam video (CNN / LSTM or Transformer, pose estimation)
Medical image classifier (research demo)
classifies chest X-rays, clearly labelled as not for diagnosis (CNNs, Grad-CAM, responsible AI)
Milestones
- Week 15
Proposal: problem, users, dataset source and licence, baseline approach, success metric. Instructor approval required.
- Week 16
Data and baseline: cleaned dataset, EDA, and a simple baseline model with its score.
- Week 17
Model v1: deep learning or Transformer model beating the baseline; experiments tracked.
- Week 18
Mid-review: 10-minute review with a TA covering results so far, error analysis and plan for final week.
- Week 19
Deployed: public app or API, evaluation report, error and bias analysis.
- Week 20
Demo day: 10-minute live demo + 5-minute Q&A; final repo, model card, demo video (<= 5 min).
Assessment
How you're graded
15 non-phase weeks, about 1.7% each
Weeks 4, 10, 15 and 19, 7.5% each, with a 5-minute live demo
one 20-minute quiz per phase, 4 total
proposal 5%, final model and deployment 15%, evaluation and bias report 5%, demo day presentation 10%
Tools
What you'll work with
Start ML, Deep Learning & Transformers at ₹7,999
Send an enquiry and we'll share batch dates and payment details.