Skip to content

DarkHawk727/deep-ml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deep ML

A repository for my solutions to problems on Deep-ML, a site for LeetCode-style questions for machine learning and data science. For each problem, I decided to use either numpy or pure Python, depending on the type signature of the method, i.e. if the method takes in 2 np.arrays, then I use numpy, else Python.

Collections

Note

Collections have duplicate questions.

  1. AlexNet
  2. Attention is All You Need
    • Implement Self-Attention Mechanism
    • Implement Multi-Head Attention
    • Implement Masked Self-Attention
    • Implement Layer Normalization for Sequence Data
    • Positional Encoding Calculator
  3. Deep Learning
    1. Linear Algebra
    2. Probability and Statistics
    3. Optimization Techniques
    4. Fundamentals of Neural Networks
    5. Backpropagation
    6. LLM
  4. DeepSeek R1
    • Implement the GRPO Objective Function
    • Group Relative Advantage for GRPO
    • KL Divergence Estimator for GRPO
    • Pass@k and Majority Voting Evaluation Metrics
    • Knowledge Distillation Loss
  5. DenseNet
  6. GPT 243
    1. Autograd Engine (Value Class & Backpropagation)
    2. Lab: Autograd
    3. Tokenization & Embeddings
      • Character-Level Tokenizer (stoi/itos/BOS)
      • Learned Positional Embeddings
    4. Lab: Tokenization
      • Build a Tokenizer for Language Modelling
    5. Core Building Blocks (Linear, Softmax, RMSNorm)
    6. Lab: Build a Neural Network from Scratch
      • MNIST: Build Neural NEtwork from Scratch (numpy Only)
    7. Multi-Head Attention & KV Cache
      • Implement Self-Attention Mechanism
      • Implement Masked Self-Attention
      • Implement Multi-Head Attention
      • KV Cache for Efficient Autogregressive Attention
    8. Lab: Attention
      • Design Your Own Attention Mechanism
    9. Transformer Block (Residuals, MLP, Activations)
      • Implement a Simple Residual Block with Shortcut Connection
      • Implement Position-wise Feed-Forwards Block with Residual and Dropout
      • Implement the Square ReLU Activation Function
    10. Lab: Activation Function
    11. Loss Functions & Cross-Entropy
    12. Adam Optimizer & Learning Rate Schedule
    13. Lab: Optimizer
      • Design Your Own Optimizer (numpy)
    14. Training Loop (Putting It All Together)
      • Calculate Number of Parameters in Neural Network
    15. Lab: Full Training Loop
      • Build a Digit Classifier from Scratch
    16. Inference & Text Generation
      • Temperature Sampling
  7. LLM Evaluation Methods
    1. Multiple Choice Benchmarks
      • MMLU Letter-Matching Evaluation
      • MMLU Log-Probability Scoring
    2. Verifier-Based Evaluation
      • Boxed Answer Extraction for Math Benchmarks
      • Math Answer Verification with Equivalence Checking
      • Code Execution Verifier for Programming Benchmarks
    3. Preference Leaderboards
      • Elo Rating System for Model Comparison
      • Bradley-Terry Model for Pairwise Rankings
    4. LLM-as-a-Judge
      • Rubric-Based LLM Judge Evaluation
      • Pairwise Preference Judge for LLM Comparison
    5. Other Measures Mentioned in the Post
      • BLEU Score for Text Generation
      • Calculate PReplexity for Language Models
      • Compute Multi-class Cross-Entropy Loss
  8. Linear Algebra
    1. Vector Spaces
    2. Matrix Operations
    3. Eigenvalues and Eigenvectors
    4. Matrix Factorization and Decomposition
  9. Machine Learning
    1. Linear Algebra
    2. Probability and Statistics
    3. Optimization
    4. Model Evaluation
    5. Classification & Regression Techniques
    6. Unsupervised Learning
    7. Deep Learning
  10. Metadata Normalization (MDN)
    1. Mathematical Prerequisites
    2. Normalization Baselines (What MDN Improves Upon)
      • Implement Batch Normalization for BCHW Input
      • Implement Group Normalization
    3. Core MDN Concepts
      • Implement Code MDN Residualization
      • Distance Correlation for Measuring Metadata Dependence
    4. Advanced MDN (Handling Confounding)
      • MDN with Label Collinearity Control
    5. Lab
      • Feature Deconfounder for Biased Image Data
  11. ResNet
  12. Sparsely Gated MoE
  13. Data Science I Interview Prep
    1. Core Machine Learning Concepts
    2. Data Processing
    3. Deep Learning
    4. Model Evaluation & Metrics
  14. Essense of Linear Algebra
    1. Vectors
    2. Linear Combinations
    3. Linear Transformations
    4. Matrix Multiplication
    5. Determinant
    6. Inverse Matrices
    7. Cross Product
    8. Cramer's Rule
    9. Change of Basis
    10. Eigenvector and Eigenvalues
  15. Micrograd Builder
  16. Optimizers

Labs

Learning Paths

  1. Calculus for Machine Learning
    1. Derivatives and Gradients
    2. Multivariate Calculus
    3. Neural Network Derivatives
    4. Backpropagation
    5. Gradient Descent
    6. Optimization
    7. Calculus Lab
    8. Pytorch: Calculus Lab 1
    9. Pytorch: Calculus Lab 2
  2. Linear Algebra for Machine Learning
    1. Vector Operations
    2. Vector Norms and Independence
    3. Matrix Basics
    4. Matrix Multiplication
    5. Matrix Properties I
    6. Matrix Properties II
    7. Solving Linear Systems
    8. Orthogonality and Projections
    9. Matrix Decompositions I
    10. Matrix Decompositions II
    11. Covariance and Correlation
    12. Linear Algebra Lab I
    13. Linear Algebra Lab II
  3. Probability and Statistics for Machine Learning
    1. Descriptive Statistics
    2. Probability Fundamentals
    3. Bayes' Theorem
    4. Common Distributions I
    5. Common Distributions II
    6. Law of Large Numbers and CLT
    7. Information Theory
    8. KL Divergence
    9. Maximum Likelihood and MAP
    10. Statistical Inference
    11. Bayesian Methods
    12. Probabalistic Models

About

Solutions repo to Deep-ML exercises.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages