Git Product home page Git Product logo

aws-inferentia-huggingface-workshop-2022's Introduction

AWS Summit San Francisco 2022

CMP314 Optimizing NLP models with Amazon EC2 Inf1 instances in Amazon Sagemaker

Welcome to the AWS Summit San Francisco 2022 Inferentia Workshop! During this workshop, we will create two endpoints with one HuggingFace model each. We will use them for the task of paraphrase detection which is an NLP classification problem. These two endpoints will have the following configurations: a) CPU-based endpoint, where we will be deploying the model with no changes; and b) Inf1 instance based endpoint, where we will prepare and compile the model using SageMaker Neo before deploying. Finally, we will perform a latency and throughput performance comparison of both endpoints.

Event engine access during the event

Follow these instructions to connect to the AWS Console during the event

  1. Access event engine: Open a browser and type the URL shared during the workshop.

  2. Click on “Agree” (make sure the event passcode is displayed)

  1. Click on “Email One-Time Password (OTP)”

  1. Complete with your email and click “Send Passcode”

  1. Retrieve the OTP passcode from your email. Copy and paste it in the “Passcode 9 digit code” field. Press “Sign In”

  1. Once logged in, you will see the "team Dashboard". Click on “AWS Console”

  1. Then click on “Open AWS Console"

  1. Inside the console look for the search box and Type “Sagemaker”, then click on the "Amazon Sagemaker" Service. If you prefer you can navigate directly to the Sagemaker console.

  1. Once you see the Sagemaker dashboard click on “Studio” on the “Sagemaker Domain” menu on the left.

  1. Click on “Launch App” button and then on “Studio”

  1. Once inside Sagemaker Studio”, go to “File/New/Terminal” to open a terminal:

  1. Type the following command to clone this repo: git clone https://github.com/aws-samples/aws-inferentia-huggingface-workshop.git

  2. Once the repo is cloned, open the Jupiter notebook named aws_summit_2022_inf1_bert_compile_and_deploy.ipynb. To do this, find the file browser on the left, and click on “aws-inferentia-huggingface-workshop” then double click on the file name aws_summit_2022_inf1_bert_compile_and_deploy.ipynb.

  1. You will see the following pop up.

  1. Make sure you select the Python 3 (Pytorch 1.8 Python 3.6 CPU Optimized) Kernel when prompted

Now start the workshop and have fun !

Licence

This code is released under the MIT-0 license Please refer to the license for applicable terms.

aws-inferentia-huggingface-workshop-2022's People

Contributors

kamranjkhan avatar mboaglio 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.