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

Function build_mlp

src/models/ace_step/diffusion.cpp:296–311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294 auto c_gate_msa = slice_conditioning_plane(ctx, modulation, 5, hidden_size, seq_len);
295
296 auto norm_hidden = apply_modulated_rms_norm(
297 ctx,
298 hidden_states,
299 weights.self_attn_norm,
300 one,
301 shift_msa,
302 scale_msa,
303 config.rms_norm_eps);
304 auto attn_out = build_attention(
305 ctx,
306 norm_hidden,
307 positions,
308 weights.self_attn,
309 config,
310 self_attention_mask,
311 backend_type);
312 attn_out = modules::MulModule{}.build(ctx, attn_out, gate_msa);
313 auto x = modules::AddModule{}.build(ctx, hidden_states, attn_out);
314

Callers 1

dit_layerFunction · 0.70

Calls 2

LinearModuleClass · 0.85
buildMethod · 0.45

Tested by

no test coverage detected