kenga-embed-z / encode_example.py
GermannM's picture
42M kenga instruct/byte encoder for Giga-team eval
bc7dd2a verified
Raw History Blame Contribute Delete
229 Bytes
from modeling_kenga_embed import KengaEmbed
m = KengaEmbed.from_pretrained(".")
q = m.encode_queries(["Where is the capital of Russia?"])
d = m.encode_documents(["Moscow is the capital of Russia."])
print(float((q * d).sum(-1)))