Git Product home page Git Product logo

aida-transformers-workshop-code's Introduction

Code for the Transformer AIDA Workshop

This repository contains the practical material for the AIDA Workshop on Transformers. It's a minimal example of how we can implement basic image Transformers in pytorch, as well as how we can use the pre-trained Transformer models for vision tasks from the Huggingface library.

Learning outcomes

The goal is to become familiar with building a Transformer neural network using the building blocks in Pytorch and Huggingface.

After going through the material, the student should:

  • Be able to use the TransformerEncoder and TransformerDecoder modules in Pytorch
  • Be able to use existing Transformer models for vision from Huggingface and apply them to their own data.

Workshop material

The learning material is centered around notebooks, it is a suitable platform for code-along style workshops, but for real reproducible experiments you should convert these steps to batch processing scripts.

The notebooks are designed to either 1) be run from your own computer, in which case you need to perform the installation steps below, or 2) From Google Colab in which case you need to follow the "colab" link after the link to the notebook below.

Workshop notebooks:

Installing dependencies for local use

First clone this repository using git:

#Download the workshop material (this repository)
> git clone [email protected]:eryl/aida-transformers-workshop-code.git

This workshop assumes you are using Anaconda (or a variant like miniforge), so install one if you don't have it.

It is highly suggested that you use the libmamba dependency solver, the default conda solver is extremely slow for this relatively complex environment file:

# Create workshop environment "aida_workshop_gnn"
> conda install -n base conda-libmamba-solver # install the libmamba solver to the base environment
> conda env create -f environment.yml --solver=libmamba  # Create the environemnt

Which will install all necessary requirements. Activate the environment by running:

# Create workshop environment "aida_workshop_gnn"
> conda activate aida_workshop_gnn

Start the local jupyter server by running

# Start the jupyter notebook server
> jupyter notebooks

As an alternative to using conda above, we recommend that you install mamba instead, which makes all these installations much faster:

# Install the free mamba tool
> conda install -n base mamba -c conda-forge
# Create workshop environment "aida_workshop_gnn"
> mamba env create -f environment.yml

aida-transformers-workshop-code's People

Contributors

eryl 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.