LlmRamEstimateOptions

data class LlmRamEstimateOptions(val contextLength: Long? = null, val batchSize: Long = 512, val kvCacheElementBytes: Double = 2.0, val flashAttention: Boolean = false)(source)

Options for estimateLlmPeakRam.

Constructors

Link copied to clipboard
constructor(contextLength: Long? = null, batchSize: Long = 512, kvCacheElementBytes: Double = 2.0, flashAttention: Boolean = false)

Types

Link copied to clipboard
object Companion

Constants and factory functions of LlmRamEstimateOptions.

Properties

Link copied to clipboard

logical batch size (n_batch), which sizes the logits and activation buffers.

Link copied to clipboard

KV cache length in tokens; null uses min(model context, 4096) like LlamaContextConfig's default, 0 uses the full training context.

Link copied to clipboard

with flash attention the n_head x n_batch x n_ctx attention score matrix is not materialized.

Link copied to clipboard

bytes per KV cache element (2 for the default F16 cache, 1 for Q8_0-ish caches).