LLamaTokenDataArrayNative
Namespace: LLama.Native
Contains a pointer to an array of LLamaTokenData which is pinned in memory.
1 |
|
Inheritance Object → ValueType → LLamaTokenDataArrayNative
Remarks:
C# equivalent of llama_token_data_array
Properties
Data
A pointer to an array of LlamaTokenData
1 |
|
Property Value
Sorted
Indicates if the items in the array are sorted, so the most likely token is first
1 |
|
Property Value
Selected
The index of the selected token (i.e. not the token id)
1 |
|
Property Value
Size
Number of LLamaTokenData in the array. Set this to shrink the array
1 |
|
Property Value
Methods
Create(LLamaTokenDataArray, LLamaTokenDataArrayNative&)
Create a new LLamaTokenDataArrayNative around the data in the LLamaTokenDataArray
1 |
|
Parameters
array
LLamaTokenDataArray
Data source
native
LLamaTokenDataArrayNative&
Created native array
Returns
MemoryHandle
A memory handle, pinning the data in place until disposed