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

Function load_transformer_blocks

src/models/heartmula/codec.cpp:272–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270 config.dim,
271 config.codebook_dim,
272 true);
273 weights.vq_codebooks.reserve(static_cast<size_t>(config.num_quantizers));
274 for (int64_t quantizer = 0; quantizer < config.num_quantizers; ++quantizer) {
275 const std::string name = "flow_matching.vq_embed.layers." + std::to_string(quantizer) + "._codebook.embed";
276 weights.vq_codebooks.push_back(store.load_tensor_as_shape(
277 source,
278 name,
279 storage_type,
280 {1, config.codebook_size, config.codebook_dim},
281 core::TensorShape::from_dims({config.codebook_size, config.codebook_dim})));
282 }
283 weights.cond_feature_emb = binding::linear_from_source(
284 store,
285 source,
286 "flow_matching.cond_feature_emb",
287 storage_type,
288 config.dim,
289 config.dim,
290 true);
291 weights.zero_cond_embedding = store.load_f32_tensor(
292 source,
293 "flow_matching.zero_cond_embedding1",
294 {config.dim});
295 weights.zero_cond_embedding_host = source.require_f32_tensor("flow_matching.zero_cond_embedding1", {config.dim});

Callers 1

load_flow_weightsFunction · 0.85

Calls 3

load_transformer_blockFunction · 0.85
llama_mlp_hidden_dimFunction · 0.70
to_stringFunction · 0.50

Tested by

no test coverage detected