ElBruno.LocalEmbeddings.Harrier
1.6.1
dotnet add package ElBruno.LocalEmbeddings.Harrier --version 1.6.1
NuGet\Install-Package ElBruno.LocalEmbeddings.Harrier -Version 1.6.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ElBruno.LocalEmbeddings.Harrier" Version="1.6.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ElBruno.LocalEmbeddings.Harrier" Version="1.6.1" />
<PackageReference Include="ElBruno.LocalEmbeddings.Harrier" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ElBruno.LocalEmbeddings.Harrier --version 1.6.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ElBruno.LocalEmbeddings.Harrier, 1.6.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ElBruno.LocalEmbeddings.Harrier@1.6.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ElBruno.LocalEmbeddings.Harrier&version=1.6.1
#tool nuget:?package=ElBruno.LocalEmbeddings.Harrier&version=1.6.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ElBruno.LocalEmbeddings.Harrier
High-quality multilingual embeddings using Microsoft Harrier-OSS-v1 locally with ONNX Runtime.
Installation
dotnet add package ElBruno.LocalEmbeddings.Harrier
Quick Start
using ElBruno.LocalEmbeddings.Harrier;
// Create with default settings (downloads INT8 quantized model on first run)
await using var generator = await HarrierEmbeddingGenerator.CreateAsync();
// Generate embeddings
var embeddings = await generator.GenerateAsync(["Hello world!", "Hola mundo!"]);
Console.WriteLine($"Dimensions: {embeddings[0].Vector.Length}"); // 640
Model Details
- Publisher: Microsoft (MIT license)
- Architecture: Decoder-only (Gemma 3 based)
- Parameters: 270M
- Embedding dimensions: 640
- Context window: 32,768 tokens
- Languages: 94+
- MTEB-v2 ranking: #1
- Default variant: INT8 Quantized (~270 MB)
Features
- 🦅 Top-ranked embedding model on MTEB-v2 — best semantic quality
- 🌍 Multilingual support — 94+ languages
- 📦 Multiple quantization variants — Choose between quality (FP32/FP16) and speed (INT8/Q4)
- 🎯 Instruction-tuned — Specify task-specific prefixes for better results
- 📚 Long context — Supports up to 32,768 tokens
- ⚡ ONNX Runtime — Runs locally on CPU, zero external API calls
- 🔒 Private by default — No data sent to external services
Configuration
var options = new HarrierEmbeddingsOptions
{
// Model variant (FP32, FP16, Quantized, Q4)
ModelVariant = HarrierModelVariant.Quantized,
// Instruction prefix for task-specific embeddings
InstructionPrefix = "Instruct: Retrieve semantically similar text\nQuery: ",
// Token limit
MaxSequenceLength = 8192,
// Cache and download
EnsureModelDownloaded = true,
CacheDirectory = null // Auto-detect per platform
};
await using var generator = await HarrierEmbeddingGenerator.CreateAsync(options);
Dependency Injection
using ElBruno.LocalEmbeddings.Harrier.Extensions;
using Microsoft.Extensions.AI;
services.AddHarrierEmbeddings(options =>
{
options.ModelVariant = HarrierModelVariant.Q4;
});
// Resolve as IEmbeddingGenerator<string, Embedding<float>>
var generator = serviceProvider.GetRequiredService<IEmbeddingGenerator<string, Embedding<float>>>();
Learn More
📖 Full Harrier Integration Guide — Instruction prefixes, configuration, troubleshooting, and migration from MiniLM.
🎬 HarrierConsoleApp Sample — Complete working example with 6 progressive scenarios.
License
MIT — See LICENSE
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- ElBruno.LocalEmbeddings (>= 1.6.1)
- Microsoft.ML.OnnxRuntime (>= 1.24.4)
- Microsoft.ML.Tokenizers (>= 2.0.0)
-
net8.0
- ElBruno.LocalEmbeddings (>= 1.6.1)
- Microsoft.ML.OnnxRuntime (>= 1.24.4)
- Microsoft.ML.Tokenizers (>= 2.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.6.1 | 93 | 8/17/2026 |
| 1.6.0 | 79 | 8/17/2026 |
| 1.5.9 | 123 | 8/2/2026 |
| 1.5.7 | 92 | 8/2/2026 |
| 1.5.5 | 101 | 8/2/2026 |
| 1.5.3 | 126 | 7/27/2026 |
| 1.5.1 | 116 | 7/19/2026 |
| 1.5.0 | 142 | 5/23/2026 |
| 1.4.6 | 127 | 4/28/2026 |
| 1.4.5 | 112 | 4/28/2026 |
| 1.4.3 | 155 | 4/7/2026 |
| 1.4.2 | 118 | 4/7/2026 |
| 1.4.1 | 112 | 4/7/2026 |
| 1.4.0 | 123 | 4/7/2026 |
| 1.0.1 | 110 | 5/20/2026 |