This code allows you to fully finetune a model via Hugging Face using AWS's multi nodes and FSDP configuration for big models.
- Python 3.10 or higher
- Sagemaker
- HF_TOKEN - Hugging Face's user access token with read and write permissions
- Your AWS RoleName to access AWS's gpus
Usage example for Jamba-1.5-Mini
- Download or clone the repo to you local computer.
- Create a new virtual environment based on Python >= 3.10.
- Add
HF_TOKEN
andAWS_ROLE_NAME
as environment variables. pip install sagemaker
(andpip install setuptools
in case of python >= 3.12)- Run
python sagemaker_training.py
from the main dir.
Track your job in AWS training dashboard