Skip to content

Commit acf2e89

Browse files
committed
llama : clarify comment about pp and tg graphs [no ci]
This commit clarifies the comment in `llama-context.cpp` regarding the prefill prompt (pp), and token generation (tg) graphs. The motivation for this is that I've struggled to remember these and had to look them up more than once, so I thought it would be helpful to add a comment that makes it clear what these stand for.
1 parent 446595b commit acf2e89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/llama-context.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ llama_context::llama_context(
298298

299299
cross.v_embd.clear();
300300

301-
// reserve pp graph first so that buffers are only allocated once
301+
// reserve pp (prefill prompt) graph first so that buffers are only allocated once
302302
{
303303
auto * gf = graph_reserve(n_tokens, n_seqs, n_tokens, mctx.get());
304304
if (!gf) {
@@ -309,7 +309,7 @@ llama_context::llama_context(
309309
n_nodes_pp = ggml_graph_n_nodes(gf);
310310
}
311311

312-
// reserve with tg graph to get the number of splits and nodes
312+
// reserve with tg (token generation) graph to get the number of splits and nodes
313313
{
314314
auto * gf = graph_reserve(n_seqs, n_seqs, n_seqs, mctx.get());
315315
if (!gf) {

0 commit comments

Comments
 (0)