---
title: "ClikaRT::spec::KVSpecOptions"
sidebar_label: "KVSpecOptions"
description: "Options for generate_kv_input_specs: the batch size and past-sequence length every detected KV-cache input is specced at. The defaults describe a prefill step: a zero-length past."
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--struct">struct</span>

**Header:** `ClikaRT/graph/input_specs.h`

Options for `generate_kv_input_specs`: the batch size and past-sequence length every detected KV-cache input is specced at. The defaults describe a prefill step: a zero-length past. `past_len_*` follow [`ShapeProfile`](./ShapeProfile.md) min/opt/max semantics; set all three equal (or just construct with one value) for a fixed past length.

## Member functions

### KVSpecOptions() {#KVSpecOptions}

<div class="api-signature">

**`KVSpecOptions`**() `=default`

</div>

<div class="api-declared">

Declared in `ClikaRT/graph/input_specs.h`, line 265

</div>

### KVSpecOptions(int64\_t, int64\_t) {#KVSpecOptions-2}

<div class="api-signature">

`explicit` **`KVSpecOptions`**(`std::int64_t` `batch_size`, `std::int64_t` `past_len` `=` `0`)

</div>

Spec every detected KV input at `batch_size` with a fixed `past_len`.

<div class="api-declared">

Declared in `ClikaRT/graph/input_specs.h`, line 267

</div>

## Data members

### batch {#batch}

<div class="api-signature">

`std::int64_t` **`batch`** `= 1`

</div>

batch size every detected KV input is specced at.

<div class="api-declared">

Declared in `ClikaRT/graph/input_specs.h`, line 260

</div>

### past\_len\_min {#past_len_min}

<div class="api-signature">

`std::int64_t` **`past_len_min`** `= 0`

</div>

smallest past length ([`ShapeProfile`](./ShapeProfile.md) semantics).

<div class="api-declared">

Declared in `ClikaRT/graph/input_specs.h`, line 261

</div>

### past\_len\_opt {#past_len_opt}

<div class="api-signature">

`std::int64_t` **`past_len_opt`** `= 0`

</div>

the past length the graph specializes to.

<div class="api-declared">

Declared in `ClikaRT/graph/input_specs.h`, line 262

</div>

### past\_len\_max {#past_len_max}

<div class="api-signature">

`std::int64_t` **`past_len_max`** `= 0`

</div>

largest past length ([`ShapeProfile`](./ShapeProfile.md) semantics).

<div class="api-declared">

Declared in `ClikaRT/graph/input_specs.h`, line 263

</div>
