How to use hon9kon9ize/yue-embed with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("hon9kon9ize/yue-embed") sentences = [ "query: is ampulla of vater part of the pancreas", "document: Ampulla of Vater The ampulla of Vater, also known as the hepatopancreatic ampulla or the hepatopancreatic duct, is formed by the union of the pancreatic duct and the common bile duct. The ampulla is specifically located at the major duodenal papilla.", "document: 抗凝加化疗;化疗", "document: Daylight saving time in Australia Daylight saving was first used in Australia during World War I, and was applied in all states. It was used again during the Second World War. A drought in Tasmania in 1967 led to the reintroduction of daylight saving in that state during the summer, and this was repeated every summer since then. In 1971, New South Wales, Victoria,[16] Queensland, South Australia, and the Australian Capital Territory followed Tasmania by observing daylight saving. Western Australia and the Northern Territory did not. Queensland abandoned daylight saving time in 1972.[17]" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4]
The community tab is the place to discuss and collaborate with the HF community!