How to binarize only model architecture without weights?

I would like to binarize the computational flow of a model (basically the model class) without weights to send it over the network and instantiate the same network architecture remotely. I’ve looked into torch.onnx but it seems as if this is not the right tool as it also includes weights and input format needs to be fixed. Any suggestions how this could be achieved?