MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / byte_fallback_token

Function byte_fallback_token

src/models/voxcpm2/tokenizer_text.cpp:74–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74std::string byte_fallback_token(unsigned char byte) {
75 constexpr char kHex[] = "0123456789ABCDEF";
76 std::string out = "<0x";
77 out.push_back(kHex[(byte >> 4U) & 0x0FU]);
78 out.push_back(kHex[byte & 0x0FU]);
79 out.push_back('>');
80 return out;
81}
82
83std::vector<std::string> bpe_initial_pieces(
84 std::string_view normalized_text,

Callers 1

bpe_initial_piecesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected