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

Method build_inp_pos

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

Source from the content-addressed store, hash-verified

1445}
1446
1447ggml_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
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);

Callers

nothing calls this directly

Calls 4

ggml_new_tensor_1dFunction · 0.85
ggml_set_inputFunction · 0.85
n_pos_per_embdMethod · 0.80
add_inputMethod · 0.80

Tested by

no test coverage detected