MCPcopy Create free account
hub / github.com/abetlen/llama-cpp-python / llama_encode

Function llama_encode

llama_cpp/llama_cpp.py:3048–3052  ·  view source on GitHub ↗

Process a batch of tokens using the encoder. 0 - success < 0 - error

(ctx: llama_context_p, batch: llama_batch, /)

Source from the content-addressed store, hash-verified

3046# struct llama_batch batch);
3047@ctypes_function("llama_encode", [llama_context_p_ctypes, llama_batch], ctypes.c_int32)
3048def llama_encode(ctx: llama_context_p, batch: llama_batch, /) -> int:
3049 """Process a batch of tokens using the encoder.
3050 0 - success
3051 < 0 - error"""
3052 ...
3053
3054
3055# // Process a batch of tokens.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…