MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / build_inp_attn_scale

Method build_inp_attn_scale

subprojects/llama.cpp/src/llama-graph.cpp:1460–1472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1458}
1459
1460ggml_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
1474ggml_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,

Callers

nothing calls this directly

Calls 3

ggml_new_tensor_3dFunction · 0.85
ggml_set_inputFunction · 0.85
add_inputMethod · 0.80

Tested by

no test coverage detected