Downloads · 30 days
11
12% of all-time downloads
puppyyyo/larceny-m3-ICT_v1
larceny-m3-ICT_v1 is a machine learning model from puppyyyo. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
11
12% of all-time downloads
All-time downloads
89
Public
Parameters
568M
1.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.1 GB · 98%
From the Hugging Face model README
pip install -U FlagEmbedding
from FlagEmbedding import FlagModel
model_name = "puppyyyo/larceny-m3-law-knowledge-v1"
model = FlagModel(
model_name,
use_fp16=False
)
sentences_1 = ["What is BGE M3?", "Defination of BM25"]
sentences_2 = ["BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.",
"BM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document"]
embeddings_1 = model.encode(sentences_1)
embeddings_2 = model.encode(sentences_2)
similarity = embeddings_1 @ embeddings_2.T
print(similarity)
# m3-v1
# [[0.64422363 0.41711098], [0.5521891 0.75232375]]
# m3-v2
# [[0.5995765 0.26392284], [0.27698418 0.6981832 ]]
# m3-v3
# [[0.5663224 0.24284379], [0.26776457 0.68114114]]