LMSupply.Embedder
0.112.0
See the version list below for details.
dotnet add package LMSupply.Embedder --version 0.112.0
NuGet\Install-Package LMSupply.Embedder -Version 0.112.0
<PackageReference Include="LMSupply.Embedder" Version="0.112.0" />
<PackageVersion Include="LMSupply.Embedder" Version="0.112.0" />
<PackageReference Include="LMSupply.Embedder" />
paket add LMSupply.Embedder --version 0.112.0
#r "nuget: LMSupply.Embedder, 0.112.0"
#:package LMSupply.Embedder@0.112.0
#addin nuget:?package=LMSupply.Embedder&version=0.112.0
#tool nuget:?package=LMSupply.Embedder&version=0.112.0
LMSupply.Embedder
Local text embedding for .NET with automatic model downloading.
Features
- Zero-config: Models download automatically from HuggingFace
- GPU Acceleration: CUDA, DirectML (Windows), CoreML (macOS)
- Cross-platform: Windows, Linux, macOS
- Simple API: Just 2 lines of code to get started
Quick Start
using LMSupply.Embedder;
// Load the default model
await using var model = await LocalEmbedder.LoadAsync("default");
// Generate embeddings
float[] embedding = await model.EmbedAsync("Hello, world!");
Console.WriteLine($"Dimensions: {embedding.Length}");
Query/Passage Embeddings
Some models (the E5 family, Nomic) are fine-tuned with a text-prefix convention — query embeddings
and document/passage embeddings need different prefixes for accurate retrieval, and text with no
retrieval role (similarity, clustering) takes a third. Every entry point applies the model's own
convention from its ModelInfo (a no-op for models that don't need one):
| Method | Prefix applied | E5 | Nomic |
|---|---|---|---|
EmbedAsync |
DefaultPrefix — similarity, clustering, features |
query: |
clustering: |
EmbedQueryAsync |
QueryPrefix — the search side of retrieval |
query: |
search_query: |
EmbedPassageAsync |
PassagePrefix — what retrieval searches |
passage: |
search_document: |
EmbedRawAsync |
none — the text as given, for text that already carries its instruction |
await using var model = await LocalEmbedder.LoadAsync("multilingual-e5-base");
float[] queryEmbedding = await model.EmbedQueryAsync("what is the capital of France?");
float[] passageEmbedding = await model.EmbedPassageAsync("Paris is the capital of France.");
Batch and Matryoshka-truncated (dimensions:) overloads exist for all four. A model loaded by
repository id takes these from config_sentence_transformers.json (prompts and
default_prompt_name), as sentence-transformers does.
Available Models
Four standard aliases (LocalEmbedder.LoadAsync("default"), etc.) plus a longer list of models
loadable by their explicit short name (LocalEmbedder.LoadAsync("multilingual-e5-base")).
Aliases
| Alias | Model | Dimensions | Prefix | Description |
|---|---|---|---|---|
default |
BAAI/bge-m3 | 1024 | — | 568M params, 100+ languages, 8K context, SOTA multilingual |
fast |
intfloat/multilingual-e5-small | 384 | query/passage | 118M params, 100+ languages, lightweight |
quality |
BAAI/bge-m3 | 1024 | — | Same model as default; exposed separately for pipelines that explicitly request the quality tier |
large |
intfloat/multilingual-e5-large | 1024 | query/passage | 560M params, 100+ languages, highest dense quality (512-token context limit — use default for long documents) |
Explicit models (by short name)
| Model | Dimensions | Prefix | Description |
|---|---|---|---|
nomic-embed-text-v1.5 |
768 (Matryoshka 64–768) | search_query/search_document | 137M params, English-first, 8K context |
all-mpnet-base-v2 |
768 | — | 110M params, legacy quality model, English |
bge-base-en-v1.5 |
768 | query instruction | 110M params, excellent quality, English |
bge-large-en-v1.5 |
1024 | query instruction | 335M params, highest accuracy BGE, English |
e5-small-v2 |
384 | query/passage | 33M params, English |
e5-base-v2 |
768 | query/passage | 110M params, excellent retrieval, English |
multilingual-e5-small |
384 | query/passage | 118M params, 100+ languages, compact |
multilingual-e5-base |
768 | query/passage | 278M params, 100+ languages, quality |
multilingual-e5-large |
1024 | query/passage | 560M params, 100+ languages, highest quality |
gte-large-en-v1.5 |
1024 | — | 434M params, 8K context, highest accuracy GTE |
"Prefix" marks models fine-tuned with a prefix convention (see
Query/Passage Embeddings above): "query instruction" means only the
retrieval query takes one (BGE English v1.5: Represent this sentence for searching relevant passages: ,
applied by EmbedQueryAsync); — means the model needs no prefix and
EmbedAsync/EmbedQueryAsync/EmbedPassageAsync embed its text as given.
GPU Acceleration
Do not add ONNX Runtime packages (Microsoft.ML.OnnxRuntime*): LMSupply provisions the runtime itself, and a
second copy conflicts with it. ExecutionProvider.Auto uses CUDA when the CUDA 12 runtime and cuDNN 9 are
installed on the machine, CoreML on macOS, and the CPU otherwise. On Windows with an AMD or Intel GPU, ONNX
sessions run on the CPU (DirectML was removed in 0.67.0). See
GPU acceleration.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- LMSupply.Core (>= 0.112.0)
- LMSupply.Llama (>= 0.112.0)
- LMSupply.Text.Core (>= 0.112.0)
- Microsoft.Extensions.AI.Abstractions (>= 10.10.1)
- System.Numerics.Tensors (>= 10.0.12)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on LMSupply.Embedder:
| Package | Downloads |
|---|---|
|
FluxIndex.Providers.LMSupply
LMSupply local AI embedding, reranking, and text completion provider for FluxIndex |
|
|
FileFlux.Providers.LMSupply
LMSupply local ONNX model provider for FileFlux: document analysis (summarization, metadata extraction), embeddings, OCR, image captioning, and speech transcription — no API key required. |
|
|
IronHive.Cli.Core
IronHive CLI Core - Agent loop, tools, session management, and provider integrations for building AI-powered CLI tools |
|
|
IronHive.Host.Core
IronHive Host Core - Agent loop, tools, session management, and provider integrations for building reusable AI agent hosts (CLI, server, embedded) |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.115.1 | 62 | 10/8/2026 |
| 0.115.0 | 33 | 10/8/2026 |
| 0.114.0 | 53 | 10/8/2026 |
| 0.113.0 | 81 | 10/8/2026 |
| 0.112.1 | 56 | 10/7/2026 |
| 0.112.0 | 60 | 10/7/2026 |
| 0.111.0 | 167 | 10/7/2026 |
| 0.110.1 | 77 | 10/7/2026 |
| 0.110.0 | 92 | 10/7/2026 |
| 0.109.1 | 79 | 10/7/2026 |
| 0.109.0 | 226 | 10/7/2026 |
| 0.108.0 | 279 | 10/6/2026 |
| 0.107.0 | 195 | 10/6/2026 |
| 0.106.1 | 122 | 10/5/2026 |
| 0.106.0 | 307 | 10/5/2026 |
| 0.105.2 | 221 | 10/4/2026 |
| 0.105.1 | 172 | 10/4/2026 |
| 0.105.0 | 199 | 10/4/2026 |
| 0.104.0 | 204 | 10/3/2026 |
| 0.103.0 | 147 | 10/3/2026 |