LlamaEngineOptions

data class LlamaEngineOptions(val gpuDevice: Int = 0, val allowBackendFallback: Boolean = true, val useMlock: Boolean = false, val projectorPath: String? = null, val imageMinTokens: Int = 0, val imageMaxTokens: Int = 0)(source)

LLM-specific construction options of a LlamaEngine.

Constructors

Link copied to clipboard
constructor(gpuDevice: Int = 0, allowBackendFallback: Boolean = true, useMlock: Boolean = false, projectorPath: String? = null, imageMinTokens: Int = 0, imageMaxTokens: Int = 0)

Properties

Link copied to clipboard

when the requested backend is unavailable, fall back along ComputeBackend.fallback (eventually ComputeBackend.CPU_ONLY) instead of failing. A GPU backend counts as unavailable when its context fails the load-time warm-up (a few short decodes on the GPU), e.g. a compute pipeline the GPU driver cannot build.

Link copied to clipboard

index among the GPU devices of the selected kind (Metal / Vulkan).

Link copied to clipboard

maximum embeddings per image for projectors with dynamic resolution, 0 = the projector's default.

Link copied to clipboard

minimum embeddings per image for projectors with dynamic resolution, 0 = the projector's default.

Link copied to clipboard

multimodal projector GGUF (mmproj-*.gguf) matching the model. When set, it is loaded with libmtmd next to the model, on the same backend (com.donfuldauer.kggml.core.ComputeBackend.CPU_ONLY creates no GPU backend for the image encoder either), and enables the image overloads of LlamaEngine.generate. null = text only.

Link copied to clipboard

lock the model weights in RAM (mlock).