Giter VIP home page Giter VIP logo

ml-notebooks's Introduction

๐Ÿ™ Machine Learning Notebooks

This repo contains machine learning notebooks for different tasks and applications. The notebooks are meant to be minimal, easily reusable, and extendable. You are free to use them for educational and research purposes.

This repo supports Codespaces!

  • Spin up a new instance by clicking on the green "<> Code" button followed by the "Configure and create codespace" option. Make sure to select the dev container config provided with this repo. This setups an environment with all the dependencies installed and ready to go.
  • Once the codespace is fully running, you can install all the libraries you will need to run the notebooks under the /notebooks folder. Open up a terminal and simply run conda create --name myenv --file spec-file.txt to install all the Python libraries including PyTorch.
  • Activate your environment conda activate myenv. You might need to run conda init zsh or whatever shell you are using... and then close + reopen terminal.
  • Finally you can try out if everything is working by opening a notebook such as /notebooks/bow.ipynb.

Getting Started

Name Description Notebook
Introduction to Computational Graphs A basic tutorial to learn about computational graphs
PyTorch Hello World! Build a simple neural network and train it
A Gentle Introduction to PyTorch A detailed explanation introducing PyTorch concepts
Counterfactual Explanations A basic tutorial to learn about counterfactual explanations for explainable AI
Linear Regression from Scratch An implementation of linear regression from scratch using stochastic gradient descent
Logistic Regression from Scratch An implementation of logistic regression from scratch
Concise Logistic Regression Concise implementation of logistic regression model for binary image classification.
First Neural Network - Image Classifier Build a minimal image classifier using MNIST
Neural Network from Scratch An implementation of simple neural network from scratch
Introduction to GNNs Introduction to Graph Neural Networks. Applies basic GCN to Cora dataset for node classification.

NLP

Name Description Notebook
Bag of Words Text Classifier Build a simple bag of words text classifier.
Continuous Bag of Words (CBOW) Text Classifier Build a continuous bag of words text classifier.
Deep Continuous Bag of Words (Deep CBOW) Text Classifier Build a deep continuous bag of words text classifier.
Text Data Augmentation An introduction to the most commonly used data augmentation techniques for text and their implementation
Emotion Classification with Fine-tuned BERT Emotion classification using fine-tuned BERT model

Transformers

Name Description Notebook
Text Classification using Transformer An implementation of Attention Mechanism and Positional Embeddings on a text classification task
Kaggle
Neural Machine Translation using Transformer An implementation of Transformer to translate human readable dates in any format to YYYY-MM-DD format.
Kaggle
Feature Tokenizer Transformer An implementation of Feature Tokenizer Transformer on a classification task
Kaggle
Named Entity Recognition using Transformer An implementation of Transformer to perform token classification and identify species in PubMed abstracts
Kaggle
Extractive Question Answering using Transformer An implementation of Transformer to perform extractive question answering
Kaggle

Computer Vision

Name Description Notebook
Siamese Network An implementation of Siamese Network for finding Image Similarity
Kaggle
Variational Auto Encoder An implementation of Variational Auto Encoder to generate Augmentations for MNIST Handwritten Digits
Kaggle
Object Detection using Sliding Window and Image Pyramid A basic object detection implementation using sliding window and image pyramid on top of an image classifier
Kaggle
Object Detection using Selective Search A basic object detection implementation using selective search on top of an image classifier
Kaggle

Generative Adversarial Network

Name Description Notebook
Deep Convolutional GAN An Implementation of Deep Convolutional GAN to generate MNIST digits
Kaggle
Wasserstein GAN with Gradient Penalty An Implementation of Wasserstein GAN with Gradient Penalty to generate MNIST digits
Kaggle
Conditional GAN An Implementation of Conditional GAN to generate MNIST digits
Kaggle

Parameter Efficient Fine-tuning

Name Description Notebook
LoRA BERT An Implementation of BERT Finetuning using LoRA Kaggle
LoRA BERT NER An Implementation of BERT Finetuning using LoRA for token classification task Kaggle
LoRA T5 An Implementation of T5 Finetuning using LoRA Kaggle
LoRA TinyLlama 1.1B An Implementation of TinyLlama 1.1B Finetuning using LoRA Kaggle
QLoRA TinyLlama 1.1B An Implementation of TinyLlama 1.1B Finetuning using QLoRA Kaggle
QLoRA Mistral 7B An Implementation of Mistral 7B Finetuning using QLoRA Kaggle

If you find any bugs or have any questions regarding these notebooks, please open an issue. We will address it as soon as we can.

Reach out on Twitter if you have any questions.

Please cite the following if you use the code examples in your research:

@misc{saravia2022ml,
  title={ML Notebooks},
  author={Saravia, Elvis and Rastogi, Ritvik},
  journal={https://github.com/dair-ai/ML-Notebooks},
  year={2022}
}

ml-notebooks's People

Contributors

haaris-rahman avatar marcovirgolin avatar omarsar avatar pitmonticone avatar ritvik19 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ml-notebooks's Issues

Missing license declaration

First, thank you for sharing this collection of notebooks with us!

Could you please add an explicit LICENSE file to the repo so that it's clear under what terms the content is provided, and under what terms user contributions are licensed?

I see other repos in this org include licenses, so I'm guessing this was just an oversight, and should be easy to address.

Thanks!


Per GitHub docs on licensing:

[...] without a license, the default copyright laws apply, meaning that you
retain all rights to your source code and no one may reproduce, distribute,
or create derivative works from your work. If you're creating an open source
project, we strongly encourage you to include an open source license.

Line magic function `%` not found.

In the tutorial related to the CounterFactual Explainations, when we clone the cogs repo, , we use

# clone repo, access, and install repo
! git clone https://github.com/marcovirgolin/cogs
% cd /content/cogs
! pip install .

Running this block would give an error Line magic function % not found.

The change directory command line is actually three words, but with Ubuntu 18.04, Python 3.8 and iPython 7.19, it actually needs two words, and not three. Since most of the devices use these versions now, it would be helpful to just remove the extra space between the % and cd.

The changed code would look like this:

# clone repo, access, and install repo
! git clone https://github.com/marcovirgolin/cogs
%cd /content/cogs
! pip install .

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.