Namespace: LLama
A set of llava model weights (mmproj), loaded into memory.
public sealed class LLavaWeights : System.IDisposable
Inheritance Object → LLavaWeights
Implements IDisposable
The native handle, which is used in the native APIs
public SafeLlavaModelHandle NativeHandle { get; }
Remarks:
Be careful how you use this!
Load weights into memory
public static LLavaWeights LoadFromFile(string mmProject)
mmProject String
path to the "mmproj" model file
Create the Image Embeddings from the bytes of an image.
public SafeLlavaImageEmbedHandle CreateImageEmbeddings(LLamaContext ctxLlama, Byte[] image)
ctxLlama LLamaContext
image Byte[]
Image bytes. Supported formats:
JPGPNGBMPTGA
Create the Image Embeddings from the bytes of an image.
public SafeLlavaImageEmbedHandle CreateImageEmbeddings(LLamaContext ctxLlama, string image)
ctxLlama LLamaContext
image String
Path to the image file. Supported formats:
JPGPNGBMPTGA
Eval the image embeddings
public bool EvalImageEmbed(LLamaContext ctxLlama, SafeLlavaImageEmbedHandle imageEmbed, Int32& n_past)
ctxLlama LLamaContext
imageEmbed SafeLlavaImageEmbedHandle
n_past Int32&
public void Dispose()