c0sogi / LLMChat

A full-stack Webui implementation of Large Language model, such as ChatGPT or LLaMA.
MIT License
257 stars 45 forks source link

Replace Redis #17

Closed Torhamilton closed 1 year ago

Torhamilton commented 1 year ago

Lets implement qdrant for embeddings. Use Redis for what it's good at - caching chats. Qdrant is fast and stable and excellent at search and filtering see benchmark. Redis single thread execution is bad for vertical scaling. Down the road we should allow BYOD (bring your own db)

Please implement as separate docker for independent scaling docker run -p 6333:6333 qdrant/qdrant

c0sogi commented 1 year ago

Since many of my projects already rely on redis, replacing the database is a very difficult task. Modify that code and request a pull request.

What's more, REDIS is not a CPU-bound operation, so it can handle 100,000+ requests per second quickly, even if it's single-threaded.

Torhamilton commented 1 year ago

I am looking into qdrant and will make a pr once I make progress. This stuff is not for Redis - we need capabilities to insert, delete, filter, advance operations with indices etc. We want to offload this task and reduce memory requirements

Torhamilton commented 1 year ago

I will close this for now until need is critical.