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

Function mlp

src/models/vevo2/ar.cpp:324–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322 const core::TensorValue & input,
323 const core::TensorValue & positions,
324 const Vevo2Qwen2ARWeights::Layer & weights,
325 const Vevo2Qwen2ARConfig & config,
326 const core::TensorValue & cache_key,
327 const core::TensorValue & cache_value,
328 const core::TensorValue & attention_mask) {
329 const int64_t dim = ar_head_dim(config);
330 const int64_t scratch_slot = cache_key.shape.dims[1] - 1;
331 auto x_norm = modules::RMSNormModule({config.hidden_size, config.rms_norm_eps, true, false})
332 .build(ctx, input, weights.input_norm);
333 auto q = modules::LinearModule({config.hidden_size, config.num_attention_heads * dim, weights.q_proj.bias.has_value()})
334 .build(ctx, x_norm, weights.q_proj);
335 auto k = modules::LinearModule({config.hidden_size, config.num_key_value_heads * dim, weights.k_proj.bias.has_value()})

Callers 2

decoder_layerFunction · 0.70

Calls 2

LinearModuleClass · 0.85
buildMethod · 0.45

Tested by

no test coverage detected