@@ -233,18 +233,18 @@ llm_build_gemma3n_iswa::llm_build_gemma3n_iswa(const llama_model & model, const
233233 res->t_logits = cur;
234234
235235 ggml_build_forward_expand (gf, cur);
236- };
236+ }
237237
238238ggml_tensor * llm_build_gemma3n_iswa::calc_magnitude (ggml_tensor * x) {
239239 return ggml_sqrt (ctx0, ggml_sum_rows (ctx0, ggml_sqr (ctx0, x)));
240- };
240+ }
241241
242242// get 2D slice view from a 3D tensor, the idx corresponds to the 3rd dim
243243ggml_tensor * llm_build_gemma3n_iswa::view_2d_slice (ggml_tensor * x, int idx) {
244244 GGML_ASSERT (idx < (int ) x->ne [2 ]);
245245 return ggml_view_2d (ctx0, x, x->ne [0 ], x->ne [1 ], ggml_row_size (x->type , x->ne [0 ]),
246246 idx * x->ne [0 ] * x->ne [1 ] * ggml_element_size (x));
247- };
247+ }
248248
249249// equivalent to get_per_layer_inputs() in python code
250250// output shape: [n_embd_altup, n_layer, n_tokens]
@@ -264,7 +264,7 @@ ggml_tensor * llm_build_gemma3n_iswa::get_per_layer_inputs() {
264264 }
265265 res->add_input (std::move (inp));
266266 return inp_per_layer;
267- };
267+ }
268268
269269// equivalent to project_per_layer_inputs() in python code
270270// this calculates the per-layer inputs, so the final tensor shape will have n_layer as the last dim
@@ -287,7 +287,7 @@ ggml_tensor * llm_build_gemma3n_iswa::project_per_layer_inputs(ggml_tensor * inp
287287 // permute to shape: [n_embd_altup, n_tokens, n_layer]
288288 inp_per_layer = ggml_cont (ctx0, ggml_permute (ctx0, inp_per_layer, 0 , 2 , 1 , 3 ));
289289 return inp_per_layer;
290- };
290+ }
291291
292292// input cur shape: [n_altup, n_tokens]
293293// output shape: [n_altup, n_tokens]
@@ -299,7 +299,7 @@ ggml_tensor * llm_build_gemma3n_iswa::laurel(ggml_tensor * cur, int il) {
299299 tmp = ggml_add (ctx0, tmp, cur);
300300 cb (tmp, " laurel_out" , il);
301301 return tmp;
302- };
302+ }
303303
304304// input x shape: [n_embd, n_tokens]
305305// output shape: [n_embd, n_tokens]
@@ -309,7 +309,7 @@ ggml_tensor * llm_build_gemma3n_iswa::gaussian_topk(ggml_tensor * x) {
309309 1 .0f / (float ) (x->ne [0 ] - 1 )));
310310 ggml_tensor * cutoff_x = ggml_add (ctx0, mean, ggml_scale (ctx0, std, f_sparsity_std_mul));
311311 return ggml_relu (ctx0, ggml_sub (ctx0, x, cutoff_x));
312- };
312+ }
313313
314314//
315315// altup functions
@@ -326,7 +326,7 @@ ggml_tensor * llm_build_gemma3n_iswa::altup_compute_router_modalities(ggml_tenso
326326
327327 ggml_tensor * output = ggml_mul_mat (ctx0, model.layers [il].altup_router , router_inputs);
328328 return ggml_tanh (ctx0, output); // [n_altup, n_tokens]
329- };
329+ }
330330
331331// input cur shape: [n_embd, n_tokens, n_altup]
332332// output shape: [n_embd, n_tokens, n_altup]
@@ -350,7 +350,7 @@ ggml_tensor * llm_build_gemma3n_iswa::altup_predict(ggml_tensor * cur, int il) {
350350 cb (predictions, " predictions" , il);
351351
352352 return predictions;
353- };
353+ }
354354
355355// input predictions shape: [n_embd, n_tokens, n_altup]
356356// input activated shape: [n_embd, n_tokens]
0 commit comments