MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / bytes_to_unicode_bpe

Function bytes_to_unicode_bpe

unicode.h:429–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

427}
428
429static std::string bytes_to_unicode_bpe(uint8_t byte) {
430 static std::unordered_map<uint8_t, std::string> map = bytes_to_unicode_map_bpe();
431 return map.at(byte);
432}
433
434static std::unordered_map<std::string, uint8_t> unicode_to_bytes_map_bpe() {
435 std::unordered_map<std::string, uint8_t> map;

Callers 2

llama_byte_to_tokenFunction · 0.85
bpe_gpt2_preprocessMethod · 0.85

Calls 1

bytes_to_unicode_map_bpeFunction · 0.85

Tested by

no test coverage detected