@akash97715 the easiest way to use the HuggingFace DLCs for batch transform job with zero-code configuration is by saving your model using transformers
.
Meaning to would need to replace the torch.save
in your training script with.
model.save_pretrained("my_dir")
tokenizer.save_pretrained("my_dir")
After that, you can create a compatible model.tar.gz
- Create a
tar
file:
cd {my_dir}
tar zcvf model.tar.gz *
- Upload
model.tar.gz
to S3:
aws s3 cp model.tar.gz <s3://{my-s3-path}>
Now you can provide the S3 URI to the model_data
argument when creating your batch transform job.