Spaces:
Build error
Build error
Download scripts/model-quantizer.py from hicustomer/govsearch: direct link, hf CLI and curl.
- Browser
- Download file 232 Bytes
-
https://huggingface.co/spaces/hicustomer/govsearch/resolve/main/scripts/model-quantizer.py
- Command line
-
hf download hf://spaces/hicustomer/govsearch/scripts/model-quantizer.py
-
curl -L -o model-quantizer.py https://huggingface.co/spaces/hicustomer/govsearch/resolve/main/scripts/model-quantizer.py
232 Bytes
| #!/usr/bin/env python | |
| import sys | |
| from pathlib import Path | |
| from transformers.convert_graph_to_onnx import quantize | |
| input_file = sys.argv[1] | |
| quantized_model_path = quantize(Path(input_file)) | |
| quantized_model_path.replace(input_file) | |