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

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

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

# SourceOptions

interface [SourceOptions](index.md)

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](revision.md) is the hub revision (a branch, a tag or a commit), [cacheDir](cacheDir.md) the hub cache (null for the hub's default), [token](token.md) a hub access token passed through to the download (null for the hub's own token chain), [offline](offline.md) answers from the cache alone, and [device](device.md) is the runtime's device spelling (&quot;cpu&quot;, &quot;vulkan:0&quot;; null keeps the door's default). A local source ignores the hub knobs.

#### Inheritors

| |
|---|
| [CheckOptions](../CheckOptions/index.md) |
| [LoadOptions](../LoadOptions/index.md) |
| [TtsLoadOptions](../TtsLoadOptions/index.md) |
| [VisionLoadOptions](../VisionLoadOptions/index.md) |
| [TranslateLoadOptions](../TranslateLoadOptions/index.md) |

## Properties

| Name | Summary |
|---|---|
| [cacheDir](cacheDir.md) | [common]<br>abstract val [cacheDir](cacheDir.md): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)? |
| [device](device.md) | [common]<br>abstract val [device](device.md): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)? |
| [dtype](dtype.md) | [common]<br>open val [dtype](dtype.md): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)?<br>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](offline.md) | [common]<br>abstract val [offline](offline.md): [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) |
| [revision](revision.md) | [common]<br>abstract val [revision](revision.md): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) |
| [token](token.md) | [common]<br>abstract val [token](token.md): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)? |
| [weights](weights.md) | [common]<br>open val [weights](weights.md): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)?<br>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. |