Views
No views yet
SentenceTransformer(
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel
(1): Pooling({'word_embedding_dimension': 384, '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})
)pip install -U sentence-transformers1from sentence_transformers import SentenceTransformer
2
3# Download from the 🤗 Hub
4model = SentenceTransformer("paraphrase-multilingual-MiniLM-L12-v2-job-cv-multi-dataset")
5# Run inference
6sentences = [
7 'Mobile Developer, kinh nghiệm lập trình ứng dụng iOS với Swift.',
8 'Tuyển iOS Developer thành thạo Swift.',
9 'Tuyển kỹ sư cơ khí giám sát dây chuyền sản xuất.',
10]
11embeddings = model.encode(sentences)
12print(embeddings.shape)
13# [3, 384]
14
15# Get the similarity scores for the embeddings
16similarities = model.similarity(embeddings, embeddings)
17print(similarities.shape)
18# [3, 3]BinaryClassificationEvaluator| Metric | Value |
|---|---|
| cosine_accuracy | 0.9755 |
| cosine_accuracy_threshold | 0.5809 |
| cosine_f1 | 0.9779 |
| cosine_f1_threshold | 0.5644 |
| cosine_precision | 0.9833 |
| cosine_recall | 0.9725 |
| cosine_ap | 0.9956 |
TripletEvaluator| Metric | Value |
|---|---|
| cosine_accuracy | 1.0 |
EmbeddingSimilarityEvaluator| Metric | Value |
|---|---|
| pearson_cosine | 0.97 |
| spearman_cosine | 0.9431 |
BinaryClassificationEvaluator| Metric | Value |
|---|---|
| cosine_accuracy | 0.9968 |
| cosine_accuracy_threshold | 0.765 |
| cosine_f1 | 0.9984 |
| cosine_f1_threshold | 0.765 |
| cosine_precision | 1.0 |
| cosine_recall | 0.9968 |
| cosine_ap | 1.0 |
BinaryClassificationEvaluator| Metric | Value |
|---|---|
| cosine_accuracy | 0.9936 |
| cosine_accuracy_threshold | 0.8211 |
| cosine_f1 | 0.9968 |
| cosine_f1_threshold | 0.8211 |
| cosine_precision | 1.0 |
| cosine_recall | 0.9936 |
| cosine_ap | 1.0 |
text1, text2, and label| text1 | text2 | label | |
|---|---|---|---|
| type | string | string | int |
| details |
|
|
|
| text1 | text2 | label |
|---|---|---|
Lập trình viên backend, 3 năm kinh nghiệm với Node.js và xây dựng API. | Tuyển Backend Developer có kinh nghiệm với Node.js. | 1 |
Kỹ sư mạng với 6 năm kinh nghiệm quản lý hệ thống mạng lớn. | Cần System Administrator với kinh nghiệm quản lý hệ thống. | 0 |
Lập trình viên JavaScript với 4 năm kinh nghiệm, thành thạo Node.js và Express. | Cần tuyển Backend Developer biết sử dụng PHP và Laravel. | 0 |
ContrastiveLoss with these parameters:
1{
2 "distance_metric": "SiameseDistanceMetric.COSINE_DISTANCE",
3 "margin": 0.5,
4 "size_average": true
5}anchor, positive, and negative| anchor | positive | negative | |
|---|---|---|---|
| type | string | string | string |
| details |
|
|
|
| anchor | positive | negative |
|---|---|---|
Account Manager, chuyên quản lý khách hàng B2B và xây dựng mối quan hệ lâu dài. | Tuyển Account Manager có kinh nghiệm quản lý khách hàng doanh nghiệp. | Tuyển chuyên viên pháp lý tư vấn doanh nghiệp. |
Chuyên viên tư vấn giáo dục với 10 năm kinh nghiệm định hướng nghề nghiệp. | Cần chuyên viên tư vấn giáo dục có kinh nghiệm định hướng nghề nghiệp. | Nhân viên tổ chức sự kiện giáo dục hỗ trợ triển khai hội thảo. |
Actor với nhiều năm kinh nghiệm diễn xuất trên sân khấu và phim truyền hình. | Diễn viên cần có khả năng hóa thân vào các vai diễn phức tạp. | Nhà sản xuất phim cần quản lý và tổ chức các dự án phim tài liệu. |
TripletLoss with these parameters:
1{
2 "distance_metric": "TripletDistanceMetric.EUCLIDEAN",
3 "triplet_margin": 5
4}text1, text2, and score| text1 | text2 | score | |
|---|---|---|---|
| type | string | string | float |
| details |
|
|
|
| text1 | text2 | score |
|---|---|---|
Hardware Engineer có khả năng thiết kế hệ thống nhúng. | Embedded Engineer cần có kỹ năng phát triển phần mềm nhúng. | 0.74 |
Kỹ sư phần mềm, chuyên môn trong phát triển hệ thống thời gian thực, 4 năm kinh nghiệm. | Yêu cầu Embedded Software Engineer với kinh nghiệm tối thiểu 3 năm. | 0.88 |
Cần Software Engineer với kinh nghiệm phát triển web. | Frontend Developer cần thành thạo React và JavaScript. | 0.34 |
CoSENTLoss with these parameters:
1{
2 "scale": 20.0,
3 "similarity_fct": "pairwise_cos_sim"
4}text1 and text2| text1 | text2 | |
|---|---|---|
| type | string | string |
| details |
|
|
| text1 | text2 |
|---|---|
Nhân viên hỗ trợ kho thuốc cần kỹ năng quản lý. | Nhân viên kho thuốc cần kỹ năng kiểm kê. |
Nhân viên bán hàng cần có kỹ năng giao tiếp và xử lý tình huống. | Salesperson chuyên xử lý đơn hàng và giữ mối quan hệ với khách hàng. |
Tuyển kỹ sư cơ khí chuyên thiết kế máy móc công nghiệp. | Kỹ sư cơ khí cần thiết kế hệ thống sản xuất tiên tiến. |
MultipleNegativesRankingLoss with these parameters:
1{
2 "scale": 20.0,
3 "similarity_fct": "cos_sim"
4}text1 and text2| text1 | text2 | |
|---|---|---|
| type | string | string |
| details |
|
|
| text1 | text2 |
|---|---|
Chuyên viên quản lý danh mục đầu tư với 8 năm kinh nghiệm tối ưu hóa tài sản và phân tích lợi nhuận. | 8 năm kinh nghiệm quản lý danh mục đầu tư và phân tích tài chính. |
Hotel Manager with strong leadership skills and 5 years of experience. | Hotel manager skilled in optimizing hotel operations and guest services. |
7 năm kinh nghiệm phát triển backend và cơ sở dữ liệu. | Backend Developer chuyên về API và cơ sở dữ liệu. |
MultipleNegativesRankingLoss with these parameters:
1{
2 "scale": 20.0,
3 "similarity_fct": "cos_sim"
4}text1, text2, and label| text1 | text2 | label | |
|---|---|---|---|
| type | string | string | int |
| details |
|
|
|
| text1 | text2 | label |
|---|---|---|
Tuyển kỹ sư phần mềm nhúng có kinh nghiệm 3 năm trở lên. | Software Developer, yêu cầu hiểu biết về hệ thống nhúng. | 0 |
Tư vấn môi trường hỗ trợ kiểm soát ô nhiễm môi trường đô thị. | Quản lý chất thải có kinh nghiệm xử lý và tái chế nước. | 1 |
DevOps Engineer với khả năng triển khai trên AWS, Azure. | Cloud Engineer cần quản lý hạ tầng. | 1 |
ContrastiveLoss with these parameters:
1{
2 "distance_metric": "SiameseDistanceMetric.COSINE_DISTANCE",
3 "margin": 0.5,
4 "size_average": true
5}anchor, positive, and negative| anchor | positive | negative | |
|---|---|---|---|
| type | string | string | string |
| details |
|
|
|
| anchor | positive | negative |
|---|---|---|
Quản lý danh mục đầu tư tài chính trong hơn 6 năm, chuyên gia phân tích đầu tư. | Investment Analyst cần kinh nghiệm quản lý danh mục đầu tư. | Kế toán chi phí phụ trách kiểm soát chi phí. |
Chuyên viên quản lý chuỗi cung ứng, thành thạo SAP và tối ưu hóa quy trình. | Supply Chain Manager có kinh nghiệm tối ưu chuỗi cung ứng. | Tuyển lập trình viên Unity phát triển trò chơi 3D. |
Nhà phân tích dữ liệu, kinh nghiệm trong lĩnh vực y tế và sinh học. | Data Analyst cần kỹ năng phân tích dữ liệu y tế. | Tuyển nhân viên kinh doanh bất động sản. |
TripletLoss with these parameters:
1{
2 "distance_metric": "TripletDistanceMetric.EUCLIDEAN",
3 "triplet_margin": 5
4}text1, text2, and score| text1 | text2 | score | |
|---|---|---|---|
| type | string | string | float |
| details |
|
|
|
| text1 | text2 | score |
|---|---|---|
Cần Quản lý đội xe có khả năng giám sát hiệu suất và lập kế hoạch vận hành. | Điều phối viên vận tải yêu cầu giám sát và tối ưu hóa hoạt động vận tải. | 0.83 |
Lập trình viên Python với kỹ năng xây dựng và tối ưu hóa hệ thống backend. | Hỗ trợ kỹ thuật viên IT xử lý lỗi mạng. | 0.29 |
Nhà khoa học nghiên cứu các hệ thống nano tiên tiến cho y học hiện đại. | Kỹ thuật viên thí nghiệm tập trung vào phân tích vật liệu nano. | 0.74 |
CoSENTLoss with these parameters:
1{
2 "scale": 20.0,
3 "similarity_fct": "pairwise_cos_sim"
4}text1 and text2| text1 | text2 | |
|---|---|---|
| type | string | string |
| details |
|
|
| text1 | text2 |
|---|---|
Restaurant Manager chịu trách nhiệm giám sát và tối ưu hóa dịch vụ. | Restaurant Manager có khả năng điều hành và phát triển dịch vụ ăn uống. |
Quản lý thương mại điện tử tối ưu hóa quy trình bán hàng. | Quản lý sàn thương mại điện tử cần tối ưu hóa vận hành. |
Kỹ thuật viên kiểm tra cần kiểm tra chất lượng hệ thống sản xuất. | Kỹ thuật viên kiểm tra yêu cầu giám sát quy trình sản xuất. |
MultipleNegativesRankingLoss with these parameters:
1{
2 "scale": 20.0,
3 "similarity_fct": "cos_sim"
4}text1 and text2| text1 | text2 | |
|---|---|---|
| type | string | string |
| details |
|
|
| text1 | text2 |
|---|---|
Producer với kinh nghiệm quản lý các dự án phim truyền hình và phim tài liệu. | Chuyên gia sản xuất phim với kỹ năng quản lý các dự án phim lớn. |
Chuyên viên xử lý môi trường có kinh nghiệm trong xử lý nước thải và kiểm soát ô nhiễm. | Chuyên gia tư vấn môi trường với kinh nghiệm phát triển các dự án tái chế và xử lý nước thải. |
Cybersecurity Expert, chuyên gia bảo mật với 3 năm kinh nghiệm. | Chuyên gia An ninh mạng, 3 năm kinh nghiệm bảo mật hệ thống. |
MultipleNegativesRankingLoss with these parameters:
1{
2 "scale": 20.0,
3 "similarity_fct": "cos_sim"
4}eval_strategy: stepsper_device_train_batch_size: 32per_device_eval_batch_size: 32learning_rate: 2e-05num_train_epochs: 5warmup_ratio: 0.1fp16: Truebatch_sampler: no_duplicatesoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: stepsprediction_loss_only: Trueper_device_train_batch_size: 32per_device_eval_batch_size: 32per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 1eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 2e-05weight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 1.0num_train_epochs: 5max_steps: -1lr_scheduler_type: linearlr_scheduler_kwargs: {}warmup_ratio: 0.1warmup_steps: 0log_level: passivelog_level_replica: warninglog_on_each_node: Truelogging_nan_inf_filter: Truesave_safetensors: Truesave_on_each_node: Falsesave_only_model: Falserestore_callback_states_from_checkpoint: Falseno_cuda: Falseuse_cpu: Falseuse_mps_device: Falseseed: 42data_seed: Nonejit_mode_eval: Falseuse_ipex: Falsebf16: Falsefp16: Truefp16_opt_level: O1half_precision_backend: autobf16_full_eval: Falsefp16_full_eval: Falsetf32: Nonelocal_rank: 0ddp_backend: Nonetpu_num_cores: Nonetpu_metrics_debug: Falsedebug: []dataloader_drop_last: Falsedataloader_num_workers: 0dataloader_prefetch_factor: Nonepast_index: -1disable_tqdm: Falseremove_unused_columns: Truelabel_names: Noneload_best_model_at_end: Falseignore_data_skip: Falsefsdp: []fsdp_min_num_params: 0fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}fsdp_transformer_layer_cls_to_wrap: Noneaccelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}deepspeed: Nonelabel_smoothing_factor: 0.0optim: adamw_torchoptim_args: Noneadafactor: Falsegroup_by_length: Falselength_column_name: lengthddp_find_unused_parameters: Noneddp_bucket_cap_mb: Noneddp_broadcast_buffers: Falsedataloader_pin_memory: Truedataloader_persistent_workers: Falseskip_memory_metrics: Trueuse_legacy_prediction_loop: Falsepush_to_hub: Falseresume_from_checkpoint: Nonehub_model_id: Nonehub_strategy: every_savehub_private_repo: Falsehub_always_push: Falsegradient_checkpointing: Falsegradient_checkpointing_kwargs: Noneinclude_inputs_for_metrics: Falseinclude_for_metrics: []eval_do_concat_batches: Truefp16_backend: autopush_to_hub_model_id: Nonepush_to_hub_organization: Nonemp_parameters:auto_find_batch_size: Falsefull_determinism: Falsetorchdynamo: Noneray_scope: lastddp_timeout: 1800torch_compile: Falsetorch_compile_backend: Nonetorch_compile_mode: Nonedispatch_batches: Nonesplit_batches: Noneinclude_tokens_per_second: Falseinclude_num_input_tokens_seen: Falseneftune_noise_alpha: Noneoptim_target_modules: Nonebatch_eval_metrics: Falseeval_on_start: Falseuse_liger_kernel: Falseeval_use_gather_object: Falseaverage_tokens_across_devices: Falseprompts: Nonebatch_sampler: no_duplicatesmulti_dataset_batch_sampler: proportional| Epoch | Step | Training Loss | binary loss | triplet loss | similarity loss | job paraphrase loss | cv paraphrase loss | cosine_ap | cosine_accuracy | spearman_cosine |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | - | - | - | - | - | - | 1.0 | 0.9682 | 0.5468 |
| 0.2817 | 200 | 2.401 | - | - | - | - | - | - | - | - |
| 0.5634 | 400 | 1.5659 | - | - | - | - | - | - | - | - |
| 0.7042 | 500 | - | 0.0088 | 0.2391 | 6.9067 | 0.1746 | 0.2689 | 1.0 | 0.9936 | 0.9123 |
| 0.8451 | 600 | 1.8501 | - | - | - | - | - | - | - | - |
| 1.1268 | 800 | 1.7318 | - | - | - | - | - | - | - | - |
| 1.4085 | 1000 | 1.3758 | 0.0079 | 0.0367 | 6.2019 | 0.1665 | 0.2657 | 1.0 | 1.0 | 0.9238 |
| 1.6901 | 1200 | 1.3554 | - | - | - | - | - | - | - | - |
| 1.9718 | 1400 | 1.5119 | - | - | - | - | - | - | - | - |
| 2.1127 | 1500 | - | 0.0081 | 0.0144 | 5.7135 | 0.1633 | 0.2295 | 1.0 | 1.0 | 0.9341 |
| 2.2535 | 1600 | 1.2886 | - | - | - | - | - | - | - | - |
| 2.5352 | 1800 | 1.1131 | - | - | - | - | - | - | - | - |
| 2.8169 | 2000 | 1.3962 | 0.0108 | 0.0191 | 6.0231 | 0.1540 | 0.2342 | 1.0 | 1.0 | 0.9396 |
| 3.0986 | 2200 | 1.2394 | - | - | - | - | - | - | - | - |
| 3.3803 | 2400 | 1.1392 | - | - | - | - | - | - | - | - |
| 3.5211 | 2500 | - | 0.0097 | 0.0025 | 5.6361 | 0.1580 | 0.2212 | 1.0 | 1.0 | 0.9410 |
| 3.6620 | 2600 | 1.1614 | - | - | - | - | - | - | - | - |
| 3.9437 | 2800 | 1.2351 | - | - | - | - | - | - | - | - |
| 4.2254 | 3000 | 1.1862 | 0.0100 | 0.0107 | 5.5943 | 0.1517 | 0.2158 | 1.0 | 1.0 | 0.9420 |
| 4.5070 | 3200 | 0.9371 | - | - | - | - | - | - | - | - |
| 4.7887 | 3400 | 1.3572 | - | - | - | - | - | - | - | - |
| 4.9296 | 3500 | - | 0.0104 | 0.0057 | 5.6213 | 0.1539 | 0.2141 | 1.0 | 1.0 | 0.9429 |
| 5.0 | 3550 | - | - | - | - | - | - | 1.0 | 1.0 | 0.9431 |
1@inproceedings{reimers-2019-sentence-bert,
2 title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
3 author = "Reimers, Nils and Gurevych, Iryna",
4 booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
5 month = "11",
6 year = "2019",
7 publisher = "Association for Computational Linguistics",
8 url = "https://arxiv.org/abs/1908.10084",
9}1@inproceedings{hadsell2006dimensionality,
2 author={Hadsell, R. and Chopra, S. and LeCun, Y.},
3 booktitle={2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'06)},
4 title={Dimensionality Reduction by Learning an Invariant Mapping},
5 year={2006},
6 volume={2},
7 number={},
8 pages={1735-1742},
9 doi={10.1109/CVPR.2006.100}
10}1@misc{hermans2017defense,
2 title={In Defense of the Triplet Loss for Person Re-Identification},
3 author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
4 year={2017},
5 eprint={1703.07737},
6 archivePrefix={arXiv},
7 primaryClass={cs.CV}
8}1@online{kexuefm-8847,
2 title={CoSENT: A more efficient sentence vector scheme than Sentence-BERT},
3 author={Su Jianlin},
4 year={2022},
5 month={Jan},
6 url={https://kexue.fm/archives/8847},
7}1@misc{henderson2017efficient,
2 title={Efficient Natural Language Response Suggestion for Smart Reply},
3 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},
4 year={2017},
5 eprint={1705.00652},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL}
8}