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

Function fingerprint_pieces

src/framework/tokenizers/sentencepiece.cpp:48–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48size_t fingerprint_pieces(const std::vector<SentencePiecePiece> & pieces) {
49 size_t seed = std::hash<size_t>{}(pieces.size());
50 for (const auto & piece : pieces) {
51 seed = hash_combine(seed, fingerprint_piece(piece));
52 }
53 return seed;
54}
55
56ProcessorPtr load_processor(const std::filesystem::path & model_path) {
57 auto processor = std::make_shared<sentencepiece::SentencePieceProcessor>();

Callers 2

Calls 3

hash_combineFunction · 0.85
fingerprint_pieceFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected