You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
try
{
unsafe
{
var parameters = new ModelParams(modelPath)
{
ContextSize = 1024, // The longest length of chat as memory.
GpuLayerCount = 5 // How many layers to offload to GPU. Please adjust it according to your GPU memory.
};
}
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
I use .net Framework 4.8.
Installing LLamaSharp worked just fine. But when I try to install LLamaSharp.Backend.Cuda12 or LLamaSharp.Backend.Cpu(installed one at a time) the package istn't included in the references. I tried reinstalling it multiple times and I can't execute NativeLibraryConfig.Instance.WithLogs(); either because it says "Severity Code Description Project File Line Suppression State Error (active) CS1061 'NativeLibraryConfigContainer' does not contain a definition for 'WithLogs' and no accessible extension method 'WithLogs' accepting a first argument of type 'NativeLibraryConfigContainer' could be found (are you missing a using directive or an assembly reference?)"
I also downloaded the repo and it worked just fine. I guess there is an error on my side but I just don't know what to do anymore.
Reproduction Steps
Install LLamaSharp package
Install a LLamaSharp.Backend package
LLamaSharp.Backend isnt included in references (LlamaSharp is)
Environment & Configuration
Operating system:
.NET runtime version:
LLamaSharp version:
CUDA version (if you are using cuda backend):
CPU & GPU device:
Known Workarounds
No response
The text was updated successfully, but these errors were encountered:
Description
I try to run the example for LLamasharp. At the moment I just got
using LLama.Common;
using LLama;
using LLama.Native;
string modelPath = @"C:\dev\llama-2-7b-chat.Q4_K_M.gguf";
try
{
unsafe
{
var parameters = new ModelParams(modelPath)
{
ContextSize = 1024, // The longest length of chat as memory.
GpuLayerCount = 5 // How many layers to offload to GPU. Please adjust it according to your GPU memory.
};
}
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
I use .net Framework 4.8.
Installing LLamaSharp worked just fine. But when I try to install LLamaSharp.Backend.Cuda12 or LLamaSharp.Backend.Cpu(installed one at a time) the package istn't included in the references. I tried reinstalling it multiple times and I can't execute NativeLibraryConfig.Instance.WithLogs(); either because it says "Severity Code Description Project File Line Suppression State Error (active) CS1061 'NativeLibraryConfigContainer' does not contain a definition for 'WithLogs' and no accessible extension method 'WithLogs' accepting a first argument of type 'NativeLibraryConfigContainer' could be found (are you missing a using directive or an assembly reference?)"
I also downloaded the repo and it worked just fine. I guess there is an error on my side but I just don't know what to do anymore.
Reproduction Steps
Environment & Configuration
Known Workarounds
No response
The text was updated successfully, but these errors were encountered: