GenerationOptions
Options of one LlamaEngine.generate call.
Sampling runs [grammar] -> [repetition penalty] -> top-k -> top-p -> min-p -> temperature -> distribution, or greedy argmax when temperature is <= 0.
Constructors
Types
Constants and factory functions of GenerationOptions.
Properties
add BOS/EOS to the prompt as the model's tokenizer requires.
constrains every sampled token (GBNF or JSON schema), null for unconstrained text.
true when temperature selects greedy decoding.
parse control tokens written as text in the prompt (e.g. chat-template markers).
render control tokens into com.donfuldauer.kggml.core.TokenEvent.Token.text.
how many recent tokens the repetition penalty considers.
repetition penalty, 1 disables.
reuse the KV cache of the longest common token prefix between this prompt and the tokens already in the engine's session (previous prompts, generations, or a restored session), so only the new suffix is evaluated. false clears the session first.
generation stops with StopReason.STOP_SEQUENCE once the generated text contains one of these. The token that completed the stop sequence is still emitted.
sampling temperature; <= 0 selects greedy (deterministic) decoding.