mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-31 10:53:53 +00:00
updated copy and cleaned up files
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
This commit is contained in:
parent
1d9e74e373
commit
1ac05d3a2a
3 changed files with 10 additions and 161 deletions
|
|
@ -13,32 +13,33 @@ That means you're not limited to storing vectors in memory or in a separate serv
|
|||
- Fully integrated with Llama Stacks
|
||||
- Uses disk-based storage for persistence, allowing for larger vector storage
|
||||
|
||||
### Comparison to faiss
|
||||
### Comparison to Faiss
|
||||
|
||||
SQLite-Vec is a lightweight alternative to Faiss, which is a popular vector database provider.
|
||||
While faiss is a powerful, fast, and lightweight in line provider, faiss reindexes the
|
||||
entire database when a new vector is added. SQLite-Vec is a disk-based storage provider
|
||||
While Faiss is a fast, lightweight and powerful inline provider, Faiss reindexes the
|
||||
entire database when a new vector is added. SQLite-Vec is a disk-based storage provider
|
||||
that allows for larger vector storage and handles incremental writes more efficiently.
|
||||
|
||||
sqlite-vec is a great alternative to faiss when you need to execute several writes to the
|
||||
SQLite-vec is a great alternative to Faiss when you need to execute several writes to the
|
||||
database.
|
||||
|
||||
Consider the histogram below in which 10,000 randomly generated strings were inserted
|
||||
in batches of 100 into both `faiss` and `sqlite-vec` using `client.tool_runtime.rag_tool.insert()`.
|
||||
Consider the histogram below in which 10,000 randomly generated strings were inserted
|
||||
in batches of 100 into both Faiss and SQLite-vec using `client.tool_runtime.rag_tool.insert()`.
|
||||
|
||||
```{image} ../../../../_static/providers/vector_io/write_time_comparison_sqlite-vec-faiss.png
|
||||
:alt: Comparison of SQLite-Vec and Faiss write times
|
||||
:width: 400px
|
||||
```
|
||||
|
||||
You will notice that the average write time for `sqlite-vec` was 788ms, compared to
|
||||
47,640ms for faiss. While the number is jarring, if you look at the distribution, you'll notice that it is rather uniformly spread across the [1500, 100000] interval.
|
||||
You will notice that the average write time for `sqlite-vec` was 788ms, compared to
|
||||
47,640ms for Faiss. While the number is jarring, if you look at the distribution, you can see that it is rather
|
||||
uniformly spread across the [1500, 100000] interval.
|
||||
|
||||
```{image} ../../../../_static/providers/vector_io/write_time_sequence_sqlite-vec-faiss.png
|
||||
:alt: Comparison of SQLite-Vec and Faiss write times
|
||||
:width: 400px
|
||||
```
|
||||
For more information about this discussion see [the GitHub Issue](https://github.com/meta-llama/llama-stack/issues/1165)
|
||||
For more information about this topic see [the GitHub Issue](https://github.com/meta-llama/llama-stack/issues/1165)
|
||||
where this was discussed.
|
||||
|
||||
## Usage
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue