You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

llama.native.llamabeamsstate.md 1.0 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # LLamaBeamsState
  2. Namespace: LLama.Native
  3. Passed to beam_search_callback function.
  4. Whenever 0 < common_prefix_length, this number of tokens should be copied from any of the beams
  5. (e.g. beams[0]) as they will be removed (shifted) from all beams in all subsequent callbacks.
  6. ```csharp
  7. public struct LLamaBeamsState
  8. ```
  9. Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ValueType](https://docs.microsoft.com/en-us/dotnet/api/system.valuetype) → [LLamaBeamsState](./llama.native.llamabeamsstate.md)
  10. ## Fields
  11. ### **CommonPrefixLength**
  12. Current max length of prefix tokens shared by all beams.
  13. ```csharp
  14. public ulong CommonPrefixLength;
  15. ```
  16. ### **LastCall**
  17. True iff this is the last callback invocation.
  18. ```csharp
  19. public bool LastCall;
  20. ```
  21. ## Properties
  22. ### **Beams**
  23. The current state of each beam
  24. ```csharp
  25. public Span<LLamaBeamView> Beams { get; }
  26. ```
  27. #### Property Value
  28. [Span&lt;LLamaBeamView&gt;](https://docs.microsoft.com/en-us/dotnet/api/system.span-1)<br>