|
Mila
Deep Neural Network Library
|
Public Member Functions | |
| virtual std::string | decode (std::span< const TokenId > tokens)=0 |
| virtual std::vector< TokenId > | encode (const std::string &text)=0 |
| virtual std::optional< TokenId > | getBosTokenId () const =0 |
| virtual std::optional< TokenId > | getEosTokenId () const =0 |
| virtual std::optional< TokenId > | getPadTokenId () const =0 |
| virtual size_t | getVocabSize () const =0 |
| virtual bool | isValidToken (TokenId tokenId) const =0 |
| virtual std::string | tokenToString (TokenId tokenId) const =0 |
|
pure virtual |
Implemented in Mila::Data::BpeTokenizer, and Mila::Data::CharTokenizer.
|
pure virtual |
Implemented in Mila::Data::BpeTokenizer, and Mila::Data::CharTokenizer.
|
pure virtual |
Implemented in Mila::Data::CharTokenizer.
|
pure virtual |
Implemented in Mila::Data::CharTokenizer.
|
pure virtual |
Implemented in Mila::Data::CharTokenizer.
|
pure virtual |
Implemented in Mila::Data::CharTokenizer.
|
pure virtual |
Implemented in Mila::Data::CharTokenizer.
|
pure virtual |
Implemented in Mila::Data::CharTokenizer.