# Load model from local cache directory in Sagemaker notebooks

**URL:** <https://discuss.huggingface.co/t/load-model-from-local-cache-directory-in-sagemaker-notebooks/65474>\
**Category:** Amazon SageMaker\
**Created:** [December 12, 2023, 6:14am UTC](https://discuss.huggingface.co/t/load-model-from-local-cache-directory-in-sagemaker-notebooks/65474 "2023-12-12T06:14:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![PbOE1209](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@PbOE1209](https://discuss.huggingface.co/u/PbOE1209)\
**Post date:** [December 12, 2023, 6:14am UTC](https://discuss.huggingface.co/t/load-model-from-local-cache-directory-in-sagemaker-notebooks/65474/1 "2023-12-12T06:14:44Z")

</div>

We are downloading the model weights for llama2 70b from hugging face and specifying the local cache directory on day 1.In the day 2 when we try to load the model from cache directory it just hangs on there.

More specifically lets say on day 1 I am loading the models and storing in cache dir.Rest of the day it works fine.But after stopping the instance and again starting on day 2 model loading just keeps hanging unless and until we delete the cache directory and load the weights again from huggingface.

How can we get around this problem?
