  We describe an implementation of the relative binning technique to speed up
parameter estimation of gravitational-wave signals. We first give a pedagogical
overview of relative binning, discussing also the expressions for the
likelihood marginalized over phase and distance. Then, we describe the details
of the code in \texttt{Bilby}, an open-source software package commonly used
for parameter estimation of gravitational-wave sources. Our code is able to
reproduce the parameters of GW170817 in 14 hours on a single-core CPU, performs
well on simulated signals, and passes the percentile-percentile (p-p) tests. We
also illustrate that relative binning is an ideal technique to estimate the
parameters of signals in next-generation gravitational wave detectors.
