llama-cpp-d ~master (2026-03-20T18:06:26.5280947)
Dub
Repo
SamplerChain.sample
llama
sampling
SamplerChain
Sample the next token from a
LlamaContext
.
llama_token
sample
(llama_context* ctx, int batchIdx)
llama_token
sample
(LlamaContext ctx, int batchIdx)
struct
SamplerChain
@
nogc
nothrow
llama_token
sample
(
ref
LlamaContext
ctx
,
int
batchIdx
= -1
)
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 from a LlamaContext.