% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/llama.R
\name{llama_state_get_size}
\alias{llama_state_get_size}
\title{Get the size of the serialized context state in bytes}
\usage{
llama_state_get_size(ctx)
}
\arguments{
\item{ctx}{Context handle returned by [llama_new_context]}
}
\value{
A numeric scalar (size in bytes).
}
\description{
Returns the number of bytes required to serialize the current context state
(KV cache + sampling state). Use before allocating a buffer for raw state I/O.
}
