Module 4
Module 4
Lu Zou
Sr. Partner Solutions Architect, AI/ML
Amazon Web Services
© 2024, Amazon Web Services, Inc. or its affiliates. All rights © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
reserved.
Getting started with AWS Trainium and
AWS Inferentia
Launch Integrations A few lines of Monitor,
instances code run tune, scale
(Trn1, Inf2, Inf1)
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Neuron Getting Started: https://bityl.co/IcJO
Neuron SDK Overview Neuron SDK version 2.20
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Neuron SDK Overview Neuron SDK version 2.20
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Neuron SDK Overview Neuron SDK version 2.20
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Neuron SDK Overview Neuron SDK version 2.20
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Neuron: SDK compiler
THE AWS NEURON COMPILER
z = matmul_128x128(x,y)
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Neuron Kernel Interface (NKI) Neuron SDK version 2.20
Graph optimizations
HIGH PERFORMANCE USER-DEFINED KERNELS
(hardware agnostic)
Loop optimizations
(layout, tiling, vectorization, pipelining)
z =
matmul_128x128(
x,y)
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Neuron SDK Overview Neuron SDK version 2.20
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Monitoring and visualization
Neuron
Neuron ls
Top
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Monitoring and visualization
Neuron Profiler
$ neuron-profile capture -n file.neff -s profile.ntff
$ neuron-profile view -n file.neff -s profile.ntff
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Monitor workloads through AWS
CloudWatch
NEURON MONITOR CONTAINER SEAMLESS INTEGRATION WITH CONTAINERIZED NEURON APPLICATIONS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
More Ways to Get Started
Amazon
Use Case Start With Resources
Service
Bring your own models and • PyTorch Neuron • Learn
training/Inference script to deploy via DLC / Tensorflow • Blog, Blog
managed ML service Inferentia DLC • Hands On
• Tutorial
Amazon • Sagemaker examples
SageMaker Models from Hugging Face: • Hugging Face and • Example Notebook – 1
Managed Fine-tune and deploy opensource SageMaker • Example Notebook - 2
Service models from Hugging Face directly on
SageMaker
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Neuron Getting Started
https://bityl.co/IcJO
Thank you!