Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks
Paper • 1908.10084 • Published • 18
How to use thomaskim1130/stella_en_1.5B_v5-FinanceRAG with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("thomaskim1130/stella_en_1.5B_v5-FinanceRAG", trust_remote_code=True)
sentences = [
"Instruct: Given a web search query, retrieve relevant passages that answer the query.\nQuery: Title: \nText: | _id | q1a724386 |\n| title | |\n| text | What does the table show?\n\nWhat table show?\n\n\n",
"Title: \nText: | _id | dd2abe7ca |\n| title | |\n| text | Table of Contents\n61\nADOBE SYSTEMS INCORPORATED\n CONSOLIDATED STATEMENTS OF CASH FLOWS\n(In thousands)\n \nYears Ended\n \nDecember 1,\n2017\nDecember 2,\n2016\nNovember 27,\n2015\nCash flows from operating activities:\n \n \nNet income\n$\n1,693,954\n$\n1,168,782\n$\n629,551\nAdjustments to reconcile net income to net cash provided by operating activities:\nDepreciation, amortization and accretion\n325,997\n331,535\n339,473\nStock-based compensation\n451,451\n349,912\n335,859\nDeferred income taxes\n51,605\n24,222\n(69,657)\n\nDeferred income taxes\n51,605\n24,222\n(69,657)\nGain on the sale of property\n\n(21,415)\nUnrealized (gains) losses on investments\n(5,494)\n3,145\n(9,210)\nExcess tax benefits from stock-based compensation\n\n(75,105)\n(68,153)\nOther non-cash items\n4,625\n2,022\n1,216\nChanges in operating assets and liabilities, net of acquired assets and\n assumed liabilities:\nTrade receivables, net\n(187,173)\n(160,416)\n(79,502)\nPrepaid expenses and other current assets\n28,040\n(71,021)\n(7,701)\nTrade payables\n(45,186)\n(6,281)\n22,870\nAccrued expenses\n154,125\n64,978\n(22,564)\nIncome taxes payable\n(34,493)\n43,115\n97,934\nDeferred revenue\n475,402\n524,840\n320,801\nNet cash provided by operating activities\n2,912,853\n2,199,728\n1,469,502\n\n2,912,853\n2,199,728\n1,469,502\nCash flows from investing activities:\n \n \nPurchases of short-term investments\n(1,931,011)\n(2,285,222)\n(2,064,833)\nMaturities of short-term investments\n759,737\n769,228\n371,790\nProceeds from sales of short-term investments\n1,393,929\n860,849\n1,176,476\nAcquisitions, net of cash acquired\n(459,626)\n(48,427)\n(826,004)\nPurchases of property and equipment\n(178,122)\n(203,805)\n(184,936)\nProceeds from sale of property\n\n57,779\nPurchases of long-term investments, intangibles and other assets\n(29,918)\n(58,433)\n(22,779)\nProceeds from sale of long-term investments\n2,134\n5,777\n4,149\nNet cash used for investing activities\n(442,877)\n(960,033)\n(1,488,358)\nCash flows from financing activities:\n \n \nPurchases of treasury stock\n(1,100,000)\n(1,075,000)\n(625,000)\nProceeds from issuance of treasury stock\n158,351\n145,697\n164,270\nTaxes paid related to net share settlement of equity awards\n(240,126)\n(236,400)\n(186,373)\n\n(240,126)\n(236,400)\n(186,373)\nExcess tax benefits from stock-based compensation\n\n75,105\n68,153\nProceeds from debt issuance\n\n\n989,280\nRepayment of debt and capital lease obligations\n(1,960)\n(108)\n(602,189)\nDebt issuance costs\n\n(8,828)\nNet cash used for financing activities\n(1,183,735)\n(1,090,706)\n(200,687)\nEffect of foreign currency exchange rates on cash and cash equivalents\n8,516\n(14,234)\n(21,297)\nNet increase (decrease) in cash and cash equivalents\n1,294,757\n134,755\n(240,840)\nCash and cash equivalents at beginning of year\n1,011,315\n876,560\n1,117,400\nCash and cash equivalents at end of year\n$\n2,306,072\n$\n1,011,315\n$\n876,560\nSupplemental disclosures:\n \nCash paid for income taxes, net of refunds\n$\n396,668\n$\n249,884\n$\n203,010\n\n$\n396,668\n$\n249,884\n$\n203,010\nCash paid for interest\n$\n69,430\n$\n66,193\n$\n56,014\nNon-cash investing activities:\nInvestment in lease receivable applied to building purchase\n$\n80,439\n$\n\n$\n\nIssuance of common stock and stock awards assumed in business acquisitions\n$\n10,348\n$\n\n$\n677\nSee accompanying Notes to Consolidated Financial Statements.\n\nTable Contents\n SYSTEMS\n STATEMENTS CASH FLOWS\n Years Ended\n December 1,\n 2017\n December 2,\n 2016\n November 27,\n 2015\n Cash flows operating activities\n Net income\n 1,693,954\n 1,168,782\n 629,551\n Adjustments reconcile net income cash activities\n Depreciation amortization accretion\n 325,997\n 331,535\n,473\n Stock-based compensation\n 451,451\n 349,912\n 335,859\n Deferred income taxes\n 51,605\n 24,222\n (69,657)\n Gain sale property\n (21,415)\n Unrealized losses investments\n (5,494)\n 3,145\n (9,210)\n\n(5,494)\n 3,145\n (9,210)\n Excess tax benefits stock-based compensation\n (75,105)\n (68,153)\n non-cash items\n 2,022\n 1,216\n Changes operating assets liabilities acquired\n Trade receivables\n (187,173)\n (160,416)\n (79,502)\n Prepaid expenses current assets\n 28,040\n (71,021)\n (7,701)\n Trade payables\n (45,186)\n (6,281)\n 22,870\n Accrued expenses\n 154,125\n 64,978\n (22,564\n Income taxes payable\n (34,493)\n 43,115\n 97,934\n Deferred revenue\n 475,402\n 524,840\n 320,801\n Net cash operating activities\n 2,912,853\n 2,199,728\n\n2,912,853\n 2,199,728\n 1,469,502\n Cash flows investing activities\n Purchases short-term investments\n (1,931,011)\n (2,285,222)\n (2,064,833)\n Maturities short-term investments\n 759,737\n 769,228\n 371,790\n Proceeds sales short-term investments\n 1,393,929\n 860,849\n1,176,476\n Acquisitions cash\n (459,626)\n (48,427)\n (826,004)\n Purchases property equipment\n (178,122)\n (203,805)\n (184,936)\n Proceeds sale property\n 57,779\n Purchases long-term investments intangibles\n (29,918)\n (58,433)\n (22,779)\n\n(29,918)\n (58,433)\n (22,779)\n Proceeds sale long-term investments\n 2,134\n 5,777\n 4,149\n Net cash investing activities\n (442,877)\n (960,033)\n (1,488,358)\n Cash flows financing\n Purchases treasury stock\n (1,100,000)\n (1,075,000)\n (625,000)\n Proceeds issuance treasury stock\n 158,351\n 145,697\n 164,270\n Taxes share settlement equity awards\n (240,126)\n (236,400)\n (186,373)\n Excess tax benefits stock-based compensation\n 75,105\n 68,153\n Proceeds debt issuance\n,280\n Repayment debt capital lease obligations\n\n,280\n Repayment debt capital lease obligations\n (1,960)\n (108)\n (602,189)\n Debt issuance costs\n (8,828)\n Net cash financing activities\n (1,183,735)\n (1,090,706)\n (200,687)\n Effect foreign currency exchange rates cash equivalents\n 8,516\n (14,234)\n (21,297)\n Net increase (decrease cash equivalents\n 1,294,757\n 134,755\n (240,840)\n Cash equivalents beginning year\n 1,011,315\n 876,560\n 1,117,400\n end year\n $\n 2,306,072\n $\n 1,011,315\n $\n 876,560\n Supplemental Cash paid income taxes refunds\n $\n 396,668\n $\n 249,884\n\n$\n 396,668\n $\n 249,884\n $ 203,010\n Cash paid interest\n $\n 69,430\n\n66,193\n $\n 56,014\n Non-cash investing activities:\n Investment lease receivable applied building purchase\n $\n 80,439\n $ $\n Issuance common stock stock awards assumed business acquisitions\n $ 10,348\n $ $\n 677\n Notes Consolidated Financial Statements.\n\n\n",
"Title: \nText: | _id | d1a7244a8 |\n| title | |\n| text | Expenditure on R&D\nTCS Innovation Labs are located in India and other parts of the world. These R&D centers, as certified by Department of Scientific & Industrial Research (DSIR) function from Pune, Chennai, Bengaluru, Delhi- NCR, Hyderabad, Kolkata and Mumbai.\nExpenditure incurred in the R&D centers and innovation centers during FY 2019 and FY 2018 are given below:\n\nExpenditure on R&D and innovation | Unconsolidated | | Consolidated | \n------------------------------------------------------------------- | -------------- | ------- | ------------ | -------\n | FY 2019 | FY 2018 | FY 2019 | FY 2018\na. Capital | 2 | - | 2 | -\n\nb. Recurring | 303 | 295 | 306 | 298 \nc. Total R&D expenditure (a+b) | 305 | 295 | 308 | 298 \nd. Innovation center expenditure | 1,285 | 1,079 | 1,352 | 1,202 \ne. Total R&D and innovation expenditure (c+d) | 1,590 | 1,374 | 1,660 | 1,500\n\nf. R&D and innovation expenditure as a percentage of total turnover | 1.3% | 1.4% | 1.1% | 1.2%\n\nExpenditure on R&D\n TCS Innovation Labs located in India other parts world. R&D centers certified by Department of Scientific & Industrial Research (DSIR) function from Pune Chennai Bengaluru Delhi- NCR Hyderabad Kolkata Mumbai.\n Expenditure in R&D centers innovation centers during FY 2019 FY 2018 given below:\n\nExpenditure on R&D and innovation | Unconsolidated | | Consolidated | \n------------------------------------------------------------------- | -------------- | ------- | ------------ | -------\n | FY 2019 | FY 2018 | FY 2019 | FY 2018\na. Capital | 2 | - | 2 | -\n\nb. Recurring | 303 | 295 | 306 | 298 \nc. Total R&D expenditure (a+b) | 305 | 295 | 308 | 298 \nd. Innovation center expenditure | 1,285 | 1,079 | 1,352 | 1,202 \ne. Total R&D and innovation expenditure (c+d) | 1,590 | 1,374 | 1,660 | 1,500\n\nf. R&D and innovation expenditure as a percentage of total turnover | 1.3% | 1.4% | 1.1% | 1.2%\n\n\n",
"Title: \nText: | _id | JPM20235630 |\n| title | |\n| text | Principal transactions revenue is driven by many factors, including: •the bid-offer spread, which is the difference between the price at which a market participant is willing and able to sell an instrument to the Firm and the price at which another market participant is willing and able to buy it from the Firm, and vice versa; and •realized and unrealized gains and losses on financial instruments and commodities transactions, including those accounted for under the fair value option, primarily used in\n\nunder the fair value option, primarily used in client-driven market-making activities.\n\nPrincipal transactions revenue driven by many factors, including: •the bid-offer spread, difference between price a market participant willing to sell an instrument to Firm and price another market participant willing to buy it from Firm, and vice versa; and •realized and unrealized gains and losses on financial instruments and commodities transactions, including those accounted for under fair value option, primarily used in client-driven market-making activities.\n\n\n"
]
embeddings = model.encode(sentences)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [4, 4]This is a sentence-transformers model finetuned from dunzhang/stella_en_1.5B_v5. It maps sentences & paragraphs to a 1024-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': 512, 'do_lower_case': False}) with Transformer model: Qwen2Model
(1): Pooling({'word_embedding_dimension': 1536, '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): Dense({'in_features': 1536, 'out_features': 1024, 'bias': True, 'activation_function': 'torch.nn.modules.linear.Identity'})
)
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 = [
'Instruct: Given a web search query, retrieve relevant passages that answer the query.\nQuery: Title: \nText: | _id | q83c2a93e |\n| title | |\n| text | in 2006 what was the total amount authorized by the board of directors authorized for the repurchase of shares in billions\n\nin 2006 total amount authorized by board of directors authorized for repurchase of shares in billions\n\n\n',
'Title: \nText: | _id | d828efc52 |\n| title | |\n| text | Item 1B.\nUnresolved Staff Comments.\nNone.\nItem 2.\nProperties.3M\x80\x99s general offices, corporate research laboratories, and certain division laboratories are located in St. Paul, Minnesota.\nIn the United States, 3M has nine sales offices in eight states and operates 74 manufacturing facilities in 27 states.\nInternationally, 3M has 148 sales offices.\n\nInternationally, 3M has 148 sales offices.\nThe Company operates 93 manufacturing and converting facilities in 32 countries outside the United States.3M owns substantially all of its physical properties.3M\x80\x99s physical facilities are highly suitable for the purposes for which they were designed.\nBecause 3M is a global enterprise characterized by substantial intersegment cooperation, properties are often used by multiple business segments.\nItem 3.\nLegal Proceedings.\n\nItem 3.\nLegal Proceedings.\nDiscussion of legal matters is incorporated by reference from Part II, Item 8, Note 13, \x80\x9cCommitments and Contingencies,\x80\x9d of this document, and should be considered an integral part of Part I, Item 3, \x80\x9cLegal Proceedings.\n\x80\x9d Item 4.\nSubmission of Matters to a Vote of Security Holders.\nNone in the quarter ended December 31, 2007.\nPART II Item 5.\nMarket for Registrant\x80\x99s Common Equity, Related Stockholder Matters and Issuer Purchases of Equity Securities.\n\nEquity compensation plans\x80\x99 information is incorporated by reference from Part III, Item 12, \x80\x9cSecurity Ownership of Certain Beneficial Owners and Management and Related Stockholder Matters,\x80\x9d of this document, and should be considered an integral part of Item 5.\nAt January 31, 2008, there were approximately 121,302 shareholders of record.3M\x80\x99s stock is listed on the New York Stock Exchange, Inc. (NYSE), the Chicago Stock Exchange, Inc. , and the SWX Swiss Exchange.\n\nCash dividends declared and paid totaled $.48 per share for each quarter of 2007, and $.46 per share for each quarter of 2006.\nStock price comparisons follow:\n\nItem 1B.\n Unresolved Staff Comments.\n None.\n Item 2.\n Properties. 3M\x80\x99s general offices corporate research laboratories division laboratories located in St. Paul, Minnesota.\n United States 3M has nine sales offices in eight states operates 74 manufacturing facilities in 27 states.\n Internationally 3M has 148 sales offices.\n\nInternationally 3M has 148 sales offices.\n Company operates 93 manufacturing converting facilities in 32 countries outside United States. 3M owns all physical properties. 3M\x80\x99s physical facilities suitable for purposes designed.\n 3M global enterprise substantial intersegment cooperation properties used by multiple business segments.\n Item 3.\n Legal Proceedings.\n\nItem 3.\n Legal Proceedings.\n Discussion of legal matters incorporated reference from Part II, Item 8, Note 13, \x80\x9cCommitments and Contingencies document integral part of Part I, Item 3, \x80\x9cLegal Proceedings.\n Item 4.\n Submission of Matters to Vote of Security Holders.\n None in quarter ended December 31, 2007.\n PART II Item 5.\n Market for Registrant\x80\x99s Common Equity Related Stockholder Matters Issuer Purchases of Equity Securities.\n\nEquity compensation plans\x80\x99 information incorporated reference from Part III, Item 12, \x80\x9cSecurity Ownership of Certain Beneficial Owners Management Related Stockholder Matters document integral part of Item 5.\n At January 31, 2008, approximately 121,302 shareholders of record. 3M\x80\x99s stock listed on New York Stock Exchange. (NYSE), Chicago Stock Exchange, Inc. SWX Swiss Exchange.\n Cash dividends declared paid totaled $. 48 per share for each quarter of 2007, $. 46 per share for each quarter of 2006.\n\nStock price comparisons follow\n\n\n',
'Title: \nText: | _id | d815ddb0a |\n| title | |\n| text | Income Taxes 2017 Tax Act: The President signed U. S. tax reform legislation (\x80\x9c2017 Tax Act\x80\x9d) on December 22, 2017, which is considered the enactment date.\nThe 2017 Tax Act includes a broad range of provisions, many of which significantly differ from those contained in previous U. S. tax law.\nChanges in tax law are accounted for in the period of enactment.\nAs such, our 2017 consolidated financial statements reflect the immediate tax effect of the 2017 Tax Act.\n\nThe 2017 Tax Act contains several key provisions including, among other things: ?\na one-time tax on the mandatory deemed repatriation of post-1986 untaxed foreign earnings and profits (E&P), referred to as the toll charge; ?\na reduction in the corporate income tax rate from 35 percent to 21 percent for tax years beginning after December 31, 2017; ?\n\nthe introduction of a new U. S. tax on certain off-shore earnings referred to as global intangible low-taxed income (GILTI) at an effective tax rate of 10.5 percent for tax years beginning after December 31, 2017 (increasing to 13.125 percent for tax years beginning after December 31, 2025), with a partial offset by foreign tax credits; and ?\n\nthe introduction of a territorial tax system beginning in 2018 by providing a 100 percent dividend received deduction on certain qualified dividends from foreign subsidiaries.\nDuring the fourth quarter of 2017, we recorded an income tax benefit of $1,272.4 million, which was comprised of the following: ?\nincome tax benefit of $715.0 million for the one-time deemed repatriation of foreign earnings.\n\nThis is composed of a $1,181.0 million benefit from the removal of a deferred tax liability we had recorded for the repatriation of foreign earnings prior to the 2017 Tax Act offset by $466.0 million for the toll charge recognized under the 2017 Tax Act.\nIn accordance with the 2017 Tax Act, we expect to elect to pay the toll charge in installments over eight years.\n\nAs of December 31, 2017, we have recorded current and non-current income tax liabilities related to the toll charge of $82.0 million and $384.0 million, respectively. ?\nan income tax benefit of $557.4 million, primarily related to the remeasurement of our deferred tax assets and liabilities at the enacted corporate income tax rate of 21 percent.\n\nThe net benefit recorded was based on currently available information and interpretations made in applying the provisions of the 2017 Tax Act as of the time of filing this Annual Report on Form 10-K. We further refined our estimates related to the impact of the 2017 Tax Act subsequent to the issuance of our earnings release for the fourth quarter of 2017.\n\nIn accordance with authoritative guidance issued by the SEC, the income tax effect for certain aspects of the 2017 Tax Act represent provisional amounts for which our accounting is incomplete, but with respect to which a reasonable estimate could be determined and recorded during the fourth quarter of 2017.\n\nThe actual effects of the 2017 Tax Act and final amounts recorded may differ materially from our current estimate of provisional amounts due to, among other things, further interpretive guidance that may be issued by U. S. tax authorities or regulatory bodies, including the SEC and the FASB.\n\nWe will continue to analyze the 2017 Tax Act and any additional guidance that may be issued so we can finalize the full effects of applying the new legislation on our financial statements in the measurement period, which ends in the fourth quarter of 2018.\nWe continue to evaluate the impacts of the 2017 Tax Act and consider the amounts recorded to be provisional.\n\nIn addition, we are still evaluating the GILTI provisions of the 2017 Tax Act and their impact, if any, on our consolidated financial statements as of December 31, 2017.\nThe FASB allows companies to adopt an accounting policy to either recognize deferred taxes for GILTI or treat such as a tax cost in the year incurred.\n\nWe have not yet determined which accounting policy to adopt because determining the impact of the GILTI provisions requires analysis of our existing legal entity structure, the reversal of our U. S. GAAP and U. S. tax basis differences in the assets and liabilities of our foreign subsidiaries, and our ability to offset any tax with foreign tax credits.\nAs such, we did not record a deferred income tax\n\nIncome Taxes 2017 Tax Act: President signed U. S. tax reform legislation (\x80\x9c2017 Tax Act\x80\x9d) on December 22, 2017 considered enactment date.\n 2017 Tax Act includes broad provisions many differ from previous U. S. tax law.\n Changes in tax law accounted for in period of enactment.\n 2017 consolidated financial statements reflect immediate tax effect of 2017 Tax Act.\n 2017 Tax Act contains key provisions including ?\n\n2017 Tax Act contains key provisions including ?\n one-time tax on mandatory deemed repatriation of post-1986 untaxed foreign earnings and profits referred toll charge ?\n reduction in corporate income tax rate from 35 percent to 21 percent for tax years after December 31, 2017 ?\n\nintroduction of new U. S. tax on certain off-shore earnings as global intangible low-taxed income (GILTI) at effective tax rate of 10. 5 percent for tax years beginning after December 31, 2017 (increasing to 13. 125 percent for tax years after December 31, 2025), partial offset by foreign tax credits ?\n introduction of territorial tax system beginning in 2018 providing 100 percent dividend received deduction on certain qualified dividends from foreign subsidiaries.\n\nDuring fourth quarter of 2017 recorded income tax benefit of $1,272. 4 million of ?\n income tax benefit of $715. 0 million for one-time deemed repatriation of foreign earnings.\n composed of $1,181. 0 million benefit from removal of deferred tax liability for repatriation of foreign earnings prior to 2017 Tax Act offset by $466. 0 million for toll charge recognized under 2017 Tax Act.\n In accordance with 2017 Tax Act expect to elect to pay toll charge in installments over eight years.\n\nAs of December 31, 2017 recorded current and non-current income tax liabilities related to toll charge of $82. 0 million and $384.0 million, respectively. ?\n income tax benefit of $557. 4 million, primarily related to remeasurement of deferred tax assets and liabilities at enacted corporate income tax rate of 21 percent.\n\nnet benefit recorded based on available information and interpretations in applying provisions of 2017 Tax Act as of time of filing this Annual Report on Form 10-K. refined estimates related to impact of 2017 Tax Act subsequent to issuance of earnings release for fourth quarter of 2017.\n\nIn accordance with authoritative guidance by SEC, income tax effect for certain aspects of 2017 Tax Act represent provisional amounts for accounting is incomplete, but to reasonable estimate could be determined and recorded during fourth quarter of 2017.\n actual effects of 2017 Tax Act and final amounts recorded may differ materially from current estimate of provisional amounts due to further interpretive guidance issued by U. S. tax authorities or regulatory bodies, including SEC and FASB.\n\nwill continue to analyze 2017 Tax Act and additional guidance issued can finalize full effects of applying new legislation on financial statements in measurement period, ends in fourth quarter of 2018.\n continue to evaluate impacts of 2017 Tax Act and consider amounts recorded to be provisional.\n In, still evaluating GILTI provisions of 2017 Tax Act and impact if, on consolidated financial statements as of December 31, 2017.\n\nFASB allows companies to adopt accounting policy to recognize deferred taxes for GILTI or treat such as tax cost in year incurred.\n not yet determined which accounting policy to adopt because determining impact of GILTI provisions requires analysis of existing legal entity structure, reversal of U. S. GAAP and U. S. tax basis differences in assets and liabilities of foreign subsidiaries, and ability to offset tax with foreign tax credits.\n, we did not record deferred income tax\n\n\n',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 1024]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
EvaluateInformationRetrievalEvaluator| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.0 |
| cosine_accuracy@3 | 0.0049 |
| cosine_accuracy@5 | 0.0146 |
| cosine_accuracy@10 | 0.0146 |
| cosine_precision@1 | 0.0 |
| cosine_precision@3 | 0.0024 |
| cosine_precision@5 | 0.0034 |
| cosine_precision@10 | 0.0017 |
| cosine_recall@1 | 0.0 |
| cosine_recall@3 | 0.0049 |
| cosine_recall@5 | 0.0146 |
| cosine_recall@10 | 0.0146 |
| cosine_ndcg@10 | 0.0071 |
| cosine_mrr@10 | 0.0044 |
| cosine_map@100 | 0.0377 |
| dot_accuracy@1 | 0.0 |
| dot_accuracy@3 | 0.0 |
| dot_accuracy@5 | 0.0194 |
| dot_accuracy@10 | 0.0243 |
| dot_precision@1 | 0.0 |
| dot_precision@3 | 0.0 |
| dot_precision@5 | 0.0039 |
| dot_precision@10 | 0.0024 |
| dot_recall@1 | 0.0 |
| dot_recall@3 | 0.0 |
| dot_recall@5 | 0.0194 |
| dot_recall@10 | 0.0243 |
| dot_ndcg@10 | 0.0098 |
| dot_mrr@10 | 0.0053 |
| dot_map@100 | 0.0249 |
sentence_0 and sentence_1| sentence_0 | sentence_1 | |
|---|---|---|
| type | string | string |
| details |
|
|
| sentence_0 | sentence_1 |
|---|---|
Instruct: Given a web search query, retrieve relevant passages that answer the query. |
_id |
Instruct: Given a web search query, retrieve relevant passages that answer the query. |
_id |
Instruct: Given a web search query, retrieve relevant passages that answer the query. |
_id |
MultipleNegativesRankingLoss with these parameters:{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
eval_strategy: stepsper_device_train_batch_size: 4per_device_eval_batch_size: 4num_train_epochs: 4fp16: Truebatch_sampler: no_duplicatesmulti_dataset_batch_sampler: round_robinoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: stepsprediction_loss_only: Trueper_device_train_batch_size: 4per_device_eval_batch_size: 4per_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: 4max_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: 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: Falseeval_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: Falsebatch_sampler: no_duplicatesmulti_dataset_batch_sampler: round_robin| Epoch | Step | Training Loss | Evaluate_cosine_map@100 |
|---|---|---|---|
| 0 | 0 | - | 0.2425 |
| 0.8818 | 500 | 0.4583 | - |
| 1.0 | 567 | - | 0.0377 |
@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}
}