llama-cpp-d ~master (2026-03-20T18:06:26.5280947)
Dub
Repo
SamplerChain.sample
llama
sampling
SamplerChain
Sample the next token.
batchIdx = -1
uses the last output position.
llama_token
sample
(llama_context* ctx, int batchIdx)
struct
SamplerChain
@
nogc
nothrow
llama_token
sample
(
llama_context
*
ctx
,
int
batchIdx
= -1
)
llama_token
sample
(LlamaContext ctx, int batchIdx)
Meta
Source
See Implementation
llama
sampling
SamplerChain
functions
accept
dist
dry
grammar
greedy
logitBias
minP
mirostatV2
penalties
printPerf
sample
temp
tempExt
topK
topNSigma
topP
typical
xtc
mixins
__anonymous
static functions
create
Sample the next token. batchIdx = -1 uses the last output position.