Snivellus789
commited on
Commit
•
bc5340b
1
Parent(s):
bff580f
Add new SentenceTransformer model.
Browse files- 1_Pooling/config.json +10 -0
- README.md +407 -0
- config.json +31 -0
- config_sentence_transformers.json +10 -0
- model.safetensors +3 -0
- modules.json +20 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +57 -0
- vocab.txt +0 -0
1_Pooling/config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"word_embedding_dimension": 384,
|
3 |
+
"pooling_mode_cls_token": true,
|
4 |
+
"pooling_mode_mean_tokens": false,
|
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,407 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: BAAI/bge-small-en-v1.5
|
3 |
+
datasets: []
|
4 |
+
language: []
|
5 |
+
library_name: sentence-transformers
|
6 |
+
pipeline_tag: sentence-similarity
|
7 |
+
tags:
|
8 |
+
- sentence-transformers
|
9 |
+
- sentence-similarity
|
10 |
+
- feature-extraction
|
11 |
+
- generated_from_trainer
|
12 |
+
- dataset_size:1500
|
13 |
+
- loss:BatchAllTripletLoss
|
14 |
+
widget:
|
15 |
+
- source_sentence: 实现一段代码,将给定短语中的每个单词按字母顺序排列,然后按照每个单词首字母的字典顺序对这些单词进行排序,并保留每个单词中字符的原始顺序。
|
16 |
+
sentences:
|
17 |
+
- 可以给出小猫、小狗和小兔的年龄对温度的适应度和健康的影响的代码吗?
|
18 |
+
- 绘制一个5x5的矩阵,矩阵中的单元格颜色交替,模式如下所描述(黑=实心块,白=空白块):
|
19 |
+
- "Write a Java program that simulates a basic text-based RPG (Role-Playing Game)\
|
20 |
+
\ with the following features:\n - Character creation: allow the user to choose\
|
21 |
+
\ a name, class, and starting attributes.\n - Combat system: implement turn-based\
|
22 |
+
\ combat against randomly generated enemies.\n - Leveling up: increase character\
|
23 |
+
\ attributes based on experience points gained from defeating enemies.\n - Inventory\
|
24 |
+
\ system: collect items dropped by defeated enemies and manage them in an inventory\
|
25 |
+
\ menu.\n "
|
26 |
+
- source_sentence: 'Create a HTML page with an ordered list of items using Five items:
|
27 |
+
apple, banana, orange, strawberry, and lemon.'
|
28 |
+
sentences:
|
29 |
+
- 'How can we modify the given Ruby code to determine if a candidate fulfills all
|
30 |
+
the eligibility criteria for the US presidency? Specifically, in addition to the
|
31 |
+
age requirement of 35 years, we also need to check if the candidate is a natural-born
|
32 |
+
citizen and has been a resident of the United States for at least 14 years. Can
|
33 |
+
you suggest a more optimized code to accomplish this task? '
|
34 |
+
- 从系统生物学的视角解读生物科技的重要性。
|
35 |
+
- 为一家以室内植物为主的植物店计划一场营销活动。
|
36 |
+
- source_sentence: 请使用尽可能简单的语言解释主体-客体模型(Subject-Object Model)。
|
37 |
+
sentences:
|
38 |
+
- 'Generate an algorithm for the game Hangman. '
|
39 |
+
- 如何使用 JavaScript 将两个 HTML 元素互换位置?
|
40 |
+
- 'In Swift, what function can I use to shorten the sentence "I''m feeling kind
|
41 |
+
of tired after having worked all day" while maintaining the same meaning and tone?
|
42 |
+
Can you provide an example of the shortened sentence using the function? '
|
43 |
+
- source_sentence: 在一个Dockerfile中,何时使用ADD指令与COPY指令?
|
44 |
+
sentences:
|
45 |
+
- 在给定的数列中寻找子数组,使其元素和最大。
|
46 |
+
- 'In an Excel spreadsheet that contains information about employees, there is a
|
47 |
+
column for job titles. John''s job title is listed as "Manager." Add a description
|
48 |
+
of John''s responsibilities to the sentence "John was a" using an Excel formula. '
|
49 |
+
- 多项式p(z) = z^3 + Az^2 + Bz + C为复数系数多项式。如果我们知道A、B、C为实数,而p根存在两个复数根r1和r2,第三个根也是它们的共轭复数r3。证明虚部非零。
|
50 |
+
- source_sentence: 解析三种大数据分析工具,请包括使用案例。
|
51 |
+
sentences:
|
52 |
+
- "How can the traveler determine the correct number of open hands after the 2021st\
|
53 |
+
\ gesture based on the pattern provided by the villagers? \nHere is a possible\
|
54 |
+
\ solution in Ruby:\nopen_hands = 1\nclosed_hands = 1\n(1..2021).each do |i|\n\
|
55 |
+
\ if i % 2 == 1\n closed_hands += open_hands\n open_hands = closed_hands\
|
56 |
+
\ - open_hands\n else\n open_hands += closed_hands\n closed_hands = open_hands\
|
57 |
+
\ - closed_hands\n end\nend\nputs \"After the 2021st gesture, the number of open\
|
58 |
+
\ hands is #{open_hands}.\" \nCan you explain how this Ruby code works to solve\
|
59 |
+
\ the puzzle posed by the villagers? "
|
60 |
+
- 'How can I use C# code to simulate the discovery of a rare and valuable book collection
|
61 |
+
secretly housed in a local library, and then capture the town''s reaction to the
|
62 |
+
discovery? '
|
63 |
+
- 'How can I create a stylish outfit that incorporates intricate embroidery patterns
|
64 |
+
and luxurious fabric, while also being budget-friendly? Can you provide a creative
|
65 |
+
solution using Ruby code that balances affordability and elegance?
|
66 |
+
|
67 |
+
For example, you could use the following code to search for affordable fabric
|
68 |
+
options and embroidery patterns:
|
69 |
+
|
70 |
+
```ruby
|
71 |
+
|
72 |
+
require ''etsy''
|
73 |
+
|
74 |
+
# Search for affordable fabrics on Etsy
|
75 |
+
|
76 |
+
results = Etsy::Search.new(''affordable fabric'', :includes => [:Images], :price_max
|
77 |
+
=> 50).results
|
78 |
+
|
79 |
+
# Search for intricate embroidery patterns on Etsy
|
80 |
+
|
81 |
+
embroidery_results = Etsy::Search.new(''intricate embroidery pattern'', :includes
|
82 |
+
=> [:Images], :price_max => 100).results
|
83 |
+
|
84 |
+
# Choose a fabric and embroidery pattern to use in the outfit
|
85 |
+
|
86 |
+
chosen_fabric = results.sample
|
87 |
+
|
88 |
+
chosen_embroidery = embroidery_results.sample
|
89 |
+
|
90 |
+
# Use the chosen fabric and embroidery pattern to create a stylish outfit
|
91 |
+
|
92 |
+
# ...
|
93 |
+
|
94 |
+
```
|
95 |
+
|
96 |
+
Can you provide additional code and reasoning to complete the solution? '
|
97 |
+
---
|
98 |
+
|
99 |
+
# SentenceTransformer based on BAAI/bge-small-en-v1.5
|
100 |
+
|
101 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5). It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
102 |
+
|
103 |
+
## Model Details
|
104 |
+
|
105 |
+
### Model Description
|
106 |
+
- **Model Type:** Sentence Transformer
|
107 |
+
- **Base model:** [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5) <!-- at revision 5c38ec7c405ec4b44b94cc5a9bb96e735b38267a -->
|
108 |
+
- **Maximum Sequence Length:** 512 tokens
|
109 |
+
- **Output Dimensionality:** 384 tokens
|
110 |
+
- **Similarity Function:** Cosine Similarity
|
111 |
+
<!-- - **Training Dataset:** Unknown -->
|
112 |
+
<!-- - **Language:** Unknown -->
|
113 |
+
<!-- - **License:** Unknown -->
|
114 |
+
|
115 |
+
### Model Sources
|
116 |
+
|
117 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
118 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
119 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
120 |
+
|
121 |
+
### Full Model Architecture
|
122 |
+
|
123 |
+
```
|
124 |
+
SentenceTransformer(
|
125 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
|
126 |
+
(1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
|
127 |
+
(2): Normalize()
|
128 |
+
)
|
129 |
+
```
|
130 |
+
|
131 |
+
## Usage
|
132 |
+
|
133 |
+
### Direct Usage (Sentence Transformers)
|
134 |
+
|
135 |
+
First install the Sentence Transformers library:
|
136 |
+
|
137 |
+
```bash
|
138 |
+
pip install -U sentence-transformers
|
139 |
+
```
|
140 |
+
|
141 |
+
Then you can load this model and run inference.
|
142 |
+
```python
|
143 |
+
from sentence_transformers import SentenceTransformer
|
144 |
+
|
145 |
+
# Download from the 🤗 Hub
|
146 |
+
model = SentenceTransformer("Snivellus789/router-embedding-tuned-2")
|
147 |
+
# Run inference
|
148 |
+
sentences = [
|
149 |
+
'解析三种大数据分析工具,请包括使用案例。',
|
150 |
+
"How can I create a stylish outfit that incorporates intricate embroidery patterns and luxurious fabric, while also being budget-friendly? Can you provide a creative solution using Ruby code that balances affordability and elegance?\nFor example, you could use the following code to search for affordable fabric options and embroidery patterns:\n```ruby\nrequire 'etsy'\n# Search for affordable fabrics on Etsy\nresults = Etsy::Search.new('affordable fabric', :includes => [:Images], :price_max => 50).results\n# Search for intricate embroidery patterns on Etsy\nembroidery_results = Etsy::Search.new('intricate embroidery pattern', :includes => [:Images], :price_max => 100).results\n# Choose a fabric and embroidery pattern to use in the outfit\nchosen_fabric = results.sample\nchosen_embroidery = embroidery_results.sample\n# Use the chosen fabric and embroidery pattern to create a stylish outfit\n# ...\n```\nCan you provide additional code and reasoning to complete the solution? ",
|
151 |
+
"How can I use C# code to simulate the discovery of a rare and valuable book collection secretly housed in a local library, and then capture the town's reaction to the discovery? ",
|
152 |
+
]
|
153 |
+
embeddings = model.encode(sentences)
|
154 |
+
print(embeddings.shape)
|
155 |
+
# [3, 384]
|
156 |
+
|
157 |
+
# Get the similarity scores for the embeddings
|
158 |
+
similarities = model.similarity(embeddings, embeddings)
|
159 |
+
print(similarities.shape)
|
160 |
+
# [3, 3]
|
161 |
+
```
|
162 |
+
|
163 |
+
<!--
|
164 |
+
### Direct Usage (Transformers)
|
165 |
+
|
166 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
167 |
+
|
168 |
+
</details>
|
169 |
+
-->
|
170 |
+
|
171 |
+
<!--
|
172 |
+
### Downstream Usage (Sentence Transformers)
|
173 |
+
|
174 |
+
You can finetune this model on your own dataset.
|
175 |
+
|
176 |
+
<details><summary>Click to expand</summary>
|
177 |
+
|
178 |
+
</details>
|
179 |
+
-->
|
180 |
+
|
181 |
+
<!--
|
182 |
+
### Out-of-Scope Use
|
183 |
+
|
184 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
185 |
+
-->
|
186 |
+
|
187 |
+
<!--
|
188 |
+
## Bias, Risks and Limitations
|
189 |
+
|
190 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
191 |
+
-->
|
192 |
+
|
193 |
+
<!--
|
194 |
+
### Recommendations
|
195 |
+
|
196 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
197 |
+
-->
|
198 |
+
|
199 |
+
## Training Details
|
200 |
+
|
201 |
+
### Training Dataset
|
202 |
+
|
203 |
+
#### Unnamed Dataset
|
204 |
+
|
205 |
+
|
206 |
+
* Size: 1,500 training samples
|
207 |
+
* Columns: <code>sentence</code> and <code>label</code>
|
208 |
+
* Approximate statistics based on the first 1000 samples:
|
209 |
+
| | sentence | label |
|
210 |
+
|:--------|:-----------------------------------------------------------------------------------|:------------------------------------------------|
|
211 |
+
| type | string | int |
|
212 |
+
| details | <ul><li>min: 8 tokens</li><li>mean: 95.61 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>0: ~50.00%</li><li>1: ~50.00%</li></ul> |
|
213 |
+
* Samples:
|
214 |
+
| sentence | label |
|
215 |
+
|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------|
|
216 |
+
| <code>请输出所有跟政企市场相关的关键词列表</code> | <code>0</code> |
|
217 |
+
| <code>开发一个定制的JavaScript解决方案,用于有效地平衡和排序一个二叉树。你可以假设输入是一个平衡因子擯至2的大O()为Log(N)的AVL树。专注于实现自我调整二叉搜索树的变换,当面对不平衡操作时,如插入或删除节点。确保你的解决方案为潜在的边缘案例做好准备,并具有健壮的错误处理策略。你的代码应该清晰地记录和优化效率。</code> | <code>0</code> |
|
218 |
+
| <code>在一个尚未被公开的领域中,描述五个最具创新性的产品概念。</code> | <code>0</code> |
|
219 |
+
* Loss: [<code>BatchAllTripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#batchalltripletloss)
|
220 |
+
|
221 |
+
### Training Hyperparameters
|
222 |
+
#### Non-Default Hyperparameters
|
223 |
+
|
224 |
+
- `per_device_train_batch_size`: 16
|
225 |
+
- `per_device_eval_batch_size`: 16
|
226 |
+
- `learning_rate`: 2e-05
|
227 |
+
- `num_train_epochs`: 2
|
228 |
+
- `warmup_ratio`: 0.1
|
229 |
+
- `bf16`: True
|
230 |
+
- `batch_sampler`: no_duplicates
|
231 |
+
|
232 |
+
#### All Hyperparameters
|
233 |
+
<details><summary>Click to expand</summary>
|
234 |
+
|
235 |
+
- `overwrite_output_dir`: False
|
236 |
+
- `do_predict`: False
|
237 |
+
- `eval_strategy`: no
|
238 |
+
- `prediction_loss_only`: True
|
239 |
+
- `per_device_train_batch_size`: 16
|
240 |
+
- `per_device_eval_batch_size`: 16
|
241 |
+
- `per_gpu_train_batch_size`: None
|
242 |
+
- `per_gpu_eval_batch_size`: None
|
243 |
+
- `gradient_accumulation_steps`: 1
|
244 |
+
- `eval_accumulation_steps`: None
|
245 |
+
- `learning_rate`: 2e-05
|
246 |
+
- `weight_decay`: 0.0
|
247 |
+
- `adam_beta1`: 0.9
|
248 |
+
- `adam_beta2`: 0.999
|
249 |
+
- `adam_epsilon`: 1e-08
|
250 |
+
- `max_grad_norm`: 1.0
|
251 |
+
- `num_train_epochs`: 2
|
252 |
+
- `max_steps`: -1
|
253 |
+
- `lr_scheduler_type`: linear
|
254 |
+
- `lr_scheduler_kwargs`: {}
|
255 |
+
- `warmup_ratio`: 0.1
|
256 |
+
- `warmup_steps`: 0
|
257 |
+
- `log_level`: passive
|
258 |
+
- `log_level_replica`: warning
|
259 |
+
- `log_on_each_node`: True
|
260 |
+
- `logging_nan_inf_filter`: True
|
261 |
+
- `save_safetensors`: True
|
262 |
+
- `save_on_each_node`: False
|
263 |
+
- `save_only_model`: False
|
264 |
+
- `restore_callback_states_from_checkpoint`: False
|
265 |
+
- `no_cuda`: False
|
266 |
+
- `use_cpu`: False
|
267 |
+
- `use_mps_device`: False
|
268 |
+
- `seed`: 42
|
269 |
+
- `data_seed`: None
|
270 |
+
- `jit_mode_eval`: False
|
271 |
+
- `use_ipex`: False
|
272 |
+
- `bf16`: True
|
273 |
+
- `fp16`: False
|
274 |
+
- `fp16_opt_level`: O1
|
275 |
+
- `half_precision_backend`: auto
|
276 |
+
- `bf16_full_eval`: False
|
277 |
+
- `fp16_full_eval`: False
|
278 |
+
- `tf32`: None
|
279 |
+
- `local_rank`: 0
|
280 |
+
- `ddp_backend`: None
|
281 |
+
- `tpu_num_cores`: None
|
282 |
+
- `tpu_metrics_debug`: False
|
283 |
+
- `debug`: []
|
284 |
+
- `dataloader_drop_last`: False
|
285 |
+
- `dataloader_num_workers`: 0
|
286 |
+
- `dataloader_prefetch_factor`: None
|
287 |
+
- `past_index`: -1
|
288 |
+
- `disable_tqdm`: False
|
289 |
+
- `remove_unused_columns`: True
|
290 |
+
- `label_names`: None
|
291 |
+
- `load_best_model_at_end`: False
|
292 |
+
- `ignore_data_skip`: False
|
293 |
+
- `fsdp`: []
|
294 |
+
- `fsdp_min_num_params`: 0
|
295 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
296 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
297 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
298 |
+
- `deepspeed`: None
|
299 |
+
- `label_smoothing_factor`: 0.0
|
300 |
+
- `optim`: adamw_torch
|
301 |
+
- `optim_args`: None
|
302 |
+
- `adafactor`: False
|
303 |
+
- `group_by_length`: False
|
304 |
+
- `length_column_name`: length
|
305 |
+
- `ddp_find_unused_parameters`: None
|
306 |
+
- `ddp_bucket_cap_mb`: None
|
307 |
+
- `ddp_broadcast_buffers`: False
|
308 |
+
- `dataloader_pin_memory`: True
|
309 |
+
- `dataloader_persistent_workers`: False
|
310 |
+
- `skip_memory_metrics`: True
|
311 |
+
- `use_legacy_prediction_loop`: False
|
312 |
+
- `push_to_hub`: False
|
313 |
+
- `resume_from_checkpoint`: None
|
314 |
+
- `hub_model_id`: None
|
315 |
+
- `hub_strategy`: every_save
|
316 |
+
- `hub_private_repo`: False
|
317 |
+
- `hub_always_push`: False
|
318 |
+
- `gradient_checkpointing`: False
|
319 |
+
- `gradient_checkpointing_kwargs`: None
|
320 |
+
- `include_inputs_for_metrics`: False
|
321 |
+
- `eval_do_concat_batches`: True
|
322 |
+
- `fp16_backend`: auto
|
323 |
+
- `push_to_hub_model_id`: None
|
324 |
+
- `push_to_hub_organization`: None
|
325 |
+
- `mp_parameters`:
|
326 |
+
- `auto_find_batch_size`: False
|
327 |
+
- `full_determinism`: False
|
328 |
+
- `torchdynamo`: None
|
329 |
+
- `ray_scope`: last
|
330 |
+
- `ddp_timeout`: 1800
|
331 |
+
- `torch_compile`: False
|
332 |
+
- `torch_compile_backend`: None
|
333 |
+
- `torch_compile_mode`: None
|
334 |
+
- `dispatch_batches`: None
|
335 |
+
- `split_batches`: None
|
336 |
+
- `include_tokens_per_second`: False
|
337 |
+
- `include_num_input_tokens_seen`: False
|
338 |
+
- `neftune_noise_alpha`: None
|
339 |
+
- `optim_target_modules`: None
|
340 |
+
- `batch_eval_metrics`: False
|
341 |
+
- `eval_on_start`: False
|
342 |
+
- `batch_sampler`: no_duplicates
|
343 |
+
- `multi_dataset_batch_sampler`: proportional
|
344 |
+
|
345 |
+
</details>
|
346 |
+
|
347 |
+
### Training Logs
|
348 |
+
| Epoch | Step | Training Loss |
|
349 |
+
|:------:|:----:|:-------------:|
|
350 |
+
| 1.0638 | 100 | 0.097 |
|
351 |
+
|
352 |
+
|
353 |
+
### Framework Versions
|
354 |
+
- Python: 3.10.12
|
355 |
+
- Sentence Transformers: 3.0.1
|
356 |
+
- Transformers: 4.42.4
|
357 |
+
- PyTorch: 2.3.1+cu121
|
358 |
+
- Accelerate: 0.33.0.dev0
|
359 |
+
- Datasets: 2.20.0
|
360 |
+
- Tokenizers: 0.19.1
|
361 |
+
|
362 |
+
## Citation
|
363 |
+
|
364 |
+
### BibTeX
|
365 |
+
|
366 |
+
#### Sentence Transformers
|
367 |
+
```bibtex
|
368 |
+
@inproceedings{reimers-2019-sentence-bert,
|
369 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
370 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
371 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
372 |
+
month = "11",
|
373 |
+
year = "2019",
|
374 |
+
publisher = "Association for Computational Linguistics",
|
375 |
+
url = "https://arxiv.org/abs/1908.10084",
|
376 |
+
}
|
377 |
+
```
|
378 |
+
|
379 |
+
#### BatchAllTripletLoss
|
380 |
+
```bibtex
|
381 |
+
@misc{hermans2017defense,
|
382 |
+
title={In Defense of the Triplet Loss for Person Re-Identification},
|
383 |
+
author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
|
384 |
+
year={2017},
|
385 |
+
eprint={1703.07737},
|
386 |
+
archivePrefix={arXiv},
|
387 |
+
primaryClass={cs.CV}
|
388 |
+
}
|
389 |
+
```
|
390 |
+
|
391 |
+
<!--
|
392 |
+
## Glossary
|
393 |
+
|
394 |
+
*Clearly define terms in order to be accessible across audiences.*
|
395 |
+
-->
|
396 |
+
|
397 |
+
<!--
|
398 |
+
## Model Card Authors
|
399 |
+
|
400 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
401 |
+
-->
|
402 |
+
|
403 |
+
<!--
|
404 |
+
## Model Card Contact
|
405 |
+
|
406 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
407 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "BAAI/bge-small-en-v1.5",
|
3 |
+
"architectures": [
|
4 |
+
"BertModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"hidden_act": "gelu",
|
9 |
+
"hidden_dropout_prob": 0.1,
|
10 |
+
"hidden_size": 384,
|
11 |
+
"id2label": {
|
12 |
+
"0": "LABEL_0"
|
13 |
+
},
|
14 |
+
"initializer_range": 0.02,
|
15 |
+
"intermediate_size": 1536,
|
16 |
+
"label2id": {
|
17 |
+
"LABEL_0": 0
|
18 |
+
},
|
19 |
+
"layer_norm_eps": 1e-12,
|
20 |
+
"max_position_embeddings": 512,
|
21 |
+
"model_type": "bert",
|
22 |
+
"num_attention_heads": 12,
|
23 |
+
"num_hidden_layers": 12,
|
24 |
+
"pad_token_id": 0,
|
25 |
+
"position_embedding_type": "absolute",
|
26 |
+
"torch_dtype": "float32",
|
27 |
+
"transformers_version": "4.42.4",
|
28 |
+
"type_vocab_size": 2,
|
29 |
+
"use_cache": true,
|
30 |
+
"vocab_size": 30522
|
31 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "3.0.1",
|
4 |
+
"transformers": "4.42.4",
|
5 |
+
"pytorch": "2.3.1+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:a85d3d1be576018deb068d81138299861c2ffc9ed66cfbd9c90f898973815acb
|
3 |
+
size 133462128
|
modules.json
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
{
|
15 |
+
"idx": 2,
|
16 |
+
"name": "2",
|
17 |
+
"path": "2_Normalize",
|
18 |
+
"type": "sentence_transformers.models.Normalize"
|
19 |
+
}
|
20 |
+
]
|
sentence_bert_config.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"max_seq_length": 512,
|
3 |
+
"do_lower_case": true
|
4 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": {
|
3 |
+
"content": "[CLS]",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"mask_token": {
|
10 |
+
"content": "[MASK]",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": {
|
17 |
+
"content": "[PAD]",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"sep_token": {
|
24 |
+
"content": "[SEP]",
|
25 |
+
"lstrip": false,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
},
|
30 |
+
"unk_token": {
|
31 |
+
"content": "[UNK]",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
}
|
37 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_basic_tokenize": true,
|
47 |
+
"do_lower_case": true,
|
48 |
+
"mask_token": "[MASK]",
|
49 |
+
"model_max_length": 512,
|
50 |
+
"never_split": null,
|
51 |
+
"pad_token": "[PAD]",
|
52 |
+
"sep_token": "[SEP]",
|
53 |
+
"strip_accents": null,
|
54 |
+
"tokenize_chinese_chars": true,
|
55 |
+
"tokenizer_class": "BertTokenizer",
|
56 |
+
"unk_token": "[UNK]"
|
57 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|