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.llamanativebatch.md 1.4 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # LLamaNativeBatch
  2. Namespace: LLama.Native
  3. Input data for llama_decode
  4. A llama_batch object can contain input about one or many sequences
  5. The provided arrays (i.e. token, embd, pos, etc.) must have size of n_tokens
  6. ```csharp
  7. public struct LLamaNativeBatch
  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) → [LLamaNativeBatch](./llama.native.llamanativebatch.md)
  10. ## Fields
  11. ### **n_tokens**
  12. The number of items pointed at by pos, seq_id and logits.
  13. ```csharp
  14. public int n_tokens;
  15. ```
  16. ### **tokens**
  17. Either `n_tokens` of `llama_token`, or `NULL`, depending on how this batch was created
  18. ```csharp
  19. public LLamaToken* tokens;
  20. ```
  21. ### **embd**
  22. Either `n_tokens * embd * sizeof(float)` or `NULL`, depending on how this batch was created
  23. ```csharp
  24. public Single* embd;
  25. ```
  26. ### **pos**
  27. the positions of the respective token in the sequence
  28. ```csharp
  29. public LLamaPos* pos;
  30. ```
  31. ### **n_seq_id**
  32. https://github.com/ggerganov/llama.cpp/blob/master/llama.h#L139 ???
  33. ```csharp
  34. public Int32* n_seq_id;
  35. ```
  36. ### **seq_id**
  37. the sequence to which the respective token belongs
  38. ```csharp
  39. public LLamaSeqId** seq_id;
  40. ```
  41. ### **logits**
  42. if zero, the logits for the respective token will not be output
  43. ```csharp
  44. public Byte* logits;
  45. ```