So what I could tell from testing different models, this error occurs when the environment runs out of memory when attempting to load in the model.
For example, if you have a cloud environment with 1GiB of memory and your ONNX model size is 800MB, you're likely to run out of memory when the model mapping is loaded.
I can think of two solutions for this problem:
Hope this helps anyone else who faces the same issue,
Liam