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

Method embed_tokens

src/models/vibevoice/decoder.cpp:1540–1554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1538}
1539
1540VibeVoiceTokenEmbeddings VibeVoiceDecoderWeightsRuntime::embed_tokens(
1541 const std::vector<int32_t> & input_ids) const {
1542 if (input_ids.empty()) {
1543 throw std::runtime_error("VibeVoice decoder embedding requires at least one token");
1544 }
1545 const int64_t steps = static_cast<int64_t>(input_ids.size());
1546 if (embedding_graph_ == nullptr || !embedding_graph_->matches(*this, steps)) {
1547 embedding_graph_.reset();
1548 embedding_graph_ = std::make_unique<VibeVoiceDecoderEmbeddingGraph>(
1549 *this,
1550 steps,
1551 64ull * 1024ull * 1024ull);
1552 }
1553 return embedding_graph_->run(input_ids);
1554}
1555
1556VibeVoiceDecoderPrefillOutput VibeVoiceDecoderWeightsRuntime::prefill_embeddings(
1557 const std::vector<float> & embeddings,

Callers 3

single_token_embeddingFunction · 0.45
prepare_vibevoice_promptFunction · 0.45

Calls 5

emptyMethod · 0.45
sizeMethod · 0.45
matchesMethod · 0.45
resetMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected