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

Method build_input_k_idxs

subprojects/llama.cpp/src/llama-kv-cache.cpp:1159–1167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1157}
1158
1159ggml_tensor * llama_kv_cache::build_input_k_idxs(ggml_context * ctx, const llama_ubatch & ubatch) const {
1160 const uint32_t n_tokens = ubatch.n_tokens;
1161
1162 ggml_tensor * k_idxs = ggml_new_tensor_1d(ctx, GGML_TYPE_I64, n_tokens);
1163
1164 ggml_set_input(k_idxs);
1165
1166 return k_idxs;
1167}
1168
1169ggml_tensor * llama_kv_cache::build_input_v_idxs(ggml_context * ctx, const llama_ubatch & ubatch) const {
1170 const uint32_t n_tokens = ubatch.n_tokens;

Callers 4

build_attn_inp_kv_implFunction · 0.80
build_attn_inp_k_implFunction · 0.80

Calls 2

ggml_new_tensor_1dFunction · 0.85
ggml_set_inputFunction · 0.85

Tested by

no test coverage detected