Skip to content

NormalizeBy

NormalizeBy module-attribute

NormalizeBy: TypeAlias = Literal['total_diff', 'net_diff']

The strategy for normalizing token contributions, dividing each contribution \(\delta_\tau\) by a single constant.

  • "total_diff" divides by the sum of absolute contributions (the "total difference"), \(\sum_\tau |\delta_\tau|\).
  • "net_diff" divides by the absolute sum of contributions (the "net difference"), \(|\sum_\tau \delta_\tau|\).

Source