Downloads · 30 days
53
14% of all-time downloads
Mannas/legal-bge-in
legal-bge-in is a sentence similarity model from Mannas. Use it when you need a score for how close two texts are. It is set up for sentence-transformers. The card lists the license as mit.
A fine-tune of BAAI/bge-base-en-v1.5 specialised for retrieval over Indian case law (Supreme Court of India + Delhi High Court). It embeds legal text so that a lawyer's question lands near the judgments that answer it…
Downloads · 30 days
53
14% of all-time downloads
All-time downloads
386
Public
Parameters
109M
438 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors438 MB · 100%
From the Hugging Face model README
A fine-tune of BAAI/bge-base-en-v1.5 specialised for retrieval over Indian case law (Supreme Court of India + Delhi High Court). It embeds legal text so that a lawyer's question lands near the judgments that answer it — better than the generic base model on the distinctions that matter in law (e.g. §138 NI Act cheque-bounce vs §420 IPC cheating, anticipatory vs regular bail).
Measured on a held-out set of 447 legal questions, searched against a fixed candidate pool (leakage-checked; the model never saw the eval judgments during training). Δ vs vanilla bge-base-en-v1.5 on the identical pool:
| Metric | Vanilla bge-base | This model | Improvement |
|---|---|---|---|
| Recall@10 | 0.7181 | 0.7897 | +7.2 pts |
| MRR@10 | 0.5137 | 0.6009 | +8.7 pts |
≈ 25% fewer missed cases, and correct judgments ranked meaningfully higher. Trained locally on a single consumer GPU (RTX 5060 Ti, 16 GB), no paid APIs.
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("Mannas/legal-bge-in")
# For SHORT search queries, prepend the BGE instruction (passages are embedded bare):
QUERY_PREFIX = "Represent this sentence for searching relevant passages: "
query = QUERY_PREFIX + "notice requirements for cheque dishonour under Section 138"
passages = [
"The complaint under Section 138 of the Negotiable Instruments Act, 1881 ...",
"Anticipatory bail under Section 438 CrPC is granted where ...",
]
q = model.encode(query, normalize_embeddings=True)
p = model.encode(passages, normalize_embeddings=True)
scores = p @ q # cosine similarities; higher = more relevant
ISSUES: lines and synthetic queries (a local LLM reading passages and writing the question each answers), paired with the relevant judgment chunk. No human labelling.Built on BAAI's BGE. If you use this model, a link back is appreciated.