Skip to main content

clika_runtime.modelverse.generation

The decode policy of a text generation: budget, sampling, stopping.

:class:GenerationConfig is a plain dataclass. A model carries the defaults its checkpoint ships (model.defaults); generate and stream_generate overlay the keyword arguments you pass on those defaults, so model.generate("hi", max_new_tokens=32, temperature=0.7) changes exactly those two knobs::

from clika_runtime.modelverse import GenerationConfig

config = GenerationConfig(max_new_tokens=64, temperature=0.7, top_p=0.9)
text = model.generate("hello", config=config)
NameKind
GenerationConfigclass
functionsmodule functions