Text encoding

CTranslate2 exposes high-level classes to run encoder-only models such as BERT. The main entrypoint is the Encoder class.

Tip

See the BERT example in the Transformers guide which uses a BERT model for sequence classification.