Discover and explore top open-source AI tools and projects—updated daily.
C#/.NET library for local LLM inference (LLaMA/LLaVA, etc.)
Top 14.4% on SourcePulse
LLamaSharp provides a C#/.NET library for efficient local execution of Large Language Models (LLMs) like LLaMA and LLaVA. It targets .NET developers seeking to integrate LLM capabilities into their applications, offering RAG support and higher-level APIs for ease of use.
How It Works
LLamaSharp is built upon the llama.cpp
project, leveraging its optimized C++ backend for efficient inference on both CPU and GPU (CUDA, Metal, Vulkan). This approach allows .NET applications to benefit from the performance optimizations of llama.cpp
without requiring direct C++ development. The library abstracts the complexities of model loading and inference, providing a managed interface for .NET developers.
Quick Start & Requirements
PM> Install-Package LLamaSharp
LLamaSharp.Backend.Cuda12
, LLamaSharp.Backend.Cpu
).Highlighted Details
LLamaSharp.kernel-memory
.Maintenance & Community
llama.cpp
commits.Licensing & Compatibility
Limitations & Caveats
The project requires careful matching of backend packages to system configurations (e.g., CUDA version). Compatibility between LLamaSharp versions and specific llama.cpp
commits is crucial, as noted in the version table, and using mismatched commits can lead to crashes.
2 days ago
1 day