---
title: "clika_runtime.modelverse.generation"
sidebar_label: "clika_runtime.modelverse.generation"
description: "The clika_runtime.modelverse.generation module, introspected from the installed wheel."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

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)

| Name | Kind |
| --- | --- |
| [`GenerationConfig`](./GenerationConfig.md) | class |
| [functions](./functions.md) | module functions |