Download utils.py from wepiqx/MERNIK: direct link, hf CLI and curl.
- Browser
- Download file 446 Bytes
-
https://huggingface.co/wepiqx/MERNIK/resolve/main/utils.py
- Command line
-
hf download hf://wepiqx/MERNIK/utils.py
-
curl -L -o utils.py https://huggingface.co/wepiqx/MERNIK/resolve/main/utils.py
446 Bytes
| def parse_quant_size(output: str) -> float | None: | |
| """Extract quant size from full output (prefers quant over model size).""" | |
| import re | |
| # Try quant size first across all lines | |
| m = re.search(r"quant size\s*=\s*([0-9.]+)\s*MiB", output) | |
| if m: | |
| return float(m.group(1)) | |
| # Fall back to model size | |
| m = re.search(r"model size\s*=\s*([0-9.]+)\s*MiB", output) | |
| if m: | |
| return float(m.group(1)) | |
| return None | |