Omartificial-Intelligence-Space
commited on
Add new SentenceTransformer model.
Browse files- 1_Pooling/config.json +10 -0
- README.md +601 -0
- config.json +31 -0
- config_sentence_transformers.json +10 -0
- model.safetensors +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +55 -0
- vocab.txt +0 -0
1_Pooling/config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"word_embedding_dimension": 768,
|
3 |
+
"pooling_mode_cls_token": false,
|
4 |
+
"pooling_mode_mean_tokens": true,
|
5 |
+
"pooling_mode_max_tokens": false,
|
6 |
+
"pooling_mode_mean_sqrt_len_tokens": false,
|
7 |
+
"pooling_mode_weightedmean_tokens": false,
|
8 |
+
"pooling_mode_lasttoken": false,
|
9 |
+
"include_prompt": true
|
10 |
+
}
|
README.md
ADDED
@@ -0,0 +1,601 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- ar
|
4 |
+
library_name: sentence-transformers
|
5 |
+
tags:
|
6 |
+
- sentence-transformers
|
7 |
+
- sentence-similarity
|
8 |
+
- feature-extraction
|
9 |
+
- generated_from_trainer
|
10 |
+
- dataset_size:2772052
|
11 |
+
- loss:MultipleNegativesRankingLoss
|
12 |
+
- loss:SoftmaxLoss
|
13 |
+
- loss:CoSENTLoss
|
14 |
+
base_model: google-bert/bert-base-multilingual-cased
|
15 |
+
datasets:
|
16 |
+
- Omartificial-Intelligence-Space/Arabic-stsb
|
17 |
+
- Omartificial-Intelligence-Space/Arabic-Quora-Duplicates
|
18 |
+
widget:
|
19 |
+
- source_sentence: امرأة تكتب شيئاً
|
20 |
+
sentences:
|
21 |
+
- قد يكون من الممكن أن يوجد نظام شمسي مثل نظامنا خارج المجرة
|
22 |
+
- امرأة تقطع البصل الأخضر.
|
23 |
+
- مراهق يتحدث إلى فتاة عبر كاميرا الإنترنت
|
24 |
+
- source_sentence: لاعب التزلج على الجليد يقفز فوق برميل
|
25 |
+
sentences:
|
26 |
+
- الرجل كان يمشي
|
27 |
+
- رجل عجوز يجلس في غرفة الانتظار بالمستشفى.
|
28 |
+
- متزلج على الجليد يقفز
|
29 |
+
- source_sentence: العديد من النساء يرتدين ملابس الشرق الأوسط من الذهب والأزرق والأصفر
|
30 |
+
والأحمر ويؤدون رقصة.
|
31 |
+
sentences:
|
32 |
+
- الناس توقفوا على جانب الطريق
|
33 |
+
- هناك على الأقل إمرأتين
|
34 |
+
- المرأة وحدها نائمة في قاربها على القمر
|
35 |
+
- source_sentence: الرجل يرتدي قميصاً أزرق.
|
36 |
+
sentences:
|
37 |
+
- رجل يرتدي قميصاً أزرق يميل إلى الجدار بجانب الطريق مع شاحنة زرقاء وسيارة حمراء
|
38 |
+
مع الماء في الخلفية.
|
39 |
+
- الرجل يجلس بجانب لوحة لنفسه
|
40 |
+
- رجل يرتدي قميص أسود يعزف على الجيتار.
|
41 |
+
- source_sentence: ما هي الدروس التي يمكن أن نتعلمها من أدولف هتلر؟
|
42 |
+
sentences:
|
43 |
+
- ما هي الدروس التي يمكن أن نتعلمها من أدولف هتلر؟
|
44 |
+
- ما مدى قربنا من الحرب العالمية؟
|
45 |
+
- هل حرق وقود الطائرات يذوب أعمدة الصلب؟
|
46 |
+
pipeline_tag: sentence-similarity
|
47 |
+
---
|
48 |
+
|
49 |
+
# SentenceTransformer based on google-bert/bert-base-multilingual-cased
|
50 |
+
|
51 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [google-bert/bert-base-multilingual-cased](https://huggingface.co/google-bert/bert-base-multilingual-cased) on the all-nli-pair, all-nli-pair-class, all-nli-pair-score, all-nli-triplet, [stsb](https://huggingface.co/datasets/Omartificial-Intelligence-Space/arabic-stsb) and [quora](https://huggingface.co/datasets/Omartificial-Intelligence-Space/arabic-quora-duplicates) datasets. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
52 |
+
|
53 |
+
## Model Details
|
54 |
+
|
55 |
+
### Model Description
|
56 |
+
- **Model Type:** Sentence Transformer
|
57 |
+
- **Base model:** [google-bert/bert-base-multilingual-cased](https://huggingface.co/google-bert/bert-base-multilingual-cased) <!-- at revision 3f076fdb1ab68d5b2880cb87a0886f315b8146f8 -->
|
58 |
+
- **Maximum Sequence Length:** 512 tokens
|
59 |
+
- **Output Dimensionality:** 768 tokens
|
60 |
+
- **Similarity Function:** Cosine Similarity
|
61 |
+
- **Training Datasets:**
|
62 |
+
- all-nli-pair
|
63 |
+
- all-nli-pair-class
|
64 |
+
- all-nli-pair-score
|
65 |
+
- all-nli-triplet
|
66 |
+
- [stsb](https://huggingface.co/datasets/Omartificial-Intelligence-Space/arabic-stsb)
|
67 |
+
- [quora](https://huggingface.co/datasets/Omartificial-Intelligence-Space/arabic-quora-duplicates)
|
68 |
+
- **Language:** ar
|
69 |
+
<!-- - **License:** Unknown -->
|
70 |
+
|
71 |
+
### Model Sources
|
72 |
+
|
73 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
74 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
75 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
76 |
+
|
77 |
+
### Full Model Architecture
|
78 |
+
|
79 |
+
```
|
80 |
+
SentenceTransformer(
|
81 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
|
82 |
+
(1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
|
83 |
+
)
|
84 |
+
```
|
85 |
+
|
86 |
+
## Usage
|
87 |
+
|
88 |
+
### Direct Usage (Sentence Transformers)
|
89 |
+
|
90 |
+
First install the Sentence Transformers library:
|
91 |
+
|
92 |
+
```bash
|
93 |
+
pip install -U sentence-transformers
|
94 |
+
```
|
95 |
+
|
96 |
+
Then you can load this model and run inference.
|
97 |
+
```python
|
98 |
+
from sentence_transformers import SentenceTransformer
|
99 |
+
|
100 |
+
# Download from the 🤗 Hub
|
101 |
+
model = SentenceTransformer("Omartificial-Intelligence-Space/Arabic-base-all-nli-stsb-quora")
|
102 |
+
# Run inference
|
103 |
+
sentences = [
|
104 |
+
'ما هي الدروس التي يمكن أن نتعلمها من أدولف هتلر؟',
|
105 |
+
'ما هي الدروس التي يمكن أن نتعلمها من أدولف هتلر؟',
|
106 |
+
'ما مدى قربنا من الحرب العالمية؟',
|
107 |
+
]
|
108 |
+
embeddings = model.encode(sentences)
|
109 |
+
print(embeddings.shape)
|
110 |
+
# [3, 768]
|
111 |
+
|
112 |
+
# Get the similarity scores for the embeddings
|
113 |
+
similarities = model.similarity(embeddings, embeddings)
|
114 |
+
print(similarities.shape)
|
115 |
+
# [3, 3]
|
116 |
+
```
|
117 |
+
|
118 |
+
<!--
|
119 |
+
### Direct Usage (Transformers)
|
120 |
+
|
121 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
122 |
+
|
123 |
+
</details>
|
124 |
+
-->
|
125 |
+
|
126 |
+
<!--
|
127 |
+
### Downstream Usage (Sentence Transformers)
|
128 |
+
|
129 |
+
You can finetune this model on your own dataset.
|
130 |
+
|
131 |
+
<details><summary>Click to expand</summary>
|
132 |
+
|
133 |
+
</details>
|
134 |
+
-->
|
135 |
+
|
136 |
+
<!--
|
137 |
+
### Out-of-Scope Use
|
138 |
+
|
139 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
140 |
+
-->
|
141 |
+
|
142 |
+
<!--
|
143 |
+
## Bias, Risks and Limitations
|
144 |
+
|
145 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
146 |
+
-->
|
147 |
+
|
148 |
+
<!--
|
149 |
+
### Recommendations
|
150 |
+
|
151 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
152 |
+
-->
|
153 |
+
|
154 |
+
## Training Details
|
155 |
+
|
156 |
+
### Training Datasets
|
157 |
+
|
158 |
+
#### all-nli-pair
|
159 |
+
|
160 |
+
* Dataset: all-nli-pair
|
161 |
+
* Size: 314,315 training samples
|
162 |
+
* Columns: <code>anchor</code> and <code>positive</code>
|
163 |
+
* Approximate statistics based on the first 1000 samples:
|
164 |
+
| | anchor | positive |
|
165 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
166 |
+
| type | string | string |
|
167 |
+
| details | <ul><li>min: 6 tokens</li><li>mean: 24.43 tokens</li><li>max: 88 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 11.73 tokens</li><li>max: 45 tokens</li></ul> |
|
168 |
+
* Samples:
|
169 |
+
| anchor | positive |
|
170 |
+
|:------------------------------------------------------------|:--------------------------------------------|
|
171 |
+
| <code>شخص على حصان يقفز فوق طائرة معطلة</code> | <code>شخص في الهواء الطلق، على حصان.</code> |
|
172 |
+
| <code>أطفال يبتسمون و يلوحون للكاميرا</code> | <code>هناك أطفال حاضرون</code> |
|
173 |
+
| <code>صبي يقفز على لوح التزلج في منتصف الجسر الأحمر.</code> | <code>الفتى يقوم بخدعة التزلج</code> |
|
174 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
175 |
+
```json
|
176 |
+
{
|
177 |
+
"scale": 20.0,
|
178 |
+
"similarity_fct": "cos_sim"
|
179 |
+
}
|
180 |
+
```
|
181 |
+
|
182 |
+
#### all-nli-pair-class
|
183 |
+
|
184 |
+
* Dataset: all-nli-pair-class
|
185 |
+
* Size: 942,069 training samples
|
186 |
+
* Columns: <code>premise</code>, <code>hypothesis</code>, and <code>label</code>
|
187 |
+
* Approximate statistics based on the first 1000 samples:
|
188 |
+
| | premise | hypothesis | label |
|
189 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:-------------------------------------------------------------------|
|
190 |
+
| type | string | string | int |
|
191 |
+
| details | <ul><li>min: 8 tokens</li><li>mean: 24.78 tokens</li><li>max: 72 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 13.55 tokens</li><li>max: 55 tokens</li></ul> | <ul><li>0: ~33.40%</li><li>1: ~33.30%</li><li>2: ~33.30%</li></ul> |
|
192 |
+
* Samples:
|
193 |
+
| premise | hypothesis | label |
|
194 |
+
|:-----------------------------------------------|:--------------------------------------------|:---------------|
|
195 |
+
| <code>شخص على حصان يقفز فوق طائرة معطلة</code> | <code>شخص يقوم بتدريب حصانه للمنافسة</code> | <code>1</code> |
|
196 |
+
| <code>شخص على حصان يقفز فوق طائرة معطلة</code> | <code>شخص في مطعم، يطلب عجة.</code> | <code>2</code> |
|
197 |
+
| <code>شخص على حصان يقفز فوق طائرة معطلة</code> | <code>شخص في الهواء الطلق، على حصان.</code> | <code>0</code> |
|
198 |
+
* Loss: [<code>SoftmaxLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#softmaxloss)
|
199 |
+
|
200 |
+
#### all-nli-pair-score
|
201 |
+
|
202 |
+
* Dataset: all-nli-pair-score
|
203 |
+
* Size: 942,069 training samples
|
204 |
+
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
|
205 |
+
* Approximate statistics based on the first 1000 samples:
|
206 |
+
| | sentence1 | sentence2 | score |
|
207 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:--------------------------------------------------------------|
|
208 |
+
| type | string | string | float |
|
209 |
+
| details | <ul><li>min: 8 tokens</li><li>mean: 24.78 tokens</li><li>max: 72 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 13.55 tokens</li><li>max: 55 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.5</li><li>max: 1.0</li></ul> |
|
210 |
+
* Samples:
|
211 |
+
| sentence1 | sentence2 | score |
|
212 |
+
|:-----------------------------------------------|:--------------------------------------------|:-----------------|
|
213 |
+
| <code>شخص على حصان يقفز فوق طائرة معطلة</code> | <code>شخص يقوم بتدريب حصانه للمنافسة</code> | <code>0.5</code> |
|
214 |
+
| <code>شخص على حصان يقفز فوق طائرة معطلة</code> | <code>شخص في مطعم، يطلب عجة.</code> | <code>0.0</code> |
|
215 |
+
| <code>شخص على حصان يقفز فوق طائرة معطلة</code> | <code>شخص في الهواء الطلق، على حصان.</code> | <code>1.0</code> |
|
216 |
+
* Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
|
217 |
+
```json
|
218 |
+
{
|
219 |
+
"scale": 20.0,
|
220 |
+
"similarity_fct": "pairwise_cos_sim"
|
221 |
+
}
|
222 |
+
```
|
223 |
+
|
224 |
+
#### all-nli-triplet
|
225 |
+
|
226 |
+
* Dataset: all-nli-triplet
|
227 |
+
* Size: 557,850 training samples
|
228 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
229 |
+
* Approximate statistics based on the first 1000 samples:
|
230 |
+
| | anchor | positive | negative |
|
231 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
232 |
+
| type | string | string | string |
|
233 |
+
| details | <ul><li>min: 6 tokens</li><li>mean: 12.54 tokens</li><li>max: 72 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 16.06 tokens</li><li>max: 59 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 18.13 tokens</li><li>max: 70 tokens</li></ul> |
|
234 |
+
* Samples:
|
235 |
+
| anchor | positive | negative |
|
236 |
+
|:------------------------------------------------------------|:--------------------------------------------|:------------------------------------|
|
237 |
+
| <code>شخص على حصان يقفز فوق طائرة معطلة</code> | <code>شخص في الهواء الطلق، على حصان.</code> | <code>شخص في مطعم، يطلب عجة.</code> |
|
238 |
+
| <code>أطفال يبتسمون و يلوحون للكاميرا</code> | <code>هناك أطفال حاضرون</code> | <code>الاطفال يتجهمون</code> |
|
239 |
+
| <code>صبي يقفز على لوح التزلج في منتصف الجسر الأحمر.</code> | <code>الفتى يقوم بخدعة التزلج</code> | <code>الصبي يتزلج على الرصيف</code> |
|
240 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
241 |
+
```json
|
242 |
+
{
|
243 |
+
"scale": 20.0,
|
244 |
+
"similarity_fct": "cos_sim"
|
245 |
+
}
|
246 |
+
```
|
247 |
+
|
248 |
+
#### stsb
|
249 |
+
|
250 |
+
* Dataset: [stsb](https://huggingface.co/datasets/Omartificial-Intelligence-Space/arabic-stsb) at [7c6c4bd](https://huggingface.co/datasets/Omartificial-Intelligence-Space/arabic-stsb/tree/7c6c4bd31a465a0f3ed1a3704a31f2682a0f65be)
|
251 |
+
* Size: 5,749 training samples
|
252 |
+
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
|
253 |
+
* Approximate statistics based on the first 1000 samples:
|
254 |
+
| | sentence1 | sentence2 | score |
|
255 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
256 |
+
| type | string | string | float |
|
257 |
+
| details | <ul><li>min: 5 tokens</li><li>mean: 11.68 tokens</li><li>max: 34 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 11.44 tokens</li><li>max: 31 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.54</li><li>max: 1.0</li></ul> |
|
258 |
+
* Samples:
|
259 |
+
| sentence1 | sentence2 | score |
|
260 |
+
|:-----------------------------------------------|:--------------------------------------------------------|:------------------|
|
261 |
+
| <code>طائرة ستقلع</code> | <code>طائرة جوية ستقلع</code> | <code>1.0</code> |
|
262 |
+
| <code>رجل يعزف على ناي كبير</code> | <code>رجل يعزف على الناي.</code> | <code>0.76</code> |
|
263 |
+
| <code>رجل ينشر الجبن الممزق على البيتزا</code> | <code>رجل ينشر الجبن الممزق على بيتزا غير مطبوخة</code> | <code>0.76</code> |
|
264 |
+
* Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
|
265 |
+
```json
|
266 |
+
{
|
267 |
+
"scale": 20.0,
|
268 |
+
"similarity_fct": "pairwise_cos_sim"
|
269 |
+
}
|
270 |
+
```
|
271 |
+
|
272 |
+
#### quora
|
273 |
+
|
274 |
+
* Dataset: [quora](https://huggingface.co/datasets/Omartificial-Intelligence-Space/arabic-quora-duplicates) at [7d49308](https://huggingface.co/datasets/Omartificial-Intelligence-Space/arabic-quora-duplicates/tree/7d49308a21bbad3a2762d11f2e8c0cbcc86510fe)
|
275 |
+
* Size: 10,000 training samples
|
276 |
+
* Columns: <code>anchor</code> and <code>positive</code>
|
277 |
+
* Approximate statistics based on the first 1000 samples:
|
278 |
+
| | anchor | positive |
|
279 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
280 |
+
| type | string | string |
|
281 |
+
| details | <ul><li>min: 7 tokens</li><li>mean: 19.69 tokens</li><li>max: 58 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 20.15 tokens</li><li>max: 73 tokens</li></ul> |
|
282 |
+
* Samples:
|
283 |
+
| anchor | positive |
|
284 |
+
|:-----------------------------------------------------------------------|:------------------------------------------------------------------------------------------|
|
285 |
+
| <code>علم التنجيم: أنا برج الجدي الشمس القمر والقبعة الشمسية...</code> | <code>أنا برج الجدي الثلاثي (الشمس والقمر والصعود في برج الجدي) ماذا يقول هذا عني؟</code> |
|
286 |
+
| <code>كيف أكون جيولوجياً جيداً؟</code> | <code>ماذا علي أن أفعل لأكون جيولوجياً عظيماً؟</code> |
|
287 |
+
| <code>كيف أقرأ وأجد تعليقاتي على يوتيوب؟</code> | <code>كيف يمكنني رؤية كل تعليقاتي على اليوتيوب؟</code> |
|
288 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
289 |
+
```json
|
290 |
+
{
|
291 |
+
"scale": 20.0,
|
292 |
+
"similarity_fct": "cos_sim"
|
293 |
+
}
|
294 |
+
```
|
295 |
+
|
296 |
+
### Evaluation Datasets
|
297 |
+
|
298 |
+
#### all-nli-triplet
|
299 |
+
|
300 |
+
* Dataset: all-nli-triplet
|
301 |
+
* Size: 6,584 evaluation samples
|
302 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
303 |
+
* Approximate statistics based on the first 1000 samples:
|
304 |
+
| | anchor | positive | negative |
|
305 |
+
|:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
306 |
+
| type | string | string | string |
|
307 |
+
| details | <ul><li>min: 5 tokens</li><li>mean: 25.81 tokens</li><li>max: 125 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 12.09 tokens</li><li>max: 52 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 13.35 tokens</li><li>max: 42 tokens</li></ul> |
|
308 |
+
* Samples:
|
309 |
+
| anchor | positive | negative |
|
310 |
+
|:-----------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------|:---------------------------------------------------|
|
311 |
+
| <code>امرأتان يتعانقان بينما يحملان حزمة</code> | <code>إمرأتان يحملان حزمة</code> | <code>الرجال يتشاجرون خارج مطعم</code> |
|
312 |
+
| <code>طفلين صغيرين يرتديان قميصاً أزرق، أحدهما يرتدي الرقم 9 والآخر يرتدي الرقم 2 يقفان على خطوات خشبية في الحمام ويغسلان أيديهما في المغسلة.</code> | <code>طفلين يرتديان قميصاً مرقماً يغسلون أيديهم</code> | <code>طفلين يرتديان سترة يذهبان إلى المدرسة</code> |
|
313 |
+
| <code>رجل يبيع الدونات لعميل خلال معرض عالمي أقيم في مدينة أنجليس</code> | <code>رجل يبيع الدونات لعميل</code> | <code>امرأة تشرب قهوتها في مقهى صغير</code> |
|
314 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
315 |
+
```json
|
316 |
+
{
|
317 |
+
"scale": 20.0,
|
318 |
+
"similarity_fct": "cos_sim"
|
319 |
+
}
|
320 |
+
```
|
321 |
+
|
322 |
+
#### stsb
|
323 |
+
|
324 |
+
* Dataset: [stsb](https://huggingface.co/datasets/Omartificial-Intelligence-Space/arabic-stsb) at [7c6c4bd](https://huggingface.co/datasets/Omartificial-Intelligence-Space/arabic-stsb/tree/7c6c4bd31a465a0f3ed1a3704a31f2682a0f65be)
|
325 |
+
* Size: 1,500 evaluation samples
|
326 |
+
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
|
327 |
+
* Approximate statistics based on the first 1000 samples:
|
328 |
+
| | sentence1 | sentence2 | score |
|
329 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
330 |
+
| type | string | string | float |
|
331 |
+
| details | <ul><li>min: 5 tokens</li><li>mean: 20.19 tokens</li><li>max: 53 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 20.09 tokens</li><li>max: 54 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.47</li><li>max: 1.0</li></ul> |
|
332 |
+
* Samples:
|
333 |
+
| sentence1 | sentence2 | score |
|
334 |
+
|:--------------------------------------|:---------------------------------------|:------------------|
|
335 |
+
| <code>رجل يرتدي قبعة صلبة يرقص</code> | <code>رجل يرتدي قبعة صلبة يرقص.</code> | <code>1.0</code> |
|
336 |
+
| <code>طفل صغير يركب حصاناً.</code> | <code>طفل يركب حصاناً.</code> | <code>0.95</code> |
|
337 |
+
| <code>رجل يطعم فأراً لأفعى</code> | <code>الرجل يطعم الفأر للثعبان.</code> | <code>1.0</code> |
|
338 |
+
* Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
|
339 |
+
```json
|
340 |
+
{
|
341 |
+
"scale": 20.0,
|
342 |
+
"similarity_fct": "pairwise_cos_sim"
|
343 |
+
}
|
344 |
+
```
|
345 |
+
|
346 |
+
#### quora
|
347 |
+
|
348 |
+
* Dataset: [quora](https://huggingface.co/datasets/Omartificial-Intelligence-Space/arabic-quora-duplicates) at [7d49308](https://huggingface.co/datasets/Omartificial-Intelligence-Space/arabic-quora-duplicates/tree/7d49308a21bbad3a2762d11f2e8c0cbcc86510fe)
|
349 |
+
* Size: 1,000 evaluation samples
|
350 |
+
* Columns: <code>anchor</code> and <code>positive</code>
|
351 |
+
* Approximate statistics based on the first 1000 samples:
|
352 |
+
| | anchor | positive |
|
353 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
354 |
+
| type | string | string |
|
355 |
+
| details | <ul><li>min: 7 tokens</li><li>mean: 19.66 tokens</li><li>max: 73 tokens</li></ul> | <ul><li>min: 8 tokens</li><li>mean: 20.17 tokens</li><li>max: 96 tokens</li></ul> |
|
356 |
+
* Samples:
|
357 |
+
| anchor | positive |
|
358 |
+
|:-------------------------------------------------------------------|:---------------------------------------------------------------------------|
|
359 |
+
| <code>ما هو قرارك في السنة الجديدة؟</code> | <code>ما الذي يمكن أن يكون قراري للعام الجديد لعام 2017؟</code> |
|
360 |
+
| <code>هل يجب أن أشتري هاتف آيفون 6 أو سامسونج غالاكسي إس 7؟</code> | <code>أيهما أفضل: الـ iPhone 6S Plus أو الـ Samsung Galaxy S7 Edge؟</code> |
|
361 |
+
| <code>ما هي الاختلافات بين التجاوز والتراجع؟</code> | <code>ما الفرق بين التجاوز والتراجع؟</code> |
|
362 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
363 |
+
```json
|
364 |
+
{
|
365 |
+
"scale": 20.0,
|
366 |
+
"similarity_fct": "cos_sim"
|
367 |
+
}
|
368 |
+
```
|
369 |
+
|
370 |
+
### Training Hyperparameters
|
371 |
+
#### Non-Default Hyperparameters
|
372 |
+
|
373 |
+
- `per_device_train_batch_size`: 128
|
374 |
+
- `num_train_epochs`: 1
|
375 |
+
- `warmup_ratio`: 0.1
|
376 |
+
|
377 |
+
#### All Hyperparameters
|
378 |
+
<details><summary>Click to expand</summary>
|
379 |
+
|
380 |
+
- `overwrite_output_dir`: False
|
381 |
+
- `do_predict`: False
|
382 |
+
- `prediction_loss_only`: True
|
383 |
+
- `per_device_train_batch_size`: 128
|
384 |
+
- `per_device_eval_batch_size`: 8
|
385 |
+
- `per_gpu_train_batch_size`: None
|
386 |
+
- `per_gpu_eval_batch_size`: None
|
387 |
+
- `gradient_accumulation_steps`: 1
|
388 |
+
- `eval_accumulation_steps`: None
|
389 |
+
- `learning_rate`: 5e-05
|
390 |
+
- `weight_decay`: 0.0
|
391 |
+
- `adam_beta1`: 0.9
|
392 |
+
- `adam_beta2`: 0.999
|
393 |
+
- `adam_epsilon`: 1e-08
|
394 |
+
- `max_grad_norm`: 1.0
|
395 |
+
- `num_train_epochs`: 1
|
396 |
+
- `max_steps`: -1
|
397 |
+
- `lr_scheduler_type`: linear
|
398 |
+
- `lr_scheduler_kwargs`: {}
|
399 |
+
- `warmup_ratio`: 0.1
|
400 |
+
- `warmup_steps`: 0
|
401 |
+
- `log_level`: passive
|
402 |
+
- `log_level_replica`: warning
|
403 |
+
- `log_on_each_node`: True
|
404 |
+
- `logging_nan_inf_filter`: True
|
405 |
+
- `save_safetensors`: True
|
406 |
+
- `save_on_each_node`: False
|
407 |
+
- `save_only_model`: False
|
408 |
+
- `no_cuda`: False
|
409 |
+
- `use_cpu`: False
|
410 |
+
- `use_mps_device`: False
|
411 |
+
- `seed`: 42
|
412 |
+
- `data_seed`: None
|
413 |
+
- `jit_mode_eval`: False
|
414 |
+
- `use_ipex`: False
|
415 |
+
- `bf16`: False
|
416 |
+
- `fp16`: False
|
417 |
+
- `fp16_opt_level`: O1
|
418 |
+
- `half_precision_backend`: auto
|
419 |
+
- `bf16_full_eval`: False
|
420 |
+
- `fp16_full_eval`: False
|
421 |
+
- `tf32`: None
|
422 |
+
- `local_rank`: 0
|
423 |
+
- `ddp_backend`: None
|
424 |
+
- `tpu_num_cores`: None
|
425 |
+
- `tpu_metrics_debug`: False
|
426 |
+
- `debug`: []
|
427 |
+
- `dataloader_drop_last`: False
|
428 |
+
- `dataloader_num_workers`: 0
|
429 |
+
- `dataloader_prefetch_factor`: None
|
430 |
+
- `past_index`: -1
|
431 |
+
- `disable_tqdm`: False
|
432 |
+
- `remove_unused_columns`: True
|
433 |
+
- `label_names`: None
|
434 |
+
- `load_best_model_at_end`: False
|
435 |
+
- `ignore_data_skip`: False
|
436 |
+
- `fsdp`: []
|
437 |
+
- `fsdp_min_num_params`: 0
|
438 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
439 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
440 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'gradient_accumulation_kwargs': None}
|
441 |
+
- `deepspeed`: None
|
442 |
+
- `label_smoothing_factor`: 0.0
|
443 |
+
- `optim`: adamw_torch
|
444 |
+
- `optim_args`: None
|
445 |
+
- `adafactor`: False
|
446 |
+
- `group_by_length`: False
|
447 |
+
- `length_column_name`: length
|
448 |
+
- `ddp_find_unused_parameters`: None
|
449 |
+
- `ddp_bucket_cap_mb`: None
|
450 |
+
- `ddp_broadcast_buffers`: False
|
451 |
+
- `dataloader_pin_memory`: True
|
452 |
+
- `dataloader_persistent_workers`: False
|
453 |
+
- `skip_memory_metrics`: True
|
454 |
+
- `use_legacy_prediction_loop`: False
|
455 |
+
- `push_to_hub`: False
|
456 |
+
- `resume_from_checkpoint`: None
|
457 |
+
- `hub_model_id`: None
|
458 |
+
- `hub_strategy`: every_save
|
459 |
+
- `hub_private_repo`: False
|
460 |
+
- `hub_always_push`: False
|
461 |
+
- `gradient_checkpointing`: False
|
462 |
+
- `gradient_checkpointing_kwargs`: None
|
463 |
+
- `include_inputs_for_metrics`: False
|
464 |
+
- `eval_do_concat_batches`: True
|
465 |
+
- `fp16_backend`: auto
|
466 |
+
- `push_to_hub_model_id`: None
|
467 |
+
- `push_to_hub_organization`: None
|
468 |
+
- `mp_parameters`:
|
469 |
+
- `auto_find_batch_size`: False
|
470 |
+
- `full_determinism`: False
|
471 |
+
- `torchdynamo`: None
|
472 |
+
- `ray_scope`: last
|
473 |
+
- `ddp_timeout`: 1800
|
474 |
+
- `torch_compile`: False
|
475 |
+
- `torch_compile_backend`: None
|
476 |
+
- `torch_compile_mode`: None
|
477 |
+
- `dispatch_batches`: None
|
478 |
+
- `split_batches`: None
|
479 |
+
- `include_tokens_per_second`: False
|
480 |
+
- `include_num_input_tokens_seen`: False
|
481 |
+
- `neftune_noise_alpha`: None
|
482 |
+
- `optim_target_modules`: None
|
483 |
+
- `batch_sampler`: batch_sampler
|
484 |
+
- `multi_dataset_batch_sampler`: proportional
|
485 |
+
|
486 |
+
</details>
|
487 |
+
|
488 |
+
### Training Logs
|
489 |
+
| Epoch | Step | Training Loss |
|
490 |
+
|:------:|:-----:|:-------------:|
|
491 |
+
| 0.0231 | 500 | 5.0061 |
|
492 |
+
| 0.0462 | 1000 | 4.7876 |
|
493 |
+
| 0.0693 | 1500 | 4.6618 |
|
494 |
+
| 0.0923 | 2000 | 4.7337 |
|
495 |
+
| 0.1154 | 2500 | 4.5945 |
|
496 |
+
| 0.1385 | 3000 | 4.7536 |
|
497 |
+
| 0.1616 | 3500 | 4.619 |
|
498 |
+
| 0.1847 | 4000 | 4.4761 |
|
499 |
+
| 0.2078 | 4500 | 4.4454 |
|
500 |
+
| 0.2309 | 5000 | 4.6376 |
|
501 |
+
| 0.2539 | 5500 | 4.5513 |
|
502 |
+
| 0.2770 | 6000 | 4.5619 |
|
503 |
+
| 0.3001 | 6500 | 4.3416 |
|
504 |
+
| 0.3232 | 7000 | 4.7372 |
|
505 |
+
| 0.3463 | 7500 | 4.5906 |
|
506 |
+
| 0.3694 | 8000 | 4.6546 |
|
507 |
+
| 0.3924 | 8500 | 4.2452 |
|
508 |
+
| 0.4155 | 9000 | 4.684 |
|
509 |
+
| 0.4386 | 9500 | 4.426 |
|
510 |
+
| 0.4617 | 10000 | 4.2539 |
|
511 |
+
| 0.4848 | 10500 | 4.3224 |
|
512 |
+
| 0.5079 | 11000 | 4.4046 |
|
513 |
+
| 0.5310 | 11500 | 4.4644 |
|
514 |
+
| 0.5540 | 12000 | 4.4542 |
|
515 |
+
| 0.5771 | 12500 | 4.6026 |
|
516 |
+
| 0.6002 | 13000 | 4.3519 |
|
517 |
+
| 0.6233 | 13500 | 4.5135 |
|
518 |
+
| 0.6464 | 14000 | 4.3318 |
|
519 |
+
| 0.6695 | 14500 | 4.4465 |
|
520 |
+
| 0.6926 | 15000 | 3.9692 |
|
521 |
+
| 0.7156 | 15500 | 4.2084 |
|
522 |
+
| 0.7387 | 16000 | 4.2217 |
|
523 |
+
| 0.7618 | 16500 | 4.2791 |
|
524 |
+
| 0.7849 | 17000 | 4.5962 |
|
525 |
+
| 0.8080 | 17500 | 4.5871 |
|
526 |
+
| 0.8311 | 18000 | 4.3271 |
|
527 |
+
| 0.8541 | 18500 | 4.1688 |
|
528 |
+
| 0.8772 | 19000 | 4.2081 |
|
529 |
+
| 0.9003 | 19500 | 4.2867 |
|
530 |
+
| 0.9234 | 20000 | 4.5474 |
|
531 |
+
| 0.9465 | 20500 | 4.5257 |
|
532 |
+
| 0.9696 | 21000 | 3.8461 |
|
533 |
+
| 0.9927 | 21500 | 4.1254 |
|
534 |
+
|
535 |
+
|
536 |
+
### Framework Versions
|
537 |
+
- Python: 3.9.18
|
538 |
+
- Sentence Transformers: 3.0.1
|
539 |
+
- Transformers: 4.40.0
|
540 |
+
- PyTorch: 2.2.2+cu121
|
541 |
+
- Accelerate: 0.26.1
|
542 |
+
- Datasets: 2.19.0
|
543 |
+
- Tokenizers: 0.19.1
|
544 |
+
|
545 |
+
## Citation
|
546 |
+
|
547 |
+
### BibTeX
|
548 |
+
|
549 |
+
#### Sentence Transformers and SoftmaxLoss
|
550 |
+
```bibtex
|
551 |
+
@inproceedings{reimers-2019-sentence-bert,
|
552 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
553 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
554 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
555 |
+
month = "11",
|
556 |
+
year = "2019",
|
557 |
+
publisher = "Association for Computational Linguistics",
|
558 |
+
url = "https://arxiv.org/abs/1908.10084",
|
559 |
+
}
|
560 |
+
```
|
561 |
+
|
562 |
+
#### MultipleNegativesRankingLoss
|
563 |
+
```bibtex
|
564 |
+
@misc{henderson2017efficient,
|
565 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
566 |
+
author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
|
567 |
+
year={2017},
|
568 |
+
eprint={1705.00652},
|
569 |
+
archivePrefix={arXiv},
|
570 |
+
primaryClass={cs.CL}
|
571 |
+
}
|
572 |
+
```
|
573 |
+
|
574 |
+
#### CoSENTLoss
|
575 |
+
```bibtex
|
576 |
+
@online{kexuefm-8847,
|
577 |
+
title={CoSENT: A more efficient sentence vector scheme than Sentence-BERT},
|
578 |
+
author={Su Jianlin},
|
579 |
+
year={2022},
|
580 |
+
month={Jan},
|
581 |
+
url={https://kexue.fm/archives/8847},
|
582 |
+
}
|
583 |
+
```
|
584 |
+
|
585 |
+
<!--
|
586 |
+
## Glossary
|
587 |
+
|
588 |
+
*Clearly define terms in order to be accessible across audiences.*
|
589 |
+
-->
|
590 |
+
|
591 |
+
<!--
|
592 |
+
## Model Card Authors
|
593 |
+
|
594 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
595 |
+
-->
|
596 |
+
|
597 |
+
<!--
|
598 |
+
## Model Card Contact
|
599 |
+
|
600 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
601 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "google-bert/bert-base-multilingual-cased",
|
3 |
+
"architectures": [
|
4 |
+
"BertModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"directionality": "bidi",
|
9 |
+
"hidden_act": "gelu",
|
10 |
+
"hidden_dropout_prob": 0.1,
|
11 |
+
"hidden_size": 768,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 3072,
|
14 |
+
"layer_norm_eps": 1e-12,
|
15 |
+
"max_position_embeddings": 512,
|
16 |
+
"model_type": "bert",
|
17 |
+
"num_attention_heads": 12,
|
18 |
+
"num_hidden_layers": 12,
|
19 |
+
"pad_token_id": 0,
|
20 |
+
"pooler_fc_size": 768,
|
21 |
+
"pooler_num_attention_heads": 12,
|
22 |
+
"pooler_num_fc_layers": 3,
|
23 |
+
"pooler_size_per_head": 128,
|
24 |
+
"pooler_type": "first_token_transform",
|
25 |
+
"position_embedding_type": "absolute",
|
26 |
+
"torch_dtype": "float32",
|
27 |
+
"transformers_version": "4.40.0",
|
28 |
+
"type_vocab_size": 2,
|
29 |
+
"use_cache": true,
|
30 |
+
"vocab_size": 119547
|
31 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "3.0.1",
|
4 |
+
"transformers": "4.40.0",
|
5 |
+
"pytorch": "2.2.2+cu121"
|
6 |
+
},
|
7 |
+
"prompts": {},
|
8 |
+
"default_prompt_name": null,
|
9 |
+
"similarity_fn_name": null
|
10 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b50aacb357c86dfd2fcc749c93554d9de01774f84a1f2ef1c638f3b6a8e7403f
|
3 |
+
size 711436136
|
modules.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[
|
2 |
+
{
|
3 |
+
"idx": 0,
|
4 |
+
"name": "0",
|
5 |
+
"path": "",
|
6 |
+
"type": "sentence_transformers.models.Transformer"
|
7 |
+
},
|
8 |
+
{
|
9 |
+
"idx": 1,
|
10 |
+
"name": "1",
|
11 |
+
"path": "1_Pooling",
|
12 |
+
"type": "sentence_transformers.models.Pooling"
|
13 |
+
}
|
14 |
+
]
|
sentence_bert_config.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"max_seq_length": 512,
|
3 |
+
"do_lower_case": false
|
4 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": "[CLS]",
|
3 |
+
"mask_token": "[MASK]",
|
4 |
+
"pad_token": "[PAD]",
|
5 |
+
"sep_token": "[SEP]",
|
6 |
+
"unk_token": "[UNK]"
|
7 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "[PAD]",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"100": {
|
12 |
+
"content": "[UNK]",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"101": {
|
20 |
+
"content": "[CLS]",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"102": {
|
28 |
+
"content": "[SEP]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"103": {
|
36 |
+
"content": "[MASK]",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
}
|
43 |
+
},
|
44 |
+
"clean_up_tokenization_spaces": true,
|
45 |
+
"cls_token": "[CLS]",
|
46 |
+
"do_lower_case": false,
|
47 |
+
"mask_token": "[MASK]",
|
48 |
+
"model_max_length": 512,
|
49 |
+
"pad_token": "[PAD]",
|
50 |
+
"sep_token": "[SEP]",
|
51 |
+
"strip_accents": null,
|
52 |
+
"tokenize_chinese_chars": true,
|
53 |
+
"tokenizer_class": "BertTokenizer",
|
54 |
+
"unk_token": "[UNK]"
|
55 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|