Spaces:
Runtime error
Runtime error
Create download_mode.py
Browse files- download_mode.py +16 -0
download_mode.py
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# download_model.py
|
2 |
+
from huggingface_hub import snapshot_download
|
3 |
+
from pathlib import Path
|
4 |
+
|
5 |
+
def download_model():
|
6 |
+
mistral_models_path = Path.home().joinpath('mistral_models', '7B-v0.3')
|
7 |
+
mistral_models_path.mkdir(parents=True, exist_ok=True)
|
8 |
+
|
9 |
+
snapshot_download(
|
10 |
+
repo_id="mistralai/Mistral-7B-v0.3",
|
11 |
+
allow_patterns=["params.json", "consolidated.safetensors", "tokenizer.model.v3"],
|
12 |
+
local_dir=mistral_models_path
|
13 |
+
)
|
14 |
+
|
15 |
+
if __name__ == "__main__":
|
16 |
+
download_model()
|