bge-small-en

bge‑small‑en is a lightweight, English‑only sentence‑embedding model released by the

BAAI 222K downloads mit Feature Extraction
Frameworkstransformerspytorchsafetensors
Languagesen
Tagsbertfeature-extractionmtebsentence transformersmodel-indextext-embeddings-inference
Downloads
222K
License
mit
Pipeline
Feature Extraction
Author
BAAI

Run bge-small-en locally on a Q4KM hard drive

Accelerate your AI workloads with Q4KM high‑performance hard drives that come pre‑loaded with the bge‑small‑en model. No download time, instant ready‑to‑use embeddings for your semantic search or...

Shop Q4KM Drives

Technical Overview

bge‑small‑en is a lightweight, English‑only sentence‑embedding model released by the BAAI. It belongs to the Bidirectional Gated Embedding (BGE) family and is built on top of the Transformer architecture, specifically a compact ERT‑style encoder that has been fine‑tuned for dense retrieval and semantic similarity tasks.

Key features include:

  • Feature‑extraction pipeline – the model outputs fixed‑size vector embeddings (typically 384‑dimensional) that can be used directly for downstream tasks such as classification, clustering, or similarity search.
  • Fast inference – thanks to its small parameter count (≈ 30 M) and optimized torch‑safetensors weights, it runs comfortably on consumer‑grade GPUs.
  • Compatibility – works out‑of‑the‑box with the sentence‑transformers and transformers libraries, and can be deployed on Azure, AWS, or on‑premise with the endpoints_compatible tag.
  • Multi‑task readiness – evaluated across classification, retrieval, clustering, reranking, and semantic textual similarity (STS) benchmarks.

Architecture highlights:

  • Base: 12‑layer transformer encoder (similar to distilbert‑base), using BERT‑style tokenization and a CLS‑pooling strategy for sentence‑level embeddings.
  • Training objective: a combination of contrastive learning (InfoNCE) and hard‑negative mining to improve retrieval quality.
  • Parameter efficiency: ~30 M trainable weights, making it ~2‑3× smaller than the original bge‑large models while retaining > 90 % of their performance on standard MTEB tasks.

Intended use cases range from semantic search (e.g., product catalog lookup) to zero‑shot classification (e.g., intent detection) and document clustering for knowledge‑base organization. Its modest size also makes it suitable for edge‑device deployment where memory and latency are critical constraints.

Benchmark Performance

The model’s performance is reported on the MTEB (Massive Text Embedding Benchmark), which aggregates a wide variety of tasks (classification, retrieval, clustering, reranking, STS). The most relevant metrics for a sentence‑embedding model are:

  • Classification accuracy / F1 on Amazon Polarity (93 % acc, 93 % F1) and Banking77 (85 % acc, 85 % F1).
  • Retrieval quality – MAP@10 of 50.78 % and MRR@10 of 50.96 % on the ArguAna dataset, indicating strong nearest‑neighbor search capability.
  • Clustering V‑measure – 47.5 % on arXiv‑P2P and 39.97 % on arXiv‑S2S, showing decent grouping of semantically similar documents.
  • STS correlation – Cosine‑sim Pearson of 80.09 % and Spearman of 79.96 % on the BIOSSES benchmark, confirming high semantic similarity alignment.

These benchmarks matter because they reflect real‑world scenarios: classification accuracy translates to downstream intent or sentiment analysis, retrieval metrics gauge the model’s ability to rank relevant passages, and STS scores indicate how well the embedding space preserves semantic distance. Compared to larger BGE variants (e.g., bge‑large‑en), bge‑small‑en offers a ~30 % reduction in latency with only a modest drop (≈ 2‑3 %) in most scores, making it a compelling choice for latency‑sensitive applications.

Hardware Requirements

VRAM for inference – The model’s checkpoint is ~350 MB (safetensors). A GPU with at least 4 GB VRAM can host the model and run a single batch of up to 64 sentences (≈ 384‑dim vectors) without memory pressure. For higher throughput (batch size ≥ 256) or mixed‑precision (FP16) inference, a 6 GB–8 GB GPU is recommended.

Recommended GPU – NVIDIA RTX 3060, RTX 3070, or equivalent AMD GPUs (e.g., Radeon RX 6700 XT) provide ample headroom. For large‑scale serving, consider GPU A100 (40 GB) or V100 (16 GB) to enable multi‑model parallelism.

CPU requirements – The model can be run on CPU‑only environments using torch‑cpu. Expect ~150 ms latency per sentence on a modern 8‑core Intel i7 or AMD Ryzen 7. For production APIs, a dedicated inference server with at least 8 vCPU and 16 GB RAM is advisable.

Storage – Model files (weights, config, tokenizer) occupy ~400 MB. Including the sentence‑transformers wrapper and a small cache, allocate 1 GB of disk space. SSD storage is preferred to reduce loading time.

Use Cases

Primary applications revolve around any scenario that needs dense semantic representations of English sentences:

  • Semantic search – powering product‑catalog or knowledge‑base search where queries are matched against a large corpus of documents.
  • Zero‑shot classification – using the embeddings as features for intent detection, sentiment analysis, or topic tagging without task‑specific training data.
  • Document clustering & topic modeling – grouping news articles, research papers, or support tickets into coherent clusters for analytics.
  • Reranking in multi‑stage retrieval pipelines – after an initial BM25 or vector‑search pass, bge‑small‑en can rerank the top‑k results to improve relevance.
  • Recommendation systems – embedding user reviews or product descriptions to compute similarity scores for personalized suggestions.

Industry examples:

  • E‑commerce – fast product‑to‑query matching for “search‑as‑you‑type”.
  • Customer support – clustering incoming tickets to route them to the right department or to suggest FAQ articles.
  • Legal & research – grouping patents or scientific abstracts for literature review.

Integration is straightforward via the sentence‑transformers Python API, or via the transformers pipeline('feature‑extraction'). The model can also be exported to ONNX or TorchScript for deployment in Java, C++, or mobile environments.

Training Details

While the README does not disclose a full training recipe, the following information can be inferred from the tags and benchmark results:

  • Training objective – a contrastive loss (InfoNCE) with in‑batch negatives and additional hard‑negative samples drawn from a large corpus of English text.
  • Datasets – the model was likely pre‑trained on a massive web‑scale English corpus (e.g., Common Crawl) and then fine‑tuned on the MTEB suite, which includes Amazon reviews, ArguAna, BIOSSES, and other benchmark datasets.
  • Compute – training a 30 M‑parameter transformer to convergence typically requires 2–4 GPU‑days on an NVIDIA A100 (40 GB) or comparable hardware. The authors may have used mixed‑precision (FP16) to accelerate training.
  • Fine‑tuning capability – the model is released in a sentence‑transformers compatible format, allowing downstream users to further fine‑tune on domain‑specific data using the same contrastive pipeline.

The feature‑extraction pipeline tag indicates that the model outputs the CLS token embedding directly, which is the standard practice for BGE models. Users can also enable pooling strategies (mean‑pool, max‑pool) via the sentence‑transformers API if their downstream task benefits from a different representation.

Licensing Information

The repository lists the license as unknown but also includes a license:mit tag. In practice this means the model weights are likely released under the MIT license, a permissive open‑source licence that permits:

  • Commercial use – you may integrate the model into SaaS products, internal tools, or any revenue‑generating service.
  • Modification – you can fine‑tune, prune, or otherwise adapt the model.
  • Distribution – you may share the model weights or derived versions, provided you retain the original copyright notice.

If the exact legal text is missing, it is prudent to treat the model as MIT‑compatible and include a disclaimer that the license is not officially confirmed. For enterprise deployments, you should:

  1. Contact the model maintainer (BAAI) for clarification.
  2. Keep a copy of the model card and any associated LICENSE file.
  3. Provide attribution: “Model bge‑small‑en © BAAI, released under MIT (or unknown) license.”

Until a definitive license is published, most organizations consider the MIT‑style terms sufficient for commercial use, but always perform a legal review.

Pre-loaded AI models. Ready to run.

Skip the downloads. Get a Q4KM hard drive with hundreds of models pre-configured and optimized.

Shop Q4KM Hard Drives