| llama_get_logits | R Documentation |
Returns the raw logit vector (unnormalized log-probabilities) from the last token position after a decode operation.
llama_get_logits(ctx)
ctx |
Context handle returned by [llama_new_context] |
A numeric vector of length n_vocab containing the logits.
## Not run:
model <- llama_load_model("model.gguf")
ctx <- llama_new_context(model)
result <- llama_generate(ctx, "The capital of France is", max_new_tokens = 1L)
logits <- llama_get_logits(ctx)
# Find top token
top_id <- which.max(logits)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.