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

Function load_coco_fvq_weights

src/models/vevo2/components.cpp:717–750  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

715 return weights;
716}
717
718std::shared_ptr<const Vevo2CocoTokenizerWeights> load_coco_tokenizer_weights(
719 const Vevo2CocoTokenizerConfig & config,
720 const char * name,
721 ggml_backend_t backend,
722 engine::core::BackendType backend_type,
723 size_t weight_context_bytes,
724 engine::assets::TensorStorageType matmul_storage_type,
725 engine::assets::TensorStorageType conv_storage_type,
726 const engine::assets::TensorSource & source) {
727 if (config.coco_type != "style" && config.coco_type != "content_style") {
728 throw std::runtime_error("Vevo2 Coco tokenizer weights require style or content_style config");
729 }
730 auto weights = std::make_shared<Vevo2CocoTokenizerWeights>();
731 weights->store = std::make_shared<engine::core::BackendWeightStore>(
732 backend,
733 backend_type,
734 std::string("vevo2.") + name + ".weights",
735 weight_context_bytes);
736 if (config.coco_type == "content_style") {
737 weights->whisper_input = engine::modules::binding::linear_from_source(
738 *weights->store,
739 source,
740 "whisper_input_layer",
741 matmul_storage_type,
742 config.hidden_size,
743 config.whisper_dim,
744 true);
745 }
746 weights->chromagram_input = engine::modules::binding::linear_from_source(
747 *weights->store,
748 source,
749 "chromagram_input_layer",
750 matmul_storage_type,
751 config.hidden_size,
752 config.chromagram_dim,
753 true);

Callers 1

Calls 5

l2_normalized_rowsFunction · 0.85
stringFunction · 0.50
make_f32Method · 0.45
require_f32Method · 0.45

Tested by

no test coverage detected