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

Method prefill_embeddings

src/models/vibevoice/decoder.cpp:1556–1575  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1554}
1555
1556VibeVoiceDecoderPrefillOutput VibeVoiceDecoderWeightsRuntime::prefill_embeddings(
1557 const std::vector<float> & embeddings,
1558 int64_t steps) const {
1559 const auto & config = assets_->config.decoder;
1560 if (steps <= 0) {
1561 throw std::runtime_error("VibeVoice decoder prefill requires positive steps");
1562 }
1563 if (static_cast<int64_t>(embeddings.size()) != steps * config.hidden_size) {
1564 throw std::runtime_error("VibeVoice decoder prefill embedding payload size mismatch");
1565 }
1566 if (prefill_graph_ == nullptr || !prefill_graph_->matches(*this, 1, steps)) {
1567 prefill_graph_.reset();
1568 prefill_graph_ = std::make_unique<VibeVoiceDecoderPrefillGraph>(
1569 *this,
1570 1,
1571 steps,
1572 1024ull * 1024ull * 1024ull);
1573 }
1574 return prefill_graph_->run(embeddings);
1575}
1576
1577std::vector<VibeVoiceDecoderPrefillOutput> VibeVoiceDecoderWeightsRuntime::prefill_embeddings_batch(
1578 const std::vector<std::vector<float>> & embeddings,

Callers 2

generate_vibevoiceFunction · 0.80
generate_vibevoice_batchFunction · 0.80

Calls 4

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

Tested by

no test coverage detected