🚀 From Classical ML to Modern Deep Learning, AI & LLMs
Implementations, notes, and projects focused on Transformers , Large Language Models , fine-tuning , RAG , and AI agents — building on a classical Machine Learning & Deep Learning foundation.
Continuation of
machine-learning-journey
(CS-567 Machine Learning & CS-667 Advanced Machine Learning @ PUCIT, Dr. Nazar Khan)
Stage
Focus
Classical ML & DL
Probability, linear models, GMM–EM, PCA, spectral clustering, neural nets, CNNs, autoencoders
Bridge insight
Backprop, embeddings, attention as similarity, mixtures for uncertainty
Modern AI (this repo)
Transformers → Hugging Face → fine-tuning → RAG → agents → hybrid projects
📚 Learning path Overview for Modern AI & LLMs
Phase 1 — Attention & Transformers
📁 01_attention_transformers
Notebook
Topics
01_scaled_dot_product_attention.ipynb
Query, Key, Value, scaled dot-product, attention weights
02_multi_head_attention.ipynb
Multi-head attention, causal masking, attention visualisation
03_transformer_block.ipynb
LayerNorm, residuals, FFN, Pre-LN Transformer block
04_tiny_gpt_from_scratch.ipynb
Full tiny GPT, positional encoding, causal LM
Phase 2 — Hugging Face basics
📁 02_huggingface_basics
📁 03_finetuning
📁 04_rag_systems
📁 05_agents
📁 06_projects
Supporting data for the notes RAG project:
From-scratch where it teaches — attention, Transformer blocks, tiny GPT in PyTorch
Libraries where they matter — Hugging Face, PEFT, sentence-transformers, FAISS
CPU-friendly defaults — FLAN-T5-small / MiniLM when no GPU; GPU models preferred when available
Transformers v5-safe generation — AutoModelForSeq2SeqLM.generate(), not removed pipeline tasks
Classical ML stays in the loop — PCA / GMM / metrics for structure; LLM for language and interface
git clone https://github.com/S33mi/modern-ai-llm-journey.git
cd modern-ai-llm-journey
# Core stack (adjust per notebook)
pip install torch transformers datasets accelerate peft \
sentence-transformers faiss-cpu chromadb \
langchain-text-splitters rank-bm25 scikit-learn
Open any notebook in Jupyter / VS Code / Colab.
Many notebooks auto-detect CUDA and fall back to CPU-sized models.
Area
Tools
Core
Python, PyTorch
LLM Libraries
Hugging Face Transformers, PEFT, Datasets, Tokenizers
RAG & Agents
LangChain / LlamaIndex, Chroma / FAISS, Sentence Transformers
Local Inference
llama.cpp, Ollama
Fine-tuning
LoRA, QLoRA, Unsloth
Agents
Custom ReAct + Tool Calling
Classical ML
scikit-learn (PCA, GMM, K-means, metrics)
Environment
Jupyter Notebooks, Weights & Biases / Comet (optional)
QLoRA notebook includes a full CPU path (tiny model + LoRA + instruction format). Real 4-bit QLoRA needs CUDA + bitsandbytes.
ReAct agent uses a two-stage router (tool choice + argument fill) so FLAN-T5-small can complete demos on Colab CPU.
RAG over notes is grounded in extracted lecture material from CS-567 & CS-667, not generic web text.
Prefer recursive chunking, normalised embeddings , and grounded prompts (“answer only from context”) in any RAG you extend.
MIT — see LICENSE
Author : S33mi