| 1458 | } |
| 1459 | |
| 1460 | ggml_tensor * llm_graph_context::build_inp_attn_scale() const { |
| 1461 | auto inp = std::make_unique<llm_graph_input_attn_temp>(hparams.n_attn_temp_floor_scale, hparams.f_attn_temp_scale, hparams.f_attn_temp_offset); |
| 1462 | |
| 1463 | auto & cur = inp->attn_scale; |
| 1464 | |
| 1465 | // this need to be 1x1xN for broadcasting |
| 1466 | cur = ggml_new_tensor_3d(ctx0, GGML_TYPE_F32, 1, 1, n_tokens); |
| 1467 | ggml_set_input(cur); |
| 1468 | |
| 1469 | res->add_input(std::move(inp)); |
| 1470 | |
| 1471 | return cur; |
| 1472 | } |
| 1473 | |
| 1474 | ggml_tensor * llm_graph_context::build_inp_out_ids() const { |
| 1475 | // note: when all tokens are output, we could skip this optimization to spare the ggml_get_rows() calls, |
nothing calls this directly
no test coverage detected