Skip to main content

//clika-runtime/io.clika.modelverse/SourceOptions

SourceOptions

interface SourceOptions

The source knobs every load and resolve reads, the hub ecosystem's own: a source is a local directory, a hub repo id or a .gguf path; revision is the hub revision (a branch, a tag or a commit), cacheDir the hub cache (null for the hub's default), token a hub access token passed through to the download (null for the hub's own token chain), offline answers from the cache alone, and device is the runtime's device spelling ("cpu", "vulkan:0"; null keeps the door's default). A local source ignores the hub knobs.

Inheritors​

CheckOptions
LoadOptions
TtsLoadOptions
VisionLoadOptions
TranslateLoadOptions

Properties​

NameSummary
cacheDir[common]
abstract val cacheDir: String?
device[common]
abstract val device: String?
dtype[common]
open val dtype: String?
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.
offline[common]
abstract val offline: Boolean
revision[common]
abstract val revision: String
token[common]
abstract val token: String?
weights[common]
open val weights: String?
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.