File size: 4,290 Bytes
a9b80a3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9de342c
a9b80a3
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
---
language:
- ja
license: mit
library_name: sentence-transformers
pipeline_tag: sentence-similarity
tags:
- mirei
- llama
- transformers
- llm2vec
- text-embedding
- embeddings
- feature-extraction
- retrieval
base_model: iamtatsuki05/Sentence-Sarashina-Bi-0.5B-PT
datasets:
- cl-nagoya/ruri-v3-dataset-ft
---

# Sentence-Sarashina-Bi-0.5B

[English](README.md) / Japanese


## Overview
Sentence-Sarashina-Bi-0.5B は、 [iamtatsuki05/Sentence-Sarashina-Bi-0.5B-PT](https://huggingface.co/iamtatsuki05/Sentence-Sarashina-Bi-0.5B-PT) を [cl-nagoya/ruri-v3-dataset-ft](https://huggingface.co/datasets/cl-nagoya/ruri-v3-dataset-ft) で教師あり対照学習を行った 1280 次元の日本語埋め込みモデルです。


- **[Hugging Face Collection](https://huggingface.co/collections/iamtatsuki05/mirei)**
- **[GitHub](https://github.com/iamtatsuki05/MIREI)**

![Consept](assets/concept.jpg)

## Usage
### Requirements
```
sentence-transformers>=4.1.0
transformers>=4.51.0
accelerate>=1.6.0
sentencepiece>=0.2.0
flash-attn>=2.7.3
```

### Sample Code
```python
import torch
from sentence_transformers import SentenceTransformer

model_name = "iamtatsuki05/Sentence-Sarashina-Bi-0.5B"
model_kwargs = {
  "torch_dtype": torch.bfloat16,
  "attn_implementation": "flash_attention_2",
}
model = SentenceTransformer(model_name, model_kwargs=model_kwargs)

queries = ["ハチワレはどのようなキャラクターですか?"]
docs = [
    "ハチワレは、『ちいかわ』に登場する猫風のキャラクターで、明るく社交的、前向きな性格が特徴。ちいかわたちと共に日常を楽しみつつ、討伐などの冒険にも積極的に挑む存在です。",
    "うさぎは、天真爛漫でマイペースな性格が特徴のキャラクターで、突飛な行動力と鋭い直感でちいかわたちを引っ張る存在。自由気ままながらも仲間思いな一面を併せ持ちます。",
]
q_emb = model.encode(queries, normalize_embeddings=True)
d_emb = model.encode(docs, normalize_embeddings=True)
scores = model.similarity(q_emb, d_emb)
print(scores)
```


## Model Details
- **ベースモデル:** [iamtatsuki05/Sentence-Sarashina-Bi-0.5B-PT](https://huggingface.co/iamtatsuki05/Sentence-Sarashina-Bi-0.5B-PT)
- **アーキテクチャ:** Llama
- **最大シーケンス長:** 8,192トークン
- **埋め込み次元:** 1280(Mean Pooling)
- **トークナイザ:** SentencePiece / 語彙数 102,400
- **位置エンコーディング:** RoPE
- **対応言語:** 日本語
- **類似度指標:** cosine


## Model Series

弱教師あり学習済みモデルに対して [cl-nagoya/ruri-v3-dataset-ft](https://huggingface.co/datasets/cl-nagoya/ruri-v3-dataset-ft) で教師あり学習したモデル群です。

| ID                                                                                                          | Architecture | #Param. | #Param.<br>w/o Emb. | JMTEB-Avg | JMTEB-Retrieval | JMTEB-STS | JMTEB-Classification | JMTEB-Reranking | JMTEB-Clustering |
|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
| [iamtatsuki05/Sentence-ModernBERT-JP-0.5B](https://huggingface.co/iamtatsuki05/Sentence-ModernBERT-JP-0.5B) | ModernBERT   | 679M    | 548M                | 65.31     | 57.95           | 80.78     | 71.73                | 75.50           | **50.03**        |
| [iamtatsuki05/Sentence-Llama-Bi-JP-0.5B](https://huggingface.co/iamtatsuki05/Sentence-Llama-Bi-JP-0.5B)     | Llama        | 661M    | 530M                | 61.02     | 51.55           | 78.01     | 68.51                | 71.96           | 48.69            |
| [iamtatsuki05/Sentence-Sarashina-Bi-0.5B](https://huggingface.co/iamtatsuki05/Sentence-Sarashina-Bi-0.5B)<br>(this model)   | Llama        | 661M    | 530M                | **66.84** | **59.00**       | **83.50** | **74.35**            | **77.36**       | 49.40            |


## Licence
このモデルは [MIT](https://licenses.opensource.jp/MIT/MIT.html) でライセンスされています。


## How to Cite

```tex
@article{MIREI
  title={同一条件下における Encoder/Decoder アーキテクチャによる文埋め込みの性能分析},
  author={岡田 龍樹 and 杉本 徹},
  journal={言語処理学会第 32 回年次大会 (NLP2026)},
  year={2026}
}
```