Allocates a batch for up to nTokensMax tokens. Pass embd > 0 for embedding batches.
Append one token to a pre-allocated batch (created via allocBatch).
Reset a batch's token count to zero (keeps allocated memory).
Wraps a token slice into a batch. The slice must outlive the returned batch.
Wraps a raw token pointer into a batch; for C interop.
A llama_batch that frees itself when it goes out of scope.