gnm is an implementation of the affine-invariant sampler for Markov chain Monte Carlo (MCMC) that uses the Gauss-Newton-Metropolis (GNM) Algorithm. The GNM algorithm is specialized in sampling highly non-linear posterior probability distribution functions of the form exp(-||f(x)||^2/2). The code includes dynamic hyper-parameter optimization to increase performance of the sampling; other features include the Jacobian tester and an error bars creator.