FaissNet 1.1.0

dotnet add package FaissNet --version 1.1.0
                    
NuGet\Install-Package FaissNet -Version 1.1.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="FaissNet" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FaissNet" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="FaissNet" />
                    
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 FaissNet --version 1.1.0
                    
#r "nuget: FaissNet, 1.1.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.
#addin nuget:?package=FaissNet&version=1.1.0
                    
Install FaissNet as a Cake Addin
#tool nuget:?package=FaissNet&version=1.1.0
                    
Install FaissNet as a Cake Tool

FaissNet

A faiss wrapper in dotnet.

Faiss is essentially a vector store for efficiently searching the nearest neighbors of a given set of vectors.

The primary use is for Generative AI applications, e.g. ChatGPT question and answering; Semantic Kernel; etc.

Current versions is for x64 Windows, however, as the underlying native wrapper is built with C++/CMake, support for other platforms is possible.

Example:

#r "nuget: FaissNet"
let d = 64
let sz = 10
use idx = FaissNet.Index.CreateDefault(d,FaissNet.MetricType.METRIC_L2)
let data = [|for i in 1 .. sz -> [| for j in 1 .. d -> if j%2 = 0 then -1.f else 1.f  |]|] 
let ids = [|for i in 1 .. sz -> int64 i|]
idx.AddWithIds(data,ids)
let srchVec = [|for i in 1 .. sz -> 1.f |]
let nbrDists,nbrIds = idx.Search([|srchVec|],2)
printfn $"nbrIds: {nbrIds}"
idx.Dispose()

See TestFaissX project for example usage.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on FaissNet:

Repository Stars
SteveSandersonMS/dotnet-ai-workshop
Version Downloads Last updated
1.1.0 10,126 7/19/2023
0.5.6 1,358 7/7/2023
0.5.5 1,103 7/6/2023
0.5.4 1,955 7/6/2023

Breaking changes due to switch from c++/cli to c++/cmake for native wrapper. Reduce package size