AWS Trainium & Inferentia documentation
Fine-tune Transformers with AWS Trainium
Optimum Neuron
🤗 Optimum NeuronEC2 SetupQuickstartSupported ArchitecturesOptimum Containers Notebooks
How-To Guides
Neuron model cacheDistributed TrainingExport a model to InferentiaInference pipelines with AWS NeuronInference on Neuron platforms using vLLMDeploying a LLM Model with Inference EndpointsBenchmarking LLM performance with vLLM on AWS Inferentia2
Training Tutorials
Fine-tune BERT for Text Classification
How-to Fine-Tune LLMs
Inference Tutorials
EC2
SageMaker
Inference Endpoints
Inference Benchmarks
Contribute
Set up a development environmentAdd a custom model implementation for trainingAdd inference support for a new model architecture
Training API
Models and Pipelines Inference API
Fine-tune Transformers with AWS Trainium
Training on AWS Trainium is as simple as in Transformers:
- You need to replace the Transformers’
Trainerclass with theNeuronTrainerclass.
You can find several examples in the official repository for the following tasks:
- language modeling,
- question answering,
- summarization,
- text classification,
- translation,
- image classification,
- audio classification,
- speech recognition,
- contrastive image-text training.
If you want go through an step-by-step example check out the getting started with AWS Trainium and Hugging Face Transformers guide.