| 1445 | } |
| 1446 | |
| 1447 | ggml_tensor * llm_graph_context::build_inp_pos() const { |
| 1448 | auto inp = std::make_unique<llm_graph_input_pos>(hparams.n_pos_per_embd()); |
| 1449 | |
| 1450 | auto & cur = inp->pos; |
| 1451 | |
| 1452 | cur = ggml_new_tensor_1d(ctx0, GGML_TYPE_I32, (int64_t)n_tokens*hparams.n_pos_per_embd()); |
| 1453 | ggml_set_input(cur); |
| 1454 | |
| 1455 | res->add_input(std::move(inp)); |
| 1456 | |
| 1457 | return cur; |
| 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); |
nothing calls this directly
no test coverage detected