Sentence Similarity
sentence-transformers
Safetensors
English
feature-extraction
dense
Generated from Trainer
dataset_size:1200
loss:ContrastiveLoss
Eval Results (legacy)
Instructions to use mancer146/embeddinggemma-300m-haystack-contrastive-thin-fixed with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use mancer146/embeddinggemma-300m-haystack-contrastive-thin-fixed with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("mancer146/embeddinggemma-300m-haystack-contrastive-thin-fixed") sentences = [ "TaxYear: 2025 PRELIMINARY\nLandJustValue: $571,965\nImprovementsJustValue: $444,893\nTotalJustValue: $1,016,858\nSchoolAssessedValue: $657,902\nCountyTaxableValue: $607,180\nTotalTaxes: $5,881.02\n\nTaxYear: 2024\nLandJustValue: $529,037\nImprovementsJustValue: $522,202\nTotalJustValue: $1,051,239\nSchoolAssessedValue: $639,361\nCountyTaxableValue: $589,361\nTotalTaxes: $6,003.53\n\nTaxYear: 2023\nLandJustValue: $500,470\nImprovementsJustValue: $572,889\nTotalJustValue: $1,073,359\nSchoolAssessedValue: $620,739\nCountyTaxableValue: $570,739\nTotalTaxes: $5,956.52\n\nTaxYear: 2022\nLandJustValue: $230,519\nImprovementsJustValue: $610,503\nTotalJustValue: $841,022\nSchoolAssessedValue: $602,659\nCountyTaxableValue: $552,659\nTotalTaxes: $6,124.86\n\nTaxYear: 2021\nLandJustValue: $112,658\nImprovementsJustValue: $472,448\nTotalJustValue: $585,106\nSchoolAssessedValue: $585,106\nCountyTaxableValue: $535,106\nTotalTaxes: $6,190.98section: Tax,\ncounty: Collier,\nparcel_id: 82660002628", "area_under_air: 2111\nlivable_floor_area: 2111\nparcel_identifier: 51978031927\nproperty_structure_built_year: 2004\nproperty_type: SingleFamily\nsubdivision: INDIGO LAKES UNIT\ntotal_area: 2551", "monthly_tax_amount: 490.09\nperiod_end_date: 2025-12-31\nperiod_start_date: 2025-01-01\nproperty_assessed_value_amount: 657902\nproperty_building_amount: 444893\nproperty_land_amount: 571965\nproperty_market_value_amount: 1016858\nproperty_taxable_value_amount: 607180\ntax_year: 2025\nyearly_tax_amount: 5881.02\n\nmonthly_tax_amount: 510.41\nperiod_end_date: 2022-12-31\nperiod_start_date: 2022-01-01\nproperty_assessed_value_amount: 602659\nproperty_building_amount: 610503\nproperty_land_amount: 230519\nproperty_market_value_amount: 841022\nproperty_taxable_value_amount: 552659\ntax_year: 2022\nyearly_tax_amount: 6124.86", "ownership_transfer_date: 2013-07-09\npurchase_price_amount: 830000\n\nownership_transfer_date: 2011-10-03\npurchase_price_amount: 685000\n\nownership_transfer_date: 2009-07-01\npurchase_price_amount: 432500\n\nownership_transfer_date: 1999-02-22\npurchase_price_amount: 0\n\nownership_transfer_date: 2001-01-25\npurchase_price_amount: 360000" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
| language: | |
| - en | |
| license: apache-2.0 | |
| tags: | |
| - sentence-transformers | |
| - sentence-similarity | |
| - feature-extraction | |
| - dense | |
| - generated_from_trainer | |
| - dataset_size:1200 | |
| - loss:ContrastiveLoss | |
| base_model: google/embeddinggemma-300m | |
| widget: | |
| - source_sentence: 'TaxYear: 2025 PRELIMINARY | |
| LandJustValue: $571,965 | |
| ImprovementsJustValue: $444,893 | |
| TotalJustValue: $1,016,858 | |
| SchoolAssessedValue: $657,902 | |
| CountyTaxableValue: $607,180 | |
| TotalTaxes: $5,881.02 | |
| TaxYear: 2024 | |
| LandJustValue: $529,037 | |
| ImprovementsJustValue: $522,202 | |
| TotalJustValue: $1,051,239 | |
| SchoolAssessedValue: $639,361 | |
| CountyTaxableValue: $589,361 | |
| TotalTaxes: $6,003.53 | |
| TaxYear: 2023 | |
| LandJustValue: $500,470 | |
| ImprovementsJustValue: $572,889 | |
| TotalJustValue: $1,073,359 | |
| SchoolAssessedValue: $620,739 | |
| CountyTaxableValue: $570,739 | |
| TotalTaxes: $5,956.52 | |
| TaxYear: 2022 | |
| LandJustValue: $230,519 | |
| ImprovementsJustValue: $610,503 | |
| TotalJustValue: $841,022 | |
| SchoolAssessedValue: $602,659 | |
| CountyTaxableValue: $552,659 | |
| TotalTaxes: $6,124.86 | |
| TaxYear: 2021 | |
| LandJustValue: $112,658 | |
| ImprovementsJustValue: $472,448 | |
| TotalJustValue: $585,106 | |
| SchoolAssessedValue: $585,106 | |
| CountyTaxableValue: $535,106 | |
| TotalTaxes: $6,190.98section: Tax, | |
| county: Collier, | |
| parcel_id: 82660002628' | |
| sentences: | |
| - 'area_under_air: 2111 | |
| livable_floor_area: 2111 | |
| parcel_identifier: 51978031927 | |
| property_structure_built_year: 2004 | |
| property_type: SingleFamily | |
| subdivision: INDIGO LAKES UNIT | |
| total_area: 2551' | |
| - 'monthly_tax_amount: 490.09 | |
| period_end_date: 2025-12-31 | |
| period_start_date: 2025-01-01 | |
| property_assessed_value_amount: 657902 | |
| property_building_amount: 444893 | |
| property_land_amount: 571965 | |
| property_market_value_amount: 1016858 | |
| property_taxable_value_amount: 607180 | |
| tax_year: 2025 | |
| yearly_tax_amount: 5881.02 | |
| monthly_tax_amount: 510.41 | |
| period_end_date: 2022-12-31 | |
| period_start_date: 2022-01-01 | |
| property_assessed_value_amount: 602659 | |
| property_building_amount: 610503 | |
| property_land_amount: 230519 | |
| property_market_value_amount: 841022 | |
| property_taxable_value_amount: 552659 | |
| tax_year: 2022 | |
| yearly_tax_amount: 6124.86' | |
| - 'ownership_transfer_date: 2013-07-09 | |
| purchase_price_amount: 830000 | |
| ownership_transfer_date: 2011-10-03 | |
| purchase_price_amount: 685000 | |
| ownership_transfer_date: 2009-07-01 | |
| purchase_price_amount: 432500 | |
| ownership_transfer_date: 1999-02-22 | |
| purchase_price_amount: 0 | |
| ownership_transfer_date: 2001-01-25 | |
| purchase_price_amount: 360000' | |
| - source_sentence: 'TaxYear: 2025 PRELIMINARY | |
| LandJustValue: $0 | |
| ImprovementsJustValue: $261,720 | |
| TotalJustValue: $261,720 | |
| SchoolAssessedValue: $261,720 | |
| CountyTaxableValue: $261,720 | |
| TotalTaxes: $3,142.17 | |
| TaxYear: 2024 | |
| LandJustValue: $0 | |
| ImprovementsJustValue: $261,720 | |
| TotalJustValue: $261,720 | |
| SchoolAssessedValue: $261,720 | |
| CountyTaxableValue: $261,720 | |
| TotalTaxes: $3,551.55 | |
| TaxYear: 2023 | |
| LandJustValue: $0 | |
| ImprovementsJustValue: $298,680 | |
| TotalJustValue: $298,680 | |
| SchoolAssessedValue: $298,680 | |
| CountyTaxableValue: $298,680 | |
| TotalTaxes: $4,125.27 | |
| TaxYear: 2022 | |
| LandJustValue: $0 | |
| ImprovementsJustValue: $233,985 | |
| TotalJustValue: $233,985 | |
| SchoolAssessedValue: $233,985 | |
| CountyTaxableValue: $172,700 | |
| TotalTaxes: $2,771.07 | |
| TaxYear: 2021 | |
| LandJustValue: $0 | |
| ImprovementsJustValue: $157,000 | |
| TotalJustValue: $157,000 | |
| SchoolAssessedValue: $157,000 | |
| CountyTaxableValue: $157,000 | |
| TotalTaxes: $2,342.18section: Tax, | |
| county: Collier, | |
| parcel_id: 31760000209' | |
| sentences: | |
| - 'first_name: George | |
| last_name: Lewis | |
| middle_name: P | |
| first_name: Karen | |
| last_name: Lewis | |
| middle_name: L' | |
| - 'area_under_air: 997 | |
| livable_floor_area: 997 | |
| parcel_identifier: 31731720000 | |
| property_legal_description_text: FAIRWAY FOREST GARDEN VILLAS A CONDOMINIUM UNIT | |
| 179 | |
| property_structure_built_year: 1987 | |
| property_type: Condominium | |
| total_area: 997' | |
| - 'monthly_tax_amount: 195.18 | |
| period_end_date: 2021-12-31 | |
| period_start_date: 2021-01-01 | |
| property_assessed_value_amount: 157000 | |
| property_building_amount: 157000 | |
| property_land_amount: 0 | |
| property_market_value_amount: 157000 | |
| property_taxable_value_amount: 157000 | |
| tax_year: 2021 | |
| yearly_tax_amount: 2342.18 | |
| monthly_tax_amount: 261.85 | |
| period_end_date: 2025-12-31 | |
| period_start_date: 2025-01-01 | |
| property_assessed_value_amount: 261720 | |
| property_building_amount: 261720 | |
| property_land_amount: 0 | |
| property_market_value_amount: 261720 | |
| property_taxable_value_amount: 261720 | |
| tax_year: 2025 | |
| yearly_tax_amount: 3142.17 | |
| monthly_tax_amount: 295.96 | |
| period_end_date: 2024-12-31 | |
| period_start_date: 2024-01-01 | |
| property_assessed_value_amount: 261720 | |
| property_building_amount: 261720 | |
| property_land_amount: 0 | |
| property_market_value_amount: 261720 | |
| property_taxable_value_amount: 261720 | |
| tax_year: 2024 | |
| yearly_tax_amount: 3551.55 | |
| monthly_tax_amount: 230.92 | |
| period_end_date: 2022-12-31 | |
| period_start_date: 2022-01-01 | |
| property_assessed_value_amount: 233985 | |
| property_building_amount: 233985 | |
| property_land_amount: 0 | |
| property_market_value_amount: 233985 | |
| property_taxable_value_amount: 172700 | |
| tax_year: 2022 | |
| yearly_tax_amount: 2771.07 | |
| monthly_tax_amount: 343.77 | |
| period_end_date: 2023-12-31 | |
| period_start_date: 2023-01-01 | |
| property_assessed_value_amount: 298680 | |
| property_building_amount: 298680 | |
| property_land_amount: 0 | |
| property_market_value_amount: 298680 | |
| property_taxable_value_amount: 298680 | |
| tax_year: 2023 | |
| yearly_tax_amount: 4125.27' | |
| - source_sentence: 'ParcelID: 31347702043 | |
| FullAddress: 9424 MONTELANICO LOOP, NAPLES 34119 | |
| Legal: ESPLANADE GOLF AND COUNTRY CLUB OF NAPLES PHASE 3 BLOCKS K1 K2 AND H3 LOT | |
| 1390 | |
| Subdivision: 281740 - ESPLANADE G&CC PH3 B-K1,K2,H3 CLUB OF NAPLES PHASE 3 BLOCKS | |
| K1 K2 AND H3 | |
| UseCode: 1 - SINGLE FAMILY RESIDENTIAL | |
| Section: 15 | |
| Township: 48 | |
| Range: 26section: Property, | |
| county: Collier, | |
| parcel_id: 31347702043' | |
| sentences: | |
| - 'monthly_tax_amount: 1296.8 | |
| period_end_date: 2023-12-31 | |
| period_start_date: 2023-01-01 | |
| property_assessed_value_amount: 1452003 | |
| property_building_amount: 1459158 | |
| property_land_amount: 1594430 | |
| property_market_value_amount: 3053588 | |
| property_taxable_value_amount: 1402003 | |
| tax_year: 2023 | |
| yearly_tax_amount: 15561.55 | |
| monthly_tax_amount: 1339.02 | |
| period_end_date: 2021-12-31 | |
| period_start_date: 2021-01-01 | |
| property_assessed_value_amount: 1368652 | |
| property_building_amount: 1188323 | |
| property_land_amount: 180329 | |
| property_market_value_amount: 1368652 | |
| property_taxable_value_amount: 1318652 | |
| tax_year: 2021 | |
| yearly_tax_amount: 16068.19 | |
| monthly_tax_amount: 1315.87 | |
| period_end_date: 2024-12-31 | |
| period_start_date: 2024-01-01 | |
| property_assessed_value_amount: 1495563 | |
| property_building_amount: 1262216 | |
| property_land_amount: 1402668 | |
| property_market_value_amount: 2664884 | |
| property_taxable_value_amount: 1445563 | |
| tax_year: 2024 | |
| yearly_tax_amount: 15790.39 | |
| monthly_tax_amount: 1187.99 | |
| period_end_date: 2025-12-31 | |
| period_start_date: 2025-01-01 | |
| property_assessed_value_amount: 1538934 | |
| property_building_amount: 1117620 | |
| property_land_amount: 1508245 | |
| property_market_value_amount: 2625865 | |
| property_taxable_value_amount: 1488212 | |
| tax_year: 2025 | |
| yearly_tax_amount: 14255.93 | |
| monthly_tax_amount: 1334.85 | |
| period_end_date: 2022-12-31 | |
| period_start_date: 2022-01-01 | |
| property_assessed_value_amount: 1409712 | |
| property_building_amount: 1553410 | |
| property_land_amount: 470644 | |
| property_market_value_amount: 2024054 | |
| property_taxable_value_amount: 1359712 | |
| tax_year: 2022 | |
| yearly_tax_amount: 16018.16' | |
| - 'area_under_air: 2313 | |
| livable_floor_area: 2313 | |
| parcel_identifier: 31347702043 | |
| property_legal_description_text: ESPLANADE GOLF AND COUNTRY CLUB OF NAPLES PHASE | |
| 3 BLOCKS K1 K2 AND H3 LOT 1390 | |
| property_structure_built_year: 2018 | |
| property_type: SingleFamily | |
| subdivision: ESPLANADE G&CC PH3 B-K1,K2,H3 CLUB OF NAPLES PHASE 3 BLOCKS K1 K2 | |
| AND H3 | |
| total_area: 2767' | |
| - 'city_name: NAPLES | |
| county_name: Collier | |
| postal_code: 34105 | |
| range: 25 | |
| section: 14 | |
| state_code: FL | |
| street_name: WOODSHIRE | |
| street_number: 1018 | |
| street_suffix_type: Ln | |
| township: 49' | |
| - source_sentence: 'OwnerLine 1: 21 VB PROPERTIES LLCsection: Owners, | |
| county: Collier, | |
| parcel_id: 23270120001' | |
| sentences: | |
| - 'first_name: Kenneth | |
| last_name: Holman | |
| middle_name: W' | |
| - 'city_name: NAPLES | |
| county_name: Collier | |
| state_code: FL | |
| street_name: WILLOWBROOK | |
| street_number: 765 | |
| street_suffix_type: Dr | |
| township: 49' | |
| - 'name: 21' | |
| - source_sentence: 'FullAddress: 5852 NORTHRIDGE DR, NAPLES 34110 | |
| Legal: CARLTON LAKES UNIT NO 2 BLK A LOT 5 NKA VILLAS I AT CARLTON LAKES (HO) | |
| UNIT A-5 | |
| Section: 19 | |
| Township: 48 | |
| Range: 26section: Address, | |
| county: Collier, | |
| parcel_id: 25540003380' | |
| sentences: | |
| - 'monthly_tax_amount: 317.4 | |
| period_end_date: 2022-12-31 | |
| period_start_date: 2022-01-01 | |
| property_assessed_value_amount: 381299 | |
| property_building_amount: 441115 | |
| property_land_amount: 134469 | |
| property_market_value_amount: 575584 | |
| property_taxable_value_amount: 331299 | |
| tax_year: 2022 | |
| yearly_tax_amount: 3808.76 | |
| monthly_tax_amount: 517.39 | |
| period_end_date: 2025-12-31 | |
| period_start_date: 2025-01-01 | |
| property_assessed_value_amount: 692367 | |
| property_building_amount: 324162 | |
| property_land_amount: 368205 | |
| property_market_value_amount: 692367 | |
| property_taxable_value_amount: 641645 | |
| tax_year: 2025 | |
| yearly_tax_amount: 6208.64 | |
| monthly_tax_amount: 320.37 | |
| period_end_date: 2021-12-31 | |
| period_start_date: 2021-01-01 | |
| property_assessed_value_amount: 370193 | |
| property_building_amount: 334803 | |
| property_land_amount: 35390 | |
| property_market_value_amount: 370193 | |
| property_taxable_value_amount: 320193 | |
| tax_year: 2021 | |
| yearly_tax_amount: 3844.46' | |
| - 'first_name: Christina | |
| last_name: Zajac | |
| middle_name: R | |
| first_name: Thomas | |
| last_name: Zajac | |
| middle_name: H' | |
| - 'city_name: NAPLES | |
| county_name: Collier | |
| lot: 5 | |
| postal_code: 34110 | |
| range: 26 | |
| section: 19 | |
| state_code: FL | |
| street_name: NORTHRIDGE | |
| street_number: 5852 | |
| street_suffix_type: Dr | |
| township: 48' | |
| pipeline_tag: sentence-similarity | |
| library_name: sentence-transformers | |
| metrics: | |
| - cosine_accuracy | |
| - cosine_accuracy_threshold | |
| - cosine_f1 | |
| - cosine_f1_threshold | |
| - cosine_precision | |
| - cosine_recall | |
| - cosine_ap | |
| - cosine_mcc | |
| model-index: | |
| - name: EmbeddingGemma-300m trained to measure coverage | |
| results: | |
| - task: | |
| type: binary-classification | |
| name: Binary Classification | |
| dataset: | |
| name: Unknown | |
| type: unknown | |
| metrics: | |
| - type: cosine_accuracy | |
| value: 0.96 | |
| name: Cosine Accuracy | |
| - type: cosine_accuracy_threshold | |
| value: 0.9879488945007324 | |
| name: Cosine Accuracy Threshold | |
| - type: cosine_f1 | |
| value: 0.9607843137254902 | |
| name: Cosine F1 | |
| - type: cosine_f1_threshold | |
| value: 0.98133385181427 | |
| name: Cosine F1 Threshold | |
| - type: cosine_precision | |
| value: 0.9423076923076923 | |
| name: Cosine Precision | |
| - type: cosine_recall | |
| value: 0.98 | |
| name: Cosine Recall | |
| - type: cosine_ap | |
| value: 0.9530095295398296 | |
| name: Cosine Ap | |
| - type: cosine_mcc | |
| value: 0.920736884379251 | |
| name: Cosine Mcc | |
| # EmbeddingGemma-300m trained to measure coverage | |
| This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [google/embeddinggemma-300m](https://huggingface.co/google/embeddinggemma-300m) on the json dataset. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more. | |
| ## Model Details | |
| ### Model Description | |
| - **Model Type:** Sentence Transformer | |
| - **Base model:** [google/embeddinggemma-300m](https://huggingface.co/google/embeddinggemma-300m) <!-- at revision 57c266a740f537b4dc058e1b0cda161fd15afa75 --> | |
| - **Maximum Sequence Length:** 2048 tokens | |
| - **Output Dimensionality:** 768 dimensions | |
| - **Similarity Function:** Cosine Similarity | |
| - **Training Dataset:** | |
| - json | |
| - **Language:** en | |
| - **License:** apache-2.0 | |
| ### Model Sources | |
| - **Documentation:** [Sentence Transformers Documentation](https://sbert.net) | |
| - **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers) | |
| - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers) | |
| ### Full Model Architecture | |
| ``` | |
| SentenceTransformer( | |
| (0): Transformer({'max_seq_length': 2048, 'do_lower_case': False, 'architecture': 'Gemma3TextModel'}) | |
| (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): Dense({'in_features': 768, 'out_features': 3072, 'bias': False, 'activation_function': 'torch.nn.modules.linear.Identity'}) | |
| (3): Dense({'in_features': 3072, 'out_features': 768, 'bias': False, 'activation_function': 'torch.nn.modules.linear.Identity'}) | |
| (4): Normalize() | |
| ) | |
| ``` | |
| ## Usage | |
| ### Direct Usage (Sentence Transformers) | |
| First install the Sentence Transformers library: | |
| ```bash | |
| pip install -U sentence-transformers | |
| ``` | |
| Then you can load this model and run inference. | |
| ```python | |
| from sentence_transformers import SentenceTransformer | |
| # Download from the 🤗 Hub | |
| model = SentenceTransformer("mancer146/embeddinggemma-300m-haystack-contrastive-thin-fixed") | |
| # Run inference | |
| queries = [ | |
| "FullAddress: 5852 NORTHRIDGE DR, NAPLES 34110\nLegal: CARLTON LAKES UNIT NO 2 BLK A LOT 5 NKA VILLAS I AT CARLTON LAKES (HO) UNIT A-5\nSection: 19\nTownship: 48\nRange: 26section: Address,\ncounty: Collier,\nparcel_id: 25540003380", | |
| ] | |
| documents = [ | |
| 'city_name: NAPLES\ncounty_name: Collier\nlot: 5\npostal_code: 34110\nrange: 26\nsection: 19\nstate_code: FL\nstreet_name: NORTHRIDGE\nstreet_number: 5852\nstreet_suffix_type: Dr\ntownship: 48', | |
| 'monthly_tax_amount: 317.4\nperiod_end_date: 2022-12-31\nperiod_start_date: 2022-01-01\nproperty_assessed_value_amount: 381299\nproperty_building_amount: 441115\nproperty_land_amount: 134469\nproperty_market_value_amount: 575584\nproperty_taxable_value_amount: 331299\ntax_year: 2022\nyearly_tax_amount: 3808.76\n\nmonthly_tax_amount: 517.39\nperiod_end_date: 2025-12-31\nperiod_start_date: 2025-01-01\nproperty_assessed_value_amount: 692367\nproperty_building_amount: 324162\nproperty_land_amount: 368205\nproperty_market_value_amount: 692367\nproperty_taxable_value_amount: 641645\ntax_year: 2025\nyearly_tax_amount: 6208.64\n\nmonthly_tax_amount: 320.37\nperiod_end_date: 2021-12-31\nperiod_start_date: 2021-01-01\nproperty_assessed_value_amount: 370193\nproperty_building_amount: 334803\nproperty_land_amount: 35390\nproperty_market_value_amount: 370193\nproperty_taxable_value_amount: 320193\ntax_year: 2021\nyearly_tax_amount: 3844.46', | |
| 'first_name: Christina\nlast_name: Zajac\nmiddle_name: R\n\nfirst_name: Thomas\nlast_name: Zajac\nmiddle_name: H', | |
| ] | |
| query_embeddings = model.encode_query(queries) | |
| document_embeddings = model.encode_document(documents) | |
| print(query_embeddings.shape, document_embeddings.shape) | |
| # [1, 768] [3, 768] | |
| # Get the similarity scores for the embeddings | |
| similarities = model.similarity(query_embeddings, document_embeddings) | |
| print(similarities) | |
| # tensor([[0.9881, 0.8106, 0.6785]]) | |
| ``` | |
| <!-- | |
| ### Direct Usage (Transformers) | |
| <details><summary>Click to see the direct usage in Transformers</summary> | |
| </details> | |
| --> | |
| <!-- | |
| ### Downstream Usage (Sentence Transformers) | |
| You can finetune this model on your own dataset. | |
| <details><summary>Click to expand</summary> | |
| </details> | |
| --> | |
| <!-- | |
| ### Out-of-Scope Use | |
| *List how the model may foreseeably be misused and address what users ought not to do with the model.* | |
| --> | |
| ## Evaluation | |
| ### Metrics | |
| #### Binary Classification | |
| * Evaluated with [<code>BinaryClassificationEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.BinaryClassificationEvaluator) | |
| | Metric | Value | | |
| |:--------------------------|:----------| | |
| | cosine_accuracy | 0.96 | | |
| | cosine_accuracy_threshold | 0.9879 | | |
| | cosine_f1 | 0.9608 | | |
| | cosine_f1_threshold | 0.9813 | | |
| | cosine_precision | 0.9423 | | |
| | cosine_recall | 0.98 | | |
| | **cosine_ap** | **0.953** | | |
| | cosine_mcc | 0.9207 | | |
| <!-- | |
| ## Bias, Risks and Limitations | |
| *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.* | |
| --> | |
| <!-- | |
| ### Recommendations | |
| *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.* | |
| --> | |
| ## Training Details | |
| ### Training Dataset | |
| #### json | |
| * Dataset: json | |
| * Size: 1,200 training samples | |
| * Columns: <code>input_text</code>, <code>output_text</code>, and <code>label</code> | |
| * Approximate statistics based on the first 1000 samples: | |
| | | input_text | output_text | label | | |
| |:--------|:-------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:------------------------------------------------| | |
| | type | string | string | int | | |
| | details | <ul><li>min: 36 tokens</li><li>mean: 188.79 tokens</li><li>max: 536 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 165.35 tokens</li><li>max: 801 tokens</li></ul> | <ul><li>0: ~50.10%</li><li>1: ~49.90%</li></ul> | | |
| * Samples: | |
| | input_text | output_text | label | | |
| |:-----------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------|:---------------| | |
| | <code>OwnerLine 1: JERI HURCKES LIVING TRUSTsection: Owners,<br>county: Collier,<br>parcel_id: 82660021104</code> | <code>name: JERI HURCKES LIVING TRUST</code> | <code>1</code> | | |
| | <code>OwnerLine 1: GUALARIO, ANTHONY=& DIANAsection: Owners,<br>county: Collier,<br>parcel_id: 16054320005</code> | <code>first_name: Anthony<br>last_name: Gualario</code> | <code>0</code> | | |
| | <code>Date: 02/11/14<br>Amount: $496,300<br>BookPage: 5009-963section: Sales,<br>county: Collier,<br>parcel_id: 69770005923</code> | <code>ownership_transfer_date: 2014-02-11<br>purchase_price_amount: 0</code> | <code>0</code> | | |
| * Loss: [<code>ContrastiveLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#contrastiveloss) with these parameters: | |
| ```json | |
| { | |
| "distance_metric": "SiameseDistanceMetric.COSINE_DISTANCE", | |
| "margin": 0.1, | |
| "size_average": true | |
| } | |
| ``` | |
| ### Training Hyperparameters | |
| #### Non-Default Hyperparameters | |
| - `eval_strategy`: steps | |
| - `per_device_train_batch_size`: 3 | |
| - `per_device_eval_batch_size`: 3 | |
| - `gradient_accumulation_steps`: 2 | |
| - `learning_rate`: 2e-05 | |
| - `num_train_epochs`: 5 | |
| - `warmup_ratio`: 0.05 | |
| - `fp16`: True | |
| - `prompts`: {'input_text': 'STS', 'output_text': 'STS'} | |
| #### All Hyperparameters | |
| <details><summary>Click to expand</summary> | |
| - `overwrite_output_dir`: False | |
| - `do_predict`: False | |
| - `eval_strategy`: steps | |
| - `prediction_loss_only`: True | |
| - `per_device_train_batch_size`: 3 | |
| - `per_device_eval_batch_size`: 3 | |
| - `per_gpu_train_batch_size`: None | |
| - `per_gpu_eval_batch_size`: None | |
| - `gradient_accumulation_steps`: 2 | |
| - `eval_accumulation_steps`: None | |
| - `torch_empty_cache_steps`: None | |
| - `learning_rate`: 2e-05 | |
| - `weight_decay`: 0.0 | |
| - `adam_beta1`: 0.9 | |
| - `adam_beta2`: 0.999 | |
| - `adam_epsilon`: 1e-08 | |
| - `max_grad_norm`: 1.0 | |
| - `num_train_epochs`: 5 | |
| - `max_steps`: -1 | |
| - `lr_scheduler_type`: linear | |
| - `lr_scheduler_kwargs`: {} | |
| - `warmup_ratio`: 0.05 | |
| - `warmup_steps`: 0 | |
| - `log_level`: passive | |
| - `log_level_replica`: warning | |
| - `log_on_each_node`: True | |
| - `logging_nan_inf_filter`: True | |
| - `save_safetensors`: True | |
| - `save_on_each_node`: False | |
| - `save_only_model`: False | |
| - `restore_callback_states_from_checkpoint`: False | |
| - `no_cuda`: False | |
| - `use_cpu`: False | |
| - `use_mps_device`: False | |
| - `seed`: 42 | |
| - `data_seed`: None | |
| - `jit_mode_eval`: False | |
| - `use_ipex`: False | |
| - `bf16`: False | |
| - `fp16`: True | |
| - `fp16_opt_level`: O1 | |
| - `half_precision_backend`: auto | |
| - `bf16_full_eval`: False | |
| - `fp16_full_eval`: False | |
| - `tf32`: None | |
| - `local_rank`: 0 | |
| - `ddp_backend`: None | |
| - `tpu_num_cores`: None | |
| - `tpu_metrics_debug`: False | |
| - `debug`: [] | |
| - `dataloader_drop_last`: False | |
| - `dataloader_num_workers`: 0 | |
| - `dataloader_prefetch_factor`: None | |
| - `past_index`: -1 | |
| - `disable_tqdm`: False | |
| - `remove_unused_columns`: True | |
| - `label_names`: None | |
| - `load_best_model_at_end`: False | |
| - `ignore_data_skip`: False | |
| - `fsdp`: [] | |
| - `fsdp_min_num_params`: 0 | |
| - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False} | |
| - `fsdp_transformer_layer_cls_to_wrap`: None | |
| - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None} | |
| - `parallelism_config`: None | |
| - `deepspeed`: None | |
| - `label_smoothing_factor`: 0.0 | |
| - `optim`: adamw_torch | |
| - `optim_args`: None | |
| - `adafactor`: False | |
| - `group_by_length`: False | |
| - `length_column_name`: length | |
| - `ddp_find_unused_parameters`: None | |
| - `ddp_bucket_cap_mb`: None | |
| - `ddp_broadcast_buffers`: False | |
| - `dataloader_pin_memory`: True | |
| - `dataloader_persistent_workers`: False | |
| - `skip_memory_metrics`: True | |
| - `use_legacy_prediction_loop`: False | |
| - `push_to_hub`: False | |
| - `resume_from_checkpoint`: None | |
| - `hub_model_id`: None | |
| - `hub_strategy`: every_save | |
| - `hub_private_repo`: None | |
| - `hub_always_push`: False | |
| - `hub_revision`: None | |
| - `gradient_checkpointing`: False | |
| - `gradient_checkpointing_kwargs`: None | |
| - `include_inputs_for_metrics`: False | |
| - `include_for_metrics`: [] | |
| - `eval_do_concat_batches`: True | |
| - `fp16_backend`: auto | |
| - `push_to_hub_model_id`: None | |
| - `push_to_hub_organization`: None | |
| - `mp_parameters`: | |
| - `auto_find_batch_size`: False | |
| - `full_determinism`: False | |
| - `torchdynamo`: None | |
| - `ray_scope`: last | |
| - `ddp_timeout`: 1800 | |
| - `torch_compile`: False | |
| - `torch_compile_backend`: None | |
| - `torch_compile_mode`: None | |
| - `include_tokens_per_second`: False | |
| - `include_num_input_tokens_seen`: False | |
| - `neftune_noise_alpha`: None | |
| - `optim_target_modules`: None | |
| - `batch_eval_metrics`: False | |
| - `eval_on_start`: False | |
| - `use_liger_kernel`: False | |
| - `liger_kernel_config`: None | |
| - `eval_use_gather_object`: False | |
| - `average_tokens_across_devices`: False | |
| - `prompts`: {'input_text': 'STS', 'output_text': 'STS'} | |
| - `batch_sampler`: batch_sampler | |
| - `multi_dataset_batch_sampler`: proportional | |
| - `router_mapping`: {} | |
| - `learning_rate_mapping`: {} | |
| </details> | |
| ### Training Logs | |
| | Epoch | Step | Training Loss | cosine_ap | | |
| |:-----:|:----:|:-------------:|:---------:| | |
| | 0.4 | 40 | - | 0.8426 | | |
| | 0.8 | 80 | - | 0.8858 | | |
| | 1.2 | 120 | - | 0.8194 | | |
| | 1.6 | 160 | - | 0.8856 | | |
| | 2.0 | 200 | - | 0.9643 | | |
| | 2.4 | 240 | - | 0.9469 | | |
| | 2.8 | 280 | - | 0.9426 | | |
| | 3.2 | 320 | - | 0.9084 | | |
| | 3.6 | 360 | - | 0.9337 | | |
| | 4.0 | 400 | - | 0.9449 | | |
| | 4.4 | 440 | - | 0.9555 | | |
| | 4.8 | 480 | - | 0.9525 | | |
| | 5.0 | 500 | 0.0006 | - | | |
| | -1 | -1 | - | 0.9530 | | |
| ### Framework Versions | |
| - Python: 3.11.13 | |
| - Sentence Transformers: 5.1.2 | |
| - Transformers: 4.57.0.dev0 | |
| - PyTorch: 2.6.0+cu124 | |
| - Accelerate: 1.9.0 | |
| - Datasets: 4.1.1 | |
| - Tokenizers: 0.22.1 | |
| ## Citation | |
| ### BibTeX | |
| #### Sentence Transformers | |
| ```bibtex | |
| @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", | |
| } | |
| ``` | |
| #### ContrastiveLoss | |
| ```bibtex | |
| @inproceedings{hadsell2006dimensionality, | |
| author={Hadsell, R. and Chopra, S. and LeCun, Y.}, | |
| booktitle={2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'06)}, | |
| title={Dimensionality Reduction by Learning an Invariant Mapping}, | |
| year={2006}, | |
| volume={2}, | |
| number={}, | |
| pages={1735-1742}, | |
| doi={10.1109/CVPR.2006.100} | |
| } | |
| ``` | |
| <!-- | |
| ## Glossary | |
| *Clearly define terms in order to be accessible across audiences.* | |
| --> | |
| <!-- | |
| ## Model Card Authors | |
| *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.* | |
| --> | |
| <!-- | |
| ## Model Card Contact | |
| *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.* | |
| --> |