% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/llama.R
\name{llama_get_embeddings}
\alias{llama_get_embeddings}
\title{Get all output token embeddings as a matrix}
\usage{
llama_get_embeddings(ctx, n_outputs)
}
\arguments{
\item{ctx}{Context handle returned by [llama_new_context]}

\item{n_outputs}{Number of outputs requested in the last decode call
(i.e. how many tokens had \code{logits = TRUE} in the batch).}
}
\value{
A numeric matrix with \code{n_outputs} rows and \code{n_embd} columns.
}
\description{
Returns a matrix of shape \code{n_outputs × n_embd} containing the raw
embedding vectors for all tokens whose \code{logits} flag was set in the batch.
Only works when \code{pooling_type == "none"} (generative models or embedding
contexts without pooling). For pooled embeddings use [llama_get_embeddings_seq].
}
