Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks
Paper • 1908.10084 • Published • 17
How to use shivamgoel97/finetune-sentence-transformer with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("shivamgoel97/finetune-sentence-transformer")
sentences = [
"How does the concentrated control held by the Co-Founders of the company potentially impact stockholders and the market price of the Class A common stock?",
"•inaccuracies in our key metrics and estimates;•our marketing efforts;•our ability to offer high-quality user support and to deal with fraud;•changes in the Internet, mobile device accessibility, mobile device operating systems and application marketplaces;•the interoperability of our platform across third-party applications and services;•factors relating to our intellectual property rights as well as the intellectual property rights of others;•our presence outside the United States and any future international expansion;Regulatory and Legal factors•the classification status of drivers on our platform;•changes in laws and the adoption and interpretation of administrative rules and regulations;•compliance with laws and regulations relating to privacy, data protection and the protection or transfer of personal data;•compliance with additional laws and regulations as we expand our platform offerings;•litigation resulting from violation of the Telephone Consumer Protection Act or other consumer protection laws and regulations;•intellectual property litigation;•assertions from taxing authorities that we should have collected or in the future should collect additional taxes;•our ability to maintain an effective system of disclosure controls and internal control over financial reporting;•costs related to operating as a public company;•climate change, which may have a long-term impact on our business;Financing and Transactional Risks•our future capital requirements;•our ability to service our current and future debt, and counterparty risk with respect to our capped call transactions;•our ability to make and successfully integrate acquisitions and investments or complete divestitures, joint ventures, partnerships or other strategic transactions;•our tax liabilities, ability to use our net operating loss carryforwards and future changes in tax matters;Governance Risks and Risks related to Ownership of our Capital Stock•provisions of Delaware law and our certificate of incorporation and bylaws that may make a merger, tender offer or proxy contest difficult;•exclusive forum provisions in our bylaws;•the dual class structure of our common stock and its concentration of voting power with our Co-Founders;•the volatility of the trading price of our Class A common stock;•sales of substantial amounts of our Class A common stock;•our intention not to pay dividends for the foreseeable future; and•the publication of research about us by analysts.16",
"Certain losses may be excluded from insurance coverage including, butnot limited to losses caused by intentional act, pollution, contamination, virus, bacteria, terrorism, war and civil unrest.The amount of one or more auto-related claims or operations-related claims has exceeded and could continue to exceed our applicable aggregate coverage limits,for which we have borne and could continue to bear the excess, in addition to amounts already incurred in connection with deductibles, self-insured retentions or otherwisepaid by our insurance subsidiary.Insurance providers have raised premiums and deductibles for many types of claims, coverages and for a variety of commercial risks andare likely to do so in the future.As a result, our insurance and claims expense could increase, or we may decide to raise our deductibles or self-insured retentions when ourpolicies are renewed or replaced to manage pricing pressure.Our business, financial condition and results of operations could be adversely affected if (i) cost per claim,premiums or the number of claims significantly exceeds our historical experience (ii) we experience a claim in excess of our coverage limits, (iii) our insurance providersfail to pay on our insurance claims, (iv) we experience a claim for which coverage is not provided, (v) the number of claims and average claim cost under our deductibles orself-insured retentions differs from historic averages or (vi) an insurance policy is cancelled or non-renewed.Our actual losses may exceed our insurance reserves, which could adversely affect our financial condition and results of operations.We establish insurance reserves for claims incurred but not yet paid and claims incurred but not yet reported and any related estimable expenses, and weperiodically evaluate and, as necessary, adjust our actuarial assumptions and insurance reserves as our experience develops or new information is learned.We employvarious predictive modeling and actuarial techniques and make numerous assumptions based on limited historical experience and industry statistics to estimate ourinsurance reserves.Estimating the number and severity of claims, as well as related judgment or settlement amounts, is inherently difficult, subjective and speculative.While an independent actuary firm periodically reviews our reserves for appropriateness and provides claims reserve valuations, a number of external factors can affect theactual losses incurred for any given claim, including but not limited to the length of time the claim remains open, fluctuations in healthcare costs, legislative and regulatorydevelopments, judicial developments and unexpected23",
"Accordingly, Logan Green, our co-founder, Chief Executive Officer and a member of our board of directors holdsapproximately 21.42% of the voting power of our outstanding capital stock; and John Zimmer, our co-founder and President and Vice Chair of our board of directors, holdsapproximately 12.63% of the voting power of our outstanding capital stock.Therefore, our Co-Founders, individually or together, will be able to significantly influencematters submitted to our stockholders for approval, including the election of directors, amendments of our organizational documents and any merger, consolidation, sale ofall or substantially all of our assets or other major corporate transactions.Our Co-Founders, individually or together, may have interests that differ from yours and may votein a way with which you disagree and which may be adverse to your interests.This concentrated control may have the effect of delaying, preventing or deterring a changein control of our company, could deprive our stockholders of an opportunity to receive a premium for their capital stock as part of a sale of our company and mightultimately affect the market price of our Class A common stock.Each Co-Founder’s voting power is as of December 31, 2021 and includes shares of Class A commonstock expected to be issued upon the vesting of such Co-Founder’s RSUs within 60 days of December 31, 2021.Future transfers by the holders of Class B common stock will generally result in those shares converting into shares of Class A common stock, subject to limitedexceptions, such as certain transfers effected for estate planning purposes.In addition, each share of Class B common stock will convert automatically into one share ofClass A common stock upon (i) the date specified by affirmative written election of the holders of two-thirds of the then-outstanding shares of Class B common stock, (ii)the date fixed by our board of directors that is no less than 61 days and no more than 180 days following the date on which the shares of Class B common stock held by ourCo-Founders and their permitted entities and permitted transferees represent less than 20% of the Class B common stock held by our Co-Founders and their permittedentities as of immediately following the completion of our initial public offering, or IPO, or (iii) nine months after the death or total disability of the last to die or becomedisabled of our Co-Founders, or such50"
]
embeddings = model.encode(sentences)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [4, 4]This is a sentence-transformers model finetuned from sentence-transformers/all-MiniLM-L6-v2. It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
SentenceTransformer(
(0): Transformer({'max_seq_length': 256, '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})
(2): Normalize()
)
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 = [
'Why is the Mine Safety Disclosures section not applicable in this context?',
'Item 3. Legal Proceedings.See discussion under the heading Legal Proceedings in Note 9 to the consolidated financial statements included in Part II, Item 8 of this report.Item 4. Mine Safety Disclosures.Not applicable.54',
'Any of the foregoing risks could also result in decreased usage of our network of Light Vehicles and adversely affect our business, brand,financial conditions and results of operations.If we fail to effectively manage our growth, our business, financial condition and results of operations could be adversely affected.Since 2012 and prior to the COVID-19 pandemic, we generally experienced rapid growth in our business, the number of users on our platform and our geographicreach, and we expect to continue to experience growth in the future following the recovery of the world economy from the pandemic.This growth placed, and may continueto place, significant demands on our management and our operational and financial infrastructure.Employee growth has occurred both at our San Francisco headquartersand in a number of our offices across the United States and internationally.The number of our full-time employees increased from 2,708 as of December 31, 2017, to 4,453as of December 31, 2021.However, from time to time, we have undertaken restructuring actions to better align our financial model and our business.For example, in thesecond quarter of 2020, we implemented a plan of termination to reduce operating expenses and adjust cash flows in light of the ongoing economic challenges resultingfrom the COVID-19 pandemic and its impact on our business, which plan involved the termination of approximately 17% of our employees.Steps we take to manage ourbusiness operations, including remote work policies for employees, and to align our operations with our strategies for future growth may adversely affect our reputation andbrand, our ability to recruit, retain and motivate highly skilled personnel.Our ability to manage our growth and business operations effectively and to integrate new employees, technologies and acquisitions into our existing business willrequire us to continue to expand our operational and financial infrastructure and to continue to retain, attract, train, motivate and manage employees.Continued growthcould strain our ability to develop and improve our operational, financial and management controls, enhance our reporting systems and procedures, recruit, train and retainhighly skilled personnel and maintain user satisfaction.Additionally, if we do not effectively manage the growth of our business and operations, the29',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
InformationRetrievalEvaluator| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.5203 |
| cosine_accuracy@3 | 0.7025 |
| cosine_accuracy@5 | 0.762 |
| cosine_accuracy@10 | 0.8152 |
| cosine_precision@1 | 0.5203 |
| cosine_precision@3 | 0.2342 |
| cosine_precision@5 | 0.1524 |
| cosine_precision@10 | 0.0815 |
| cosine_recall@1 | 0.5203 |
| cosine_recall@3 | 0.7025 |
| cosine_recall@5 | 0.762 |
| cosine_recall@10 | 0.8152 |
| cosine_ndcg@10 | 0.6712 |
| cosine_mrr@10 | 0.6248 |
| cosine_map@100 | 0.6305 |
sentence_0 and sentence_1| sentence_0 | sentence_1 | |
|---|---|---|
| type | string | string |
| details |
|
|
| sentence_0 | sentence_1 |
|---|---|
What is the market value of Lyft's common stock held by non-affiliates as of June 30, 2021, based on the closing sales price of the Class A common stock on that date? |
UNITED STATESSECURITIES AND EXCHANGE COMMISSIONWashington, D.C. 20549FORM 10-K (Mark One)☒ANNUAL REPORT PURSUANT TO SECTION 13 OR 15(d) OF THE SECURITIES EXCHANGE ACT OF 1934For the fiscal year ended December 31, 2021OR☐TRANSITION REPORT PURSUANT TO SECTION 13 OR 15(d) OF THE SECURITIES EXCHANGE ACT OF 1934 FOR THE TRANSITION PERIODFROM TOCommission File Number 001-38846Lyft, Inc.(Exact name of Registrant as specified in its Charter)Delaware20-8809830(State or other jurisdiction ofincorporation or organization)(I.R.S. EmployerIdentification No.)185 Berry Street, Suite 5000San Francisco, California94107(Address of principal executive offices)(Zip Code)Registrant’s telephone number, including area code: (844) 250-2773Securities registered pursuant to Section 12(b) of the Act: Title of each classTradingSymbol(s)Name of each exchange on which registeredClass A common stock, par value of $0.00001 per shareLYFTNasdaq Global Select MarketSecurities registered pursuant to ... |
Has Lyft filed a report on and attestation to its management's assessment of the effectiveness of its internal control over financial reporting under Section 404(b) of the Sarbanes-Oxley Act? |
UNITED STATESSECURITIES AND EXCHANGE COMMISSIONWashington, D.C. 20549FORM 10-K (Mark One)☒ANNUAL REPORT PURSUANT TO SECTION 13 OR 15(d) OF THE SECURITIES EXCHANGE ACT OF 1934For the fiscal year ended December 31, 2021OR☐TRANSITION REPORT PURSUANT TO SECTION 13 OR 15(d) OF THE SECURITIES EXCHANGE ACT OF 1934 FOR THE TRANSITION PERIODFROM TOCommission File Number 001-38846Lyft, Inc.(Exact name of Registrant as specified in its Charter)Delaware20-8809830(State or other jurisdiction ofincorporation or organization)(I.R.S. EmployerIdentification No.)185 Berry Street, Suite 5000San Francisco, California94107(Address of principal executive offices)(Zip Code)Registrant’s telephone number, including area code: (844) 250-2773Securities registered pursuant to Section 12(b) of the Act: Title of each classTradingSymbol(s)Name of each exchange on which registeredClass A common stock, par value of $0.00001 per shareLYFTNasdaq Global Select MarketSecurities registered pursuant to ... |
In the "Management's Discussion and Analysis of Financial Condition and Results of Operations" section, what information would you expect to find regarding the company's market risk? |
Table of ContentsPagePART IItem 1.Business5Item 1A.Risk Factors15Item 1B.Unresolved Staff Comments53Item 2.Properties53Item 3.Legal Proceedings54Item 4.Mine Safety Disclosures54PART IIItem 5.Market for Registrant’s Common Equity, Related Stockholder Matters and Issuer Purchases of Equity Securities55Item 6.[Reserved]56Item 7.Management’s Discussion and Analysis of Financial Condition and Results of Operations56Item 7A.Quantitative and Qualitative Disclosures About Market Risk73Item 8.Financial Statements and Supplementary Data74Item 9.Changes in and Disagreements With Accountants on Accounting and Financial Disclosure123Item 9A.Controls and Procedures123Item 9B.Other Information123Item 9C.Disclosure Regarding Foreign Jurisdictions that Prevent Inspections123PART IIIItem 10.Directors, Executive Officers and Corporate Governance124Item 11.Executive Compensation124Item 12.Security Ownership of Certain Beneficial Owners and Management and Related Stockholder Matters124Item 13.Certain Relat... |
MultipleNegativesRankingLoss with these parameters:{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
eval_strategy: stepsper_device_train_batch_size: 10per_device_eval_batch_size: 10num_train_epochs: 2multi_dataset_batch_sampler: round_robinoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: stepsprediction_loss_only: Trueper_device_train_batch_size: 10per_device_eval_batch_size: 10per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_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: {}warmup_ratio: 0.0warmup_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: Falsefp16_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: 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: 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: batch_samplermulti_dataset_batch_sampler: round_robin| Epoch | Step | cosine_ndcg@10 |
|---|---|---|
| 0.7463 | 50 | 0.6668 |
| 1.0 | 67 | 0.6661 |
| 1.4925 | 100 | 0.6699 |
| 2.0 | 134 | 0.6712 |
@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",
}
@misc{henderson2017efficient,
title={Efficient Natural Language Response Suggestion for Smart Reply},
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},
year={2017},
eprint={1705.00652},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
Base model
nreimers/MiniLM-L6-H384-uncased