Accelerate Hugging Face NLP models on Arm servers
Introduction
Benchmark and accelerate Hugging Face NLP models on Arm
Next Steps
Accelerate Hugging Face NLP models on Arm servers
Review frequently asked questions
These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
The instructions target an Arm server running Ubuntu 22.04 LTS. They’ve been tested on AWS Graviton3 (c7g) instances.
Use an Arm server instance with at least four CPU cores and 8 GB of RAM. This capacity supports running the three sentiment analysis models and collecting measurements.
You’ll uses PyTorch to run NLP Sentiment Analysis models sourced from Hugging Face.
First, run the models to collect a baseline using the same Sentiment Analysis pipeline. Then enable BFloat16 fast math kernels on supported Arm Neoverse-based AWS Graviton3 processors, rerun the same workload, and compare measurements.
You’ll evaluate three NLP models with the Sentiment Analysis pipeline. By the end, you should have deployed the models on your Arm server and recorded baseline and BFloat16-enabled performance results for comparison.