Neural network model repository for highly sparse and sparse-quantized models with matching sparsification recipes
371
stars
25
forks
source link
split_external_data - helper to break ONNX model external data into mutliple files w/ max size #354
Closed
bfineran closed 1 year ago
utility function that breaks ONNX model with a single external data file into multiple external data files with a given max size
internal see doc here: https://github.com/neuralmagic/internal-docs/pull/21
max file size defaults to 16GB
test_plan:
given a plain resnet50 file saved with external data (using
sparseml.utils.onnx.save_onnx
) saved tomodel.onnx model.data.onnx
)running
split_external_data("model.onnx", 30000000)
yieldedmodel was able to compile and running through deepsparse evaluation gave the expected accuracy