decodeBytes method

Uint8List decodeBytes(
  1. List<int> tokens
)

Decodes a list of tokens into bytes.

Example:

final enc = getEncoding("gpt2");
enc.decodeBytes([31373, 995]); // [104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100]

Implementation

Uint8List decodeBytes(List<int> tokens) {
  return _coreBPE.decodeNative(tokens).bytes;
}