Views
No views yet
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: NewModel
(1): Pooling({'word_embedding_dimension': 768, '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})
(2): Normalize()
)pip install -U sentence-transformers1from sentence_transformers import SentenceTransformer
2
3# Download from the 🤗 Hub
4model = SentenceTransformer("pj-mathematician/JobGTE-multilingual-base-v1")
5# Run inference
6sentences = [
7 'Volksvertreter',
8 'Parlamentarier',
9 'Oberbürgermeister',
10]
11embeddings = model.encode(sentences)
12print(embeddings.shape)
13# [3, 768]
14
15# Get the similarity scores for the embeddings
16similarities = model.similarity(embeddings, embeddings)
17print(similarities.shape)
18# [3, 3]full_en, full_es, full_de, full_zh, mix_es, mix_de and mix_zhInformationRetrievalEvaluator| Metric | full_en | full_es | full_de | full_zh | mix_es | mix_de | mix_zh |
|---|---|---|---|---|---|---|---|
| cosine_accuracy@1 | 0.6571 | 0.1243 | 0.2956 | 0.6602 | 0.728 | 0.6703 | 0.1908 |
| cosine_accuracy@20 | 0.9905 | 1.0 | 0.9704 | 0.9806 | 0.96 | 0.9506 | 1.0 |
| cosine_accuracy@50 | 0.9905 | 1.0 | 0.9852 | 0.9903 | 0.9792 | 0.9776 | 1.0 |
| cosine_accuracy@100 | 0.9905 | 1.0 | 0.9852 | 0.9903 | 0.9943 | 0.9865 | 1.0 |
| cosine_accuracy@150 | 0.9905 | 1.0 | 0.9901 | 0.9903 | 0.9958 | 0.9932 | 1.0 |
| cosine_accuracy@200 | 0.9905 | 1.0 | 0.9901 | 0.9903 | 0.9974 | 0.9948 | 1.0 |
| cosine_precision@1 | 0.6571 | 0.1243 | 0.2956 | 0.6602 | 0.728 | 0.6703 | 0.1908 |
| cosine_precision@20 | 0.5171 | 0.5719 | 0.5084 | 0.4782 | 0.1243 | 0.1252 | 0.1544 |
| cosine_precision@50 | 0.316 | 0.3885 | 0.3654 | 0.2895 | 0.0515 | 0.0523 | 0.0618 |
| cosine_precision@100 | 0.189 | 0.2517 | 0.2413 | 0.1757 | 0.0263 | 0.0267 | 0.0309 |
| cosine_precision@150 | 0.1338 | 0.1905 | 0.1804 | 0.126 | 0.0176 | 0.018 | 0.0206 |
| cosine_precision@200 | 0.1043 | 0.1522 | 0.1447 | 0.0982 | 0.0133 | 0.0135 | 0.0154 |
| cosine_recall@1 | 0.0678 | 0.0037 | 0.0111 | 0.0615 | 0.2813 | 0.2524 | 0.0614 |
| cosine_recall@20 | 0.547 | 0.3842 | 0.3221 | 0.5108 | 0.9183 | 0.9096 | 1.0 |
| cosine_recall@50 | 0.74 | 0.5641 | 0.5025 | 0.6923 | 0.9499 | 0.9482 | 1.0 |
| cosine_recall@100 | 0.8453 | 0.6742 | 0.6248 | 0.8004 | 0.9701 | 0.9685 | 1.0 |
| cosine_recall@150 | 0.8838 | 0.7464 | 0.683 | 0.8465 | 0.9768 | 0.9782 | 1.0 |
| cosine_recall@200 | 0.9109 | 0.7825 | 0.7216 | 0.8771 | 0.9818 | 0.981 | 1.0 |
| cosine_ndcg@1 | 0.6571 | 0.1243 | 0.2956 | 0.6602 | 0.728 | 0.6703 | 0.1908 |
| cosine_ndcg@20 | 0.6954 | 0.6139 | 0.5393 | 0.654 | 0.8044 | 0.7736 | 0.5474 |
| cosine_ndcg@50 | 0.715 | 0.5874 | 0.5267 | 0.6707 | 0.813 | 0.7844 | 0.5474 |
| cosine_ndcg@100 | 0.7679 | 0.6144 | 0.5579 | 0.7234 | 0.8173 | 0.7889 | 0.5474 |
| cosine_ndcg@150 | 0.7857 | 0.6499 | 0.588 | 0.7438 | 0.8186 | 0.7909 | 0.5474 |
| cosine_ndcg@200 | 0.797 | 0.6681 | 0.6071 | 0.7554 | 0.8195 | 0.7914 | 0.5474 |
| cosine_mrr@1 | 0.6571 | 0.1243 | 0.2956 | 0.6602 | 0.728 | 0.6703 | 0.1908 |
| cosine_mrr@20 | 0.8138 | 0.5581 | 0.5104 | 0.8037 | 0.7969 | 0.752 | 0.4093 |
| cosine_mrr@50 | 0.8138 | 0.5581 | 0.511 | 0.8041 | 0.7975 | 0.7529 | 0.4093 |
| cosine_mrr@100 | 0.8138 | 0.5581 | 0.511 | 0.8041 | 0.7977 | 0.7531 | 0.4093 |
| cosine_mrr@150 | 0.8138 | 0.5581 | 0.511 | 0.8041 | 0.7977 | 0.7531 | 0.4093 |
| cosine_mrr@200 | 0.8138 | 0.5581 | 0.511 | 0.8041 | 0.7977 | 0.7531 | 0.4093 |
| cosine_map@1 | 0.6571 | 0.1243 | 0.2956 | 0.6602 | 0.728 | 0.6703 | 0.1908 |
| cosine_map@20 | 0.5579 | 0.4799 | 0.401 | 0.5087 | 0.7351 | 0.6968 | 0.3298 |
| cosine_map@50 | 0.5471 | 0.425 | 0.3588 | 0.4926 | 0.7374 | 0.6996 | 0.3298 |
| cosine_map@100 | 0.5796 | 0.4302 | 0.3633 | 0.5217 | 0.738 | 0.7003 | 0.3298 |
| cosine_map@150 | 0.5875 | 0.4459 | 0.3777 | 0.5299 | 0.7381 | 0.7004 | 0.3298 |
| cosine_map@200 | 0.5912 | 0.4533 | 0.3848 | 0.5334 | 0.7382 | 0.7005 | 0.3298 |
| cosine_map@500 | 0.5953 | 0.4656 | 0.3978 | 0.5386 | 0.7383 | 0.7006 | 0.3298 |
anchor and positive| anchor | positive | |
|---|---|---|
| type | string | string |
| details |
|
|
| anchor | positive |
|---|---|
air commodore | flight lieutenant |
command and control officer | flight officer |
air commodore | command and control officer |
GISTEmbedLoss with these parameters:
1{'guide': SentenceTransformer(
2 (0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel
3 (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})
4 (2): Normalize()
5), 'temperature': 0.01, 'margin_strategy': 'absolute', 'margin': 0.0}anchor and positive| anchor | positive | |
|---|---|---|
| type | string | string |
| details |
|
|
| anchor | positive |
|---|---|
Staffelkommandantin | Kommodore |
Luftwaffenoffizierin | Luftwaffenoffizier/Luftwaffenoffizierin |
Staffelkommandantin | Luftwaffenoffizierin |
GISTEmbedLoss with these parameters:
1{'guide': SentenceTransformer(
2 (0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel
3 (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})
4 (2): Normalize()
5), 'temperature': 0.01, 'margin_strategy': 'absolute', 'margin': 0.0}anchor and positive| anchor | positive | |
|---|---|---|
| type | string | string |
| details |
|
|
| anchor | positive |
|---|---|
jefe de escuadrón | instructor |
comandante de aeronave | instructor de simulador |
instructor | oficial del Ejército del Aire |
GISTEmbedLoss with these parameters:
1{'guide': SentenceTransformer(
2 (0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel
3 (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})
4 (2): Normalize()
5), 'temperature': 0.01, 'margin_strategy': 'absolute', 'margin': 0.0}anchor and positive| anchor | positive | |
|---|---|---|
| type | string | string |
| details |
|
|
| anchor | positive |
|---|---|
技术总监 | 技术和运营总监 |
技术总监 | 技术主管 |
技术总监 | 技术艺术总监 |
GISTEmbedLoss with these parameters:
1{'guide': SentenceTransformer(
2 (0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel
3 (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})
4 (2): Normalize()
5), 'temperature': 0.01, 'margin_strategy': 'absolute', 'margin': 0.0}anchor and positive| anchor | positive | |
|---|---|---|
| type | string | string |
| details |
|
|
| anchor | positive |
|---|---|
technical manager | Technischer Direktor für Bühne, Film und Fernsehen |
head of technical | directora técnica |
head of technical department | 技术艺术总监 |
GISTEmbedLoss with these parameters:
1{'guide': SentenceTransformer(
2 (0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel
3 (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})
4 (2): Normalize()
5), 'temperature': 0.01, 'margin_strategy': 'absolute', 'margin': 0.0}eval_strategy: stepsper_device_train_batch_size: 64per_device_eval_batch_size: 128gradient_accumulation_steps: 2num_train_epochs: 5warmup_ratio: 0.05log_on_each_node: Falsefp16: Truedataloader_num_workers: 4ddp_find_unused_parameters: Truebatch_sampler: no_duplicatesoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: stepsprediction_loss_only: Trueper_device_train_batch_size: 64per_device_eval_batch_size: 128per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 2eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 5e-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.05warmup_steps: 0log_level: passivelog_level_replica: warninglog_on_each_node: Falselogging_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: Truedataloader_num_workers: 4dataloader_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}tp_size: 0fsdp_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: Trueddp_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: Nonehub_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: 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 | full_en_cosine_ndcg@200 | full_es_cosine_ndcg@200 | full_de_cosine_ndcg@200 | full_zh_cosine_ndcg@200 | mix_es_cosine_ndcg@200 | mix_de_cosine_ndcg@200 | mix_zh_cosine_ndcg@200 |
|---|---|---|---|---|---|---|---|---|---|
| -1 | -1 | - | 0.7447 | 0.6125 | 0.5378 | 0.7240 | 0.7029 | 0.6345 | 0.5531 |
| 0.0010 | 1 | 3.4866 | - | - | - | - | - | - | - |
| 0.1027 | 100 | 2.5431 | - | - | - | - | - | - | - |
| 0.2053 | 200 | 1.4536 | 0.7993 | 0.6633 | 0.5974 | 0.7642 | 0.7567 | 0.7011 | 0.5498 |
| 0.3080 | 300 | 1.1018 | - | - | - | - | - | - | - |
| 0.4107 | 400 | 0.9184 | 0.7925 | 0.6586 | 0.6058 | 0.7587 | 0.7749 | 0.7278 | 0.5486 |
| 0.5133 | 500 | 0.8973 | - | - | - | - | - | - | - |
| 0.6160 | 600 | 0.7309 | 0.7951 | 0.6671 | 0.6096 | 0.7708 | 0.7793 | 0.7339 | 0.5525 |
| 0.7187 | 700 | 0.7297 | - | - | - | - | - | - | - |
| 0.8214 | 800 | 0.7281 | 0.7929 | 0.6711 | 0.6088 | 0.7645 | 0.7899 | 0.7444 | 0.5479 |
| 0.9240 | 900 | 0.6607 | - | - | - | - | - | - | - |
| 1.0267 | 1000 | 0.6075 | 0.7915 | 0.6659 | 0.6088 | 0.7665 | 0.7968 | 0.7588 | 0.5482 |
| 1.1294 | 1100 | 0.4553 | - | - | - | - | - | - | - |
| 1.2320 | 1200 | 0.4775 | 0.7979 | 0.6696 | 0.6033 | 0.7669 | 0.7959 | 0.7624 | 0.5484 |
| 1.3347 | 1300 | 0.4838 | - | - | - | - | - | - | - |
| 1.4374 | 1400 | 0.4912 | 0.7973 | 0.6757 | 0.6112 | 0.7656 | 0.7978 | 0.7650 | 0.5487 |
| 1.5400 | 1500 | 0.4732 | - | - | - | - | - | - | - |
| 1.6427 | 1600 | 0.5269 | 0.8031 | 0.6723 | 0.6108 | 0.7654 | 0.8008 | 0.7660 | 0.5492 |
| 1.7454 | 1700 | 0.4822 | - | - | - | - | - | - | - |
| 1.8480 | 1800 | 0.5072 | 0.7962 | 0.6668 | 0.6051 | 0.7592 | 0.8001 | 0.7714 | 0.5486 |
| 1.9507 | 1900 | 0.4709 | - | - | - | - | - | - | - |
| 2.0544 | 2000 | 0.3772 | 0.7940 | 0.6647 | 0.6037 | 0.7579 | 0.8064 | 0.7732 | 0.5479 |
| 2.1571 | 2100 | 0.3982 | - | - | - | - | - | - | - |
| 2.2598 | 2200 | 0.3073 | 0.7969 | 0.6652 | 0.6005 | 0.7625 | 0.8054 | 0.7734 | 0.5493 |
| 2.3624 | 2300 | 0.383 | - | - | - | - | - | - | - |
| 2.4651 | 2400 | 0.3687 | 0.7925 | 0.6690 | 0.5987 | 0.7583 | 0.8081 | 0.7735 | 0.5477 |
| 2.5678 | 2500 | 0.3472 | - | - | - | - | - | - | - |
| 2.6704 | 2600 | 0.3557 | 0.7956 | 0.6758 | 0.6019 | 0.7659 | 0.8082 | 0.7767 | 0.5491 |
| 2.7731 | 2700 | 0.3527 | - | - | - | - | - | - | - |
| 2.8758 | 2800 | 0.3446 | 0.7945 | 0.6719 | 0.6020 | 0.7616 | 0.8124 | 0.7818 | 0.5496 |
| 2.9784 | 2900 | 0.3566 | - | - | - | - | - | - | - |
| 3.0821 | 3000 | 0.3252 | 0.7948 | 0.6682 | 0.6025 | 0.7617 | 0.8152 | 0.7848 | 0.5516 |
| 3.1848 | 3100 | 0.2968 | - | - | - | - | - | - | - |
| 3.2875 | 3200 | 0.2962 | 0.7953 | 0.6717 | 0.6086 | 0.7613 | 0.8110 | 0.7824 | 0.5482 |
| 3.3901 | 3300 | 0.3084 | - | - | - | - | - | - | - |
| 3.4928 | 3400 | 0.2909 | 0.7940 | 0.6634 | 0.6023 | 0.7615 | 0.8138 | 0.7822 | 0.5457 |
| 3.5955 | 3500 | 0.2964 | - | - | - | - | - | - | - |
| 3.6982 | 3600 | 0.3193 | 0.7960 | 0.6635 | 0.6070 | 0.7534 | 0.8164 | 0.7844 | 0.5467 |
| 3.8008 | 3700 | 0.3514 | - | - | - | - | - | - | - |
| 3.9035 | 3800 | 0.3147 | 0.7973 | 0.6696 | 0.6125 | 0.7616 | 0.8176 | 0.7885 | 0.5469 |
| 4.0062 | 3900 | 0.2738 | - | - | - | - | - | - | - |
| 4.1088 | 4000 | 0.2842 | 0.7960 | 0.6672 | 0.6082 | 0.7536 | 0.8174 | 0.7891 | 0.5479 |
| 4.2115 | 4100 | 0.2739 | - | - | - | - | - | - | - |
| 4.3142 | 4200 | 0.2704 | 0.7979 | 0.6681 | 0.6111 | 0.7540 | 0.8180 | 0.7891 | 0.5476 |
| 4.4168 | 4300 | 0.2529 | - | - | - | - | - | - | - |
| 4.5195 | 4400 | 0.272 | 0.7968 | 0.6685 | 0.6087 | 0.7564 | 0.8185 | 0.7901 | 0.5476 |
| 4.6222 | 4500 | 0.3 | - | - | - | - | - | - | - |
| 4.7248 | 4600 | 0.2598 | 0.7972 | 0.6675 | 0.6072 | 0.7556 | 0.8190 | 0.7909 | 0.5478 |
| 4.8275 | 4700 | 0.3101 | - | - | - | - | - | - | - |
| 4.9302 | 4800 | 0.2524 | 0.7970 | 0.6681 | 0.6071 | 0.7554 | 0.8195 | 0.7914 | 0.5474 |
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@misc{solatorio2024gistembed,
2 title={GISTEmbed: Guided In-sample Selection of Training Negatives for Text Embedding Fine-tuning},
3 author={Aivin V. Solatorio},
4 year={2024},
5 eprint={2402.16829},
6 archivePrefix={arXiv},
7 primaryClass={cs.LG}
8}