Git Product home page Git Product logo

learning's Introduction

Micrograd and Language Model from Scratch

This is a repository where I gather the notebooks that helped me learn new things or deepen my understandings about the concepts that I'm passinate about.

This repository moslty contains Jupyter notebooks that focus on building foundational machine learning and language processing models from scratch. These notebooks provide a hands-on approach to understanding the underlying mechanisms of neural networks and language models.

Notebooks

1. micrograd_from_scratch.ipynb

This notebook is a detailed guide to building a miniature automatic differentiation library, similar to the early stages of TensorFlow or PyTorch, from scratch. This library, named 'micrograd', is designed to facilitate the understanding of how gradients are computed automatically in deep learning frameworks.

This notebooks is according to the Andrej Karpathy's micrograd youtube video.

Features:

  • Implementation of a simple neural network framework.
  • Functions to perform forward and backward passes.
  • Demonstration of training a small neural network on a basic dataset.

Learning Outcomes:

  • Understand the basics of automatic differentiation.
  • Learn how neural network operations are computed.
  • Gain insights into the backpropagation process.

2. language_model_make_more_karpathy.ipynb

This notebook explores the construction of a character-level language model inspired by Andrej Karpathy's Second video on the Zero to Hero playlist. The model is built from scratch using Python and tensors from Pytorch.

Features:

  • Building a character-level NN and a Bigram model from scratch.
  • Training the NN on a dataset of names to learn the structure and predict new names.
  • Visualization of training progress and predictions.

Learning Outcomes:

  • Understanding the architecture and mechanics behind langauge models.
  • Handling and processing text data for natural language tasks.
  • Implementing and training a model to generate text.

Getting Started

To get started with these notebooks, you need to have Python installed on your machine along with Jupyter Notebook or JupyterLab. Additionally, you will need several libraries, most of which can be installed via pip:

pip install numpy matplotlib

Clone the repository to your local machine:

Copy
git clone https://github.com/yourusername/your-repository-name.git
cd your-repository-name

You can then launch Jupyter Notebook or JupyterLab:

Copy
jupyter notebook
# or
jupyter lab

Navigate to the notebook you want to view or edit within the Jupyter interface in your browser.

Contributing

Contributions to improve the notebooks or fix issues are highly welcome. Please feel free to fork the repository and submit a pull request.

Fork the repository. Create your feature branch (git checkout -b feature/AmazingFeature). Commit your changes (git commit -am 'Add some AmazingFeature'). Push to the branch (git push origin feature/AmazingFeature). Open a pull request.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

MohammadErfan Jabbari - @MohammadErfanJ - [email protected]

learning's People

Contributors

mohammaderfan-jabbari avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.