Loading…
Loading…
This is a fine-tuned version of the BGE Small embedding model, trained on the USCode-QueryPairs dataset, a subset of the USLawQA corpus. The model is optimized for generating embeddings for legal text, achieving 75% accuracy on the test set.
This model is ideal for:
The model can be used with model.encode for generating embeddings. Below is an example usage snippet:
# Load model directly
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("ArchitRastogi/BGE-Small-LegalEmbeddings-USCode")
model = AutoModel.from_pretrained("ArchitRastogi/BGE-Small-LegalEmbeddings-USCode")
text = "Duties of the president"
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)
#Printing the Embeddings
print(outputs)
The model was evaluated on the test set of USLawQA and achieved the following metrics:
For any inquiries, suggestions, or feedback, feel free to reach out:
Archit Rastogi
📧 architrastogi20@gmail.com
This dataset is distributed under the Apache 2.0 License. Please ensure compliance with applicable copyright laws when using this dataset.
BAAI/bge-small-en-v1.5