For PyTorch, what is the recommended mode of operation? Eager mode or Lazy mode?

While designing a model architecture and debugging it, Eager mode will generally provide the desired level of interaction. However, once the model design is fixed, Lazy mode will generally provide faster training speed.

Users can refer to the Pytorch User Guide for a detailed description of the modes and how they work with the SynapseAI SW stack.

Hi Greg,
Can you estimate by what order of magnitude the Eager mode will generally be slower than the Lazy mode?

Hi @shachar

Lazy mode will be significantly faster than eager mode, and the exact speedup will depend on the size/complexity of the model.

For a simple mnist example here, lazy mode is around 45% faster.

2 Likes