How to use FINGU-AI/FingUv2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("FINGU-AI/FingUv2", trust_remote_code=True) sentences = [ "[array([{'from': 'human', 'value': '低IPの人に対する侮辱とは?'},\n {'from': 'gpt', 'value': '例えば、ジョークの最初に \"I was going to do X, but I just remembered because I\\'m changed mind because it would be too easy for you get idea of the punchline \"と言うことです。'},\n {'from': 'human', 'value': 'なるほど。IQの低い人を侮辱するという意味だったんだ。'}],\n dtype=object) ]", "['一般的な侮辱は「お前はバカだ」で、これは太古の昔から使われている。']", "[' 먼저 마이크가 매년 저축하는 금액을 계산해 봅시다. 마이크는 연봉 15만 달러의 10%를 저축합니다:\\n\\n150,000달러의 10% = 0.10 * $150,000 = $15,000\\n\\n이제 6년 동안 그가 저축할 총 금액을 계산해 봅시다:\\n\\n1년 $15,000 * 6년 = $90,000\\n\\n마이크는 집의 20%를 계약금으로 지불해야 합니다. 그가 사고 싶은 집의 가격을 P로 표시해 봅시다. 마이크가 저축한 90,000달러는 P의 20%를 나타냅니다. 다음 방정식을 설정할 수 있습니다:\\n\\n0.20 * P = $90,000\\n\\n이제 P를 풀 수 있습니다:\\n\\nP = $90,000 / 0.20\\nP = $450,000\\n\\n따라서 마이크가 사고 싶은 집의 가격은 $450,000입니다.']", "['例えば、https://www.urbandictionary.com/define.php?term=insult+for+someone+with+a+など。']" ] 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!