| 1538 | } |
| 1539 | |
| 1540 | VibeVoiceTokenEmbeddings 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 | |
| 1556 | VibeVoiceDecoderPrefillOutput VibeVoiceDecoderWeightsRuntime::prefill_embeddings( |
| 1557 | const std::vector<float> & embeddings, |
no test coverage detected