klyn.llm.inference.LocalLLMProvider.load
method
public static load(repository as String, quantization as ModelQuantization = ModelQuantization.AUTO, device as Device = Device.auto, maxContext as Long = 2048l, revision as String = "main", offline as Boolean = false, verbose as Boolean = false, token as String = "") as LocalLLMProvider
Description

Downloads the requested Hub variant if necessary, verifies it and loads it on the selected CPU/GPU. No Python, external inference engine or Toolkit is used. AUTO selects an unambiguous executable Q8_0 asset; no silent conversion.

Parameters
ParameterDescription
repositoryHugging Face owner/name.
quantizationPublished GGUF variant; no automatic requantization.
deviceCPU/GPU selector; auto selects a compatible GPU, otherwise CPU.
maxContextPrompt plus response bound.
revisionHub branch/tag/commit, pinned in the downloaded snapshot.
offlineRequire the complete cache without network access.
verboseShow download and weight-loading ProgressBar displays; false by default, producing no console output.
tokenOptional private-repository token, not forwarded across hosts.
Returns

Owned AutoClosable provider; reuse it across requests and sessions.

Throws
  • IOException for download/integrity errors.
  • ValueException for unavailable devices or unsupported variants.
Example

try provider = LocalLLMProvider.load("bartowski/Qwen_Qwen3.5-9B-GGUF", ModelQuantization.Q8_0): print(LLMChatSession(provider).ask("Hello"))