Downloads · 30 days
242
9% of all-time downloads
Quintu/bge-m3-legal_retrieval
bge-m3-legal_retrieval is a feature extraction model from Quintu. Use it when you need embeddings to search or compare text. It is set up for sentence-transformers. The card lists the license as apache-2.0.
This repository contains the Quintu/bge-m3-legalretrieval, a fine-tuned version of the bge-m3 model optimized for legal document retrieval tasks. The model is specifically designed to handle the nuances of legal langu…
Downloads · 30 days
242
9% of all-time downloads
All-time downloads
2.6K
Public
Parameters
568M
1.2 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors1.1 GB · 98%
From the Hugging Face model README
This repository contains the Quintu/bge-m3-legal_retrieval, a fine-tuned version of the bge-m3 model optimized for legal document retrieval tasks. The model is specifically designed to handle the nuances of legal language, enabling accurate and efficient retrieval of relevant legal documents based on semantic similarity.
You can easily load and use the model with the SentenceTransformer library:
from sentence_transformers import SentenceTransformer
# Load the fine-tuned model
model_tuned = SentenceTransformer("Quintu/bge-m3-legal_retrieval")
# Example usage: Encode queries and documents
queries = ["What are the key legal precedents for intellectual property disputes?"]
documents = [
"This document discusses key precedents in intellectual property law.",
"This document covers legal principles in criminal law."
]
# Encode the queries and documents
query_embeddings = model_tuned.encode(queries)
document_embeddings = model_tuned.encode(documents)
# Compute similarity (example with cosine similarity)
from sklearn.metrics.pairwise import cosine_similarity
similarity_scores = cosine_similarity(query_embeddings, document_embeddings)
# Output similarity scores
print(similarity_scores)