Inference infrastructure

shape