| 168 | } |
| 169 | |
| 170 | core::TensorValue apply_gamma( |
| 171 | core::ModuleBuildContext & ctx, |
| 172 | const core::TensorValue & input, |
| 173 | const core::TensorValue & gamma, |
| 174 | int64_t hidden) { |
| 175 | auto repeated = repeat_like(ctx, gamma, input, core::TensorShape::from_dims({1, hidden, 1})); |
| 176 | return core::wrap_tensor(ggml_mul(ctx.ggml, input.tensor, repeated.tensor), input.shape, GGML_TYPE_F32); |
| 177 | } |
| 178 | |
| 179 | core::TensorValue swiglu( |
| 180 | core::ModuleBuildContext & ctx, |
no test coverage detected