Upload folder using huggingface_hub
Browse files- 1_Pooling/config.json +4 -1
- README.md +603 -50
- config.json +2 -2
- config_sentence_transformers.json +7 -4
- model.safetensors +1 -1
1_Pooling/config.json
CHANGED
@@ -3,5 +3,8 @@
|
|
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 |
}
|
|
|
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
CHANGED
@@ -1,91 +1,644 @@
|
|
1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
pipeline_tag: sentence-similarity
|
3 |
tags:
|
4 |
- sentence-transformers
|
5 |
-
- feature-extraction
|
6 |
- sentence-similarity
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
---
|
9 |
|
10 |
-
#
|
|
|
|
|
11 |
|
12 |
-
|
13 |
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
-
|
17 |
|
18 |
-
|
|
|
|
|
|
|
|
|
19 |
|
20 |
```
|
21 |
-
|
|
|
|
|
|
|
|
|
22 |
```
|
23 |
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
|
|
26 |
```python
|
27 |
from sentence_transformers import SentenceTransformer
|
28 |
-
sentences = ["This is an example sentence", "Each sentence is converted"]
|
29 |
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
embeddings = model.encode(sentences)
|
32 |
-
print(embeddings)
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
```
|
34 |
|
|
|
|
|
35 |
|
|
|
36 |
|
37 |
-
|
|
|
38 |
|
39 |
-
|
|
|
40 |
|
41 |
-
|
42 |
|
|
|
43 |
|
44 |
-
|
45 |
-
|
46 |
|
47 |
-
|
|
|
48 |
|
49 |
-
|
50 |
-
|
51 |
-
{'batch_size': 10, 'sampler': 'torch.utils.data.sampler.SequentialSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'}
|
52 |
-
```
|
53 |
|
54 |
-
|
55 |
|
56 |
-
|
57 |
-
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
```
|
60 |
|
61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
```
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
},
|
72 |
-
|
73 |
-
"steps_per_epoch": null,
|
74 |
-
"warmup_steps": 51,
|
75 |
-
"weight_decay": 0.01
|
76 |
}
|
77 |
```
|
78 |
|
|
|
|
|
79 |
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
|
89 |
-
|
|
|
90 |
|
91 |
-
|
|
|
|
1 |
---
|
2 |
+
base_model: BAAI/bge-small-en-v1.5
|
3 |
+
datasets: []
|
4 |
+
language: []
|
5 |
+
library_name: sentence-transformers
|
6 |
+
metrics:
|
7 |
+
- cosine_accuracy@1
|
8 |
+
- cosine_accuracy@3
|
9 |
+
- cosine_accuracy@5
|
10 |
+
- cosine_accuracy@10
|
11 |
+
- cosine_precision@1
|
12 |
+
- cosine_precision@3
|
13 |
+
- cosine_precision@5
|
14 |
+
- cosine_precision@10
|
15 |
+
- cosine_recall@1
|
16 |
+
- cosine_recall@3
|
17 |
+
- cosine_recall@5
|
18 |
+
- cosine_recall@10
|
19 |
+
- cosine_ndcg@10
|
20 |
+
- cosine_mrr@10
|
21 |
+
- cosine_map@100
|
22 |
+
- dot_accuracy@1
|
23 |
+
- dot_accuracy@3
|
24 |
+
- dot_accuracy@5
|
25 |
+
- dot_accuracy@10
|
26 |
+
- dot_precision@1
|
27 |
+
- dot_precision@3
|
28 |
+
- dot_precision@5
|
29 |
+
- dot_precision@10
|
30 |
+
- dot_recall@1
|
31 |
+
- dot_recall@3
|
32 |
+
- dot_recall@5
|
33 |
+
- dot_recall@10
|
34 |
+
- dot_ndcg@10
|
35 |
+
- dot_mrr@10
|
36 |
+
- dot_map@100
|
37 |
pipeline_tag: sentence-similarity
|
38 |
tags:
|
39 |
- sentence-transformers
|
|
|
40 |
- sentence-similarity
|
41 |
+
- feature-extraction
|
42 |
+
- generated_from_trainer
|
43 |
+
- dataset_size:491
|
44 |
+
- loss:MultipleNegativesRankingLoss
|
45 |
+
widget:
|
46 |
+
- source_sentence: do I have money I vested through [TICKER]
|
47 |
+
sentences:
|
48 |
+
- '[{"get_portfolio([''brokerName''])": "portfolio"}, {"filter(''portfolio'',''brokerName'',''=='',''Magnifi'')":
|
49 |
+
"portfolio"}]'
|
50 |
+
- '[{"get_attribute([''<TICKER1>''],[''returns''],''<DATES>'')": "price_<TICKER1>"}]'
|
51 |
+
- '[{"get_earnings_announcements([''<TICKER1>''],''<DATES>'')": "<TICKER1>_earnings"}]'
|
52 |
+
- source_sentence: Knock Knock!
|
53 |
+
sentences:
|
54 |
+
- '[{"get_portfolio([''weight''])": "portfolio"}, {"factor_contribution(''portfolio'',''<DATES>'',''sector'',''sector
|
55 |
+
retailing'',''portfolio'')": "portfolio"}]'
|
56 |
+
- '[{"get_news_articles([''<TICKER1>''],None,None,None)": "news_data_<TICKER1>"}]'
|
57 |
+
- '[]'
|
58 |
+
- source_sentence: what's the earnings per share of [TICKER]
|
59 |
+
sentences:
|
60 |
+
- '[{"get_attribute([''<TICKER1>''],[''returns''],''<DATES>'')": "performance_data_<TICKER1>"}]'
|
61 |
+
- '[{"get_attribute([''<TICKER1>''],[''earnings per share''],''<DATES>'')": "earnings_per_share_<TICKER1>"}]'
|
62 |
+
- '[{"get_portfolio([''weight''])": "portfolio"}, {"factor_contribution(''portfolio'',''<DATES>'',''factor'',''momentum'',''portfolio'')":
|
63 |
+
"portfolio"}]'
|
64 |
+
- source_sentence: returns of [TICKER] since 2017
|
65 |
+
sentences:
|
66 |
+
- '[{"get_portfolio([''weight''])": "portfolio"}, {"factor_contribution(''portfolio'',''<DATES>'',''factor'',''volatility'',''returns'')":
|
67 |
+
"portfolio"}]'
|
68 |
+
- '[{"get_attribute([''<TICKER1>''],[''returns''],''<DATES>'')": "performance_data_<TICKER1>"}]'
|
69 |
+
- '[{"get_dictionary_definition([''limit order'', ''market order''])": "definitions"}]'
|
70 |
+
- source_sentence: how should I play [TICKER] futures contracts
|
71 |
+
sentences:
|
72 |
+
- '[]'
|
73 |
+
- '[{"get_attribute([''<TICKER1>''],[''returns''],''<DATES>'')": "live_price_<TICKER1>"}]'
|
74 |
+
- '[{"get_news_articles(None,None,None,None)": "latest_news_data"}]'
|
75 |
+
model-index:
|
76 |
+
- name: SentenceTransformer based on BAAI/bge-small-en-v1.5
|
77 |
+
results:
|
78 |
+
- task:
|
79 |
+
type: information-retrieval
|
80 |
+
name: Information Retrieval
|
81 |
+
dataset:
|
82 |
+
name: Unknown
|
83 |
+
type: unknown
|
84 |
+
metrics:
|
85 |
+
- type: cosine_accuracy@1
|
86 |
+
value: 0.7191780821917808
|
87 |
+
name: Cosine Accuracy@1
|
88 |
+
- type: cosine_accuracy@3
|
89 |
+
value: 0.9246575342465754
|
90 |
+
name: Cosine Accuracy@3
|
91 |
+
- type: cosine_accuracy@5
|
92 |
+
value: 0.952054794520548
|
93 |
+
name: Cosine Accuracy@5
|
94 |
+
- type: cosine_accuracy@10
|
95 |
+
value: 0.9794520547945206
|
96 |
+
name: Cosine Accuracy@10
|
97 |
+
- type: cosine_precision@1
|
98 |
+
value: 0.7191780821917808
|
99 |
+
name: Cosine Precision@1
|
100 |
+
- type: cosine_precision@3
|
101 |
+
value: 0.3082191780821918
|
102 |
+
name: Cosine Precision@3
|
103 |
+
- type: cosine_precision@5
|
104 |
+
value: 0.19041095890410956
|
105 |
+
name: Cosine Precision@5
|
106 |
+
- type: cosine_precision@10
|
107 |
+
value: 0.09794520547945204
|
108 |
+
name: Cosine Precision@10
|
109 |
+
- type: cosine_recall@1
|
110 |
+
value: 0.019977168949771692
|
111 |
+
name: Cosine Recall@1
|
112 |
+
- type: cosine_recall@3
|
113 |
+
value: 0.02568493150684932
|
114 |
+
name: Cosine Recall@3
|
115 |
+
- type: cosine_recall@5
|
116 |
+
value: 0.02644596651445967
|
117 |
+
name: Cosine Recall@5
|
118 |
+
- type: cosine_recall@10
|
119 |
+
value: 0.02720700152207002
|
120 |
+
name: Cosine Recall@10
|
121 |
+
- type: cosine_ndcg@10
|
122 |
+
value: 0.1886992031917713
|
123 |
+
name: Cosine Ndcg@10
|
124 |
+
- type: cosine_mrr@10
|
125 |
+
value: 0.8171314416177428
|
126 |
+
name: Cosine Mrr@10
|
127 |
+
- type: cosine_map@100
|
128 |
+
value: 0.02272901264767703
|
129 |
+
name: Cosine Map@100
|
130 |
+
- type: dot_accuracy@1
|
131 |
+
value: 0.7191780821917808
|
132 |
+
name: Dot Accuracy@1
|
133 |
+
- type: dot_accuracy@3
|
134 |
+
value: 0.9246575342465754
|
135 |
+
name: Dot Accuracy@3
|
136 |
+
- type: dot_accuracy@5
|
137 |
+
value: 0.952054794520548
|
138 |
+
name: Dot Accuracy@5
|
139 |
+
- type: dot_accuracy@10
|
140 |
+
value: 0.9794520547945206
|
141 |
+
name: Dot Accuracy@10
|
142 |
+
- type: dot_precision@1
|
143 |
+
value: 0.7191780821917808
|
144 |
+
name: Dot Precision@1
|
145 |
+
- type: dot_precision@3
|
146 |
+
value: 0.3082191780821918
|
147 |
+
name: Dot Precision@3
|
148 |
+
- type: dot_precision@5
|
149 |
+
value: 0.19041095890410956
|
150 |
+
name: Dot Precision@5
|
151 |
+
- type: dot_precision@10
|
152 |
+
value: 0.09794520547945204
|
153 |
+
name: Dot Precision@10
|
154 |
+
- type: dot_recall@1
|
155 |
+
value: 0.019977168949771692
|
156 |
+
name: Dot Recall@1
|
157 |
+
- type: dot_recall@3
|
158 |
+
value: 0.02568493150684932
|
159 |
+
name: Dot Recall@3
|
160 |
+
- type: dot_recall@5
|
161 |
+
value: 0.02644596651445967
|
162 |
+
name: Dot Recall@5
|
163 |
+
- type: dot_recall@10
|
164 |
+
value: 0.02720700152207002
|
165 |
+
name: Dot Recall@10
|
166 |
+
- type: dot_ndcg@10
|
167 |
+
value: 0.1886992031917713
|
168 |
+
name: Dot Ndcg@10
|
169 |
+
- type: dot_mrr@10
|
170 |
+
value: 0.8171314416177428
|
171 |
+
name: Dot Mrr@10
|
172 |
+
- type: dot_map@100
|
173 |
+
value: 0.02272901264767703
|
174 |
+
name: Dot Map@100
|
175 |
---
|
176 |
|
177 |
+
# SentenceTransformer based on BAAI/bge-small-en-v1.5
|
178 |
+
|
179 |
+
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.
|
180 |
|
181 |
+
## Model Details
|
182 |
|
183 |
+
### Model Description
|
184 |
+
- **Model Type:** Sentence Transformer
|
185 |
+
- **Base model:** [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5) <!-- at revision 5c38ec7c405ec4b44b94cc5a9bb96e735b38267a -->
|
186 |
+
- **Maximum Sequence Length:** 512 tokens
|
187 |
+
- **Output Dimensionality:** 384 tokens
|
188 |
+
- **Similarity Function:** Cosine Similarity
|
189 |
+
<!-- - **Training Dataset:** Unknown -->
|
190 |
+
<!-- - **Language:** Unknown -->
|
191 |
+
<!-- - **License:** Unknown -->
|
192 |
|
193 |
+
### Model Sources
|
194 |
|
195 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
196 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
197 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
198 |
+
|
199 |
+
### Full Model Architecture
|
200 |
|
201 |
```
|
202 |
+
SentenceTransformer(
|
203 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
|
204 |
+
(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})
|
205 |
+
(2): Normalize()
|
206 |
+
)
|
207 |
```
|
208 |
|
209 |
+
## Usage
|
210 |
+
|
211 |
+
### Direct Usage (Sentence Transformers)
|
212 |
+
|
213 |
+
First install the Sentence Transformers library:
|
214 |
+
|
215 |
+
```bash
|
216 |
+
pip install -U sentence-transformers
|
217 |
+
```
|
218 |
|
219 |
+
Then you can load this model and run inference.
|
220 |
```python
|
221 |
from sentence_transformers import SentenceTransformer
|
|
|
222 |
|
223 |
+
# Download from the 🤗 Hub
|
224 |
+
model = SentenceTransformer("sentence_transformers_model_id")
|
225 |
+
# Run inference
|
226 |
+
sentences = [
|
227 |
+
'how should I play [TICKER] futures contracts',
|
228 |
+
'[]',
|
229 |
+
'[{"get_attribute([\'<TICKER1>\'],[\'returns\'],\'<DATES>\')": "live_price_<TICKER1>"}]',
|
230 |
+
]
|
231 |
embeddings = model.encode(sentences)
|
232 |
+
print(embeddings.shape)
|
233 |
+
# [3, 384]
|
234 |
+
|
235 |
+
# Get the similarity scores for the embeddings
|
236 |
+
similarities = model.similarity(embeddings, embeddings)
|
237 |
+
print(similarities.shape)
|
238 |
+
# [3, 3]
|
239 |
```
|
240 |
|
241 |
+
<!--
|
242 |
+
### Direct Usage (Transformers)
|
243 |
|
244 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
245 |
|
246 |
+
</details>
|
247 |
+
-->
|
248 |
|
249 |
+
<!--
|
250 |
+
### Downstream Usage (Sentence Transformers)
|
251 |
|
252 |
+
You can finetune this model on your own dataset.
|
253 |
|
254 |
+
<details><summary>Click to expand</summary>
|
255 |
|
256 |
+
</details>
|
257 |
+
-->
|
258 |
|
259 |
+
<!--
|
260 |
+
### Out-of-Scope Use
|
261 |
|
262 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
263 |
+
-->
|
|
|
|
|
264 |
|
265 |
+
## Evaluation
|
266 |
|
267 |
+
### Metrics
|
268 |
+
|
269 |
+
#### Information Retrieval
|
270 |
+
|
271 |
+
* Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
|
272 |
+
|
273 |
+
| Metric | Value |
|
274 |
+
|:--------------------|:-----------|
|
275 |
+
| cosine_accuracy@1 | 0.7192 |
|
276 |
+
| cosine_accuracy@3 | 0.9247 |
|
277 |
+
| cosine_accuracy@5 | 0.9521 |
|
278 |
+
| cosine_accuracy@10 | 0.9795 |
|
279 |
+
| cosine_precision@1 | 0.7192 |
|
280 |
+
| cosine_precision@3 | 0.3082 |
|
281 |
+
| cosine_precision@5 | 0.1904 |
|
282 |
+
| cosine_precision@10 | 0.0979 |
|
283 |
+
| cosine_recall@1 | 0.02 |
|
284 |
+
| cosine_recall@3 | 0.0257 |
|
285 |
+
| cosine_recall@5 | 0.0264 |
|
286 |
+
| cosine_recall@10 | 0.0272 |
|
287 |
+
| cosine_ndcg@10 | 0.1887 |
|
288 |
+
| cosine_mrr@10 | 0.8171 |
|
289 |
+
| **cosine_map@100** | **0.0227** |
|
290 |
+
| dot_accuracy@1 | 0.7192 |
|
291 |
+
| dot_accuracy@3 | 0.9247 |
|
292 |
+
| dot_accuracy@5 | 0.9521 |
|
293 |
+
| dot_accuracy@10 | 0.9795 |
|
294 |
+
| dot_precision@1 | 0.7192 |
|
295 |
+
| dot_precision@3 | 0.3082 |
|
296 |
+
| dot_precision@5 | 0.1904 |
|
297 |
+
| dot_precision@10 | 0.0979 |
|
298 |
+
| dot_recall@1 | 0.02 |
|
299 |
+
| dot_recall@3 | 0.0257 |
|
300 |
+
| dot_recall@5 | 0.0264 |
|
301 |
+
| dot_recall@10 | 0.0272 |
|
302 |
+
| dot_ndcg@10 | 0.1887 |
|
303 |
+
| dot_mrr@10 | 0.8171 |
|
304 |
+
| dot_map@100 | 0.0227 |
|
305 |
+
|
306 |
+
<!--
|
307 |
+
## Bias, Risks and Limitations
|
308 |
+
|
309 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
310 |
+
-->
|
311 |
+
|
312 |
+
<!--
|
313 |
+
### Recommendations
|
314 |
+
|
315 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
316 |
+
-->
|
317 |
+
|
318 |
+
## Training Details
|
319 |
+
|
320 |
+
### Training Dataset
|
321 |
+
|
322 |
+
#### Unnamed Dataset
|
323 |
+
|
324 |
+
|
325 |
+
* Size: 491 training samples
|
326 |
+
* Columns: <code>sentence_0</code> and <code>sentence_1</code>
|
327 |
+
* Approximate statistics based on the first 1000 samples:
|
328 |
+
| | sentence_0 | sentence_1 |
|
329 |
+
|:--------|:---------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
|
330 |
+
| type | string | string |
|
331 |
+
| details | <ul><li>min: 4 tokens</li><li>mean: 11.9 tokens</li><li>max: 26 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 67.55 tokens</li><li>max: 194 tokens</li></ul> |
|
332 |
+
* Samples:
|
333 |
+
| sentence_0 | sentence_1 |
|
334 |
+
|:------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------|
|
335 |
+
| <code>Profitability of [TICKER]</code> | <code>[{"get_attribute(['<TICKER1>'],['cash flow profitability'],'<DATES>')": "profitability_<TICKER1>"}]</code> |
|
336 |
+
| <code>[TICKER] momentum</code> | <code>[{"get_attribute(['<TICKER1>'],['momentum'],'<DATES>')": "momentum_<TICKER1>"}]</code> |
|
337 |
+
| <code>what was the total return of [TICKER] for 2023</code> | <code>[{"get_attribute(['<TICKER1>'],['returns'],'<DATES>')": "performance_data_<TICKER1>"}]</code> |
|
338 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
339 |
+
```json
|
340 |
+
{
|
341 |
+
"scale": 20.0,
|
342 |
+
"similarity_fct": "cos_sim"
|
343 |
+
}
|
344 |
```
|
345 |
|
346 |
+
### Training Hyperparameters
|
347 |
+
#### Non-Default Hyperparameters
|
348 |
+
|
349 |
+
- `eval_strategy`: steps
|
350 |
+
- `per_device_train_batch_size`: 10
|
351 |
+
- `per_device_eval_batch_size`: 10
|
352 |
+
- `num_train_epochs`: 6
|
353 |
+
- `multi_dataset_batch_sampler`: round_robin
|
354 |
+
|
355 |
+
#### All Hyperparameters
|
356 |
+
<details><summary>Click to expand</summary>
|
357 |
+
|
358 |
+
- `overwrite_output_dir`: False
|
359 |
+
- `do_predict`: False
|
360 |
+
- `eval_strategy`: steps
|
361 |
+
- `prediction_loss_only`: True
|
362 |
+
- `per_device_train_batch_size`: 10
|
363 |
+
- `per_device_eval_batch_size`: 10
|
364 |
+
- `per_gpu_train_batch_size`: None
|
365 |
+
- `per_gpu_eval_batch_size`: None
|
366 |
+
- `gradient_accumulation_steps`: 1
|
367 |
+
- `eval_accumulation_steps`: None
|
368 |
+
- `torch_empty_cache_steps`: None
|
369 |
+
- `learning_rate`: 5e-05
|
370 |
+
- `weight_decay`: 0.0
|
371 |
+
- `adam_beta1`: 0.9
|
372 |
+
- `adam_beta2`: 0.999
|
373 |
+
- `adam_epsilon`: 1e-08
|
374 |
+
- `max_grad_norm`: 1
|
375 |
+
- `num_train_epochs`: 6
|
376 |
+
- `max_steps`: -1
|
377 |
+
- `lr_scheduler_type`: linear
|
378 |
+
- `lr_scheduler_kwargs`: {}
|
379 |
+
- `warmup_ratio`: 0.0
|
380 |
+
- `warmup_steps`: 0
|
381 |
+
- `log_level`: passive
|
382 |
+
- `log_level_replica`: warning
|
383 |
+
- `log_on_each_node`: True
|
384 |
+
- `logging_nan_inf_filter`: True
|
385 |
+
- `save_safetensors`: True
|
386 |
+
- `save_on_each_node`: False
|
387 |
+
- `save_only_model`: False
|
388 |
+
- `restore_callback_states_from_checkpoint`: False
|
389 |
+
- `no_cuda`: False
|
390 |
+
- `use_cpu`: False
|
391 |
+
- `use_mps_device`: False
|
392 |
+
- `seed`: 42
|
393 |
+
- `data_seed`: None
|
394 |
+
- `jit_mode_eval`: False
|
395 |
+
- `use_ipex`: False
|
396 |
+
- `bf16`: False
|
397 |
+
- `fp16`: False
|
398 |
+
- `fp16_opt_level`: O1
|
399 |
+
- `half_precision_backend`: auto
|
400 |
+
- `bf16_full_eval`: False
|
401 |
+
- `fp16_full_eval`: False
|
402 |
+
- `tf32`: None
|
403 |
+
- `local_rank`: 0
|
404 |
+
- `ddp_backend`: None
|
405 |
+
- `tpu_num_cores`: None
|
406 |
+
- `tpu_metrics_debug`: False
|
407 |
+
- `debug`: []
|
408 |
+
- `dataloader_drop_last`: False
|
409 |
+
- `dataloader_num_workers`: 0
|
410 |
+
- `dataloader_prefetch_factor`: None
|
411 |
+
- `past_index`: -1
|
412 |
+
- `disable_tqdm`: False
|
413 |
+
- `remove_unused_columns`: True
|
414 |
+
- `label_names`: None
|
415 |
+
- `load_best_model_at_end`: False
|
416 |
+
- `ignore_data_skip`: False
|
417 |
+
- `fsdp`: []
|
418 |
+
- `fsdp_min_num_params`: 0
|
419 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
420 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
421 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
422 |
+
- `deepspeed`: None
|
423 |
+
- `label_smoothing_factor`: 0.0
|
424 |
+
- `optim`: adamw_torch
|
425 |
+
- `optim_args`: None
|
426 |
+
- `adafactor`: False
|
427 |
+
- `group_by_length`: False
|
428 |
+
- `length_column_name`: length
|
429 |
+
- `ddp_find_unused_parameters`: None
|
430 |
+
- `ddp_bucket_cap_mb`: None
|
431 |
+
- `ddp_broadcast_buffers`: False
|
432 |
+
- `dataloader_pin_memory`: True
|
433 |
+
- `dataloader_persistent_workers`: False
|
434 |
+
- `skip_memory_metrics`: True
|
435 |
+
- `use_legacy_prediction_loop`: False
|
436 |
+
- `push_to_hub`: False
|
437 |
+
- `resume_from_checkpoint`: None
|
438 |
+
- `hub_model_id`: None
|
439 |
+
- `hub_strategy`: every_save
|
440 |
+
- `hub_private_repo`: False
|
441 |
+
- `hub_always_push`: False
|
442 |
+
- `gradient_checkpointing`: False
|
443 |
+
- `gradient_checkpointing_kwargs`: None
|
444 |
+
- `include_inputs_for_metrics`: False
|
445 |
+
- `eval_do_concat_batches`: True
|
446 |
+
- `fp16_backend`: auto
|
447 |
+
- `push_to_hub_model_id`: None
|
448 |
+
- `push_to_hub_organization`: None
|
449 |
+
- `mp_parameters`:
|
450 |
+
- `auto_find_batch_size`: False
|
451 |
+
- `full_determinism`: False
|
452 |
+
- `torchdynamo`: None
|
453 |
+
- `ray_scope`: last
|
454 |
+
- `ddp_timeout`: 1800
|
455 |
+
- `torch_compile`: False
|
456 |
+
- `torch_compile_backend`: None
|
457 |
+
- `torch_compile_mode`: None
|
458 |
+
- `dispatch_batches`: None
|
459 |
+
- `split_batches`: None
|
460 |
+
- `include_tokens_per_second`: False
|
461 |
+
- `include_num_input_tokens_seen`: False
|
462 |
+
- `neftune_noise_alpha`: None
|
463 |
+
- `optim_target_modules`: None
|
464 |
+
- `batch_eval_metrics`: False
|
465 |
+
- `eval_on_start`: False
|
466 |
+
- `eval_use_gather_object`: False
|
467 |
+
- `batch_sampler`: batch_sampler
|
468 |
+
- `multi_dataset_batch_sampler`: round_robin
|
469 |
+
|
470 |
+
</details>
|
471 |
+
|
472 |
+
### Training Logs
|
473 |
+
<details><summary>Click to expand</summary>
|
474 |
+
|
475 |
+
| Epoch | Step | cosine_map@100 |
|
476 |
+
|:------:|:----:|:--------------:|
|
477 |
+
| 0.04 | 2 | 0.0137 |
|
478 |
+
| 0.08 | 4 | 0.0137 |
|
479 |
+
| 0.12 | 6 | 0.0138 |
|
480 |
+
| 0.16 | 8 | 0.0142 |
|
481 |
+
| 0.2 | 10 | 0.0144 |
|
482 |
+
| 0.24 | 12 | 0.0147 |
|
483 |
+
| 0.28 | 14 | 0.0149 |
|
484 |
+
| 0.32 | 16 | 0.0151 |
|
485 |
+
| 0.36 | 18 | 0.0155 |
|
486 |
+
| 0.4 | 20 | 0.0166 |
|
487 |
+
| 0.44 | 22 | 0.0170 |
|
488 |
+
| 0.48 | 24 | 0.0174 |
|
489 |
+
| 0.52 | 26 | 0.0179 |
|
490 |
+
| 0.56 | 28 | 0.0181 |
|
491 |
+
| 0.6 | 30 | 0.0184 |
|
492 |
+
| 0.64 | 32 | 0.0186 |
|
493 |
+
| 0.68 | 34 | 0.0189 |
|
494 |
+
| 0.72 | 36 | 0.0191 |
|
495 |
+
| 0.76 | 38 | 0.0192 |
|
496 |
+
| 0.8 | 40 | 0.0195 |
|
497 |
+
| 0.84 | 42 | 0.0195 |
|
498 |
+
| 0.88 | 44 | 0.0195 |
|
499 |
+
| 0.92 | 46 | 0.0195 |
|
500 |
+
| 0.96 | 48 | 0.0196 |
|
501 |
+
| 1.0 | 50 | 0.0197 |
|
502 |
+
| 1.04 | 52 | 0.0196 |
|
503 |
+
| 1.08 | 54 | 0.0198 |
|
504 |
+
| 1.12 | 56 | 0.0200 |
|
505 |
+
| 1.16 | 58 | 0.0202 |
|
506 |
+
| 1.2 | 60 | 0.0202 |
|
507 |
+
| 1.24 | 62 | 0.0205 |
|
508 |
+
| 1.28 | 64 | 0.0206 |
|
509 |
+
| 1.32 | 66 | 0.0207 |
|
510 |
+
| 1.3600 | 68 | 0.0208 |
|
511 |
+
| 1.4 | 70 | 0.0208 |
|
512 |
+
| 1.44 | 72 | 0.0209 |
|
513 |
+
| 1.48 | 74 | 0.0210 |
|
514 |
+
| 1.52 | 76 | 0.0211 |
|
515 |
+
| 1.56 | 78 | 0.0211 |
|
516 |
+
| 1.6 | 80 | 0.0209 |
|
517 |
+
| 1.6400 | 82 | 0.0210 |
|
518 |
+
| 1.6800 | 84 | 0.0209 |
|
519 |
+
| 1.72 | 86 | 0.0209 |
|
520 |
+
| 1.76 | 88 | 0.0210 |
|
521 |
+
| 1.8 | 90 | 0.0211 |
|
522 |
+
| 1.8400 | 92 | 0.0211 |
|
523 |
+
| 1.88 | 94 | 0.0211 |
|
524 |
+
| 1.92 | 96 | 0.0214 |
|
525 |
+
| 1.96 | 98 | 0.0216 |
|
526 |
+
| 2.0 | 100 | 0.0218 |
|
527 |
+
| 2.04 | 102 | 0.0217 |
|
528 |
+
| 2.08 | 104 | 0.0217 |
|
529 |
+
| 2.12 | 106 | 0.0219 |
|
530 |
+
| 2.16 | 108 | 0.0221 |
|
531 |
+
| 2.2 | 110 | 0.0219 |
|
532 |
+
| 2.24 | 112 | 0.0217 |
|
533 |
+
| 2.2800 | 114 | 0.0217 |
|
534 |
+
| 2.32 | 116 | 0.0217 |
|
535 |
+
| 2.36 | 118 | 0.0218 |
|
536 |
+
| 2.4 | 120 | 0.0219 |
|
537 |
+
| 2.44 | 122 | 0.0219 |
|
538 |
+
| 2.48 | 124 | 0.0219 |
|
539 |
+
| 2.52 | 126 | 0.0222 |
|
540 |
+
| 2.56 | 128 | 0.0220 |
|
541 |
+
| 2.6 | 130 | 0.0221 |
|
542 |
+
| 2.64 | 132 | 0.0221 |
|
543 |
+
| 2.68 | 134 | 0.0221 |
|
544 |
+
| 2.7200 | 136 | 0.0221 |
|
545 |
+
| 2.76 | 138 | 0.0222 |
|
546 |
+
| 2.8 | 140 | 0.0222 |
|
547 |
+
| 2.84 | 142 | 0.0224 |
|
548 |
+
| 2.88 | 144 | 0.0224 |
|
549 |
+
| 2.92 | 146 | 0.0223 |
|
550 |
+
| 2.96 | 148 | 0.0224 |
|
551 |
+
| 3.0 | 150 | 0.0223 |
|
552 |
+
| 3.04 | 152 | 0.0223 |
|
553 |
+
| 3.08 | 154 | 0.0223 |
|
554 |
+
| 3.12 | 156 | 0.0223 |
|
555 |
+
| 3.16 | 158 | 0.0223 |
|
556 |
+
| 3.2 | 160 | 0.0223 |
|
557 |
+
| 3.24 | 162 | 0.0223 |
|
558 |
+
| 3.2800 | 164 | 0.0223 |
|
559 |
+
| 3.32 | 166 | 0.0223 |
|
560 |
+
| 3.36 | 168 | 0.0223 |
|
561 |
+
| 3.4 | 170 | 0.0223 |
|
562 |
+
| 3.44 | 172 | 0.0224 |
|
563 |
+
| 3.48 | 174 | 0.0224 |
|
564 |
+
| 3.52 | 176 | 0.0225 |
|
565 |
+
| 3.56 | 178 | 0.0224 |
|
566 |
+
| 3.6 | 180 | 0.0224 |
|
567 |
+
| 3.64 | 182 | 0.0224 |
|
568 |
+
| 3.68 | 184 | 0.0225 |
|
569 |
+
| 3.7200 | 186 | 0.0225 |
|
570 |
+
| 3.76 | 188 | 0.0225 |
|
571 |
+
| 3.8 | 190 | 0.0225 |
|
572 |
+
| 3.84 | 192 | 0.0225 |
|
573 |
+
| 3.88 | 194 | 0.0225 |
|
574 |
+
| 3.92 | 196 | 0.0226 |
|
575 |
+
| 3.96 | 198 | 0.0226 |
|
576 |
+
| 4.0 | 200 | 0.0226 |
|
577 |
+
| 4.04 | 202 | 0.0226 |
|
578 |
+
| 4.08 | 204 | 0.0226 |
|
579 |
+
| 4.12 | 206 | 0.0226 |
|
580 |
+
| 4.16 | 208 | 0.0225 |
|
581 |
+
| 4.2 | 210 | 0.0225 |
|
582 |
+
| 4.24 | 212 | 0.0225 |
|
583 |
+
| 4.28 | 214 | 0.0225 |
|
584 |
+
| 4.32 | 216 | 0.0225 |
|
585 |
+
| 4.36 | 218 | 0.0226 |
|
586 |
+
| 4.4 | 220 | 0.0227 |
|
587 |
+
|
588 |
+
</details>
|
589 |
+
|
590 |
+
### Framework Versions
|
591 |
+
- Python: 3.10.9
|
592 |
+
- Sentence Transformers: 3.0.1
|
593 |
+
- Transformers: 4.44.0
|
594 |
+
- PyTorch: 2.4.0+cu121
|
595 |
+
- Accelerate: 0.33.0
|
596 |
+
- Datasets: 2.20.0
|
597 |
+
- Tokenizers: 0.19.1
|
598 |
+
|
599 |
+
## Citation
|
600 |
+
|
601 |
+
### BibTeX
|
602 |
+
|
603 |
+
#### Sentence Transformers
|
604 |
+
```bibtex
|
605 |
+
@inproceedings{reimers-2019-sentence-bert,
|
606 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
607 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
608 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
609 |
+
month = "11",
|
610 |
+
year = "2019",
|
611 |
+
publisher = "Association for Computational Linguistics",
|
612 |
+
url = "https://arxiv.org/abs/1908.10084",
|
613 |
+
}
|
614 |
```
|
615 |
+
|
616 |
+
#### MultipleNegativesRankingLoss
|
617 |
+
```bibtex
|
618 |
+
@misc{henderson2017efficient,
|
619 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
620 |
+
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},
|
621 |
+
year={2017},
|
622 |
+
eprint={1705.00652},
|
623 |
+
archivePrefix={arXiv},
|
624 |
+
primaryClass={cs.CL}
|
|
|
|
|
|
|
625 |
}
|
626 |
```
|
627 |
|
628 |
+
<!--
|
629 |
+
## Glossary
|
630 |
|
631 |
+
*Clearly define terms in order to be accessible across audiences.*
|
632 |
+
-->
|
633 |
+
|
634 |
+
<!--
|
635 |
+
## Model Card Authors
|
636 |
+
|
637 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
638 |
+
-->
|
639 |
|
640 |
+
<!--
|
641 |
+
## Model Card Contact
|
642 |
|
643 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
644 |
+
-->
|
config.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "/
|
3 |
"architectures": [
|
4 |
"BertModel"
|
5 |
],
|
@@ -24,7 +24,7 @@
|
|
24 |
"pad_token_id": 0,
|
25 |
"position_embedding_type": "absolute",
|
26 |
"torch_dtype": "float32",
|
27 |
-
"transformers_version": "4.
|
28 |
"type_vocab_size": 2,
|
29 |
"use_cache": true,
|
30 |
"vocab_size": 30522
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "BAAI/bge-small-en-v1.5",
|
3 |
"architectures": [
|
4 |
"BertModel"
|
5 |
],
|
|
|
24 |
"pad_token_id": 0,
|
25 |
"position_embedding_type": "absolute",
|
26 |
"torch_dtype": "float32",
|
27 |
+
"transformers_version": "4.44.0",
|
28 |
"type_vocab_size": 2,
|
29 |
"use_cache": true,
|
30 |
"vocab_size": 30522
|
config_sentence_transformers.json
CHANGED
@@ -1,7 +1,10 @@
|
|
1 |
{
|
2 |
"__version__": {
|
3 |
-
"sentence_transformers": "
|
4 |
-
"transformers": "4.
|
5 |
-
"pytorch": "
|
6 |
-
}
|
|
|
|
|
|
|
7 |
}
|
|
|
1 |
{
|
2 |
"__version__": {
|
3 |
+
"sentence_transformers": "3.0.1",
|
4 |
+
"transformers": "4.44.0",
|
5 |
+
"pytorch": "2.4.0+cu121"
|
6 |
+
},
|
7 |
+
"prompts": {},
|
8 |
+
"default_prompt_name": null,
|
9 |
+
"similarity_fn_name": null
|
10 |
}
|
model.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 133462128
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:076fc63febba0cc87ba58c5dd73d33fa4030cd3f99545e729c84cd9aec36a329
|
3 |
size 133462128
|