[2306.02379] Modular Transformers: Compressing Transformers into Modularized Layers for Flexible Efficient Inference