All examples
Language models

Load a native local model

Generate with local GGUF weights, inspect typed responses and close owned handles.

llm_native.aner
// Requires an optional native-engine build and a compatible local GGUF file.
// Checking this source does not open the model; running it loads local weights.
import aner.llm

print(llm.native_available())
let model = llm.load("models/research-model.gguf", context: 4096, device: "auto")
print(model.device())
print(model.context())
print(model.fingerprint())
print(model.memory_summary())
let answer = model.generate("Explain the purpose of validation data.",
    max_tokens: 128, temperature: 0.0, seed: 0)
print(answer.text())
print(answer.finish_reason())
print(answer.total_tokens())
model.close()

Make it your experiment.

Use the matching development runtime. Save this program as examples/llm_native.aner inside a folder for your experiment. Open a terminal in that folder, then check and run the program.

Terminal
aner check examples/llm_native.aner
aner run examples/llm_native.aner

The aner command must be on your PATH. Follow the installation guide if your terminal cannot find it.

Requires the matching optional native inference development runtime and the explicit local GGUF model file used by the source. Published Aner 0.0.5 packages do not include llm.load. Checking loads no model; running performs local inference and sends no provider request.

Credential setup
aner check examples/llm_native.aner
aner run examples/llm_native.aner

Client construction and syntax checking send no inference request. Running this program calls its explicit model service. Inspect the returned finish reason and reported usage; unavailable token counts remain unknown and usage does not verify charges.

Read token accounting and provider requirements
Install Aner