Skip to content

Commit 3530fc2

Browse files
committed
docs: Remove ref to llama_eval in llama_cpp.py docs
The llama_eval function was removed in 0.2.14 (0d37ce5) but the docs still reference it. Updated to match the llama.h docs from upstream.
1 parent e712cff commit 3530fc2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

llama_cpp/llama_cpp.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ class llama_context_params(ctypes.Structure):
764764
cb_eval_user_data (ctypes.ctypes.c_void_p): user data for cb_eval
765765
type_k (int): data type for K cache
766766
type_v (int): data type for V cache
767-
logits_all (bool): the llama_eval() call computes all logits, not just the last one (DEPRECATED - set llama_batch.logits instead)
767+
logits_all (bool): the llama_decode() call computes all logits, not just the last one (DEPRECATED - set llama_batch.logits instead)
768768
embeddings (bool): if true, extract embeddings (together with logits)
769769
offload_kqv (bool): whether to offload the KQV ops (including the KV cache) to GPU
770770
flash_attn (bool): whether to use flash attention
@@ -2453,10 +2453,10 @@ def llama_synchronize(ctx: llama_context_p, /):
24532453
"llama_get_logits", [llama_context_p_ctypes], ctypes.POINTER(ctypes.c_float)
24542454
)
24552455
def llama_get_logits(ctx: llama_context_p, /) -> CtypesArray[ctypes.c_float]:
2456-
"""Token logits obtained from the last call to llama_eval()
2457-
The logits for the last token are stored in the last row
2458-
Logits for which llama_batch.logits[i] == 0 are undefined
2459-
Rows: n_tokens provided with llama_batch
2456+
"""Token logits obtained from the last call to llama_decode()
2457+
The logits for which llama_batch.logits[i] != 0 are stored contiguously
2458+
in the order they have appeared in the batch.
2459+
Rows: number of tokens for which llama_batch.logits[i] != 0
24602460
Cols: n_vocab
24612461
24622462
Returns:

0 commit comments

Comments
 (0)