Giter Site home page Giter Site logo

nonatofabio / aws-neuron-sdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aws-neuron/aws-neuron-sdk

0.0 0.0 0.0 7.09 MB

Powering Amazon custom machine learning chips. Blazing fast and cost effective, natively integrated into PyTorch and TensorFlow and integrated with your favorite AWS services

Home Page: https://aws.amazon.com/machine-learning/neuron/

License: Other

Python 15.01% Shell 0.52% Jupyter Notebook 84.46% Dockerfile 0.01%

aws-neuron-sdk's Introduction

neuron

AWS Neuron

Table of Contents

  1. AWS Neuron Overview
  2. Getting started

AWS Neuron overview

AWS Neuron is a software development kit (SDK) enabling high-performance deep learning inference using AWS Inferentia custom designed machine learning chips. With Neuron, you can develop, profile, and deploy high-performance inference predictions on top of Inferentia based EC2 Inf1 instances.

Neuron is pre-integrated into popular machine learning frameworks like TensorFlow, MXNet and Pytorch to provide a seamless training-to-inference workflow. It includes a compiler, runtime driver, as well as debug and profiling utilities with a TensorBoard plugin for visualization.

Neuron developer flow

Since Neuron is pre-integrated with popular frameworks, it can be easily incorporated into ML applications to provide high-performance inference predictions. Neuron is built to enable the above steps to be done from within an ML framework with the addition of the compilation step and load the model to the Inferentia chips. Neuron allows customers to keep training in 32-bit floating point for best accuracy and auto-convert the 32-bit trained model to run at speed of 16-bit using bfloat16 model.

image devflow

Once a model is trained to the required accuracy, it is compiled to an optimized binary form, referred to as a Neuron Executable File Format (NEFF), which is in turn loaded by the Neuron runtime driver to execute inference input requests on the Inferentia chips. The compilation step may be performed on any EC2 instance or on-premises.

Neuron roadmap

We know ML models constantly evolve, so we’ve designed Neuron to give builders a future-proof development environment, utilizing an ahead-of-time compiler that ensures Neuron will optimally utilize the hardware as new operators and neural-net models are developed.

The AWS Neuron feature roadmap provides visibility onto what functures and performance enhancements we are working on in the near future. We invite you to view the roadmap here and let us know what you think.

Getting started:

Start using one of the supported frameworks:

TensorFlow-Neuron TensorFlow-Neuron readme provides useful pointers to install and use Neuron from within the TensorFlow framework.

MXNet-Neuron MXNet-Neuron readme provides useful pointers to install and use Neuron from within the MXNet framework.

Pytorch-Neuron Pytorch-Neuron readme provides useful pointers to install and use Neuron from within the Pytorch framework

Performance optimizations

Neuron provides developers with various performance optimization options. Two of the most widely used ones are Batching and NeuronCore-Pipeline. Both techniques aim to keep the data close to the compute engines to improve hardware utilization, but achieve that in different ways. In batching it is achieved by loading the data into an on-chip cache and reusing it multiple times for multiple different model-inputs, while in pipelining this is achieved by caching all model parameters into the on-chip cache across multiple NeuronCores and streaming the calculation across them. For more details on the NeuronCore Pipeline checkout the tech note here, and for more details on Neuron Batching, please read the tech note here.

Another capability, called NeuronCore Groups allows developers to assign different models to separate NeuronCores, and run the same or multiple models in parallel. NeuronCore Groups may be useful for increasing accuracy through majority-vote, or when different models need to run as a pipeline. For more details please read more here.

Installing Neuron

To use Neuron you can use a pre-built Amazon Machine Images (DLAMI) or DL containers or install Neuron software on your own instances. To ensure you have the latest Neuron version we recommend to either install it on your own instance, or to check for the installed version when using DLAMI or DL containers.

Install Neuron in your own AMI

You can Install Neuron in your own AMI if you already have an environment you'd like to continue using.

DLAMI

Refer to the AWS DLAMI Getting Started guide to learn how to use the DLAMI with Neuron. When first using a released DLAMI, there may be additional updates to the Neuron packages installed in it.

NOTE: Only DLAMI versions 26.0 and newer have Neuron support included.

DL Containers

For containerized applications, it is recommended to use the neuron-rtd container, more details here. Inferentia support for AWS DL Containers is coming soon.

Tutorials

Neuron github provides detailed tutorials for each of the supported frameworks, we advise you watch the repo, as we add more tutorials and guides frequently. A few examples:

Run ResNet50 inference examples

Run BERT inference examples

Profiling and debugging

Neuron includes a set of tools and capabilities to help developers monitor and optimize their Neuron based inference applications. Neuron tools can be incorporated into scripts to automate Neuron devices operation and health monitoring, and include discover and usage utilities, data-path profiling tools, and visualization utilities. Using a TensorBoard plugin you can inspect and profile graphs execution.

Support

If none of the github and online resources have an answer to your question, checkout the AWS Neuron support forum.

Application and Technical Notes

aws-neuron-sdk's People

Contributors

aws-awaran avatar aws-diamant avatar aws-mesharma avatar aws-mo avatar aws-taylor avatar aws-zejdaj avatar awsgh avatar awshaichen avatar awsilya avatar awsjoez avatar awsrjh avatar awsyalvin avatar cprice404-aws avatar deeppat avatar hahtk avatar jeffhataws avatar micwade-aws avatar mrnikwaws avatar orf avatar sai-sharan avatar spring01 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.