Download code/fetch.py from mkvn/quantization-cache-amplification: direct link, hf CLI and curl.
- Browser
- Download file 295 Bytes
-
https://huggingface.co/datasets/mkvn/quantization-cache-amplification/resolve/main/code/fetch.py
- Command line
-
hf download hf://datasets/mkvn/quantization-cache-amplification/code/fetch.py
-
curl -L -o fetch.py https://huggingface.co/datasets/mkvn/quantization-cache-amplification/resolve/main/code/fetch.py
295 Bytes
| import sys, time | |
| from huggingface_hub import snapshot_download | |
| repo = sys.argv[1] | |
| t0 = time.time() | |
| p = snapshot_download(repo, allow_patterns=["*.json", "*.safetensors", "*.txt", "*.model"], | |
| max_workers=8) | |
| print(f"DONE {repo} -> {p} in {time.time()-t0:.0f}s", flush=True) | |