llama_vocab_is_eog: Check if a token is an end-of-generation token

View source: R/llama.R

llama_vocab_is_eogR Documentation

Check if a token is an end-of-generation token

Description

Returns 'TRUE' for EOS, EOT, and other tokens that signal end of output. Useful for implementing custom generation loops.

Usage

llama_vocab_is_eog(model, token)

Arguments

model

Model handle returned by [llama_load_model]

token

Integer token ID (0-based)

Value

A logical scalar.


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