Legal-Embed-bge-base-en-v1.5

This repository hosts a fine-tuned version of BAAI/bge-base-en-v1.5 optimized for legal document (text) retrieval and Retrieval-Augmented Generation (RAG) tasks.

Model Details

Evaluation (NDCG@10)

Dimension Baseline Fine-tuned Improvement (%)
768 0.6105 0.6412 5.03
512 0.6037 0.6379 5.67
256 0.5853 0.6268 7.08
128 0.5276 0.5652 7.13
64 0.4469 0.5187 16.07

Metrics include cosine accuracy, MRR, MAP and NDCG.

Training Configuration

  • Epochs: 4
  • Batch size: 32
  • Learning rate: 2e-5
  • Data: 1,456 train / 162 test samples
  • Hardware: CUDA GPU with FlashAttention

Findings

  • Maximum improvement: 16.07%

  • Fine-tuned 64D vs Baseline 768D: -15.03%

  • Fine-tuned 128D vs Baseline 768D: -7.41%

  • Storage reduction with 128D: 6× smaller

  • Storage reduction with 64D: 12× smaller

  • Baseline best score: 0.6105

  • Fine-tuned best score: 0.6412

Usage

from sentence_transformers import SentenceTransformer

model = SentenceTransformer("axondendriteplus/Legal-Embed-bge-base-en-v1.5")
embeddings = model.encode(["your legal text"])

Credits

Fine-tuning guide: https://www.philschmid.de/fine-tune-embedding-model-for-rag

Downloads last month
24
Safetensors
Model size
109M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for axondendriteplus/Legal-Embed-bge-base-en-v1.5

Finetuned
(406)
this model

Evaluation results