By building upon the recent theory that established the connection betweenimplicit generative modeling (IGM) and optimal transport, in this study, wepropose a novel parameter-free algorithm for learning the underlyingdistributions of complicated datasets and sampling from them. The proposedalgorithm is based on a functional optimization problem, which aims at findinga measure that is close to the data distribution as much as possible and alsoexpressive enough for generative modeling purposes. We formulate the problem asa gradient flow in the space of probability measures. The connections betweengradient flows and stochastic differential equations let us develop acomputationally efficient algorithm for solving the optimization problem. Weprovide formal theoretical analysis where we prove finite-time error guaranteesfor the proposed algorithm. To the best of our knowledge, the proposedalgorithm is the first nonparametric IGM algorithm with explicit theoreticalguarantees. Our experimental results support our theory and show that ouralgorithm is able to successfully capture the structure of different types ofdata distributions.