Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I delpoy a model with AWS S3 and without downloading model from hunggingface via TGI image on Sagemaker? #27

Open
weiZhenkun opened this issue Aug 20, 2023 · 1 comment

Comments

@weiZhenkun
Copy link

No description provided.

@weiZhenkun weiZhenkun changed the title how can I delpoy a private model.tgz with AWS S3 with TGI image on Sagemaker? How can I delpoy a private model.tgz with AWS S3 via TGI image on Sagemaker? Aug 20, 2023
@weiZhenkun weiZhenkun changed the title How can I delpoy a private model.tgz with AWS S3 via TGI image on Sagemaker? How can I delpoy a model with AWS S3 and without downloading model from hunggingface via TGI image on Sagemaker? Aug 26, 2023
@ramkrithik
Copy link

ramkrithik commented Oct 17, 2023

Yes, we can define model data from s3 in HuggingFaceModel initialisation and replace the "HF_MODEL_ID" to "/opt/ml/model". But before that you should convert the model weights to safe tensors by loading the model and resave with safe serialisation (There will be better solutions than this).

hub = {
    'HF_MODEL_ID':'/opt/ml/model',...
}
huggingface_model = HuggingFaceModel( 
model_data = "s3://x/model.tar.gz"
env = hub
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants