VOOZH about

URL: https://www.nuget.org/packages/ElBruno.LocalEmbeddings.Harrier

⇱ NuGet Gallery | ElBruno.LocalEmbeddings.Harrier 1.5.0




👁 Image
ElBruno.LocalEmbeddings.Harrier 1.5.0

dotnet add package ElBruno.LocalEmbeddings.Harrier --version 1.5.0
 
 
NuGet\Install-Package ElBruno.LocalEmbeddings.Harrier -Version 1.5.0
 
 
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.5.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ElBruno.LocalEmbeddings.Harrier" Version="1.5.0" />
 
Directory.Packages.props
<PackageReference Include="ElBruno.LocalEmbeddings.Harrier" />
 
Project file
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.5.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ElBruno.LocalEmbeddings.Harrier, 1.5.0"
 
 
#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.5.0
 
 
#: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.5.0
 
Install as a Cake Addin
#tool nuget:?package=ElBruno.LocalEmbeddings.Harrier&version=1.5.0
 
Install as a Cake Tool
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

📖 — Instruction prefixes, configuration, troubleshooting, and migration from MiniLM.

🎬 — Complete working example with 6 progressive scenarios.

License

MIT — See

Product Versions Compatible and additional computed target framework versions.
.NET net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 is compatible.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.5.0 107 5/23/2026
1.4.6 113 4/28/2026
1.4.5 101 4/28/2026
1.4.3 144 4/7/2026
1.4.2 108 4/7/2026
1.4.1 103 4/7/2026
1.4.0 112 4/7/2026
1.0.1 94 5/20/2026