Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -95,7 +95,7 @@ def run_merge_cpu(runner: LogsViewRunner, cli: str, merged_path: str, tmpdirname
|
|
| 95 |
def run_merge_gpu(runner: LogsViewRunner, cli: str, merged_path: str, tmpdirname: str):
|
| 96 |
yield from run_merge_cpu(
|
| 97 |
runner,
|
| 98 |
-
cli,
|
| 99 |
merged_path,
|
| 100 |
tmpdirname,
|
| 101 |
)
|
|
@@ -164,7 +164,7 @@ def merge(yaml_config: str, hf_token: str, repo_name: str, private: bool) -> Ite
|
|
| 164 |
api = huggingface_hub.HfApi(token=hf_token)
|
| 165 |
has_gpu = torch.cuda.is_available()
|
| 166 |
cli = "mergekit-yaml config.yaml merge --copy-tokenizer --allow-crimes -v" + (
|
| 167 |
-
" --
|
| 168 |
)
|
| 169 |
|
| 170 |
with tempfile.TemporaryDirectory(ignore_cleanup_errors=True) as tmpdirname:
|
|
|
|
| 95 |
def run_merge_gpu(runner: LogsViewRunner, cli: str, merged_path: str, tmpdirname: str):
|
| 96 |
yield from run_merge_cpu(
|
| 97 |
runner,
|
| 98 |
+
cli + " --cuda --low-cpu-memory --read-to-gpu",
|
| 99 |
merged_path,
|
| 100 |
tmpdirname,
|
| 101 |
)
|
|
|
|
| 164 |
api = huggingface_hub.HfApi(token=hf_token)
|
| 165 |
has_gpu = torch.cuda.is_available()
|
| 166 |
cli = "mergekit-yaml config.yaml merge --copy-tokenizer --allow-crimes -v" + (
|
| 167 |
+
" --out-shard-size 1B --lazy-unpickle" if (not has_gpu) else ""
|
| 168 |
)
|
| 169 |
|
| 170 |
with tempfile.TemporaryDirectory(ignore_cleanup_errors=True) as tmpdirname:
|