Add template for sampler.