Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -201,7 +201,7 @@ def merge(yaml_config: str, hf_token: str, repo_name: str, private: bool) -> Ite
|
|
| 201 |
api = huggingface_hub.HfApi(token=hf_token)
|
| 202 |
has_gpu = torch.cuda.is_available()
|
| 203 |
cli = "mergekit-yaml config.yaml merge --copy-tokenizer --allow-crimes -v" + (
|
| 204 |
-
" --out-shard-size
|
| 205 |
)
|
| 206 |
|
| 207 |
with tempfile.TemporaryDirectory(ignore_cleanup_errors=True) as tmpdirname:
|
|
|
|
| 201 |
api = huggingface_hub.HfApi(token=hf_token)
|
| 202 |
has_gpu = torch.cuda.is_available()
|
| 203 |
cli = "mergekit-yaml config.yaml merge --copy-tokenizer --allow-crimes -v" + (
|
| 204 |
+
" --out-shard-size 10B --lazy-unpickle" if (not has_gpu) else ""
|
| 205 |
)
|
| 206 |
|
| 207 |
with tempfile.TemporaryDirectory(ignore_cleanup_errors=True) as tmpdirname:
|