BackendPromptPenaltyGeneration class abstract
Optional generation route that preserves prompt penalties under a grammar.
New LFM2 Python-auto grammars use this route to retain the sampling behavior of the previously unconstrained prompt. Ordinary explicit grammars retain LlamaBackend.generate semantics. A routed/runtime-dependent backend must report its actual loaded delegate's support rather than interface presence. High-level LFM2 auto uses this rendered route even when native chat is also available; a backend requiring structured chat cannot admit that combination.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- supportsPromptPenaltiesWithGrammar → bool
-
Whether generateWithPromptPenalties retains prompt tokens in the
repetition/presence window, even with an attached grammar.
no setter
Methods
-
generateWithPromptPenalties(
int contextHandle, String prompt, GenerationParams params, {String? mediaMarker, List< LlamaContentPart> ? parts}) → Stream<List< int> > - Generates with prompt penalties without feeding the prompt to a grammar.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited