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

Function llama_batch_get_one

llama_cpp/llama_cpp.py:2988–2997  ·  view source on GitHub ↗

Return batch for single sequence of tokens NOTE: this is a helper function to facilitate transition to the new batch API - avoid using it

(
    tokens: CtypesArray[llama_token],
    n_tokens: Union[ctypes.c_int, int],
    /,
)

Source from the content-addressed store, hash-verified

2986 llama_batch,
2987)
2988def llama_batch_get_one(
2989 tokens: CtypesArray[llama_token],
2990 n_tokens: Union[ctypes.c_int, int],
2991 /,
2992) -> llama_batch:
2993 """Return batch for single sequence of tokens
2994
2995 NOTE: this is a helper function to facilitate transition to the new batch API - avoid using it
2996 """
2997 ...
2998
2999
3000# // Allocates a batch of tokens on the heap that can hold a maximum of n_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…