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

Method LayerNormModule

src/framework/modules/norm_modules.cpp:167–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165 result = core::wrap_tensor(ggml_mul(ctx.ggml, result.tensor, weight), result.shape,
166 config.cuda_f16_output ? GGML_TYPE_F16 : GGML_TYPE_F32);
167 }
168 if (config.use_bias) {
169 if (!weights.bias.has_value()) {
170 throw std::runtime_error("bias is required when NormConfig.use_bias is true");
171 }
172 core::validate_shape(*weights.bias, core::TensorShape::from_dims({config.hidden_size}), "bias");

Callers

nothing calls this directly

Calls 1

validate_norm_configFunction · 0.85

Tested by

no test coverage detected