Skip to content

A scalar-valued autograd engine implemented from scratch in Python. Replicates Torch's logic to demonstrate backpropagation fundamentals.

License

Notifications You must be signed in to change notification settings

igna-s/Michigrad-Deep-Learning-From-Scratch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Michigrad & LLMs from Scratch

Python License Status

A collection of from-scratch implementations to master Deep Learning and Large Language Model fundamentals.


📖 Overview

This repository hosts educational projects designed to demystify modern Artificial Intelligence. By building core components from the ground up, we aim to understand what happens under the hood of libraries like Torch.


📂 Repository Contents

Project Folder Description
Michigrad Michigrad-from-scratch/ A lightweight scalar-valued autograd engine implementing dynamic computational graphs and backpropagation.
LLMs Llms-from-scratch/ From tokenization and n-grams to self-attention and Transformer architectures.

🚀 Installation

Python 3.8+ is recommended.

git clone https://github.com/igna-s/Michigrad-Autograd-Engine.git
cd Michigrad-Autograd-Engine

💻 Quick Usage Guide

Using the Michigrad Engine

from michigrad.engine import Value #This is the michigrad library

a = Value(2.0, label='a')
b = Value(-3.0, label='b')
c = Value(10.0, label='c')

e = a * b
d = e + c
L = d * 2.0

L.backward()

print(f"Loss: {L.data}")
print(f"dL/da: {a.grad}")

Exploring LLMs

cd Llms-from-scratch
jupyter notebook

📚 Credits & Acknowledgments

Developed as part of a Large Language Models Workshop.

Special Thanks

  • Joaquín Bogado (GitHub: @jwackito)

Inspiration

  • Andrej Karpathy’s micrograd

Created with ❤️ to learn AI by breaking things.

About

A scalar-valued autograd engine implemented from scratch in Python. Replicates Torch's logic to demonstrate backpropagation fundamentals.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 98.8%
  • Python 1.2%