Hugging Face on Amazon SageMaker
Earlier this year we announced a strategic collaboration with Amazon to make it easier for companies to use Hugging Face in SageMaker, and ship cutting-edge Machine Learning features faster. We introduced new Hugging Face Deep Learning Containers (DLCs) to train Hugging Face Transformer models in Amazon SageMaker.
With the new Hugging Face Deep Learning Containers available in Amazon SageMaker, training cutting-edge Transformers-based NLP models has never been simpler. There are variants specially optimized for TensorFlow and PyTorch, for single-GPU, single-node multi-GPU and multi-node clusters.
In addition to Hugging Face DLCs, we created a first-class Hugging Face extension to the SageMaker Python-sdk to accelerate data science teams, reducing the time required to set up and run experiments from days to minutes.
You can use the Hugging Face DLCs with the Automatic Model Tuning capability of Amazon SageMaker, in order to automatically optimize your training hyperparameters and quickly increase the accuracy of your models.
You can deploy your trained models for inference with just one more line of code, or select any of the 10,000+ publicly available models from the Model Hub, and deploy them with Amazon SageMaker.
Thanks to the SageMaker Studio web-based Integrated Development Environment (IDE), you can easily track and compare your experiments and your training artifacts.
With the Hugging Face DLCs, SageMaker customers will benefit from built-in performance optimizations for PyTorch or TensorFlow, to train NLP models faster, and with the flexibility to choose the training infrastructure with the best price/performance ratio for your workload.
The Hugging Face Training DLCs are fully integrated with the SageMaker distributed training libraries, to train models faster than was ever possible before, using the latest generation of instances available on Amazon EC2.
The Hugging Face Inference DLCs provide you with production-ready endpoints that scale easily within your AWS environment, with built-in monitoring and a ton of enterprise features.
Below you can find all the important resources to all published blog posts, videos, documentation, and sample Notebooks/scripts.
- AWS: Embracing natural language processing with Hugging Face
- Deploy Hugging Face models easily with Amazon SageMaker
- AWS and Hugging Face collaborate to simplify and accelerate adoption of natural language processing models
- Walkthrough: End-to-End Text Classification
- Working with Hugging Face models on Amazon SageMaker
- Distributed Training: Train BART/T5 for Summarization using 🤗 Transformers and Amazon SageMaker
- Deploy a Hugging Face Transformers Model from S3 to Amazon SageMaker
- Deploy a Hugging Face Transformers Model from the Model Hub to Amazon SageMaker
- Run training on Amazon SageMaker
- Deploy models to Amazon SageMaker
- Frequently Asked Questions
- Amazon SageMaker documentation for Hugging Face
- Python SDK SageMaker documentation for Hugging Face
- Deep Learning Container
- SageMaker's Distributed Data Parallel Library
- SageMaker's Distributed Model Parallel Library
- all Notebooks
- Getting Started Pytorch
- Getting Started Tensorflow
- Distributed Training Data Parallelism
- Distributed Training Model Parallelism
- Spot Instances and continue training
- SageMaker Metrics
- Distributed Training Data Parallelism Tensorflow
- Distributed Training Summarization
- Image Classification with Vision Transformer
- Deploy one of the 10 000+ Hugging Face Transformers to Amazon SageMaker for Inference
- Deploy a Hugging Face Transformer model from S3 to SageMaker for inference
The Deep Learning Container are available everywhere Amazon SageMaker is available. You can see the AWS region table for all AWS global infrastructure. To get an detailed overview of all included packages look here in the release notes.
|🤗 Transformers version||🤗 Datasets version||PyTorch/TensorFlow version||type||device||Python Version||Example