datasets: []
language: []
library_name: sentence-transformers
pipeline_tag: sentence-similarity
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:588644
- loss:CosineSimilarityLoss
widget:
- source_sentence: 我这水表冻裂了,寻思换一个多钱啊
sentences:
- 需本人到供水公司,携带“用户申请报停审批表”进行办理。
- 供水营业厅缴费地址:一、供水客户服务中心:会展中心道东光复西路790号。 二、佳东供水收费厅:长胜路与光复路交叉口长胜街85号。三、九小供水收费厅:第九小区大门西侧路北兴城胡同128号。四、行政服务中心一楼:长安路西段820号
- 线上报装登录佳木斯供水公众号, 点击“报装申请”,提交后,工作人员会在24小时内联系您。线下报装需本人到供水公司申请,居民用户携带本人身份证复印件和房照复印件,非居民用户携带营业执照复印件、法人复印件及公章。
- source_sentence: 申请安装自来水需要哪些具体条件?
sentences:
- 怎么停水了?
- 您可以登录微信公众号佳木斯供水,进入主页面绑定用户信息后缴费,或者微信小程序中缴费页面输入用户编号进行缴费。或者也可以在支付宝生活缴费页面输入用户编号进行缴费。
- 不是
- source_sentence: 咱家水表不好使,屋里头水都关了,不用水,它自己走
sentences:
- 缴水费后需要联系抄表员后,24小时内给水。
- 您可以登录微信公众号佳木斯供水,进入主页面绑定用户信息后缴费,或者微信小程序中缴费页面输入用户编号进行缴费。或者也可以在支付宝生活缴费页面输入用户编号进行缴费。
- 怎么停水了?
- source_sentence: 我想咨询个事儿,我家交水费这个名,后面有一个字错了,怎么改一下子
sentences:
- 怎么停水了?
- 我家漏水了
- 缴水费后需要联系抄表员后,24小时内给水。
- source_sentence: 我家厨房的管可能冻了,没有水
sentences:
- 怎么停水了?
- 您可以登录微信公众号佳木斯供水,进入主页面绑定用户信息后缴费,或者微信小程序中缴费页面输入用户编号进行缴费。或者也可以在支付宝生活缴费页面输入用户编号进行缴费。
- 水表坏了
---
SentenceTransformer
This is a sentence-transformers model trained. 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.
Model Details
Model Description
- Model Type: Sentence Transformer
- Maximum Sequence Length: 512 tokens
- Output Dimensionality: 768 tokens
- Similarity Function: Cosine Similarity
Model Sources
Full Model Architecture
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
(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})
)
Usage
Direct Usage (Sentence Transformers)
First install the Sentence Transformers library:
pip install -U sentence-transformers
Then you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("sentence_transformers_model_id")
# Run inference
sentences = [
'我家厨房的管可能冻了,没有水',
'怎么停水了?',
'水表坏了',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
Training Details
Training Dataset
Unnamed Dataset
Training Hyperparameters
Non-Default Hyperparameters
per_device_train_batch_size
: 16
per_device_eval_batch_size
: 16
multi_dataset_batch_sampler
: round_robin
All Hyperparameters
Click to expand
- `overwrite_output_dir`: False
- `do_predict`: False
- `eval_strategy`: no
- `prediction_loss_only`: True
- `per_device_train_batch_size`: 16
- `per_device_eval_batch_size`: 16
- `per_gpu_train_batch_size`: None
- `per_gpu_eval_batch_size`: None
- `gradient_accumulation_steps`: 1
- `eval_accumulation_steps`: None
- `torch_empty_cache_steps`: None
- `learning_rate`: 5e-05
- `weight_decay`: 0.0
- `adam_beta1`: 0.9
- `adam_beta2`: 0.999
- `adam_epsilon`: 1e-08
- `max_grad_norm`: 1
- `num_train_epochs`: 3
- `max_steps`: -1
- `lr_scheduler_type`: linear
- `lr_scheduler_kwargs`: {}
- `warmup_ratio`: 0.0
- `warmup_steps`: 0
- `log_level`: passive
- `log_level_replica`: warning
- `log_on_each_node`: True
- `logging_nan_inf_filter`: True
- `save_safetensors`: True
- `save_on_each_node`: False
- `save_only_model`: False
- `restore_callback_states_from_checkpoint`: False
- `no_cuda`: False
- `use_cpu`: False
- `use_mps_device`: False
- `seed`: 42
- `data_seed`: None
- `jit_mode_eval`: False
- `use_ipex`: False
- `bf16`: False
- `fp16`: False
- `fp16_opt_level`: O1
- `half_precision_backend`: auto
- `bf16_full_eval`: False
- `fp16_full_eval`: False
- `tf32`: None
- `local_rank`: 0
- `ddp_backend`: None
- `tpu_num_cores`: None
- `tpu_metrics_debug`: False
- `debug`: []
- `dataloader_drop_last`: False
- `dataloader_num_workers`: 0
- `dataloader_prefetch_factor`: None
- `past_index`: -1
- `disable_tqdm`: False
- `remove_unused_columns`: True
- `label_names`: None
- `load_best_model_at_end`: False
- `ignore_data_skip`: False
- `fsdp`: []
- `fsdp_min_num_params`: 0
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
- `fsdp_transformer_layer_cls_to_wrap`: None
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
- `deepspeed`: None
- `label_smoothing_factor`: 0.0
- `optim`: adamw_torch
- `optim_args`: None
- `adafactor`: False
- `group_by_length`: False
- `length_column_name`: length
- `ddp_find_unused_parameters`: None
- `ddp_bucket_cap_mb`: None
- `ddp_broadcast_buffers`: False
- `dataloader_pin_memory`: True
- `dataloader_persistent_workers`: False
- `skip_memory_metrics`: True
- `use_legacy_prediction_loop`: False
- `push_to_hub`: False
- `resume_from_checkpoint`: None
- `hub_model_id`: None
- `hub_strategy`: every_save
- `hub_private_repo`: False
- `hub_always_push`: False
- `gradient_checkpointing`: False
- `gradient_checkpointing_kwargs`: None
- `include_inputs_for_metrics`: False
- `eval_do_concat_batches`: True
- `fp16_backend`: auto
- `push_to_hub_model_id`: None
- `push_to_hub_organization`: None
- `mp_parameters`:
- `auto_find_batch_size`: False
- `full_determinism`: False
- `torchdynamo`: None
- `ray_scope`: last
- `ddp_timeout`: 1800
- `torch_compile`: False
- `torch_compile_backend`: None
- `torch_compile_mode`: None
- `dispatch_batches`: None
- `split_batches`: None
- `include_tokens_per_second`: False
- `include_num_input_tokens_seen`: False
- `neftune_noise_alpha`: None
- `optim_target_modules`: None
- `batch_eval_metrics`: False
- `eval_on_start`: False
- `use_liger_kernel`: False
- `eval_use_gather_object`: False
- `batch_sampler`: batch_sampler
- `multi_dataset_batch_sampler`: round_robin
Training Logs
Click to expand
| Epoch | Step | Training Loss |
|:------:|:------:|:-------------:|
| 0.0136 | 500 | 0.21 |
| 0.0272 | 1000 | 0.1795 |
| 0.0408 | 1500 | 0.1296 |
| 0.0544 | 2000 | 0.0749 |
| 0.0680 | 2500 | 0.0312 |
| 0.0815 | 3000 | 0.0137 |
| 0.0951 | 3500 | 0.0079 |
| 0.1087 | 4000 | 0.0057 |
| 0.1223 | 4500 | 0.0042 |
| 0.1359 | 5000 | 0.0038 |
| 0.1495 | 5500 | 0.0033 |
| 0.1631 | 6000 | 0.0029 |
| 0.1767 | 6500 | 0.0028 |
| 0.1903 | 7000 | 0.0026 |
| 0.2039 | 7500 | 0.0024 |
| 0.2174 | 8000 | 0.0022 |
| 0.2310 | 8500 | 0.0019 |
| 0.2446 | 9000 | 0.0019 |
| 0.2582 | 9500 | 0.002 |
| 0.2718 | 10000 | 0.0019 |
| 0.2854 | 10500 | 0.0019 |
| 0.2990 | 11000 | 0.0017 |
| 0.3126 | 11500 | 0.0016 |
| 0.3262 | 12000 | 0.0016 |
| 0.3398 | 12500 | 0.0016 |
| 0.3533 | 13000 | 0.0015 |
| 0.3669 | 13500 | 0.0014 |
| 0.3805 | 14000 | 0.0013 |
| 0.3941 | 14500 | 0.0015 |
| 0.4077 | 15000 | 0.0014 |
| 0.4213 | 15500 | 0.0012 |
| 0.4349 | 16000 | 0.0013 |
| 0.4485 | 16500 | 0.0012 |
| 0.4621 | 17000 | 0.0013 |
| 0.4757 | 17500 | 0.0012 |
| 0.4893 | 18000 | 0.0011 |
| 0.5028 | 18500 | 0.0011 |
| 0.5164 | 19000 | 0.0011 |
| 0.5300 | 19500 | 0.0012 |
| 0.5436 | 20000 | 0.001 |
| 0.5572 | 20500 | 0.0012 |
| 0.5708 | 21000 | 0.0009 |
| 0.5844 | 21500 | 0.0009 |
| 0.5980 | 22000 | 0.0008 |
| 0.6116 | 22500 | 0.0009 |
| 0.6252 | 23000 | 0.0009 |
| 0.6387 | 23500 | 0.0008 |
| 0.6523 | 24000 | 0.0007 |
| 0.6659 | 24500 | 0.0008 |
| 0.6795 | 25000 | 0.0009 |
| 0.6931 | 25500 | 0.0007 |
| 0.7067 | 26000 | 0.0008 |
| 0.7203 | 26500 | 0.0008 |
| 0.7339 | 27000 | 0.0007 |
| 0.7475 | 27500 | 0.0006 |
| 0.7611 | 28000 | 0.0006 |
| 0.7746 | 28500 | 0.0006 |
| 0.7882 | 29000 | 0.0006 |
| 0.8018 | 29500 | 0.0007 |
| 0.8154 | 30000 | 0.0006 |
| 0.8290 | 30500 | 0.0007 |
| 0.8426 | 31000 | 0.0007 |
| 0.8562 | 31500 | 0.0006 |
| 0.8698 | 32000 | 0.0006 |
| 0.8834 | 32500 | 0.0006 |
| 0.8970 | 33000 | 0.0006 |
| 0.9105 | 33500 | 0.0007 |
| 0.9241 | 34000 | 0.0005 |
| 0.9377 | 34500 | 0.0007 |
| 0.9513 | 35000 | 0.0006 |
| 0.9649 | 35500 | 0.0006 |
| 0.9785 | 36000 | 0.0006 |
| 0.9921 | 36500 | 0.0005 |
| 1.0057 | 37000 | 0.0004 |
| 1.0193 | 37500 | 0.0005 |
| 1.0329 | 38000 | 0.0005 |
| 1.0465 | 38500 | 0.0006 |
| 1.0600 | 39000 | 0.0005 |
| 1.0736 | 39500 | 0.0005 |
| 1.0872 | 40000 | 0.0005 |
| 1.1008 | 40500 | 0.0005 |
| 1.1144 | 41000 | 0.0006 |
| 1.1280 | 41500 | 0.0004 |
| 1.1416 | 42000 | 0.0005 |
| 1.1552 | 42500 | 0.0004 |
| 1.1688 | 43000 | 0.0005 |
| 1.1824 | 43500 | 0.0004 |
| 1.1959 | 44000 | 0.0004 |
| 1.2095 | 44500 | 0.0005 |
| 1.2231 | 45000 | 0.0004 |
| 1.2367 | 45500 | 0.0004 |
| 1.2503 | 46000 | 0.0004 |
| 1.2639 | 46500 | 0.0004 |
| 1.2775 | 47000 | 0.0004 |
| 1.2911 | 47500 | 0.0003 |
| 1.3047 | 48000 | 0.0004 |
| 1.3183 | 48500 | 0.0004 |
| 1.3318 | 49000 | 0.0003 |
| 1.3454 | 49500 | 0.0004 |
| 1.3590 | 50000 | 0.0004 |
| 1.3726 | 50500 | 0.0002 |
| 1.3862 | 51000 | 0.0003 |
| 1.3998 | 51500 | 0.0004 |
| 1.4134 | 52000 | 0.0004 |
| 1.4270 | 52500 | 0.0003 |
| 1.4406 | 53000 | 0.0003 |
| 1.4542 | 53500 | 0.0003 |
| 1.4678 | 54000 | 0.0005 |
| 1.4813 | 54500 | 0.0003 |
| 1.4949 | 55000 | 0.0002 |
| 1.5085 | 55500 | 0.0003 |
| 1.5221 | 56000 | 0.0004 |
| 1.5357 | 56500 | 0.0004 |
| 1.5493 | 57000 | 0.0004 |
| 1.5629 | 57500 | 0.0004 |
| 1.5765 | 58000 | 0.0002 |
| 1.5901 | 58500 | 0.0003 |
| 1.6037 | 59000 | 0.0002 |
| 1.6172 | 59500 | 0.0003 |
| 1.6308 | 60000 | 0.0003 |
| 1.6444 | 60500 | 0.0003 |
| 1.6580 | 61000 | 0.0002 |
| 1.6716 | 61500 | 0.0004 |
| 1.6852 | 62000 | 0.0004 |
| 1.6988 | 62500 | 0.0003 |
| 1.7124 | 63000 | 0.0003 |
| 1.7260 | 63500 | 0.0002 |
| 1.7396 | 64000 | 0.0003 |
| 1.7531 | 64500 | 0.0002 |
| 1.7667 | 65000 | 0.0002 |
| 1.7803 | 65500 | 0.0002 |
| 1.7939 | 66000 | 0.0003 |
| 1.8075 | 66500 | 0.0003 |
| 1.8211 | 67000 | 0.0003 |
| 1.8347 | 67500 | 0.0003 |
| 1.8483 | 68000 | 0.0003 |
| 1.8619 | 68500 | 0.0002 |
| 1.8755 | 69000 | 0.0003 |
| 1.8890 | 69500 | 0.0003 |
| 1.9026 | 70000 | 0.0003 |
| 1.9162 | 70500 | 0.0002 |
| 1.9298 | 71000 | 0.0003 |
| 1.9434 | 71500 | 0.0002 |
| 1.9570 | 72000 | 0.0003 |
| 1.9706 | 72500 | 0.0003 |
| 1.9842 | 73000 | 0.0002 |
| 1.9978 | 73500 | 0.0002 |
| 2.0114 | 74000 | 0.0003 |
| 2.0250 | 74500 | 0.0002 |
| 2.0385 | 75000 | 0.0002 |
| 2.0521 | 75500 | 0.0002 |
| 2.0657 | 76000 | 0.0003 |
| 2.0793 | 76500 | 0.0002 |
| 2.0929 | 77000 | 0.0001 |
| 2.1065 | 77500 | 0.0002 |
| 2.1201 | 78000 | 0.0002 |
| 2.1337 | 78500 | 0.0003 |
| 2.1473 | 79000 | 0.0002 |
| 2.1609 | 79500 | 0.0003 |
| 2.1744 | 80000 | 0.0002 |
| 2.1880 | 80500 | 0.0002 |
| 2.2016 | 81000 | 0.0002 |
| 2.2152 | 81500 | 0.0002 |
| 2.2288 | 82000 | 0.0002 |
| 2.2424 | 82500 | 0.0002 |
| 2.2560 | 83000 | 0.0002 |
| 2.2696 | 83500 | 0.0002 |
| 2.2832 | 84000 | 0.0002 |
| 2.2968 | 84500 | 0.0002 |
| 2.3103 | 85000 | 0.0002 |
| 2.3239 | 85500 | 0.0004 |
| 2.3375 | 86000 | 0.0002 |
| 2.3511 | 86500 | 0.0001 |
| 2.3647 | 87000 | 0.0003 |
| 2.3783 | 87500 | 0.0001 |
| 2.3919 | 88000 | 0.0002 |
| 2.4055 | 88500 | 0.0002 |
| 2.4191 | 89000 | 0.0002 |
| 2.4327 | 89500 | 0.0002 |
| 2.4463 | 90000 | 0.0001 |
| 2.4598 | 90500 | 0.0002 |
| 2.4734 | 91000 | 0.0002 |
| 2.4870 | 91500 | 0.0002 |
| 2.5006 | 92000 | 0.0002 |
| 2.5142 | 92500 | 0.0002 |
| 2.5278 | 93000 | 0.0002 |
| 2.5414 | 93500 | 0.0003 |
| 2.5550 | 94000 | 0.0003 |
| 2.5686 | 94500 | 0.0002 |
| 2.5822 | 95000 | 0.0002 |
| 2.5957 | 95500 | 0.0002 |
| 2.6093 | 96000 | 0.0002 |
| 2.6229 | 96500 | 0.0001 |
| 2.6365 | 97000 | 0.0002 |
| 2.6501 | 97500 | 0.0001 |
| 2.6637 | 98000 | 0.0003 |
| 2.6773 | 98500 | 0.0002 |
| 2.6909 | 99000 | 0.0002 |
| 2.7045 | 99500 | 0.0002 |
| 2.7181 | 100000 | 0.0002 |
| 2.7316 | 100500 | 0.0002 |
| 2.7452 | 101000 | 0.0001 |
| 2.7588 | 101500 | 0.0001 |
| 2.7724 | 102000 | 0.0002 |
| 2.7860 | 102500 | 0.0001 |
| 2.7996 | 103000 | 0.0003 |
| 2.8132 | 103500 | 0.0002 |
| 2.8268 | 104000 | 0.0002 |
| 2.8404 | 104500 | 0.0002 |
| 2.8540 | 105000 | 0.0002 |
| 2.8675 | 105500 | 0.0001 |
| 2.8811 | 106000 | 0.0002 |
| 2.8947 | 106500 | 0.0002 |
| 2.9083 | 107000 | 0.0002 |
| 2.9219 | 107500 | 0.0001 |
| 2.9355 | 108000 | 0.0002 |
| 2.9491 | 108500 | 0.0003 |
| 2.9627 | 109000 | 0.0003 |
| 2.9763 | 109500 | 0.0002 |
| 2.9899 | 110000 | 0.0002 |
Framework Versions
- Python: 3.10.13
- Sentence Transformers: 3.0.1
- Transformers: 4.45.0.dev0
- PyTorch: 2.2.1
- Accelerate: 0.31.0
- Datasets: 2.17.1
- Tokenizers: 0.19.1
Citation
BibTeX
Sentence Transformers
@inproceedings{reimers-2019-sentence-bert,
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
month = "11",
year = "2019",
publisher = "Association for Computational Linguistics",
url = "https://arxiv.org/abs/1908.10084",
}