Skip to main content

//clika-runtime/io.clika.modelverse/LoadOptions/contextLength

contextLength

[common]
val contextLength: Int = 0

The context window in tokens: the longest prompt plus reply the model serves. 0 is auto: the largest window that fits the device's free memory beside the weights, bounded by the checkpoint's own; a value names the window, clamped to the checkpoint's. A smaller window shrinks the key-value cache the load allocates, which is what lets a phone load a model whose full window would not fit. A speech model reads it the same way (its decoder's window comes down, never up).