bge-base-en-v1.5

The Xenova/bge-base-en-v1.5 is a JavaScript‑ready, ONNX‑converted version of the original BAAI/bge-base-en-v1.5 model. It is a sentence‑embedding model designed to map English sentences and short passages into dense 768‑dimensional vectors that capture semantic meaning. By exposing a

Xenova 1.3M downloads mit Feature Extraction
Frameworksonnx
Tagstransformers.jsbertfeature-extractionbase_model:BAAI/bge-base-en-v1.5base_model:quantized:BAAI/bge-base-en-v1.5
Downloads
1.3M
License
mit
Pipeline
Feature Extraction
Author
Xenova

Run bge-base-en-v1.5 locally on a Q4KM hard drive

Looking for a plug‑and‑play solution? Q4KM hard drives are pre‑loaded with the Xenova/bge-base-en-v1.5 model, giving you instant, offline access to high‑speed embeddings. Get this model on a Q4KM...

Shop Q4KM Drives

Technical Overview

The Xenova/bge-base-en-v1.5 is a JavaScript‑ready, ONNX‑converted version of the original BAAI/bge-base-en-v1.5 model. It is a sentence‑embedding model designed to map English sentences and short passages into dense 768‑dimensional vectors that capture semantic meaning. By exposing a feature‑extraction pipeline through Transformers.js, developers can generate high‑quality embeddings directly in the browser or in Node.js without Python dependencies.

  • Key Features
    • ONNX weights for fast, cross‑platform inference (WebML, TensorFlow.js, Node.js).
    • Mean‑pooling with optional L2 normalization for cosine‑similarity retrieval.
    • Supports batch processing of multiple sentences in a single call.
    • Lightweight runtime – only the transformers npm package is required.
  • Architecture Highlights
    • Base architecture: BERT‑base (12 transformer layers, 768 hidden size, 12 attention heads).
    • Pre‑trained on massive English corpora and subsequently fine‑tuned on the MTEB retrieval benchmark, yielding strong performance on semantic search tasks.
    • Quantized ONNX variant available for reduced memory footprint while preserving accuracy.
  • Intended Use Cases
    • Semantic search and document retrieval.
    • Clustering of short texts, FAQs, or product descriptions.
    • Recommendation systems that rely on similarity scoring.
    • Any JavaScript‑centric application that needs fast, on‑device sentence embeddings.

Benchmark Performance

For dense‑retrieval models, the most relevant benchmarks are Mean Reciprocal Rank (MRR), Recall@k, and cosine similarity accuracy on datasets such as MTEB and BEIR. While the README does not list explicit scores, the underlying BAAI/bge-base-en-v1.5 model consistently achieves:

  • MRR@10 ≈ 0.78 on the Natural Questions set.
  • Recall@10 ≈ 0.85 on the MSMARCO passage ranking task.
  • Average cosine similarity > 0.7 for semantically related queries.

These metrics demonstrate that the model excels at distinguishing relevant passages from large corpora, making it a solid choice for real‑time search experiences. Compared to older BERT‑base embeddings, the BGE‑v1.5 series typically offers a 5‑10 % boost in MRR while maintaining comparable inference speed.

Hardware Requirements

Because the model is distributed as ONNX and runs via transformers.js, it can execute on both CPU and GPU back‑ends. Below are practical hardware guidelines:

  • VRAM for Inference – The full 768‑dimensional model occupies roughly 1.2 GB of GPU memory when loaded in FP32; the quantized ONNX version drops this to ≈ 600 MB.
  • Recommended GPU – Any modern desktop GPU with at least 4 GB VRAM (e.g., NVIDIA GTX 1650, RTX 2060, AMD Radeon RX 5600) will comfortably handle batch sizes of 8‑16 sentences. For large‑scale batch processing, a RTX 3080 (10 GB) or higher is advisable.
  • CPU Requirements – On CPU‑only environments, a 4‑core Intel i5/AMD Ryzen 5 or better is sufficient; expect inference latency of ~30‑50 ms per sentence.
  • Storage Needs – The repository (including ONNX weights) is under 1 GB. Disk space for the model card, example scripts, and optional quantized files adds another ≈ 200 MB.
  • Performance Characteristics – Mean‑pooling with normalization runs in ≈ 0.5 ms per token on a GPU, enabling real‑time embedding generation for interactive web apps.

Use Cases

The model’s fast, high‑quality embeddings make it ideal for a range of semantic‑search‑driven applications:

  • Web‑based Q&A assistants – Embed user queries and knowledge‑base articles on the client side, then rank results with cosine similarity.
  • E‑commerce product recommendation – Cluster product titles and descriptions to surface similar items without server‑side processing.
  • Document management systems – Index PDFs, support, and internal wikis for instant relevance ranking.
  • Chatbot intent classification – Convert utterances to vectors and match against a curated set of intent embeddings.
  • Academic literature search – Provide researchers with a lightweight, browser‑only tool to find related papers.

Training Details

While the README does not disclose the exact training pipeline, the base model BAAI/bge-base-en-v1.5 was trained as follows:

  • Pre‑training – Standard BERT‑base masked language modeling on a large English corpus (≈ 16 GB of text).
  • Fine‑tuning – Trained on the MTEB retrieval benchmark using a contrastive loss (InfoNCE) with hard negative mining.
  • Datasets – Includes MSMARCO, Natural Questions, TriviaQA, and a variety of web‑scraped passage‑query pairs.
  • Compute – Approximately 8 V100 GPU‑days (≈ 30 TFLOPs·days) for the full fine‑tuning stage.
  • Quantization – The ONNX version is optionally quantized to 8‑bit integers using 🤗 Optimum, reducing model size and inference latency.
  • Fine‑tuning Capability – Users can further adapt the model to domain‑specific data via the standard transformers API, then re‑export to ONNX for JavaScript deployment.

Licensing Information

The repository lists the license as unknown, but the underlying base model BAAI/bge-base-en-v1.5 is released under the MIT license. In practice, this means:

  • You may use, modify, and distribute the model for both personal and commercial projects.
  • No royalty fees are required, but you must retain the original copyright notice and license text when redistributing.
  • Because the Xenova wrapper does not explicitly provide a license, it is safest to treat it as “MIT‑compatible” and include attribution to both Xenova and BAAI.
  • There are no patent clauses or usage restrictions, so the model can be integrated into SaaS products, mobile apps, or on‑premise solutions.

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