# Skip model repacking in Batch Transform

**URL:** <https://discuss.huggingface.co/t/skip-model-repacking-in-batch-transform/50859>\
**Category:** Amazon SageMaker\
**Created:** [August 15, 2023, 6:51pm UTC](https://discuss.huggingface.co/t/skip-model-repacking-in-batch-transform/50859 "2023-08-15T18:51:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jparmet](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@jparmet](https://discuss.huggingface.co/u/jparmet)\
**Post date:** [August 15, 2023, 6:51pm UTC](https://discuss.huggingface.co/t/skip-model-repacking-in-batch-transform/50859/1 "2023-08-15T18:51:40Z")

</div>

Hi,

I have a HuggingFace Model that I’ve already loaded from the tar.gz in S3 to SageMaker. When instantiating a batch transform job I seemingly have to repack the model every time, which results in ~5 minutes of time `Repacking model artifact` before the console lets me know that it’s `Using already existing model: topic-model`.

**Does anyone know if there’s a way to skip model repacking and default to using the existing model?**

Here’s the code I’m using to instantiate (within a custom class, hence `self`):

```auto
        self.model = HuggingFaceModel(
            env=hub,
            model_data=s3_path_join('s3://', self.bucket, f"{self.model_type}_model.tar.gz"),
            entry_point=entry_point,
            role=self.role,
            transformers_version="4.28.1",
            pytorch_version="2.0.0",
            py_version="py310",
            name=f"{self.model_type}-model"
        )
...
        batch_job = self.model.transformer(
            instance_count=instance_count,
            instance_type=instance_type,
            output_path=s3_path_join('s3://', self.bucket, 'output'),
            strategy='MultiRecord',
            assemble_with='Line')

```
