Skip to content

[feat-add] Fastembed Embedding provider integration#5719

Open
lucifertrj wants to merge 3 commits intocrewAIInc:mainfrom
lucifertrj:fastembed-integration
Open

[feat-add] Fastembed Embedding provider integration#5719
lucifertrj wants to merge 3 commits intocrewAIInc:mainfrom
lucifertrj:fastembed-integration

Conversation

@lucifertrj
Copy link
Copy Markdown

  • Added FastEmbed embedding provider under RAG support for local embedding models for faster processing.
  • Included tests as well with the model_name="sentence-transformers/all-MiniLM-L6-v2" as used in qdrant/constants.py: DEFAULT_EMBEDDING_MODEL
  • Included fastembed as supported provider under lib/crewai-tools - rag embedding_service.py

The provider is also tested with the following script:

from crewai.rag.embeddings.factory import build_embedder
from crewai.rag.embeddings.providers.fastembed.types import FastEmbedProviderSpec

embedding_model: FastEmbedProviderSpec = {
    "provider": "fastembed",
    "config": {
        "model_name": "sentence-transformers/all-MiniLM-L6-v2",
        "batch_size": 2},
}

embedder = build_embedder(embedding_model)
embeddings = embedder(["CrewAI supports FastEmbed embeddings."])
print(f"Embeddings: {len(embeddings)}")
print(f"Dimension: {len(embeddings[0])}")
Screenshot 2026-05-06 at 02 53 17

GOAL: The reason for adding this provider is that Qdrant, under RAG, uses FastEmbed in config.py. It would be ideal to include FastEmbed as an embedding provider so it can also be used seamlessly with CrewAI tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant