本地AI推理库 是 AI Skill Hub 本期精选AI工具之一。综合评分 8.0 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
本地AI推理库 是一款基于 C# 开发的开源工具,专注于 ai、dotnet、llm 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
本地AI推理库 是一款基于 C# 开发的开源工具,专注于 ai、dotnet、llm 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 克隆仓库 git clone https://github.com/iyulab/lm-supply cd lm-supply # 查看安装说明 cat README.md # 按 README 完成环境依赖安装后即可使用
# 查看帮助 lm-supply --help # 基本运行 lm-supply [options] <input> # 详细使用说明请查阅文档 # https://github.com/iyulab/lm-supply
# lm-supply 配置说明 # 查看配置选项 lm-supply --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export LM_SUPPLY_CONFIG="/path/to/config.yml"
Local Model Supply for .NET — on-demand AI inference
<p align="center"> <img src="images/1.png" width="49%" alt="LMSupply Console"/> <img src="images/2.png" width="49%" alt="LMSupply Console"/> </p> <p align="center"> <img src="images/3.png" width="49%" alt="LMSupply Console"/> <img src="images/4.png" width="49%" alt="LMSupply Console"/> </p>
Start small. Download what you need. Run locally.
// This is all you need. No setup. No configuration. No API keys.
await using var model = await LocalEmbedder.LoadAsync("auto"); // Hardware-optimized selection
float[] embedding = await model.EmbedAsync("Hello, world!");
LMSupply is designed around three core principles:
Under ExecutionProvider.Auto the llama-server backend is chosen by LlamaBackendSelector (shared by the generator, embedder, and reranker, so all three agree). Vendor decides the GPU backend (NVIDIA→CUDA, Apple→Metal, AMD→ROCm/Vulkan, modern Intel iGPU→Vulkan), but a dedicated-VRAM backend is demoted to CPU when the VRAM budget is below LlamaBackendSelector.MinVramForGpuOffloadBytes (2 GB) — at that point zero model layers would offload, so spinning up a GPU llama-server binary only pays initialization cost for no acceleration. This is the common case on integrated GPUs (e.g. Intel Iris Xe, where DXGI reports ~128 MB of dedicated VRAM for a shared-memory adapter): Auto now picks CPU directly instead of downloading/initializing Vulkan for a 0-layer offload. Metal is exempt (Apple Silicon uses unified memory). Set LMSUPPLY_VRAM_BUDGET_MB to override the budget and keep the GPU backend; an explicit GPU pin (Cuda/DirectML/CoreML) is never demoted.
| Package | Description | Status |
|---|---|---|
| [LMSupply.Embedder](docs/embedder.md) | Text → Vector embeddings (ONNX + GGUF) | [](https://www.nuget.org/packages/LMSupply.Embedder) |
| [LMSupply.Reranker](docs/reranker.md) | Semantic reranking for search | [](https://www.nuget.org/packages/LMSupply.Reranker) |
| [LMSupply.Generator](docs/generator.md) | Text generation & chat (ONNX + GGUF) | [](https://www.nuget.org/packages/LMSupply.Generator) |
| [LMSupply.Captioner](docs/captioner.md) | Image → Text captioning | [](https://www.nuget.org/packages/LMSupply.Captioner) |
| [LMSupply.Ocr](docs/ocr.md) | Document OCR | [](https://www.nuget.org/packages/LMSupply.Ocr) |
| [LMSupply.Detector](docs/detector.md) | Object detection | [](https://www.nuget.org/packages/LMSupply.Detector) |
| [LMSupply.Segmenter](docs/segmenter.md) | Image segmentation | [](https://www.nuget.org/packages/LMSupply.Segmenter) |
| [LMSupply.Translator](docs/translator.md) | Neural machine translation | [](https://www.nuget.org/packages/LMSupply.Translator) |
| [LMSupply.Transcriber](docs/transcriber.md) | Speech → Text (Whisper) | [](https://www.nuget.org/packages/LMSupply.Transcriber) |
| [LMSupply.Synthesizer](docs/synthesizer.md) | Text → Speech (Piper) | [](https://www.nuget.org/packages/LMSupply.Synthesizer) |
| [LMSupply.Llama](docs/llama.md) | Shared llama-server management for GGUF | [](https://www.nuget.org/packages/LMSupply.Llama) |
---
Do NOT install ONNX Runtime packages manually. LMSupply handles runtime binary management automatically via lazy downloading.
If you have conflicting packages installed, remove them:
dotnet remove package Microsoft.ML.OnnxRuntime
dotnet remove package Microsoft.ML.OnnxRuntime.Gpu
dotnet remove package Microsoft.ML.OnnxRuntime.DirectML
For NVIDIA CUDA support, ensure you have: - NVIDIA GPU drivers installed - CUDA 11.x or 12.x runtime (LMSupply auto-selects the appropriate version)
---
高效的本地AI模型推理库,易于集成
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,本地AI推理库 在AI工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | lm-supply |
| Topics | aidotnetllmlocal-inferencemachine-learningc# |
| GitHub | https://github.com/iyulab/lm-supply |
| License | MIT |
| 语言 | C# |
收录时间:2026-06-21 · 更新时间:2026-06-21 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。