Sentence Similarity
Transformers
TensorBoard
Safetensors
sentence-transformers
English
bert
feature-extraction
embeddings
legal
USCode
Eval Results (legacy)
text-embeddings-inference
Instructions to use ArchitRastogi/BGE-Small-LegalEmbeddings-USCode with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ArchitRastogi/BGE-Small-LegalEmbeddings-USCode with Transformers:
# pip install -U transformers accelerate # 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", device_map="auto") - sentence-transformers
How to use ArchitRastogi/BGE-Small-LegalEmbeddings-USCode with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("ArchitRastogi/BGE-Small-LegalEmbeddings-USCode") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Download tokenizer.json from ArchitRastogi/BGE-Small-LegalEmbeddings-USCode: direct link, hf CLI and curl.
- Browser
- Download file 711 kB
-
https://huggingface.co/ArchitRastogi/BGE-Small-LegalEmbeddings-USCode/resolve/main/tokenizer.json
- Command line
-
hf download hf://ArchitRastogi/BGE-Small-LegalEmbeddings-USCode/tokenizer.json
-
curl -L -o tokenizer.json https://huggingface.co/ArchitRastogi/BGE-Small-LegalEmbeddings-USCode/resolve/main/tokenizer.json
711 kB
File too large to display, you can check the raw version instead.