import torch
from FlagEmbedding import FlagModel
model_name = "puppyyyo/larceny-base-law-knowledge-v1"
devices = "cuda:0"if torch.cuda.is_available() else"cpu"
model = FlagModel(
model_name,
devices=devices,
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)
# base-v1# [[0.72338223 0.7122297 ], [0.5691198 0.78866345]]# base-v2# [[0.6811399 0.5206243 ], [0.50919324 0.676651 ]]# base-v3# [[0.6299723 0.5048096 ], [0.45474052 0.63200176]]
Runs of puppyyyo larceny-base-ICT_v3 on huggingface.co
4
Total runs
0
24-hour runs
0
3-day runs
2
7-day runs
-1
30-day runs
More Information About larceny-base-ICT_v3 huggingface.co Model
larceny-base-ICT_v3 huggingface.co
larceny-base-ICT_v3 huggingface.co is an AI model on huggingface.co that provides larceny-base-ICT_v3's model effect (), which can be used instantly with this puppyyyo larceny-base-ICT_v3 model. huggingface.co supports a free trial of the larceny-base-ICT_v3 model, and also provides paid use of the larceny-base-ICT_v3. Support call larceny-base-ICT_v3 model through api, including Node.js, Python, http.
larceny-base-ICT_v3 huggingface.co is an online trial and call api platform, which integrates larceny-base-ICT_v3's modeling effects, including api services, and provides a free online trial of larceny-base-ICT_v3, you can try larceny-base-ICT_v3 online for free by clicking the link below.
puppyyyo larceny-base-ICT_v3 online free url in huggingface.co:
larceny-base-ICT_v3 is an open source model from GitHub that offers a free installation service, and any user can find larceny-base-ICT_v3 on GitHub to install. At the same time, huggingface.co provides the effect of larceny-base-ICT_v3 install, users can directly use larceny-base-ICT_v3 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
larceny-base-ICT_v3 install url in huggingface.co: