//clika-runtime/io.clika.modelverse/TranslateLoadOptions
TranslateLoadOptions
[common]
data class TranslateLoadOptions(val contextLength: Int = 0, val modelArgs: Map<String, String> = emptyMap(), val revision: String = "main", val cacheDir: String? = null, val token: String? = null, val offline: Boolean = false, val device: String? = null, val weights: String? = null, val dtype: String? = null) : SourceOptions
The load-time choices a caller makes for a translation model.
Constructors
| TranslateLoadOptions | [common] constructor(contextLength: Int = 0, modelArgs: Map<String, String> = emptyMap(), revision: String = "main", cacheDir: String? = null, token: String? = null, offline: Boolean = false, device: String? = null, weights: String? = null, dtype: String? = null) |
Properties
| Name | Summary |
|---|---|
| cacheDir | [common] open override val cacheDir: String? = null |
| contextLength | [common] val contextLength: Int = 0 The context window in tokens: the longest sentence in plus its translation out, the decoder's key-value cache sized for it. 0 is auto (the window that fits the device's free memory, bounded by the checkpoint's own); a value names the window, clamped to it. |
| device | [common] open override val device: String? = null |
| dtype | [common] open override val dtype: String? = null The precision the weights load at: "float16" or "bfloat16" casts a dense checkpoint's float weights at load (about half the memory of a float32 checkpoint; the cast is best effort, and the stored precision keeps the model as trained) and selects a quantized checkpoint's compute dtype; null keeps the checkpoint's own. A load that reads neither meaning refuses naming the loads that do. The same dtype the command line's --dtype reads. |
| modelArgs | [common] val modelArgs: Map<String, String> The family's load arguments, as key and value pairs the model library reads at load. Empty keeps the snapshot's own choice. |
| offline | [common] open override val offline: Boolean = false |
| revision | [common] open override val revision: String |
| token | [common] open override val token: String? = null |
| weights | [common] open override val weights: String? = null The weight option of a repository that ships several (a GGUF repository with many quantizations): a quantization tag ( Q4_K_M), a repo-relative .gguf file name, or a glob over the option names. Null picks nothing: a repository with one option needs none, one with several refuses naming them. The same weights the command line's --weights reads. |