Downloads · 30 days
22.4K
1% of all-time downloads
pkshatech/GLuCoSE-base-ja
GLuCoSE-base-ja is a sentence similarity model from pkshatech. Use it when you need a score for how close two texts are. It is set up for sentence-transformers. The card lists the license as apache-2.0.
Downloads · 30 days
22.4K
1% of all-time downloads
All-time downloads
1.8M
Public
Repo size
1.6 GB
Likes
34
Public
Click a slice to open those files.
.bin532 MB · 100%
From the Hugging Face model README
GLuCoSE (General LUke-based COntrastive Sentence Embedding, "glucose") is a Japanese text embedding model based on LUKE. In order to create a general-purpose, user-friendly Japanese text embedding model, GLuCoSE has been trained on a mix of web data and various datasets associated with natural language inference and search. This model is not only suitable for sentence vector similarity tasks but also for semantic search tasks.
You can use this model easily with sentence-transformers.
First, install sentence-transformers with pip as follows:
pip install -U sentence-transformers
You can load the model and convert sentences into dense vectors as shown below:
from sentence_transformers import SentenceTransformer
sentences = [
"PKSHA Technologyは機械学習/深層学習技術に関わるアルゴリズムソリューションを展開している。",
"この深層学習モデルはPKSHA Technologyによって学習され、公開された。",
"広目天は、仏教における四天王の一尊であり、サンスクリット語の「種々の眼をした者」を名前の由来とする。",
]
model = SentenceTransformer('pkshatech/GLuCoSE-base-ja')
embeddings = model.encode(sentences)
print(embeddings)
Since the loss function used during training is cosine similarity, we recommend using cosine similarity for downstream tasks.
This text embedding model can also be used in LangChain. Please refer to this page for more information.
The following resources were used to train this model.
Evaluation by Spearman's correlation coefficient and Pearson's correlation coefficient.
| Model | Spearman | Pearson |
|---|---|---|
| text-embedding-ada-002 | 0.8372 | 0.7902 |
| pkshatech/simcse-ja-bert-base-clcmlp3 | 0.850 | 0.801 |
| pkshatech/GLuCoSE-base-ja | 0.864 | 0.818 |
Evaluation by top-k retrieval accuracy4 (the fraction of questions that have a correct answer in the top-k retrieved documents at least once.)
| Model | Top-1 | Top-5 | Top-10 | Top-50 |
|---|---|---|---|---|
| text-embedding-ada-002 | 33.50 | 57.80 | 65.10 | 76.60 |
| pkshatech/simcse-ja-bert-base-clcmlp3 | 30.60 | 54.50 | 62.50 | 76.70 |
| pkshatech/GLuCoSE-base-ja | 36.10 | 59.40 | 66.40 | 78.30 |
Akihiko Fukuchi, Yuichiro Hoshino, Yotarow Watanabe
@misc{pkshatech-GLuCoSE-base-ja,
title={pkshatech/GLuCoSE-base-ja},
url={https://huggingface.co/pkshatech/GLuCoSE-base-ja},
author={Akihiko Fukuchi, Yuichiro Hoshino, Yotarow Watanabe},
year={2023},
}
This model is published under the Apache License, Version 2.0.
When we trained this model, the test data of JGLUE was not released, so we used the dev set of JGLUE as a private evaluation data. Therefore, we selected the checkpoint on the train set of JGLUE insted of its dev set. ↩
For more details, please refer to https://arxiv.org/pdf/2004.04906.pdf. ↩