I just found the answer in github at Environment variables: HF_API_TOKEN
from sagemaker.huggingface.model import HuggingFaceModel

# Hub Model configuration. <https://huggingface.co/models>
hub = {
    'HF_MODEL_ID':model_checkpoint,
    'HF_TASK':'text2text-generation',
    'HF_API_TOKEN':API_TOKEN
}