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

Function codebook_decode

src/models/qwen3_tts/tokenizer_speech_decoder.cpp:636–650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

634 GGML_TYPE_F32);
635}
636
637core::TensorValue codebook_decode(
638 core::ModuleBuildContext & build_ctx,
639 ggml_tensor * codes_t_b,
640 const CodebookWeights & codebook,
641 int64_t dim,
642 int64_t size,
643 core::ConstantTensorCache & constants) {
644 auto indices = core::wrap_tensor(
645 codes_t_b,
646 core::TensorShape::from_dims({codes_t_b->ne[1], codes_t_b->ne[0]}),
647 GGML_TYPE_I32);
648 indices = core::ensure_backend_addressable_layout(build_ctx, indices);
649 const auto table = constants.make_f32(core::TensorShape::from_dims({size, dim}), codebook.embedding);
650 return modules::CodebookLookupModule({size, dim}).build(build_ctx, indices, table);
651}
652
653core::TensorValue quantizer_decode(

Callers 1

quantizer_decodeFunction · 0.85

Calls 5

wrap_tensorFunction · 0.85
make_f32Method · 0.45
buildMethod · 0.45

Tested by

no test coverage detected