A hands-on tutorial for fine-tuning BART-large-cnn on the SAMSum summarization dataset using Hugging Face Transformers and Amazon SageMaker's distributed training capabilities. Covers setting up a SageMaker Notebook Instance, configuring SageMaker Data Parallelism via the HuggingFace Estimator, running training across 16 NVIDIA V100 GPUs (2x ml.p3dn.24xlarge instances) for roughly $28, and then uploading the resulting model to the Hugging Face Hub with a model card for inference testing.

•6m read time•From philschmid.de
Post cover image
Table of contents
TutorialModel and DatasetSet up a development environment and install sagemakerChoose 🤗 Transformers examples/ scriptConfigure distributed training and hyperparametersCreate a HuggingFace estimator and start trainingUpload the fine-tuned model to huggingface.coTest inference