Skip to content

tinker_cookbook.preference.PreferenceModel

class tinker_cookbook.preference.PreferenceModel()

Abstract base class for models that score a Comparison and return a preference float.

Subclasses implement __call__ to return a score in [-1, 1] indicating which completion is preferred.

__call__(comparison)

Return a preference score for the given comparison.

Parameters:

Returns: float – A score in [-1, 1]. -1 means A is strongly preferred, 0 is a tie, and 1 means B is strongly preferred.