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

Function load_transformer_block

src/models/heartmula/codec.cpp:251–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249 prefix + "." + std::to_string(layer),
250 storage_type,
251 hidden_size,
252 mlp_hidden_size));
253 }
254 return blocks;
255}
256
257HeartCodecFlowWeights load_flow_weights(
258 core::BackendWeightStore & store,
259 const assets::TensorSource & source,
260 const HeartCodecConfig & config,
261 assets::TensorStorageType storage_type) {
262 const int64_t estimator_dim = config.num_attention_heads * config.attention_head_dim;
263 const int64_t estimator_dim_2 = 2 * estimator_dim;
264 HeartCodecFlowWeights weights;
265 weights.vq_project_out = binding::linear_from_source(
266 store,
267 source,
268 "flow_matching.vq_embed.project_out",
269 storage_type,
270 config.dim,
271 config.codebook_dim,
272 true);
273 weights.vq_codebooks.reserve(static_cast<size_t>(config.num_quantizers));

Callers 1

load_transformer_blocksFunction · 0.85

Calls 3

load_f32_tensorMethod · 0.80
load_rms_normFunction · 0.70
load_linearFunction · 0.70

Tested by

no test coverage detected