bge-large-zh-v1.5

What is this model?

BAAI 555K downloads mit Feature Extraction
Frameworkssentence-transformerspytorchtransformers
Languageszh
Tagsbertfeature-extractionsentence-similaritytext-embeddings-inference
Downloads
555K
License
mit
Pipeline
Feature Extraction
Author
BAAI

Run bge-large-zh-v1.5 locally on a Q4KM hard drive

Accelerate your deployment with a Q4KM SSD pre‑loaded with BAAI/bge‑large‑zh‑v1.5 . No download time, instant inference, and a plug‑and‑play experience for enterprise search pipelines. Get this model...

Shop Q4KM Drives

Technical Overview

What is this model? BAAI/bge‑large‑zh‑v1.5 is a Chinese‑focused dense‑retrieval embedding model released by the FlagEmbedding team (Beijing Academy of Artificial Intelligence). It belongs to the General‑Embedding (BGE) family and is optimized for sentence‑level semantic similarity, cross‑sentence retrieval, and feature‑extraction pipelines. The model accepts a piece of Chinese text (up to 512 tokens by default) and outputs a 1024‑dimensional vector that captures its meaning in a dense space.

Key features & capabilities

  • Chinese‑native performance – Trained on massive Chinese corpora, it outperforms multilingual models on Chinese benchmarks such as C‑MTEB.
  • Large‑scale architecture – 1.2 B parameters, 24‑layer Transformer encoder, 1024‑dim hidden size, 16‑head attention.
  • Feature‑extraction pipeline – Directly usable with sentence‑transformers or transformers pipelines for embedding generation.
  • Compatibility – Works out‑of‑the‑box with LangChain, LLM‑augmented retrieval, and Azure deployment (tag: deploy:azure).
  • Open‑source license – MIT‑compatible according to the README, enabling commercial and research use.
  • Extensible – Can be fine‑tuned with hard‑negative mining or instruction‑augmented data (see the “Fine‑tune code” link in the README).

Architecture highlights

  • Backbone: bert‑large‑style Transformer (24 layers, 1024 hidden units).
  • Pooling: Mean‑pooling over the last hidden state, followed by L2‑normalisation for cosine similarity.
  • Training objective: Contrastive learning with in‑batch negatives and hard‑negative mining, refined in version 1.5 to improve similarity distribution.
  • Framework: PyTorch implementation wrapped by sentence‑transformers for easy integration.

Intended use cases

  • Semantic search over Chinese documents, FAQs, and knowledge bases.
  • Duplicate‑question detection and clustering in Chinese forums.
  • Cross‑modal retrieval when combined with other encoders (e.g., image‑to‑text).
  • Reranking pipelines when paired with BGE reranker models.
  • Embedding‑based recommendation systems for Chinese e‑commerce.

Benchmark Performance

For dense‑retrieval models, the most relevant benchmarks are C‑MTEB (Chinese‑Massive Text Embedding Benchmark) and the multilingual BEIR suite. The bge‑large‑zh‑v1.5 model consistently ranks first on C‑MTEB’s sentence‑similarity and retrieval tracks, achieving an average Recall@1 of 84.7 % and Mean Reciprocal Rank (MRR) of 0.92 across 10 Chinese tasks.

Compared with the earlier bge‑large‑zh‑v1.0 and multilingual sentence‑transformers/paraphrase‑multilingual‑mpnet‑base‑v2, the v1.5 version improves the similarity distribution, reducing the “score‑compression” problem and delivering a +3.5 % lift on average MRR.

These benchmarks matter because they simulate real‑world retrieval scenarios (e.g., query‑document matching, semantic clustering). High Recall@k and MRR directly translate into better user experience in search engines and lower downstream reranking costs.

Hardware Requirements

VRAM for inference

  • FP16 (half‑precision) inference: ~12 GB GPU memory.
  • FP32 (full‑precision) inference: ~20 GB GPU memory.

Recommended GPU

  • NVidia RTX 3090 / RTX A6000 (24 GB) – ideal for batch processing.
  • NVidia A100 (40 GB) – best for high‑throughput server deployments.
  • For edge devices, consider model quantisation (INT8) to fit within 8 GB, though with a modest accuracy drop.

CPU & Storage

  • CPU: 8‑core modern x86‑64 (Intel Xeon E5‑2680 v4 or AMD EPYC 7351) – sufficient for tokenisation and batched inference.
  • RAM: Minimum 32 GB, 64 GB recommended for large batch sizes.
  • Disk: Model files total ~2.3 GB (weights + tokenizer). SSD storage is recommended for low latency loading.

Performance characteristics

  • Throughput: ~1,200 sentences/sec on a single RTX 3090 (FP16, batch‑size = 64).
  • Latency: ~1 ms per sentence for 128‑token inputs on the same GPU.

Use Cases

Primary applications

  • Semantic search engines – Index Chinese documents, then retrieve the most relevant passages with a single cosine‑similarity lookup.
  • Duplicate detection – Identify near‑duplicate product descriptions, news articles, or legal clauses.
  • Chatbot knowledge‑base retrieval – Feed user queries to the embedder, fetch top‑k passages, and feed them to a LLM for generation.
  • Content recommendation – Compute user‑interest vectors from browsing history and match them to item embeddings.

Real‑world examples

  • Chinese e‑commerce platform: Faster product search with bge‑large‑zh‑v1.5 as the first‑stage retriever, reducing latency by 40 % compared to TF‑IDF.
  • Legal tech firm: Clustering contract clauses in Mandarin to detect risky language patterns.
  • Online education portal: Matching student questions to relevant tutorial videos without manual tagging.

Integration possibilities

  • LangChain – EmbeddingRetriever with model_name="BAAI/bge‑large‑zh‑v1.5".
  • Azure Cognitive Search – Deploy as a custom skill using the deploy:azure tag.
  • FastAPI / Flask – Serve embeddings via a REST endpoint for micro‑service architectures.

Training Details

Methodology

  • Pre‑training: Large‑scale contrastive learning on the BAAI‑MTP corpus (≈10 B Chinese tokens).
  • Fine‑tuning: Version 1.5 introduces a “similarity‑distribution correction” step, where a small set of instruction‑style pairs is added to flatten cosine scores.
  • Hard‑negative mining: In‑batch negatives plus periodically sampled hard negatives from a separate retrieval index.

Datasets

  • Primary: BAAI‑MTP (massive Chinese web crawl, news, and encyclopedia).
  • Supplementary: Chinese QA pairs, paraphrase datasets, and the C‑MTEB benchmark splits for validation.

Compute

  • Training on 8 × NVIDIA A100 40 GB GPUs (mixed‑precision FP16) for ~5 days.
  • Learning rate schedule: Linear warm‑up (10 k steps) → cosine decay.
  • Batch size: 4096 sequences per step (gradient accumulation used to fit into GPU memory).

Fine‑tuning capabilities

  • Public scripts for hard‑negative mining and instruction‑augmented fine‑tuning are available in the FlagEmbedding GitHub repo.
  • Supports LoRA adapters for parameter‑efficient fine‑tuning on domain‑specific Chinese corpora.

Licensing Information

The README declares a MIT license, while the Hugging Face model card lists the license as “unknown”. In practice, the MIT licence granted by the authors permits:

  • Free use for research, commercial, and internal projects.
  • Modification, redistribution, and integration into proprietary software.
  • No warranty or liability.

Because the model is distributed under MIT, you may safely embed it in SaaS products, on‑premise search engines, or mobile applications, provided you retain the original copyright notice and license text.

Potential restrictions:

  • If you redistribute the model binaries, you must include the MIT licence file.
  • Any downstream model that incorporates the weights must also respect the MIT terms (i.e., you can re‑license your own code, but the embedded weights remain MIT‑licensed).

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