Hugging Face on Amazon SageMaker

Train and deploy Hugging Face models in minutes

With Hugging Face on Amazon SageMaker, you can deploy and fine-tune pre-trained models from Hugging Face reducing the time it takes to set up and use natural language processing (NLP) models from weeks to minutes.

NLP refers to machine learning (ML) algorithms that help computers understand human language. They help with translation, intelligent search, text analysis, and more. However, NLP models can be large and complex (sometimes consisting of hundreds of millions of model parameters), and training and optimizing them requires time, resources, and skill.

AWS collaborated with Hugging Face to create Hugging Face AWS Deep Learning Containers (DLCs), which provide data scientists and ML developers a fully managed experience for building, training, and deploying state-of-the-art NLP models on Amazon SageMaker.


Get started in minutes

Hugging Face offers a library of over 10,000 Hugging Face Transformers models that you can run on Amazon SageMaker. With just a few lines of code, you can import, train, and fine-tune pre-trained NLP Transformers models such as BERT, GPT-2, RoBERTa, XLM, DistilBert, and deploy them on Amazon SageMaker.

Train and deploy at scale

Using the Amazon SageMaker distributed training libraries and Hugging Face AWS Deep Learning Containers (DLCs), you can train and deploy models in hours instead of weeks.

Generate faster predictions

Make predictions faster across instance types such as GPU, CPU, and AWS Inferentia as well as popular ML frameworks such as PyTorch and TensorFlow.

Accelerate innovation with purpose-built ML tools

Take advantage of Amazon SageMaker’s purpose-built tools for every step of the ML development lifecycle. For example, with Amazon SageMaker Pipelines, you can create, automate, and manage the end-to-end ML workflow of your NLP solution.

How it works

How it works - Hugging Face on AWS

Use cases

Sentiment analysis

Hugging Face Transfomers models provide a wide variety of NLP models such as classification, information extraction, and question and answering in over 200 languages so it's easy to add sentiment analysis to your ML application. Sentiment analysis is the process of using textual data and predicting if the text expresses positive or negative sentiment.

Text summarization

Hugging Face provides a wide variety of models such as text processing and tokenization that make it easy to deploy text summarization in your ML application. Text summarization shortens long pieces of text, such as a news articles, into short summaries that capture the main points.

Text classification

Hugging Face provides a set of predefined topics for text classification applications such as filtering spam emails and understanding customer intent based on search queries. Text classification categorizes text into a group of words. For example, you could create an ML text classification model to group news articles into topic areas such as sports, current events, and pop culture.


Quantum Health
Read the documentation
Learn how to get started with Hugging Face on Amazon SageMaker

Visit the Hugging Face documentation.

Read documentation 
Sign up for an AWS account
Sign up for a free account

Instantly get access to the AWS Free Tier. 

Sign up 
Start building in the console
Start building in the console

Get started building in the Amazon SageMaker Console.

Sign in