Skip to content

LLamaBeamsState

Namespace: LLama.Native

Passed to beam_search_callback function. Whenever 0 < common_prefix_length, this number of tokens should be copied from any of the beams (e.g. beams[0]) as they will be removed (shifted) from all beams in all subsequent callbacks.

1
public struct LLamaBeamsState

Inheritance ObjectValueTypeLLamaBeamsState

Fields

CommonPrefixLength

Current max length of prefix tokens shared by all beams.

1
public ulong CommonPrefixLength;

LastCall

True iff this is the last callback invocation.

1
public bool LastCall;

Properties

Beams

The current state of each beam

1
public Span<LLamaBeamView> Beams { get; }

Property Value

Span<LLamaBeamView>