indiejoseph commited on
Commit
93ca945
·
verified ·
1 Parent(s): 778cc7c

Upload folder using huggingface_hub

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 1024,
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 CHANGED
@@ -1,89 +1,419 @@
1
  ---
2
- license: cc-by-4.0
3
- base_model: hon9kon9ize/bert-large-cantonese
4
  tags:
 
 
 
5
  - generated_from_trainer
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  metrics:
7
- - pearson_cosine
8
- - spearman_cosine
9
- - pearson_manhattan
10
- - spearman_manhattan
11
- - pearson_euclidean
12
- - spearman_euclidean
13
- - pearson_dot
14
- - spearman_dot
15
- - pearson_max
16
- - spearman_max
17
  model-index:
18
- - name: Cantonese Semantic Textual Similarity BERT based on hon9kon9ize/bert-large-cantonese-sts
19
- results:
20
- - task:
21
- type: semantic-similarity
22
- name: Semantic Similarity
23
- dataset:
24
- name: sts dev
25
- type: sts-dev
26
- metrics:
27
- - type: pearson_cosine
28
- value: 0.8195601142712411
29
- - type: spearman_cosine
30
- value: 0.8107244990045813
31
- - type: pearson_manhattan
32
- value: 0.8227349515965701
33
- - type: spearman_manhattan
34
- value: 0.8106624105549446
35
- - type: pearson_euclidean
36
- value: 0.8224444134336916
37
- - type: spearman_euclidean
38
- value: 0.810580167108645
39
- - type: pearson_dot
40
- value: 0.8197330940854836
41
- - type: spearman_dot
42
- value: 0.8107833210821748
 
 
 
43
  ---
44
 
45
- <!-- This model card has been generated automatically according to the information the Trainer had access to. You
46
- should probably proofread and complete it, then remove this comment. -->
47
 
48
- # bert-large-cantonese-sts
49
 
50
- This model is a fine-tuned version of [hon9kon9ize/bert-large-cantonese](https://huggingface.co/hon9kon9ize/bert-large-cantonese) on the [hon9kon9ize/yue-sts](https://huggingface.co/datasets/hon9kon9ize/yue-sts) dataset.
51
 
52
- ## Model description
 
 
 
 
 
 
 
 
 
53
 
54
- More information needed
55
 
56
- ## Intended uses & limitations
 
 
57
 
58
- More information needed
59
 
60
- ## Training and evaluation data
 
 
 
 
 
61
 
62
- More information needed
63
 
64
- ## Training procedure
65
 
66
- ### Training hyperparameters
67
 
68
- The following hyperparameters were used during training:
69
- - learning_rate: 5e-05
70
- - train_batch_size: 16
71
- - eval_batch_size: 8
72
- - seed: 42
73
- - gradient_accumulation_steps: 64
74
- - total_train_batch_size: 1024
75
- - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
76
- - lr_scheduler_type: linear
77
- - lr_scheduler_warmup_steps: 50
78
- - num_epochs: 10
79
 
80
- ### Training results
 
 
81
 
 
 
 
 
 
 
 
 
 
 
 
82
 
 
 
 
 
 
83
 
84
- ### Framework versions
 
85
 
86
- - Transformers 4.43.3
87
- - Pytorch 2.1.1+cu121
88
- - Datasets 2.15.0
89
- - Tokenizers 0.19.1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
 
 
2
  tags:
3
+ - sentence-transformers
4
+ - sentence-similarity
5
+ - feature-extraction
6
  - generated_from_trainer
7
+ - dataset_size:5749
8
+ - loss:CosineSimilarityLoss
9
+ base_model: hon9kon9ize/bert-large-cantonese-nli
10
+ widget:
11
+ - source_sentence: 有個男人彈緊豎琴。
12
+ sentences:
13
+ - 我鍾意將一心多用諗做快速轉換工作。
14
+ - 有個女人彈緊結他。
15
+ - 正如你原先個問題所講:維基百科嗰段嘢無話約瑟夫·P·甘迺迪買咗約翰·F·甘迺迪嘅勝選。
16
+ - source_sentence: 一艘大型白色郵輪浮喺水上。
17
+ sentences:
18
+ - 有個女人喺台上唱歌。
19
+ - 有個男人吹緊笛。
20
+ - 一艘大型郵輪浮喺水上。
21
+ - source_sentence: 個男人送緊蛋糕。
22
+ sentences:
23
+ - 有個女人剝緊蝦。
24
+ - 有個男人係度調味鵪鶉。
25
+ - 一架紅色雙層巴士喺一條擠迫嘅街道上。
26
+ - source_sentence: 我哋相對宇宙共同靜止參考系嘅速度係……每秒大約 371 公里,方向係朝住獅子座。」
27
+ sentences:
28
+ - 間廳擺咗啲啡色嘅傢俬同埋一台平面電視。
29
+ - 冇一樣嘢係「靜止」嘅,除非係相對某啲其他物體先至係。
30
+ - 一個人喺水邊蹓狗。
31
+ - source_sentence: 恆星喺恆星形成區形成,而恆星形成區本身係由分子雲演變而來。
32
+ sentences:
33
+ - 一個金毛小朋友喺屋企前面吹緊喇叭表演,佢細佬喺隔離睇緊。
34
+ - 一架四驅車泥濘路面度行緊。
35
+ - 「可能喺銀河系以外都存在好似我哋呢個太陽系嘅星系。」
36
+ datasets:
37
+ - hon9kon9ize/yue-stsb
38
+ pipeline_tag: sentence-similarity
39
+ library_name: sentence-transformers
40
  metrics:
41
+ - pearson_cosine
42
+ - spearman_cosine
 
 
 
 
 
 
 
 
43
  model-index:
44
+ - name: SentenceTransformer based on hon9kon9ize/bert-large-cantonese-nli
45
+ results:
46
+ - task:
47
+ type: semantic-similarity
48
+ name: Semantic Similarity
49
+ dataset:
50
+ name: sts dev
51
+ type: sts-dev
52
+ metrics:
53
+ - type: pearson_cosine
54
+ value: 0.825800689249711
55
+ name: Pearson Cosine
56
+ - type: spearman_cosine
57
+ value: 0.8262408727980405
58
+ name: Spearman Cosine
59
+ - task:
60
+ type: semantic-similarity
61
+ name: Semantic Similarity
62
+ dataset:
63
+ name: sts test
64
+ type: sts-test
65
+ metrics:
66
+ - type: pearson_cosine
67
+ value: 0.7926469146205422
68
+ name: Pearson Cosine
69
+ - type: spearman_cosine
70
+ value: 0.7911184368054363
71
+ name: Spearman Cosine
72
  ---
73
 
74
+ # SentenceTransformer based on hon9kon9ize/bert-large-cantonese-nli
 
75
 
76
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [hon9kon9ize/bert-large-cantonese-nli](https://huggingface.co/hon9kon9ize/bert-large-cantonese-nli) on the [yue-stsb](https://huggingface.co/datasets/hon9kon9ize/yue-stsb) dataset. It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
77
 
78
+ ## Model Details
79
 
80
+ ### Model Description
81
+ - **Model Type:** Sentence Transformer
82
+ - **Base model:** [hon9kon9ize/bert-large-cantonese-nli](https://huggingface.co/hon9kon9ize/bert-large-cantonese-nli) <!-- at revision 140fca4e8ed46ca830b9ee0f9dec91c9c114bd5b -->
83
+ - **Maximum Sequence Length:** 512 tokens
84
+ - **Output Dimensionality:** 1024 dimensions
85
+ - **Similarity Function:** Cosine Similarity
86
+ - **Training Dataset:**
87
+ - [yue-stsb](https://huggingface.co/datasets/hon9kon9ize/yue-stsb)
88
+ <!-- - **Language:** Unknown -->
89
+ <!-- - **License:** Unknown -->
90
 
91
+ ### Model Sources
92
 
93
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
94
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
95
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
96
 
97
+ ### Full Model Architecture
98
 
99
+ ```
100
+ SentenceTransformer(
101
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
102
+ (1): Pooling({'word_embedding_dimension': 1024, '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})
103
+ )
104
+ ```
105
 
106
+ ## Usage
107
 
108
+ ### Direct Usage (Sentence Transformers)
109
 
110
+ First install the Sentence Transformers library:
111
 
112
+ ```bash
113
+ pip install -U sentence-transformers
114
+ ```
 
 
 
 
 
 
 
 
115
 
116
+ Then you can load this model and run inference.
117
+ ```python
118
+ from sentence_transformers import SentenceTransformer
119
 
120
+ # Download from the 🤗 Hub
121
+ model = SentenceTransformer("sentence_transformers_model_id")
122
+ # Run inference
123
+ sentences = [
124
+ '恆星喺恆星形成區形成,而恆星形成區本身係由分子雲演變而來。',
125
+ '「可能喺銀河系以外都存在好似我哋呢個太陽系嘅星系。」',
126
+ '一架四驅車泥濘路面度行緊。',
127
+ ]
128
+ embeddings = model.encode(sentences)
129
+ print(embeddings.shape)
130
+ # [3, 1024]
131
 
132
+ # Get the similarity scores for the embeddings
133
+ similarities = model.similarity(embeddings, embeddings)
134
+ print(similarities.shape)
135
+ # [3, 3]
136
+ ```
137
 
138
+ <!--
139
+ ### Direct Usage (Transformers)
140
 
141
+ <details><summary>Click to see the direct usage in Transformers</summary>
142
+
143
+ </details>
144
+ -->
145
+
146
+ <!--
147
+ ### Downstream Usage (Sentence Transformers)
148
+
149
+ You can finetune this model on your own dataset.
150
+
151
+ <details><summary>Click to expand</summary>
152
+
153
+ </details>
154
+ -->
155
+
156
+ <!--
157
+ ### Out-of-Scope Use
158
+
159
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
160
+ -->
161
+
162
+ ## Evaluation
163
+
164
+ ### Metrics
165
+
166
+ #### Semantic Similarity
167
+
168
+ * Datasets: `sts-dev` and `sts-test`
169
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
170
+
171
+ | Metric | sts-dev | sts-test |
172
+ |:--------------------|:-----------|:-----------|
173
+ | pearson_cosine | 0.8258 | 0.7926 |
174
+ | **spearman_cosine** | **0.8262** | **0.7911** |
175
+
176
+ <!--
177
+ ## Bias, Risks and Limitations
178
+
179
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
180
+ -->
181
+
182
+ <!--
183
+ ### Recommendations
184
+
185
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
186
+ -->
187
+
188
+ ## Training Details
189
+
190
+ ### Training Dataset
191
+
192
+ #### yue-stsb
193
+
194
+ * Dataset: [yue-stsb](https://huggingface.co/datasets/hon9kon9ize/yue-stsb) at [40cea5d](https://huggingface.co/datasets/hon9kon9ize/yue-stsb/tree/40cea5d8e9d1aeb1498816d90d1e417bafcc96a8)
195
+ * Size: 5,749 training samples
196
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
197
+ * Approximate statistics based on the first 1000 samples:
198
+ | | sentence1 | sentence2 | score |
199
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|
200
+ | type | string | string | float |
201
+ | details | <ul><li>min: 7 tokens</li><li>mean: 12.24 tokens</li><li>max: 40 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 12.21 tokens</li><li>max: 30 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.45</li><li>max: 1.0</li></ul> |
202
+ * Samples:
203
+ | sentence1 | sentence2 | score |
204
+ |:----------------------------|:------------------------------------|:------------------|
205
+ | <code>架飛機正準備起飛。</code> | <code>一架飛機正準備起飛。</code> | <code>1.0</code> |
206
+ | <code>有個男人吹緊一支好大嘅笛。</code> | <code>有個男人吹緊笛。</code> | <code>0.76</code> |
207
+ | <code>有個男人喺批薩上面灑碎芝士。</code> | <code>有個男人將磨碎嘅芝士灑落一塊未焗嘅批薩上面。</code> | <code>0.76</code> |
208
+ * Loss: [<code>CosineSimilarityLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosinesimilarityloss) with these parameters:
209
+ ```json
210
+ {
211
+ "loss_fct": "torch.nn.modules.loss.MSELoss"
212
+ }
213
+ ```
214
+
215
+ ### Evaluation Dataset
216
+
217
+ #### yue-stsb
218
+
219
+ * Dataset: [yue-stsb](https://huggingface.co/datasets/hon9kon9ize/yue-stsb) at [40cea5d](https://huggingface.co/datasets/hon9kon9ize/yue-stsb/tree/40cea5d8e9d1aeb1498816d90d1e417bafcc96a8)
220
+ * Size: 1,500 evaluation samples
221
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
222
+ * Approximate statistics based on the first 1000 samples:
223
+ | | sentence1 | sentence2 | score |
224
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|
225
+ | type | string | string | float |
226
+ | details | <ul><li>min: 8 tokens</li><li>mean: 19.76 tokens</li><li>max: 53 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 19.65 tokens</li><li>max: 53 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.42</li><li>max: 1.0</li></ul> |
227
+ * Samples:
228
+ | sentence1 | sentence2 | score |
229
+ |:-----------------------------|:-----------------------------|:------------------|
230
+ | <code>有個戴住安全帽嘅男人喺度跳舞。</code> | <code>有個戴住安全帽嘅男人喺度跳舞。</code> | <code>1.0</code> |
231
+ | <code>一個細路仔騎緊馬。</code> | <code>個細路仔騎緊匹馬。</code> | <code>0.95</code> |
232
+ | <code>有個男人餵老鼠畀條蛇食。</code> | <code>個男人餵咗隻老鼠畀條蛇食。</code> | <code>1.0</code> |
233
+ * Loss: [<code>CosineSimilarityLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosinesimilarityloss) with these parameters:
234
+ ```json
235
+ {
236
+ "loss_fct": "torch.nn.modules.loss.MSELoss"
237
+ }
238
+ ```
239
+
240
+ ### Training Hyperparameters
241
+ #### Non-Default Hyperparameters
242
+
243
+ - `eval_strategy`: steps
244
+ - `per_device_train_batch_size`: 128
245
+ - `per_device_eval_batch_size`: 128
246
+ - `num_train_epochs`: 4
247
+ - `warmup_ratio`: 0.1
248
+ - `bf16`: True
249
+
250
+ #### All Hyperparameters
251
+ <details><summary>Click to expand</summary>
252
+
253
+ - `overwrite_output_dir`: False
254
+ - `do_predict`: False
255
+ - `eval_strategy`: steps
256
+ - `prediction_loss_only`: True
257
+ - `per_device_train_batch_size`: 128
258
+ - `per_device_eval_batch_size`: 128
259
+ - `per_gpu_train_batch_size`: None
260
+ - `per_gpu_eval_batch_size`: None
261
+ - `gradient_accumulation_steps`: 1
262
+ - `eval_accumulation_steps`: None
263
+ - `torch_empty_cache_steps`: None
264
+ - `learning_rate`: 5e-05
265
+ - `weight_decay`: 0.0
266
+ - `adam_beta1`: 0.9
267
+ - `adam_beta2`: 0.999
268
+ - `adam_epsilon`: 1e-08
269
+ - `max_grad_norm`: 1.0
270
+ - `num_train_epochs`: 4
271
+ - `max_steps`: -1
272
+ - `lr_scheduler_type`: linear
273
+ - `lr_scheduler_kwargs`: {}
274
+ - `warmup_ratio`: 0.1
275
+ - `warmup_steps`: 0
276
+ - `log_level`: passive
277
+ - `log_level_replica`: warning
278
+ - `log_on_each_node`: True
279
+ - `logging_nan_inf_filter`: True
280
+ - `save_safetensors`: True
281
+ - `save_on_each_node`: False
282
+ - `save_only_model`: False
283
+ - `restore_callback_states_from_checkpoint`: False
284
+ - `no_cuda`: False
285
+ - `use_cpu`: False
286
+ - `use_mps_device`: False
287
+ - `seed`: 42
288
+ - `data_seed`: None
289
+ - `jit_mode_eval`: False
290
+ - `use_ipex`: False
291
+ - `bf16`: True
292
+ - `fp16`: False
293
+ - `fp16_opt_level`: O1
294
+ - `half_precision_backend`: auto
295
+ - `bf16_full_eval`: False
296
+ - `fp16_full_eval`: False
297
+ - `tf32`: None
298
+ - `local_rank`: 0
299
+ - `ddp_backend`: None
300
+ - `tpu_num_cores`: None
301
+ - `tpu_metrics_debug`: False
302
+ - `debug`: []
303
+ - `dataloader_drop_last`: False
304
+ - `dataloader_num_workers`: 0
305
+ - `dataloader_prefetch_factor`: None
306
+ - `past_index`: -1
307
+ - `disable_tqdm`: False
308
+ - `remove_unused_columns`: True
309
+ - `label_names`: None
310
+ - `load_best_model_at_end`: False
311
+ - `ignore_data_skip`: False
312
+ - `fsdp`: []
313
+ - `fsdp_min_num_params`: 0
314
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
315
+ - `fsdp_transformer_layer_cls_to_wrap`: None
316
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
317
+ - `deepspeed`: None
318
+ - `label_smoothing_factor`: 0.0
319
+ - `optim`: adamw_torch
320
+ - `optim_args`: None
321
+ - `adafactor`: False
322
+ - `group_by_length`: False
323
+ - `length_column_name`: length
324
+ - `ddp_find_unused_parameters`: None
325
+ - `ddp_bucket_cap_mb`: None
326
+ - `ddp_broadcast_buffers`: False
327
+ - `dataloader_pin_memory`: True
328
+ - `dataloader_persistent_workers`: False
329
+ - `skip_memory_metrics`: True
330
+ - `use_legacy_prediction_loop`: False
331
+ - `push_to_hub`: False
332
+ - `resume_from_checkpoint`: None
333
+ - `hub_model_id`: None
334
+ - `hub_strategy`: every_save
335
+ - `hub_private_repo`: False
336
+ - `hub_always_push`: False
337
+ - `gradient_checkpointing`: False
338
+ - `gradient_checkpointing_kwargs`: None
339
+ - `include_inputs_for_metrics`: False
340
+ - `include_for_metrics`: []
341
+ - `eval_do_concat_batches`: True
342
+ - `fp16_backend`: auto
343
+ - `push_to_hub_model_id`: None
344
+ - `push_to_hub_organization`: None
345
+ - `mp_parameters`:
346
+ - `auto_find_batch_size`: False
347
+ - `full_determinism`: False
348
+ - `torchdynamo`: None
349
+ - `ray_scope`: last
350
+ - `ddp_timeout`: 1800
351
+ - `torch_compile`: False
352
+ - `torch_compile_backend`: None
353
+ - `torch_compile_mode`: None
354
+ - `dispatch_batches`: None
355
+ - `split_batches`: None
356
+ - `include_tokens_per_second`: False
357
+ - `include_num_input_tokens_seen`: False
358
+ - `neftune_noise_alpha`: None
359
+ - `optim_target_modules`: None
360
+ - `batch_eval_metrics`: False
361
+ - `eval_on_start`: False
362
+ - `use_liger_kernel`: False
363
+ - `eval_use_gather_object`: False
364
+ - `prompts`: None
365
+ - `batch_sampler`: batch_sampler
366
+ - `multi_dataset_batch_sampler`: proportional
367
+
368
+ </details>
369
+
370
+ ### Training Logs
371
+ | Epoch | Step | Training Loss | Validation Loss | sts-dev_spearman_cosine | sts-test_spearman_cosine |
372
+ |:------:|:----:|:-------------:|:---------------:|:-----------------------:|:------------------------:|
373
+ | 2.2222 | 100 | 0.0299 | 0.0312 | 0.8262 | - |
374
+ | 4.0 | 180 | - | - | - | 0.7911 |
375
+
376
+
377
+ ### Framework Versions
378
+ - Python: 3.11.2
379
+ - Sentence Transformers: 3.3.1
380
+ - Transformers: 4.46.1
381
+ - PyTorch: 2.4.0+cu121
382
+ - Accelerate: 1.0.1
383
+ - Datasets: 3.1.0
384
+ - Tokenizers: 0.20.3
385
+
386
+ ## Citation
387
+
388
+ ### BibTeX
389
+
390
+ #### Sentence Transformers
391
+ ```bibtex
392
+ @inproceedings{reimers-2019-sentence-bert,
393
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
394
+ author = "Reimers, Nils and Gurevych, Iryna",
395
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
396
+ month = "11",
397
+ year = "2019",
398
+ publisher = "Association for Computational Linguistics",
399
+ url = "https://arxiv.org/abs/1908.10084",
400
+ }
401
+ ```
402
+
403
+ <!--
404
+ ## Glossary
405
+
406
+ *Clearly define terms in order to be accessible across audiences.*
407
+ -->
408
+
409
+ <!--
410
+ ## Model Card Authors
411
+
412
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
413
+ -->
414
+
415
+ <!--
416
+ ## Model Card Contact
417
+
418
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
419
+ -->
config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "hon9kon9ize/bert-large-cantonese",
3
  "architectures": [
4
  "BertModel"
5
  ],
@@ -18,8 +18,8 @@
18
  "pad_token_id": 0,
19
  "position_embedding_type": "absolute",
20
  "torch_dtype": "float32",
21
- "transformers_version": "4.43.3",
22
  "type_vocab_size": 2,
23
- "use_cache": false,
24
  "vocab_size": 21628
25
  }
 
1
  {
2
+ "_name_or_path": "hon9kon9ize/bert-large-cantonese-nli",
3
  "architectures": [
4
  "BertModel"
5
  ],
 
18
  "pad_token_id": 0,
19
  "position_embedding_type": "absolute",
20
  "torch_dtype": "float32",
21
+ "transformers_version": "4.46.1",
22
  "type_vocab_size": 2,
23
+ "use_cache": true,
24
  "vocab_size": 21628
25
  }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.3.1",
4
+ "transformers": "4.46.1",
5
+ "pytorch": "2.4.0+cu121"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": "cosine"
10
+ }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f78387fed772b6da97ceb7be0791a2d5c51c59d2586b57c57174ff18f2f08f98
3
  size 1304182568
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9c1d5859a25e08b31120af6f1f2ababea81234d1ef546b566846773dc944d964
3
  size 1304182568
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
+ }
tokenizer.json CHANGED
@@ -1,7 +1,19 @@
1
  {
2
  "version": "1.0",
3
- "truncation": null,
4
- "padding": null,
 
 
 
 
 
 
 
 
 
 
 
 
5
  "added_tokens": [
6
  {
7
  "id": 0,
 
1
  {
2
  "version": "1.0",
3
+ "truncation": {
4
+ "direction": "Right",
5
+ "max_length": 512,
6
+ "strategy": "LongestFirst",
7
+ "stride": 0
8
+ },
9
+ "padding": {
10
+ "strategy": "BatchLongest",
11
+ "direction": "Right",
12
+ "pad_to_multiple_of": null,
13
+ "pad_id": 0,
14
+ "pad_type_id": 0,
15
+ "pad_token": "[PAD]"
16
+ },
17
  "added_tokens": [
18
  {
19
  "id": 0,