Views
No views yet
SentenceTransformer(
(0): Transformer({'max_seq_length': 8192, 'do_lower_case': False, 'architecture': 'ModernBertModel'})
(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})
(2): Normalize()
)pip install -U sentence-transformers1from sentence_transformers import SentenceTransformer
2
3# Download from the 🤗 Hub
4model = SentenceTransformer("PremkumarHF1/modernbert-embed-base-legal-matryoshka-2")
5# Run inference
6sentences = [
7 'What is appropriate if the entire substance of Document 3 is reflected in publicly available meeting minutes?',
8 '72 Portions of Document 3 may not have been disclosed in the meeting minutes submitted by the plaintiff and thus \nneed not be disclosed to the plaintiff. On the other hand, disclosure of Document 3 in its entirety is appropriate if the \nentire substance of which is reflected in those publicly available meeting minutes. \n142',
9 'KLAN202300916 \n \n \n \n \n9\nLos derechos morales, a su vez, están fundamentalmente \nprotegidos por la legislación estatal. Esta reconoce los derechos de \nlos autores como exclusivos de estos y los protege no solo en \nbeneficio propio, sino también de la sociedad por la contribución \nsocial y cultural que históricamente se le ha reconocido a la',
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)
18# tensor([[1.0000, 0.7694, 0.0882],
19# [0.7694, 1.0000, 0.0689],
20# [0.0882, 0.0689, 1.0000]])dim_768InformationRetrievalEvaluator with these parameters:
1{
2 "truncate_dim": 768
3}| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.5487 |
| cosine_accuracy@3 | 0.5935 |
| cosine_accuracy@5 | 0.6909 |
| cosine_accuracy@10 | 0.7573 |
| cosine_precision@1 | 0.5487 |
| cosine_precision@3 | 0.509 |
| cosine_precision@5 | 0.3954 |
| cosine_precision@10 | 0.2325 |
| cosine_recall@1 | 0.204 |
| cosine_recall@3 | 0.5089 |
| cosine_recall@5 | 0.6376 |
| cosine_recall@10 | 0.7424 |
| cosine_ndcg@10 | 0.6524 |
| cosine_mrr@10 | 0.5959 |
| cosine_map@100 | 0.6368 |
dim_512InformationRetrievalEvaluator with these parameters:
1{
2 "truncate_dim": 512
3}| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.5394 |
| cosine_accuracy@3 | 0.5811 |
| cosine_accuracy@5 | 0.6708 |
| cosine_accuracy@10 | 0.7573 |
| cosine_precision@1 | 0.5394 |
| cosine_precision@3 | 0.5008 |
| cosine_precision@5 | 0.3858 |
| cosine_precision@10 | 0.2318 |
| cosine_recall@1 | 0.1998 |
| cosine_recall@3 | 0.5006 |
| cosine_recall@5 | 0.623 |
| cosine_recall@10 | 0.7414 |
| cosine_ndcg@10 | 0.6451 |
| cosine_mrr@10 | 0.5865 |
| cosine_map@100 | 0.6264 |
dim_256InformationRetrievalEvaluator with these parameters:
1{
2 "truncate_dim": 256
3}| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.5039 |
| cosine_accuracy@3 | 0.5379 |
| cosine_accuracy@5 | 0.6414 |
| cosine_accuracy@10 | 0.7172 |
| cosine_precision@1 | 0.5039 |
| cosine_precision@3 | 0.4683 |
| cosine_precision@5 | 0.3641 |
| cosine_precision@10 | 0.2202 |
| cosine_recall@1 | 0.1856 |
| cosine_recall@3 | 0.4674 |
| cosine_recall@5 | 0.5894 |
| cosine_recall@10 | 0.7072 |
| cosine_ndcg@10 | 0.6103 |
| cosine_mrr@10 | 0.5513 |
| cosine_map@100 | 0.5938 |
dim_128InformationRetrievalEvaluator with these parameters:
1{
2 "truncate_dim": 128
3}| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.4374 |
| cosine_accuracy@3 | 0.4791 |
| cosine_accuracy@5 | 0.5688 |
| cosine_accuracy@10 | 0.6538 |
| cosine_precision@1 | 0.4374 |
| cosine_precision@3 | 0.4091 |
| cosine_precision@5 | 0.3221 |
| cosine_precision@10 | 0.1964 |
| cosine_recall@1 | 0.1625 |
| cosine_recall@3 | 0.4116 |
| cosine_recall@5 | 0.5259 |
| cosine_recall@10 | 0.6346 |
| cosine_ndcg@10 | 0.5405 |
| cosine_mrr@10 | 0.4846 |
| cosine_map@100 | 0.529 |
dim_64InformationRetrievalEvaluator with these parameters:
1{
2 "truncate_dim": 64
3}| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.3292 |
| cosine_accuracy@3 | 0.357 |
| cosine_accuracy@5 | 0.4328 |
| cosine_accuracy@10 | 0.51 |
| cosine_precision@1 | 0.3292 |
| cosine_precision@3 | 0.3019 |
| cosine_precision@5 | 0.2386 |
| cosine_precision@10 | 0.1549 |
| cosine_recall@1 | 0.1262 |
| cosine_recall@3 | 0.3105 |
| cosine_recall@5 | 0.3936 |
| cosine_recall@10 | 0.4985 |
| cosine_ndcg@10 | 0.418 |
| cosine_mrr@10 | 0.3681 |
| cosine_map@100 | 0.4148 |
anchor and positive| anchor | positive | |
|---|---|---|
| type | string | string |
| details |
|
|
| anchor | positive |
|---|---|
What does EPIC agree about its FOIA request? | other documents which were made available to or prepared for or by” the Commission, a direct [object Object]quotation from section 10(b) of FACA. Pl.’s Mot. Exs. at 21. EPIC agrees that its FOIA request [object Object]“exactly track[s] the language of FACA § 10(b)”—i.e., that its FOIA request is meant to be [object Object]coterminous with FACA’s parameters. Pl.’s Mem. at 24; Pl.’s Reply at 9. [object Object]25 |
What specific finding does Sussman, 494 F.3d at 1116 emphasize that the district court must make? | 79 The Court need not assess the segregability efforts of the NSA because the plaintiff does not challenge any [object Object]withholding decisions made by the NSA, and thus the Court need not review any such withholding decisions. See, [object Object]e.g., Sussman, 494 F.3d at 1116 (holding that “the district court must make specific findings of segregability |
Who expressed a viewpoint on the application of the reasonable juror test? | test used by United States Courts of Appeals for authentication of social media evidence [object Object]because it was consistent with Maryland Rule 5-901. See id. at 366, 19 A.3d at 429 [object Object](Harrell, J., dissenting). Judge Harrell explained that, in his view, applying the reasonable [object Object]juror test would have led to the conclusion that the social media evidence at issue was |
MatryoshkaLoss with these parameters:
1{
2 "loss": "MultipleNegativesRankingLoss",
3 "matryoshka_dims": [
4 768,
5 512,
6 256,
7 128,
8 64
9 ],
10 "matryoshka_weights": [
11 1,
12 1,
13 1,
14 1,
15 1
16 ],
17 "n_dims_per_step": -1
18}eval_strategy: epochper_device_train_batch_size: 32per_device_eval_batch_size: 16gradient_accumulation_steps: 16learning_rate: 2e-05num_train_epochs: 4lr_scheduler_type: cosinewarmup_ratio: 0.1warmup_steps: 0.1bf16: Truetf32: Falseload_best_model_at_end: Truebatch_sampler: no_duplicatesdo_predict: Falseeval_strategy: epochprediction_loss_only: Trueper_device_train_batch_size: 32per_device_eval_batch_size: 16gradient_accumulation_steps: 16eval_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: 4max_steps: -1lr_scheduler_type: cosinelr_scheduler_kwargs: Nonewarmup_ratio: 0.1warmup_steps: 0.1log_level: passivelog_level_replica: warninglog_on_each_node: Truelogging_nan_inf_filter: Trueenable_jit_checkpoint: Falsesave_on_each_node: Falsesave_only_model: Falserestore_callback_states_from_checkpoint: Falseuse_cpu: Falseseed: 42data_seed: Nonebf16: Truefp16: Falsebf16_full_eval: Falsefp16_full_eval: Falsetf32: Falselocal_rank: -1ddp_backend: Nonedebug: []dataloader_drop_last: Falsedataloader_num_workers: 0dataloader_prefetch_factor: Nonedisable_tqdm: Falseremove_unused_columns: Truelabel_names: Noneload_best_model_at_end: Trueignore_data_skip: Falsefsdp: []fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}accelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}parallelism_config: Nonedeepspeed: Nonelabel_smoothing_factor: 0.0optim: adamw_torch_fusedoptim_args: Nonegroup_by_length: Falselength_column_name: lengthproject: huggingfacetrackio_space_id: trackioddp_find_unused_parameters: Noneddp_bucket_cap_mb: Noneddp_broadcast_buffers: Falsedataloader_pin_memory: Truedataloader_persistent_workers: Falseskip_memory_metrics: Truepush_to_hub: Falseresume_from_checkpoint: Nonehub_model_id: Nonehub_strategy: every_savehub_private_repo: Nonehub_always_push: Falsehub_revision: Nonegradient_checkpointing: Falsegradient_checkpointing_kwargs: Noneinclude_for_metrics: []eval_do_concat_batches: Trueauto_find_batch_size: Falsefull_determinism: Falseddp_timeout: 1800torch_compile: Falsetorch_compile_backend: Nonetorch_compile_mode: Noneinclude_num_input_tokens_seen: noneftune_noise_alpha: Noneoptim_target_modules: Nonebatch_eval_metrics: Falseeval_on_start: Falseuse_liger_kernel: Falseliger_kernel_config: Noneeval_use_gather_object: Falseaverage_tokens_across_devices: Trueuse_cache: Falseprompts: Nonebatch_sampler: no_duplicatesmulti_dataset_batch_sampler: proportionalrouter_mapping: {}learning_rate_mapping: {}| Epoch | Step | Training Loss | dim_768_cosine_ndcg@10 | dim_512_cosine_ndcg@10 | dim_256_cosine_ndcg@10 | dim_128_cosine_ndcg@10 | dim_64_cosine_ndcg@10 |
|---|---|---|---|---|---|---|---|
| 0.0879 | 1 | 5.7621 | - | - | - | - | - |
| 0.1758 | 2 | 5.9431 | - | - | - | - | - |
| 0.2637 | 3 | 5.9474 | - | - | - | - | - |
| 0.3516 | 4 | 5.4979 | - | - | - | - | - |
| 0.4396 | 5 | 4.7991 | - | - | - | - | - |
| 0.5275 | 6 | 4.7927 | - | - | - | - | - |
| 0.6154 | 7 | 3.4607 | - | - | - | - | - |
| 0.7033 | 8 | 2.9653 | - | - | - | - | - |
| 0.7912 | 9 | 3.3088 | - | - | - | - | - |
| 0.8791 | 10 | 2.7624 | - | - | - | - | - |
| 0.9670 | 11 | 3.0379 | - | - | - | - | - |
| 1.0 | 12 | 2.5283 | 0.5986 | 0.5935 | 0.5643 | 0.4801 | 0.3721 |
| 1.0879 | 13 | 2.4313 | - | - | - | - | - |
| 1.1758 | 14 | 2.4523 | - | - | - | - | - |
| 1.2637 | 15 | 2.2690 | - | - | - | - | - |
| 1.3516 | 16 | 1.7914 | - | - | - | - | - |
| 1.4396 | 17 | 2.1696 | - | - | - | - | - |
| 1.5275 | 18 | 1.8344 | - | - | - | - | - |
| 1.6154 | 19 | 1.9749 | - | - | - | - | - |
| 1.7033 | 20 | 2.0728 | - | - | - | - | - |
| 1.7912 | 21 | 1.8242 | - | - | - | - | - |
| 1.8791 | 22 | 1.9102 | - | - | - | - | - |
| 1.9670 | 23 | 1.8151 | - | - | - | - | - |
| 2.0 | 24 | 1.8869 | 0.6457 | 0.6404 | 0.6092 | 0.5305 | 0.4135 |
| 2.0879 | 25 | 1.5929 | - | - | - | - | - |
| 2.1758 | 26 | 1.5348 | - | - | - | - | - |
| 2.2637 | 27 | 1.6101 | - | - | - | - | - |
| 2.3516 | 28 | 1.5381 | - | - | - | - | - |
| 2.4396 | 29 | 1.5966 | - | - | - | - | - |
| 2.5275 | 30 | 1.8647 | - | - | - | - | - |
| 2.6154 | 31 | 1.6108 | - | - | - | - | - |
| 2.7033 | 32 | 1.3501 | - | - | - | - | - |
| 2.7912 | 33 | 1.4097 | - | - | - | - | - |
| 2.8791 | 34 | 1.4909 | - | - | - | - | - |
| 2.9670 | 35 | 1.6101 | - | - | - | - | - |
| 3.0 | 36 | 1.9478 | 0.6506 | 0.6433 | 0.6093 | 0.5422 | 0.4167 |
| 3.0879 | 37 | 1.5579 | - | - | - | - | - |
| 3.1758 | 38 | 1.4603 | - | - | - | - | - |
| 3.2637 | 39 | 1.5181 | - | - | - | - | - |
| 3.3516 | 40 | 1.4586 | - | - | - | - | - |
| 3.4396 | 41 | 1.2483 | - | - | - | - | - |
| 3.5275 | 42 | 1.3902 | - | - | - | - | - |
| 3.6154 | 43 | 1.2197 | - | - | - | - | - |
| 3.7033 | 44 | 1.4976 | - | - | - | - | - |
| 3.7912 | 45 | 1.3860 | - | - | - | - | - |
| 3.8791 | 46 | 1.4929 | - | - | - | - | - |
| 3.9670 | 47 | 1.3975 | - | - | - | - | - |
| 4.0 | 48 | 1.4246 | 0.6524 | 0.6451 | 0.6103 | 0.5405 | 0.4180 |
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{kusupati2024matryoshka,
2 title={Matryoshka Representation Learning},
3 author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi},
4 year={2024},
5 eprint={2205.13147},
6 archivePrefix={arXiv},
7 primaryClass={cs.LG}
8}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}