llama_state_load: Load context state from file

View source: R/llama.R

llama_state_loadR Documentation

Load context state from file

Description

Restores a previously saved context state (including KV cache).

Usage

llama_state_load(ctx, path)

Arguments

ctx

Context handle returned by [llama_new_context]

path

File path to load state from

Value

A logical scalar: TRUE on success (errors on failure).

Examples

## Not run: 
llama_state_load(ctx, "state.bin")
# Continue generation from saved state
result <- llama_generate(ctx, "")

## End(Not run)

llamaR documentation built on May 28, 2026, 1:06 a.m.