---
title: "FitVerdict"
sidebar_label: "FitVerdict"
description: "Kotlin binding reference: FitVerdict."
---

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

//[clika-runtime](../../../index.md)/[io.clika.modelverse](../index.md)/[FitVerdict](index.md)

# FitVerdict

[common]\
data class [FitVerdict](index.md)(val source: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), val device: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), val deviceBytes: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), val weightBytes: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), val kvBytesFixed: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), val kvBytesPerToken: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), val kvDtype: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), val contextLength: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), val maxSeq: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), val activationBytes: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), val needBytes: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), val fits: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html), val maxSeqFits: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), val maxImageFits: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html), val reason: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), val judged: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html), val grade: [FitGrade](../FitGrade/index.md)?, val memorySharePercent: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html), val parameters: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), val weightEncoding: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), val tokSEstimate: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html), val tokSMeasured: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html))

Does a model fit a device, judged from its metadata alone, the library's own `FitVerdict`. The law, every term a field:

```kotlin
need = weightBytes + kvBytesFixed + kvBytesPerToken * maxSeqFits + activationBytes
fits = need <= deviceBytes
```

[weightBytes](weightBytes.md) is the size of the weight files a fetch takes; [kvBytesFixed](kvBytesFixed.md) and [kvBytesPerToken](kvBytesPerToken.md) come from the cache layout the model's documents describe, at [kvDtype](kvDtype.md) (empty when the model prices no cache); [activationBytes](activationBytes.md) is the working set beside them. [deviceBytes](deviceBytes.md) is the device's memory with no headroom taken off; a caller keeping memory free for the system applies its own margin. [maxSeq](maxSeq.md) is the sequence length the verdict was judged at and [maxSeqFits](maxSeqFits.md) the admitted context: the largest rung of the context ladder up to it whose need keeps [FitGrade.GOOD](../FitGrade/GOOD/index.md) or better, 0 when no context fits; [contextLength](contextLength.md) the model's own window (0 when its documents declare none); [maxImageFits](maxImageFits.md) the largest square image an image generation pipeline can make (0 otherwise). [grade](grade.md) is null and [judged](judged.md) false on a row whose source could not be read; [reason](reason.md) says what decided the verdict. [tokSEstimate](tokSEstimate.md) is the decode speed estimate on a CPU in tokens per second (0 when none applies), [tokSMeasured](tokSMeasured.md) a measured figure for the device (0 when none is known).

## Constructors

| | |
|---|---|
| [FitVerdict](FitVerdict.md) | [common]<br>constructor(source: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), device: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), deviceBytes: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), weightBytes: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), kvBytesFixed: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), kvBytesPerToken: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), kvDtype: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), contextLength: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), maxSeq: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), activationBytes: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), needBytes: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), fits: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html), maxSeqFits: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), maxImageFits: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html), reason: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), judged: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html), grade: [FitGrade](../FitGrade/index.md)?, memorySharePercent: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html), parameters: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), weightEncoding: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), tokSEstimate: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html), tokSMeasured: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)) |

## Properties

| Name | Summary |
|---|---|
| [activationBytes](activationBytes.md) | [common]<br>val [activationBytes](activationBytes.md): [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) |
| [contextLength](contextLength.md) | [common]<br>val [contextLength](contextLength.md): [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) |
| [device](device.md) | [common]<br>val [device](device.md): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) |
| [deviceBytes](deviceBytes.md) | [common]<br>val [deviceBytes](deviceBytes.md): [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) |
| [fits](fits.md) | [common]<br>val [fits](fits.md): [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) |
| [grade](grade.md) | [common]<br>val [grade](grade.md): [FitGrade](../FitGrade/index.md)? |
| [judged](judged.md) | [common]<br>val [judged](judged.md): [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) |
| [kvBytesFixed](kvBytesFixed.md) | [common]<br>val [kvBytesFixed](kvBytesFixed.md): [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) |
| [kvBytesPerToken](kvBytesPerToken.md) | [common]<br>val [kvBytesPerToken](kvBytesPerToken.md): [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) |
| [kvDtype](kvDtype.md) | [common]<br>val [kvDtype](kvDtype.md): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) |
| [maxImageFits](maxImageFits.md) | [common]<br>val [maxImageFits](maxImageFits.md): [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) |
| [maxSeq](maxSeq.md) | [common]<br>val [maxSeq](maxSeq.md): [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) |
| [maxSeqFits](maxSeqFits.md) | [common]<br>val [maxSeqFits](maxSeqFits.md): [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) |
| [memorySharePercent](memorySharePercent.md) | [common]<br>val [memorySharePercent](memorySharePercent.md): [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) |
| [needBytes](needBytes.md) | [common]<br>val [needBytes](needBytes.md): [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) |
| [parameters](parameters.md) | [common]<br>val [parameters](parameters.md): [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) |
| [reason](reason.md) | [common]<br>val [reason](reason.md): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) |
| [source](source.md) | [common]<br>val [source](source.md): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) |
| [tokSEstimate](tokSEstimate.md) | [common]<br>val [tokSEstimate](tokSEstimate.md): [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html) |
| [tokSMeasured](tokSMeasured.md) | [common]<br>val [tokSMeasured](tokSMeasured.md): [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html) |
| [weightBytes](weightBytes.md) | [common]<br>val [weightBytes](weightBytes.md): [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) |
| [weightEncoding](weightEncoding.md) | [common]<br>val [weightEncoding](weightEncoding.md): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) |