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

Setting cache_dir for model downloading #302

Closed
RonanKMcGovern opened this issue Jan 10, 2024 · 3 comments
Closed

Setting cache_dir for model downloading #302

RonanKMcGovern opened this issue Jan 10, 2024 · 3 comments

Comments

@RonanKMcGovern
Copy link

How does one set a local directory to which the model is loaded?

By default, on runpod, the model seems to download to the container, so I need to redirect that to workspace. I overcame this by just downloading the repo first to my workspace and then loading the model.

Code snippet:

model = AutoAWQForCausalLM.from_pretrained(model_path_on_hf, safetensors=True, **{"low_cpu_mem_usage": True})

I don't see anywhere in the docs to specify the local directory for caching/download.

@casper-hansen
Copy link
Owner

I agree that this would be a good enhancement @RonanKMcGovern. Feel free to open a PR that adds download_kwargs to AutoAWQForCausalLM.from_pretrained and AutoAWQForCausalLM.from_quantized.

@casper-hansen
Copy link
Owner

Fixed!

@RonanKMcGovern
Copy link
Author

nice, thanks

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