Skip to content

LM-Kit/lm-kit-net-samples

Repository files navigation

🎉 Claim Your Free Community License!

Get started with the LM-Kit Community Edition today and gain access to powerful AI tools for free. Whether you're a hobbyist, startup, or open-source developer, the Community Edition is here to help you innovate and experiment without limitations.

👉 Claim Your Free License Now!


🚀 What’s New

👉 See full changelog


Enterprise-Grade .NET SDK for Integrating Generative AI Capabilities | Demo Repository

With LM-Kit.NET, integrating or building AI is no longer complex.

LM-Kit.NET is a cross-platform SDK that brings together LLMs (Large Language Models) and SLMs (Small Language Models) for an extensive range of AI functionalities. It enables Quick-Start AI Agents, supports multi-agent orchestration, and offers a consistent API for C# and VB.NET. Whether you want to customize existing AI agents or build new ones, LM-Kit.NET provides a robust and streamlined approach to modern AI development.

AI Agent Runtime for .NET

Product Overview & API Reference

LM-Kit.NET delivers Multimodal Generative AI solutions for .NET, facilitating the creation and customization of AI Agents as well as comprehensive multi-agent coordination. Its capabilities, ranging from data processing, text analysis, and translation to text generation and model optimization—integrate smoothly into your .NET projects. By leveraging cutting-edge AI techniques, LM-Kit.NET empowers developers to build advanced solutions with minimal complexity.

👉 Find additional documentation and detailed guides in the LM-Kit Docs: https://docs.lm-kit.com


Extensive Feature Set

LM-Kit.NET offers a wide array of advanced AI features that can be seamlessly integrated into your .NET applications:

  • Interactive Question & Answering
    Deliver concise responses to user queries, handling both single-turn and multi-turn interactions.

  • Automated Text Generation
    Dynamically create context-appropriate content tailored to your needs.

  • Structured Text Creation
    Enforce output formats using JSON schemas, grammar constraints, templates, or other structural rules.

  • Grammar & Spelling Correction
    Automatically enhance content quality by fixing errors in spelling and syntax.

  • Style-Specific Rewriting
    Adjust the tone or style of text to align with specific communication goals.

  • Seamless Language Translations
    Convert text between different languages without compromising context or accuracy.

  • Speech-to-Text
    Convert spoken audio into highly accurate text transcripts, supporting 100+ languages.

  • Accurate Language Identification
    Determine the original language of any given text with high precision.

  • Concise Text Summaries
    Produce clear, focused summaries from extensive documents for faster comprehension.

  • Quality Assessment
    Evaluate text quality using various metrics, ensuring relevance and clarity.

  • RAG-Enhanced Generation
    Elevate text output by retrieving pertinent information from external repositories.

  • Dynamic Function Invocation
    Invoke specialized functions in your application on-demand to handle diverse tasks.

  • Semantic Embeddings
    Transform textual or image data into meaningful numeric representations for improved retrieval and analysis.

  • Customizable Data Extraction
    Extract and organize information from diverse sources using flexible schemas.

  • Tailored Classification
    Assign text to predefined categories, streamlining workflows and content management.

  • Sentiment & Emotion Analysis
    Detect the emotional stance of text and pinpoint specific feelings.

  • Sarcasm Detection
    Recognize ironic or sarcastic nuances in written material.

  • Keyword Mining
    Isolate critical terms and phrases from large datasets with ease.

  • Code Processing
    Analyze and transform programming code for enhanced development efficiency.

  • Image Analysis (Vision Support)
    Extend AI capabilities to interpret and evaluate images.

  • Multimodal Named Entity Recognition
    Detect and classify entities (people, organizations, locations, etc.) across text and images.

  • Multimodal PII Extraction
    Identify and extract personally identifiable information from text and images for compliance.

  • Model Quantization & Optimization
    Streamline both LLMs and SLMs for faster inference and lower computational overhead.

  • Fine-Tuning & LoRA Integration
    Adapt base models to meet domain-specific needs, incorporating Low-Rank Adaptation (LoRA) for efficient training.

  • And More…
    Explore additional features to supercharge your AI-driven solutions.


Run Local LLMs and SLMs on Any Device

LM-Kit.NET is powered by llama.cpp, ensuring best-in-class performance across a variety of hardware setups with minimal configuration and zero external dependencies.
All processing happens on-device (edge computing), giving you full control and tunability for inference. Additionally, LM-Kit.NET supports an expanding list of model architectures, including Gemma-3, LLaMA-3, LLaMA-4, Mistral, Falcon, Phi 4, Qwen2.5-VL, and more.


Maximized Performance

1. 🚀 Optimized for a Variety of GPUs and CPUs

Leverage CUDA on NVIDIA GPUs, Metal on Apple devices, and Vulkan for multi-GPU setups (AMD, Intel, NVIDIA), ensuring top-tier performance regardless of your hardware.

2. ⚙️ Advanced Architectural Foundations

Enjoy a core system optimized for diverse scenarios, with advanced caching and resource recycling that enables consistent high performance in single or multi-instance environments.

3. 🌟 Unmatched Performance

Experience up to 5x faster inference speeds, backed by continuous refinements and rigorous benchmarking to keep you ahead of the competition.


Retain Complete Control Over Your Data

All inference is performed locally, meaning no data ever leaves your device. This ensures:

  1. Enhanced Privacy
    Eliminates the need to send sensitive data to external servers.

  2. Increased Security
    Minimizes risks of interception or unauthorized access.

  3. Faster Response Times
    Reduces latency by avoiding remote server round trips.

  4. Lower Bandwidth Usage
    Cuts down on internet data transfer, ideal for limited connectivity.

  5. Regulatory Compliance
    Helps satisfy GDPR, HIPAA, and other data protection requirements by keeping data on-premises.


Easy Integration and Simple Deployment

LM-Kit.NET is distributed as a single NuGet package, making it incredibly easy to include in your .NET applications:

  1. Streamlined Integration
    No need for containers or complex setup—just a few clicks in Visual Studio or your preferred .NET IDE.

  2. Direct In-Process Execution
    Avoid the overhead of additional services or containers, reducing latency and simplifying deployments.

  3. Efficient Resource Management
    Operates within your existing .NET process, making it suitable for resource-constrained environments.

  4. Enhanced Reliability
    By steering clear of external dependencies, LM-Kit.NET offers stable and predictable performance.


Supported Operating Systems

  • Windows: From Windows 7 to the latest release
  • macOS: macOS 11 and above
  • Linux: Distributions with glibc 2.27 or newer

Supported .NET Frameworks

  • .NET 4.6.2 through .NET 9

Hugging Face Integration

Explore the LM-Kit section on Hugging Face for quantized models tested with LM-Kit.NET. You can also seamlessly load models from Hugging Face repositories using the Hugging Face API, simplifying model discovery and deployment.

Languages