SentenceTransformer(
(0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'BertModel'})
(1): Pooling({'embedding_dimension': 768, 'pooling_mode': 'cls', 'include_prompt': True})
(2): Normalize({})
)pip install -U sentence-transformers1from sentence_transformers import SentenceTransformer
2
3# Download from the 🤗 Hub
4model = SentenceTransformer("sentence_transformers_model_id")
5# Run inference
6sentences = [
7 'Represent this sentence for searching relevant passages: How does the reliance on cloud communication systems change with the increase in remote workforces due to the pandemic?',
8 'The full extent of the impact of the COVID-19 pandemic on our business, operations and financial results will depend on numerous evolving factors that we may not be able to accurately predict, including those set forth under the section entitled "Risk Factors." In an effort to contain COVID-19 or slow its spread, governments around the world have enacted various measures, including orders to close non-essential businesses, isolate residents to their homes, and practice social distancing. To protect the health and safety of our employees, our workforce has spent significant time working from home and travel has been curtailed for our employees as well as our customers. Small and medium-sized customers have been particularly impacted by the COVID-19 pandemic. We have also experienced significant increases in usage by existing customers as our customers’ workforces are required to work from home in response to the COVID-19 pandemic accelerating trends we have seen in distributed workforces increasingly relying on cloud communication systems like ours. While we anticipate that the global health crisis caused by COVID-19 and the measures enacted to slow its spread will negatively impact business activity across the globe, it is not clear what its potential effects will be on our business, including the effects on our customers, suppliers or vendors, or on our financial results.\nCOMPONENTS OF RESULTS OF OPERATIONS\nService Revenue\nService revenue consists of communication services subscriptions, platform usage revenue, and related fees from our UCaaS, CCaaS, and CPaaS offerings. We plan to continue driving our business to increase service revenue through a combination of increased sales and marketing efforts, geographic expansion of our customer base outside the United States, innovation in product and technology, and through strategic acquisitions of technologies and businesses.\nOther Revenue\nOther revenue consists of revenues from professional services, primarily in support of deployment of our solutions and/or platform, and revenues from sales and rentals of IP telephones in conjunction with our cloud telephony service. Other revenue is dependent on the number of customers who choose to purchase or rent an IP telephone in conjunction with our service instead of using the solution on their cell phone, computer or other compatible device, and/or choose to engage our services for implementation and deployment of our cloud services.\nCost of Service Revenue',
9 'We record deferred taxes based on differences between the financial statement basis and tax basis of assets and liabilities and available tax loss and credit carryforwards. In evaluating our ability to utilize our deferred tax assets, we consider available evidence, both positive and negative, in determining future taxable income on a jurisdiction-by-jurisdiction basis. We record a valuation allowance against deferred tax assets if, based on the weight of the evidence, it is more likely than not that some portion or all of the deferred tax assets will not be realized. A significant item of objective negative evidence considered was the historical three-year cumulative pretax loss reached in fiscal 2018. We continue to remain in a cumulative pretax loss position, and therefore, continued to maintain a full valuation allowance against our U.S., U.K., and Singapore deferred tax assets.\nLiquidity and Capital Resources\nAs of March 31, 2021, we had $152.9 million of cash and cash equivalents and short-term investments. In addition, we had $8.6 million in restricted cash in support of letters of credit securing leases for office facilities in California and New York. During fiscal 2021, $10.4 million previously held in escrow for our acquisition of Wavecell was released.\nAs of March 31, 2020, we had $170.9 million of cash and cash equivalents and short-term investments. In addition, we had $19.0 million in restricted cash, of which $8.6 million was in support of letters of credit securing leases for office facilities in California and New York and $10.4 million was held in escrow for our acquisition of Wavecell, pursuant to the terms of the acquisition agreement.',
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.5362, -0.0206],
19# [ 0.5362, 1.0000, -0.0907],
20# [-0.0206, -0.0907, 1.0000]])InformationRetrievalEvaluator| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.4435 |
| cosine_accuracy@3 | 0.6532 |
| cosine_accuracy@5 | 0.7316 |
| cosine_accuracy@10 | 0.8306 |
| cosine_precision@1 | 0.4435 |
| cosine_precision@3 | 0.2177 |
| cosine_precision@5 | 0.1463 |
| cosine_precision@10 | 0.0831 |
| cosine_recall@1 | 0.4435 |
| cosine_recall@3 | 0.6532 |
| cosine_recall@5 | 0.7316 |
| cosine_recall@10 | 0.8306 |
| cosine_ndcg@10 | 0.6319 |
| cosine_mrr@10 | 0.569 |
| cosine_map@100 | 0.5766 |
sentence_0 and sentence_1| sentence_0 | sentence_1 | |
|---|---|---|
| type | string | string |
| details |
|
|
| sentence_0 | sentence_1 |
|---|---|
Represent this sentence for searching relevant passages: What was the electrical load estimated at for the mining operation as of December 31, 2020? | The Company owned approximately 669 and 649 Antminer S17 Pro Bitcoin miners located in LaFayette, GA as of December 31, 2020 and April 15, 2021, respectively. All miners were purchased from Bitmaintech Pte. Ltd., a Singapore limited company (“Bitmain”), and are collectively rated at approximately 30 Ph/s in computing power. Bitmain has acknowledged manufacturing defects, combined with inadequate repair facilities, rendering approximately one half of our miners in need of repair or replacement. The Company’s miners are housed in three modified shipping containers. The Company’s current electrical load is estimated at under 1.0 MW. The entire facility, including the land, two 2500 KVA 3-phase transformers, the mining containers, and miners, are owned by MGT. As the Company is presently using only a portion of the built-out available electrical load, it is exploring ways to grow and maintain its current operations including but not limited to further equipment sales, leasing space to othe... |
Represent this sentence for searching relevant passages: What is the accumulated deficit reported as of December 31, 2020, that raises doubt about the ability to continue operations? | The Company may raise additional capital, either through debt or equity financings, in order to achieve its business plan objectives. Management believes that it can be successful in obtaining additional capital; however, no assurance can be provided that the Company will be able to do so. There is no assurance, moreover, that any funds raised will be sufficient to enable the Company to attain profitable operations or continue as a going concern. To the extent that the Company is unsuccessful, the Company may need to curtail its operations and implement a plan to extend payables or reduce overhead until sufficient additional capital is raised to support further operations. The Company may also attempt to obtain funds through entering into arrangements with collaborative partners or others that may require the Company to relinquish rights to certain of our technologies or products that the Company would not otherwise relinquish. There can be no assurance that any such plan will be succe... |
Represent this sentence for searching relevant passages: What risks are associated with the development and acceptance of digital currencies that may impact operational results? | The Company may raise additional capital, either through debt or equity financings, in order to achieve its business plan objectives. Management believes that it can be successful in obtaining additional capital; however, no assurance can be provided that the Company will be able to do so. There is no assurance, moreover, that any funds raised will be sufficient to enable the Company to attain profitable operations or continue as a going concern. To the extent that the Company is unsuccessful, the Company may need to curtail its operations and implement a plan to extend payables or reduce overhead until sufficient additional capital is raised to support further operations. The Company may also attempt to obtain funds through entering into arrangements with collaborative partners or others that may require the Company to relinquish rights to certain of our technologies or products that the Company would not otherwise relinquish. There can be no assurance that any such plan will be succe... |
MultipleNegativesRankingLoss with these parameters:
1{
2 "scale": 20.0,
3 "similarity_fct": "cos_sim",
4 "gather_across_devices": false,
5 "directions": [
6 "query_to_doc"
7 ],
8 "partition_mode": "joint",
9 "hardness_mode": null,
10 "hardness_strength": 0.0
11}per_device_train_batch_size: 32per_device_eval_batch_size: 32num_train_epochs: 2multi_dataset_batch_sampler: round_robindo_predict: Falseprediction_loss_only: Trueper_device_train_batch_size: 32per_device_eval_batch_size: 32gradient_accumulation_steps: 1eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 5e-05weight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 1num_train_epochs: 2max_steps: -1lr_scheduler_type: linearlr_scheduler_kwargs: Nonewarmup_ratio: Nonewarmup_steps: 0log_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: Falsefp16: Falsebf16_full_eval: Falsefp16_full_eval: Falsetf32: Nonelocal_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: Falseignore_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: batch_samplermulti_dataset_batch_sampler: round_robinrouter_mapping: {}learning_rate_mapping: {}| Epoch | Step | cosine_ndcg@10 |
|---|---|---|
| 1.0 | 215 | 0.6144 |
| 2.0 | 430 | 0.6319 |
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{oord2019representationlearningcontrastivepredictive,
2 title={Representation Learning with Contrastive Predictive Coding},
3 author={Aaron van den Oord and Yazhe Li and Oriol Vinyals},
4 year={2019},
5 eprint={1807.03748},
6 archivePrefix={arXiv},
7 primaryClass={cs.LG},
8 url={https://arxiv.org/abs/1807.03748},
9}