Skip to content

TextEmbed: Embedding Inference Server

GitHub release License: Apache-2.0

TextEmbed is a high-throughput, low-latency REST API for serving vector embeddings. Built to be flexible and scalable, TextEmbed supports a wide range of sentence-transformer models and frameworks.

This documentation reflects the latest updates from the main branch. For earlier versions, visit the TextEmbed repository.

🚀 Get Started Now!

Get Started

Explore the key features and setup instructions below.

🔍 Key Features

  • 🌐 Flexible Model Support: Deploy any model from supported sentence-transformer frameworks, including SentenceTransformers.
  • ⚡ High-Performance Inference: Leverages efficient backends like Torch for optimal performance across various devices.
  • 🔄 Dynamic Batching: Processes new embedding requests as soon as resources are available, ensuring high throughput and low latency.
  • ✔️ Accurate and Tested: Provides embeddings consistent with SentenceTransformers, validated with unit and end-to-end tests for reliability.
  • 📜 User-Friendly API: Built with FastAPI and fully documented via Swagger, conforming to OpenAI's Embedding specs.

🛠 Getting Started

Installation via PyPI

  1. Install TextEmbed:

    pip install -U textembed
    
  2. Start the Server:

    python3 -m textembed.server --models <Model1>,<Model2> --port <Port>
    
  3. View Help Options:

    python3 -m textembed.server --help
    
  1. Pull the Docker Image:

    docker pull kevaldekivadiya/textembed:latest
    
  2. Run the Docker Container:

    docker run -it --gpus all \
     -v $PWD/data:/app/.cache \
     -p 8000:8000 \
     kevaldekivadiya/textembed:latest \
     --models <Model1>,<Model2> \
     --port 8000
    
  3. View Help Options:

    docker run kevaldekivadiya/textembed:latest --help
    

🌐 Accessing the API

Access the API documentation via Swagger UI at http://localhost:8000/docs.


📥 Contributing

Contributions are welcome! Please read the Contributing Guide to get started.

📄 License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

📧 Contact

For questions or support, please reach out through GitHub Issues.


🌟 Stay Updated

Stay tuned for updates by following the TextEmbed repository. Don't forget to give us a ⭐ if you find this project helpful!

Back to Top