Any utility to get the real *nn.module* for (non-)distributed setting?
Hello all, I wonder if there is a utility that can get the realnn.Moduleaftermodel = accelerate.prepare(model). For example, when I am doing RL, I want to access themodel.generatemethod, but in distributed mode the it is wrapped asmodel.module.generate. Doesaccelerateprovide such a utility that can retrieve thenn.Moduleregardless of whether it is wrapped or not?
2023-09-29T00:47:46Z
I found it:Helpful Utilities. Question solved.