diff --git a/private_gpt/settings/settings.py b/private_gpt/settings/settings.py index 785f7b40f4..c0e0e6d370 100644 --- a/private_gpt/settings/settings.py +++ b/private_gpt/settings/settings.py @@ -92,6 +92,11 @@ class LocalSettings(BaseModel): llm_hf_repo_id: str llm_hf_model_file: str embedding_hf_model_name: str + llm_hf_resume_download: bool = Field( + default=True, + description="If `false`, the model downloading progress will always be restarted from the beginning again" + "and leave the previous downloaded tmp file untouched." + ) class SagemakerSettings(BaseModel): diff --git a/scripts/setup b/scripts/setup index 377bbe0b3d..534e3fae9b 100755 --- a/scripts/setup +++ b/scripts/setup @@ -24,6 +24,7 @@ hf_hub_download( filename=settings().local.llm_hf_model_file, cache_dir=models_cache_path, local_dir=models_path, + resume_download=settings().local.llm_hf_resume_download, ) print("LLM model downloaded!")