Byte pair encoding
| 369 | |
| 370 | // Byte pair encoding |
| 371 | void byte_pair_encode(const std::vector<unsigned char>& piece, const emhash8::HashMap<std::vector<unsigned char>, int, VectorHashEmhash>& encoder, std::vector<int>& result) { |
| 372 | if (piece.size() == 1) { |
| 373 | result.push_back(encoder.at(piece)); |
| 374 | return; |
| 375 | } |
| 376 | // TODO: stuff |
| 377 | bpe_merge(piece, encoder, result); |
| 378 | } |
| 379 | |
| 380 | } // namespace tiktoken |
no test coverage detected