FlagEmbedding
FlagEmbedding
Decision gist · record as of 2026-08-14
Yes, with conditions. FlagEmbedding is actively maintained with no known vulnerabilities. Install if you need semantic search or RAG capabilities and can accommodate the heavy ML dependencies (torch, transformers). Verify the license terms in the repository first, as the package metadata does not declare a clear license. Not suitable if you need a lightweight embedding solution or cannot install PyTorch.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires torch and transformers; model downloads are large and may require significant disk space and network bandwidth on first use.
- Low friction installation with a pure Python wheel.
- Active maintenance with recent commits and a large repository (12050 stars).
License · maintenance · safety
(unclear) — License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms in the repository before use in proprietary or commercial projects.
last release 2026-04-22 (114 days) · last repo commit 2026-08-14 · 12,050 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 632,761 downloads/mo, #5,649 on PyPI
Alternatives
Verify before relying
pip install flagembedding
from flagembedding import FlagModel
model = FlagModel('BAAI/bge-small-en-v1.5')
embeddings = model.encode(['hello world'])- Exact Python version compatibility (requires_python not specified in metadata)
- Whether all 9 runtime dependencies are always required or only for specific use cases
- Performance characteristics and typical latency for embedding generation
What it is and what it does
FlagEmbedding is a toolkit for building semantic search and RAG systems using pre-trained embedding and reranking models. It wraps transformer-based models that convert text into dense vector representations, enabling similarity-based retrieval. The package integrates with torch, transformers, and sentence_transformers to handle model loading, inference, and fine-tuning workflows.
The toolkit supports multilingual queries, variable input lengths, and multiple retrieval strategies (dense, lexical, and multi-vector). It is commonly used to rank and retrieve relevant documents for LLM prompts, implement semantic search over document collections, and fine-tune embedding models on domain-specific data.
Use it for
- Build a semantic search engine over a document corpus by encoding documents and queries into embeddings and finding nearest neighbors.
- Implement retrieval-augmented generation (RAG) by retrieving relevant documents to augment LLM context before generation.
- Re-rank top-k search results using reranker models to improve relevance of retrieved documents.
- Fine-tune embedding models on custom datasets to optimize for domain-specific or task-specific retrieval.
- Support multilingual search applications where queries and documents span multiple languages.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
FlagEmbedding is actively maintained with no known vulnerabilities. Install if you need semantic search or RAG capabilities and can accommodate the heavy ML dependencies (torch, transformers). Verify the license terms in the repository first, as the package metadata does not declare a clear license. Not suitable if you need a lightweight embedding solution or cannot install PyTorch.
Install
flagembedding on PyPI
Before you install
Low friction installation with a pure Python wheel. Active maintenance with recent commits and a large repository (12050 stars). Depends on heavy ML libraries (torch, transformers, sentence_transformers) that may require significant disk and memory.
Requires torch and transformers; model downloads are large and may require significant disk space and network bandwidth on first use.
License in practice
License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms in the repository before use in proprietary or commercial projects.
Quickstart
pip install flagembedding
from flagembedding import FlagModel
model = FlagModel('BAAI/bge-small-en-v1.5')
embeddings = model.encode(['hello world'])
Verify before relying
- Exact Python version compatibility (requires_python not specified in metadata)
- Whether all 9 runtime dependencies are always required or only for specific use cases
- Performance characteristics and typical latency for embedding generation
Package facts
| License | Not declared unclear |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 9 packagestorchtransformersdatasetsacceleratesentence_transformerspeftir-datasetssentencepieceprotobuf |
| Maintenance | Actively maintained 114 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 632,761 / month, #5,649 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: flagembedding-1.4.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “retrieval augmented generation RAG”
- FlagEmbeddingFlagEmbedding provides embedding and reranking models for semantic…
- lightrag-hkuLightRAG is a retrieval-augmented generation framework that builds…
- langchain-milvusIntegrates LangChain with Milvus vector database to enable vector…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also colpali-engine · FlashRank · voyageai · mteb · fastembed · InstructorEmbedding · sentence-transformers · lightrag-hku · colbert-ai · model2vec