"Sarashina-Embedding-v1-1B" is a Japanese text embedding model, based on the 1.2B-parameter Japanese LLM "Sarashina2.1-1B".
We trained this model with multi-stage contrastive learning. We achieved the state-of-the-art average score across 16 datasets in JMTEB (Japanese Massive Text Embedding Benchmark).
This model maps sentences & paragraphs to a 1792-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and other applications.
1from sentence_transformers import SentenceTransformer
23# Download from the 🤗 Hub4model = SentenceTransformer("sbintuitions/sarashina-embedding-v1-1b")5# Run inference6sentences =[7'更級日記は、平安時代中期に菅原孝標女によって書かれた回想録です。',8'Sarashinaは、SB Intuitionsが開発した日本語大規模言語モデルです。これまでに7B, 13B, 70B, 8x70Bのモデルが公開されています。',9'サラシナエンベディングは日本語言語モデルをベースにした日本語埋め込みモデルです。'10]11embeddings = model.encode(sentences)12print(embeddings.shape)13# [3, 1792]1415# Get the similarity scores between the embeddings16similarities = model.similarity(embeddings, embeddings)17print(similarities.shape)18# [3, 3]
Note
You do not need to add prefixes such as "Query: " and "Document: " to the beginning of the input sentence.
This model is licensed under the Sarashina Model NonCommercial License Agreement, which has restrictions on commercial use. If you are interested in utilizing this model for your business, please feel free to contact us through our contact page.
Training
"Sarashina-Embedding-v1-1B" is created through the following two-stage learning process:
Stage 1: Weakly-supervised Learning
To achieve generic text embedding performance across a wide range of domains, we performed contrastive training on weakly-supervised data consisting of our own web-crawled data and open data.