|
ember.cpp 0.1.0
C++ inference engine for Llama-family and paperkiln models (CPU, CUDA, WebAssembly)
|
#include <chat_tokenizer.h>

Public Member Functions | |
| QwenNfcTokenizer (std::vector< std::string > tokens, const std::vector< std::string > &merges, const std::vector< int32_t > &token_type) | |
| std::vector< int > | encode (const std::string &text) const |
| std::string | decode (const std::vector< int > &ids) const |
| size_t | size () const |
Private Attributes | |
| std::unique_ptr< microtorch::llama3::Tokenizer > | t_ |
| std::vector< int > | specials_ |
| std::vector< std::string > | texts_ |
Definition at line 165 of file chat_tokenizer.h.
|
inline |
Definition at line 167 of file chat_tokenizer.h.
References a, c, j, k, ember::nfc::tables::kNfcAsciiImages, specials_, t_, and texts_.
Definition at line 196 of file chat_tokenizer.h.
References id, j, k, ember::nfc::nfc_utf8(), out, specials_, t_, text, and texts_.
|
inline |
|
private |
Definition at line 234 of file chat_tokenizer.h.
Referenced by encode(), and QwenNfcTokenizer().
|
private |
Definition at line 233 of file chat_tokenizer.h.
Referenced by decode(), encode(), QwenNfcTokenizer(), and size().
|
private |
Definition at line 235 of file chat_tokenizer.h.
Referenced by encode(), and QwenNfcTokenizer().