Download scripts/quantize.py from matthiastl/gepard-onnx: direct link, hf CLI and curl.
- Browser
- Download file 241 Bytes
-
https://huggingface.co/matthiastl/gepard-onnx/resolve/main/scripts/quantize.py
- Command line
-
hf download hf://matthiastl/gepard-onnx/scripts/quantize.py
-
curl -L -o quantize.py https://huggingface.co/matthiastl/gepard-onnx/resolve/main/scripts/quantize.py
241 Bytes
| import sys | |
| from onnxruntime.quantization import QuantType, quantize_dynamic | |
| quantize_dynamic(sys.argv[1], sys.argv[2], weight_type=QuantType.QInt8, per_channel=True, op_types_to_quantize=["MatMul"], extra_options={"MatMulConstBOnly": True}) | |