FaissNet 1.1.0
dotnet add package FaissNet --version 1.1.0
NuGet\Install-Package FaissNet -Version 1.1.0
<PackageReference Include="FaissNet" Version="1.1.0" />
paket add FaissNet --version 1.1.0
#r "nuget: FaissNet, 1.1.0"
// Install FaissNet as a Cake Addin #addin nuget:?package=FaissNet&version=1.1.0 // Install FaissNet as a Cake Tool #tool nuget:?package=FaissNet&version=1.1.0
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 | Versions 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. |
-
net6.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Breaking changes due to switch from c++/cli to c++/cmake for native wrapper. Reduce package size