LLamaSharp  by SciSharp

C#/.NET library for local LLM inference (LLaMA/LLaVA, etc.)

Created 2 years ago
3,355 stars

Top 14.4% on SourcePulse

GitHubView on GitHub
Project Summary

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

Highlighted Details

  • Cross-platform support for Windows, Linux, and macOS.
  • GPU acceleration via CUDA, Metal, and Vulkan.
  • Integrations with popular frameworks like Semantic Kernel, Kernel Memory, Langchain, and BotSharp.
  • Numerous examples available, including Unity, Blazor, and ASP.NET integrations.
  • Supports RAG (Retrieval Augmented Generation) via LLamaSharp.kernel-memory.

Maintenance & Community

  • Active development with regular releases.
  • Community chat available on Discord.
  • Detailed contributor wall of fame and version mapping to llama.cpp commits.

Licensing & Compatibility

  • MIT License.
  • Permissive license suitable for commercial use and integration into closed-source applications.

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.

Health Check
Last Commit

2 days ago

Responsiveness

1 day

Pull Requests (30d)
6
Issues (30d)
10
Star History
38 stars in the last 30 days

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Gabriel Almeida Gabriel Almeida(Cofounder of Langflow), and
2 more.

torchchat by pytorch

0.1%
4k
PyTorch-native SDK for local LLM inference across diverse platforms
Created 1 year ago
Updated 1 week ago
Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Anil Dash Anil Dash(Former CEO of Glitch), and
23 more.

llamafile by Mozilla-Ocho

0.1%
23k
Single-file LLM distribution and runtime via `llama.cpp` and Cosmopolitan Libc
Created 2 years ago
Updated 2 months ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Vincent Weisser Vincent Weisser(Cofounder of Prime Intellect), and
7 more.

dalai by cocktailpeanut

0%
13k
Local LLM inference via CLI tool and Node.js API
Created 2 years ago
Updated 1 year ago
Feedback? Help us improve.