2.1 KiB
2.1 KiB
LLamaWeights
Namespace: LLama
A set of model weights, loaded into memory.
public sealed class LLamaWeights : System.IDisposable
Inheritance Object → LLamaWeights
Implements IDisposable
Properties
NativeHandle
The native handle, which is used in the native APIs
public SafeLlamaModelHandle NativeHandle { get; }
Property Value
Remarks:
Be careful how you use this!
Encoding
Encoding to use to convert text into bytes for the model
public Encoding Encoding { get; }
Property Value
VocabCount
Total number of tokens in vocabulary of this model
public int VocabCount { get; }
Property Value
ContextSize
Total number of tokens in the context
public int ContextSize { get; }
Property Value
EmbeddingSize
Dimension of embedding vectors
public int EmbeddingSize { get; }
Property Value
Methods
LoadFromFile(IModelParams)
Load weights into memory
public static LLamaWeights LoadFromFile(IModelParams params)
Parameters
params
IModelParams
Returns
Dispose()
public void Dispose()
CreateContext(IModelParams)
Create a llama_context using this model
public LLamaContext CreateContext(IModelParams params)
Parameters
params
IModelParams