How to approximate constant parameters of any generalized function?
There are general techniques around.  E.g., https://en.wikipedia.org/wiki/Non-linear_least_squares, https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.curve_fit.html

For your specific example, there's a linearization (depending on the values that $y$ can take on):

$$
\begin{align*}
y &amp;= \left[1+\left(\frac{x_1-x_2}{p_6}\right)^{p_7}\right]^{-1} \\
\frac1y-1 &amp;= \left(\frac{x_1-x_2}{p_6}\right)^{p_7} \\
\frac1y-1 &amp;= \left( \frac1{p_6}\right)^{p_7} (x_1-x_2)^{p_7} \\
\underbrace{\log\left(\frac1y-1\right)}_{y'} &amp;= \underbrace{-p_7\log p_6}_{a} + \underbrace{p_7}_b\underbrace{\log(x_1-x_2)}_{x'}
\end{align*}$$
At this point, your original problem is expressed as a linear model.  Of course, the error terms are now skewed from what they originally might have been, and taking the logarithm won't have worked if $y\notin(0,1)$.