core/embedding/pooling library
Functions
-
meanPoolAndNormalize(
ForwardResult result, {List< int> ? attentionMask}) → List<double> -
Mean-pools a token-level ForwardResult over the sequence axis and
L2-normalizes it into a single embedding vector of length
dim.