EmbedAnything is a powerful python library designed to streamline the creation and management of embedding pipelines

Overview

Framework for building local and multimodal embeddings built in Rust πŸ¦€

Downloads Open in Colab license license

EmbedAnything is a powerful python library designed to streamline the creation and management of embedding pipelines. Whether you're working with text, images, audio, or any other type of data., EmbedAnything makes it easy to generate embeddings from multiple sources and store them efficiently in a vector database.

πŸ¦€The Benefit of Rust for Speed

By using Rust for its core functionalities, EmbedAnything offers significant speed advantages: Rust is Compiled: Unlike Python, Rust compiles directly to machine code, resulting in faster execution. Memory Management: Rust enforces memory management simultaneously, preventing memory leaks and crashes that can plague other languages. Rust achieves true multithreading.

πŸš€Why Candle?...

Running language models or embedding models locally can be difficult, especially when you want to deploy a product that utilizes these models. If you use the transformers library from Hugging Face in Python, you will depend on PyTorch for tensor operations. This, in turn, has a dependency on Libtorch, which means that you will need to include the entire Libtorch library with your product. Also, Candle allows inferences on CUDA-enabled GPUs right out of the box. We will soon post on how we use Candle to increase the performance and decrease the memory usage of EmbedAnything.

Examples

  1. Image Search: Open in Colab

Watch the demo

πŸš€ Key Features

  • Local Embedding Works with local embedding models like AllminiLM
  • MultiModality Works with text and image and will soon expand to audio
  • Python Interface: Packaged as a Python library for seamless integration into your existing projects.
  • Efficient: Optimized for speed and performance, with core functionality written in Rust.
  • Scalable: Store embeddings in a vector database for easy retrieval and scalability.
  • OpenAI Works with openai as well

πŸ’š Installation

pip install embed-anything

πŸ§‘β€πŸš€ Getting Started

For local models

To use local embedding: we support Bert and Jina

import embed_anything
data = embed_anything.embed_file("filename.pdf", embeder= "Bert")
embeddings = np.array([data.embedding for data in data])

For multimodal embedding: we support CLIP

Requirements Directory with pictures you want to search for example we have test_files with images of cat, dogs etc

import embed_anything
data = embed_anything.embed_directory("test_files", embeder= "Clip")
embeddings = np.array([data.embedding for data in data])

query = "photo of a dog"
query_embedding = np.array(embed_anything.embed_query(query, embeder= "Clip")[0].embedding)
similarities = np.dot(embeddings, query_embedding)
max_index = np.argmax(similarities)
Image.open(data[max_index].text).show()

For OpenAI

  1. Please check if you already have the OpenAI key in the Environment variable.

If you are using embed-anything==0.1.7 version (latest version)

import embed_anything
data = embed_anything.embed_file("filename.pdf", embeder= "OpenAI")
embeddings = np.array([data.embedding for data in data])

🚧 Contributing to EmbedAnything

First of all, thank you for taking the time to contribute to this project. We truly appreciate your contributions, whether it's bug reports, feature suggestions, or pull requests. Your time and effort are highly valued in this project. πŸš€

This document provides guidelines and best practices to help you to contribute effectively. These are meant to serve as guidelines, not strict rules. We encourage you to use your best judgment and feel comfortable proposing changes to this document through a pull request.

Table of Content:

  1. [Code of conduct]
  2. [Quick Start]

βœ”οΈ Code of Conduct:

Please read our [Code of Conduct] to understand the expectations we have for all contributors participating in this project. By participating, you agree to abide by our Code of Conduct.

πŸš€ Quick Start

You can quickly get started with contributing by searching for issues with the labels "Good First Issue" or "Help Needed" in the [Issues Section]. If you think you can contribute, comment on the issue and we will assign it to you.

To set up your development environment, please follow the steps mentioned below :

  1. Fork the repository and create a clone of the fork
  2. Create a branch for a feature or a bug you are working on in your fork
  3. If you are working with OpenAI make sure you have the keys

Contributing Guidelines

πŸ” Reporting Bugs

  1. Title describing the issue clearly and concisely with relevant labels
  2. Provide a detailed description of the problem and the necessary steps to reproduce the issue.
  3. Include any relevant logs, screenshots, or other helpful information supporting the issue.

πŸ’‘ New Feature or Suggesting Enhancements

β˜‘οΈ ToDo

  • Vector Database Add functionalities to integrate with any Vector Database
You might also like...
Need a powerful and simple library to work with arithmetic progressions in Rust? You should definitively try out ariprog!

Ariprog I had a test (03/2024) on arithmetic progressions, so I decided to create a library to study math. Taking advantage of the fact that I was stu

πŸͺž Powerful reflection library for Rust

πŸͺž mirror-mirror Powerful reflection library for Rust 🚨 Warning 🚨 This library is still experimental and should not be used for anything serious, ye

A lightweight but incredibly powerful and feature-rich BitTorrent tracker. Supports UDP + HTTP(S) and a private tracker mode.

Torrust Tracker Project Description Torrust Tracker is a lightweight but incredibly powerful and feature-rich BitTorrent tracker made using Rust. Feat

Leptos Query - a robust asynchronous state management library for Leptos,

Leptos Query is a robust asynchronous state management library for Leptos, providing simplified data fetching, integrated reactivity, server-side rendering support, and intelligent cache management.

Simpler and more powerful replacement for `find`

FindFile (FF) An simple, ergonomic, and powerful replacement for find. Note: this repo is under active development The syntax is (mostly) figured out,

Simple yet powerful multi-line text editor widget for tui-rs and ratatui
Simple yet powerful multi-line text editor widget for tui-rs and ratatui

tui-textarea tui-textarea is a simple yet powerful text editor widget like textarea in HTML for tui-rs and ratatui. Multi-line text editor can be ea

Rustle:  a powerful download manager and accelerator written in Rust
Rustle: a powerful download manager and accelerator written in Rust

Rustle Rustle: a powerful download manager and accelerator written in Rust. Preview Features Resumable Downloads: Allow interrupted downloads to be re

A fast, powerful, and safe interpreter written in rust!

Kraber A fast, powerful, and safe programming language written in rust! About It packs a punch like the Kraber .50-Cal. Kraber is designed to be minim

A Yocto setup and management tool that helps you keep your environment up-to-date and in-sync with your team
A Yocto setup and management tool that helps you keep your environment up-to-date and in-sync with your team

yb (Yocto Buddy) yb is designed to make it easy to setup and (perhaps more importantly) keep Yocto environments up-to-date and in-sync with your team.

Comments
  • error: metadata-generation-failed

    error: metadata-generation-failed

    Throwing this error in Colab

    Collecting embed-anything Using cached embed_anything-0.1.7.tar.gz (3.2 MB) Installing build dependencies ... done Getting requirements to build wheel ... done error: subprocess-exited-with-error

    Γ— Preparing metadata (pyproject.toml) did not run successfully. β”‚ exit code: 1 ╰─> See above for output.

    note: This error originates from a subprocess, and is likely not a problem with pip. Preparing metadata (pyproject.toml) ... error error: metadata-generation-failed

    Γ— Encountered error while generating package metadata. ╰─> See above for output.

    opened by sonam-pankaj95 1
Owner
Starlight
Local Semantic Search Engine for Desktops
Starlight
Estratto is a powerful and user-friendly Rust library designed for extracting rich audio features from digital audio signals.

estratto γ€œ An Audio Feature Extraction Library estratto is a powerful and user-friendly Rust library designed for extracting rich audio features from

Amber J Blue 5 Aug 25, 2023
Rust Imaging Library's Python binding: A performant and high-level image processing library for Python written in Rust

ril-py Rust Imaging Library for Python: Python bindings for ril, a performant and high-level image processing library written in Rust. What's this? Th

Cryptex 13 Dec 6, 2022
This is a `Rust` based package to help with the management of complex medicine (pill) management cycles.

reepicheep This is a Rust based package to help with the management of complex medicine (pill) management cycles. reepicheep notifies a person(s) via

Daniel B 24 Dec 13, 2023
Rust File Management CLI is a command-line tool written in Rust that provides essential file management functionalities. Whether you're working with files or directories, this tool simplifies common file operations with ease.

Rust FileOps Rust File Management CLI is a command-line tool written in Rust that provides essential file management functionalities. Whether you're w

Harikesh Ranjan Sinha 5 May 2, 2024
Execution of and interaction with external processes and pipelines

subprocess The subprocess library provides facilities for execution of and interaction with external processes and pipelines, inspired by Python's sub

Hrvoje Nikőić 375 Jan 2, 2023
A fast and robust MLOps tool for managing data and pipelines

xvc A Fast and Robust MLOps Swiss-Army Knife in Rust βŒ› When to use xvc? Machine Learning Engineers: When you manage large quantities of unstructured d

Emre Sahin 6 Dec 15, 2022
πŸš€ Blazing fast and Powerful Discord Token Grabber, no popo made with python

Rusty-Grabber ?? a blazing fast Discord Token Grabber, no popo made with python Fastest Token Grabber ever : Rusty-Grabber> time ./target/release/grab

bishop 5 Sep 1, 2023
Framework for large distributed pipelines

Rain Rain is an open-source distributed computational framework for processing of large-scale task-based pipelines. Rain aims to lower the entry barri

Substantic 705 Dec 27, 2022
Write CI/CD pipelines using TypeScript

Katoa Katoa is a community fork of Cidada, a tool created by Fig which was sunset in late 2023 following acquisition by AWS. This fork and the underly

Katoa 47 Oct 6, 2023
An enhanced version of filetime, which can set file creation time on Windows.

filetime_creation Documentation An enhanced version of filetime, which can set file creation time on Windows. Internally, this use SetFileTime Win32 A

29 4 Dec 5, 2022