how to use the guff file for SentenceTransformer
#1
by
dantebytes
- opened
Hi, currently I use SentenceTransformer to get the similarity
from sentence_transformers import SentenceTransformer, util
_model = SentenceTransformer(multi-qa-MiniLM-L6-cos-v1)
a_embedding = _model.encode([a_text])
b_embedding = _model.encode([b_text])
percent = float(util.dot_score(query_embedding, passage_embedding)[0][0])
Question is, how can I achieve the same thing using the guff files?
it seems like I can with Llama :)
from llama_cpp import Llama
_model = Llama(
model_path=GUFFPATH,
embedding=True
)
a_embedding = _model.create_embedding(a_input)
b_embedding - _model.create_embedding(b_input)
dantebytes
changed discussion status to
closed