OnDeviceConfig
class OnDeviceConfig @JvmOverloads constructor(val mode: InferenceMode, val maxOutputTokens: Int? = null, val temperature: Float? = null, val topK: Int? = null, val seed: Int? = null, val candidateCount: Int = 1, val modelOption: OnDeviceModelOption? = null, val enableThinking: Boolean? = null)(source)
Configuration for on-device AI model inference.
Constructors
Link copied to clipboard
constructor(mode: InferenceMode, maxOutputTokens: Int? = null, temperature: Float? = null, topK: Int? = null, seed: Int? = null, candidateCount: Int = 1, modelOption: OnDeviceModelOption? = null, enableThinking: Boolean? = null)
Properties
Link copied to clipboard
The number of generated responses to return. See GenerationConfig for more detail. By default it's set to 1.
Link copied to clipboard
Whether the on-device model thinks before it answers; null leaves the model's default.
Link copied to clipboard
The maximum number of tokens to generate in the response. See GenerationConfig for more detail.
Link copied to clipboard
The InferenceMode to use for the model.
Link copied to clipboard
Configuration for the on-device model selection and performance.
Link copied to clipboard
A parameter controlling the degree of randomness in token selection. See GenerationConfig for more detail.