logitsOf method

Float32List logitsOf(
  1. Float32List residualOut
)

The final norm and LM head of residualOut (a residual leaving the last layer) into logits.

Implementation

Float32List logitsOf(Float32List residualOut) {
  _residualIn.view.setAll(0, residualOut);
  _begin();
  _rmsNorm(
    _residualIn.handle,
    0,
    _small.handle,
    _finalNorm,
    _normed.handle,
    0,
    1,
    config.hiddenSize,
    config.normEps,
    0,
  );
  _lmHead.encode(_normed.handle, _logits.handle, 0, 1);
  _finish();
  return logits;
}