Sentence Similarity
sentence-transformers
Safetensors
gemma3_text
feature-extraction
Generated from Trainer
dataset_size:315
loss:CosineSimilarityLoss
Eval Results (legacy)
text-embeddings-inference
Instructions to use kevin-rice/embeddinggemma-ticket-similarity with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use kevin-rice/embeddinggemma-ticket-similarity with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("kevin-rice/embeddinggemma-ticket-similarity") sentences = [ "In-House Replenishment Does Not Update Quantities in Product Location History / Batches After Stock Transfer", "Add \"Primary Location Quantity\" column in Suggestions section of In-House Replenishments UI", "Stock and Min On Hand Column Sorting Not Working in Manage Products UI", "Previous Surcharge and New Surcharge Displayed as Dollar Amount Instead of Percentage in Product Price History" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
metadata
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:315
- loss:CosineSimilarityLoss
base_model: google/embeddinggemma-300m
widget:
- source_sentence: >-
In-House Replenishment Does Not Update Quantities in Product Location
History / Batches After Stock Transfer
sentences:
- >-
Add "Primary Location Quantity" column in Suggestions section of
In-House Replenishments UI
- Stock and Min On Hand Column Sorting Not Working in Manage Products UI
- >-
Previous Surcharge and New Surcharge Displayed as Dollar Amount Instead
of Percentage in Product Price History
- source_sentence: Quantity field in Cart Items is not manually editable
sentences:
- >-
Unable to Search and Select Product in Select Product Catalog During
In-House Replenishment
- >-
Commodity Start At - Commodity End At Filter Not Working in Inventory
Master List Report
- "Customer Orders UI \x96 Display \"Return\" for Return Clone Orders in Type Column"
- source_sentence: >-
Inbound process blocks receiving when Expiration Date or Serial Number is
mandatory
sentences:
- '"Order Received" Button Not Functioning During Product Inbound'
- >-
Product stock becomes negative after POS delivery and stock count
displayed as -1
- Update Packing Slip date format to MM-DD-YYYY
- source_sentence: >-
Cycle Count Variance Report Displays No Data Despite Available Yearly
Inventory Count Records
sentences:
- >-
System allows counted quantity higher than available stock during cycle
count
- >-
Incorrect page title, wrong PDF icon, and latest variance data not
loading in Cycle Count Variance Report
- Move "Average Price" Menu From Reports to Warehouse > Manage Inventory
- source_sentence: >-
Misaligned Template Section Fields and Inconsistent Invoice Layout
Compared to UPS Orders
sentences:
- SKU Toggle Prints Commodity Code (CC) Instead of SKU in Location Labels
- >-
Inventory Master List Displays Active/Inactive Products While Manage
Products Uses Different Status Visibility Logic
- >-
PDF export button icon appears similar to Excel icon in Inventory Master
List report
pipeline_tag: sentence-similarity
library_name: sentence-transformers
metrics:
- pearson_cosine
- spearman_cosine
model-index:
- name: SentenceTransformer based on google/embeddinggemma-300m
results:
- task:
type: semantic-similarity
name: Semantic Similarity
dataset:
name: ticket similarity eval
type: ticket-similarity-eval
metrics:
- type: pearson_cosine
value: 0.8735255680387198
name: Pearson Cosine
- type: spearman_cosine
value: 0.819178435361286
name: Spearman Cosine
SentenceTransformer based on google/embeddinggemma-300m
This is a sentence-transformers model finetuned from google/embeddinggemma-300m. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for retrieval.
Model Details
Model Description
- Model Type: Sentence Transformer
- Base model: google/embeddinggemma-300m
- Maximum Sequence Length: 2048 tokens
- Output Dimensionality: 768 dimensions
- Similarity Function: Cosine Similarity
- Supported Modality: Text
Model Sources
- Documentation: Sentence Transformers Documentation
- Repository: Sentence Transformers on GitHub
- Hugging Face: Sentence Transformers on Hugging Face
Full Model Architecture
SentenceTransformer(
(0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'Gemma3TextModel'})
(1): Pooling({'embedding_dimension': 768, 'pooling_mode': 'mean', 'include_prompt': True})
(2): Dense({'in_features': 768, 'out_features': 3072, 'bias': False, 'activation_function': 'torch.nn.modules.linear.Identity', 'module_input_name': 'sentence_embedding', 'module_output_name': 'sentence_embedding'})
(3): Dense({'in_features': 3072, 'out_features': 768, 'bias': False, 'activation_function': 'torch.nn.modules.linear.Identity', 'module_input_name': 'sentence_embedding', 'module_output_name': 'sentence_embedding'})
(4): Normalize({})
)
Usage
Direct Usage (Sentence Transformers)
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("kevin-rice/embeddinggemma-ticket-similarity")
# Run inference
queries = [
'Misaligned Template Section Fields and Inconsistent Invoice Layout Compared to UPS Orders',
]
documents = [
'PDF export button icon appears similar to Excel icon in Inventory Master List report',
'Inventory Master List Displays Active/Inactive Products While Manage Products Uses Different Status Visibility Logic',
'SKU Toggle Prints Commodity Code (CC) Instead of SKU in Location Labels',
]
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.3035, 0.6568, 0.2639]])
Evaluation
Metrics
Semantic Similarity
- Dataset:
ticket-similarity-eval - Evaluated with
EmbeddingSimilarityEvaluator
| Metric | Value |
|---|---|
| pearson_cosine | 0.8735 |
| spearman_cosine | 0.8192 |
Training Details
Training Dataset
Unnamed Dataset
- Size: 315 training samples
- Columns:
sentence1,sentence2, andscore - Approximate statistics based on the first 315 samples:
sentence1 sentence2 score type string string float details - min: 10 tokens
- mean: 16.62 tokens
- max: 27 tokens
- min: 10 tokens
- mean: 16.83 tokens
- max: 27 tokens
- min: 0.0
- mean: 0.57
- max: 1.0
- Samples:
sentence1 sentence2 score View button icon under Action column is not displayed properlyUnable to Search and Select Product in Select Product Catalog During In-House Replenishment1.0Pick Assignment Throws Replenishment Error Even When Primary Location Has Available StockCycle Count Variance report not fetching latest cycle count data dynamically0.8Move Items UI should auto-hide location selection when only one Primary location existsPrimary Location not populated when product is fetched using Scan/Search Barcode in In-House Replenishment0.8 - Loss:
CosineSimilarityLosswith these parameters:{ "loss_fct": "torch.nn.modules.loss.MSELoss", "cos_score_transformation": "torch.nn.modules.linear.Identity" }
Evaluation Dataset
Unnamed Dataset
- Size: 79 evaluation samples
- Columns:
sentence1,sentence2, andscore - Approximate statistics based on the first 79 samples:
sentence1 sentence2 score type string string float details - min: 10 tokens
- mean: 16.51 tokens
- max: 25 tokens
- min: 11 tokens
- mean: 17.03 tokens
- max: 26 tokens
- min: 0.0
- mean: 0.63
- max: 1.0
- Samples:
sentence1 sentence2 score Update Packing Slip date format to MM-DD-YYYYAccounting Template data is not fetching under Template column in Sales History By Item report0.8Update Comments Section Format and Merge Herman ID / Employee ID FieldOrder With Quantity Exceeding Available Primary Stock Is Marked Delivered Instead of Back Order and Creates Negative Stock0.0Default distribution center comment is not displayed in Comments sectionUpdate Packing Slip date format to MM-DD-YYYY0.8 - Loss:
CosineSimilarityLosswith these parameters:{ "loss_fct": "torch.nn.modules.loss.MSELoss", "cos_score_transformation": "torch.nn.modules.linear.Identity" }
Training Hyperparameters
Non-Default Hyperparameters
per_device_train_batch_size: 4learning_rate: 2e-05warmup_steps: 0.1fp16: Trueper_device_eval_batch_size: 4
All Hyperparameters
Click to expand
per_device_train_batch_size: 4num_train_epochs: 3max_steps: -1learning_rate: 2e-05lr_scheduler_type: linearlr_scheduler_kwargs: Nonewarmup_steps: 0.1optim: adamw_torch_fusedoptim_args: Noneweight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08optim_target_modules: Nonegradient_accumulation_steps: 1average_tokens_across_devices: Truemax_grad_norm: 1.0label_smoothing_factor: 0.0bf16: Falsefp16: Truebf16_full_eval: Falsefp16_full_eval: Falsetf32: Nonegradient_checkpointing: Falsegradient_checkpointing_kwargs: Nonetorch_compile: Falsetorch_compile_backend: Nonetorch_compile_mode: Noneuse_liger_kernel: Falseliger_kernel_config: Noneuse_cache: Falseneftune_noise_alpha: Nonetorch_empty_cache_steps: Noneauto_find_batch_size: Falselog_on_each_node: Truelogging_nan_inf_filter: Trueinclude_num_input_tokens_seen: nolog_level: passivelog_level_replica: warningdisable_tqdm: Falseproject: huggingfacetrackio_space_id: Nonetrackio_bucket_id: Nonetrackio_static_space_id: Noneper_device_eval_batch_size: 4prediction_loss_only: Trueeval_on_start: Falseeval_do_concat_batches: Trueeval_use_gather_object: Falseeval_accumulation_steps: Noneinclude_for_metrics: []batch_eval_metrics: Falsesave_only_model: Falsesave_on_each_node: Falseenable_jit_checkpoint: Falsepush_to_hub: Falsehub_private_repo: Nonehub_model_id: Nonehub_strategy: every_savehub_always_push: Falsehub_revision: Noneload_best_model_at_end: Falseignore_data_skip: Falserestore_callback_states_from_checkpoint: Falsefull_determinism: Falseseed: 42data_seed: Noneuse_cpu: Falseaccelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}parallelism_config: Nonedataloader_drop_last: Falsedataloader_num_workers: 0dataloader_pin_memory: Truedataloader_persistent_workers: Falsedataloader_prefetch_factor: Noneremove_unused_columns: Truelabel_names: Nonetrain_sampling_strategy: randomlength_column_name: lengthddp_find_unused_parameters: Noneddp_bucket_cap_mb: Noneddp_broadcast_buffers: Falseddp_static_graph: Noneddp_backend: Noneddp_timeout: 1800fsdp: []fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}deepspeed: Nonedebug: []skip_memory_metrics: Truedo_predict: Falseresume_from_checkpoint: Nonewarmup_ratio: Nonelocal_rank: -1prompts: Nonebatch_sampler: batch_samplermulti_dataset_batch_sampler: proportionalrouter_mapping: {}learning_rate_mapping: {}
Training Logs
| Epoch | Step | Training Loss | Validation Loss | ticket-similarity-eval_spearman_cosine |
|---|---|---|---|---|
| 0.0633 | 5 | 0.1581 | - | - |
| 0.1266 | 10 | 0.1581 | - | - |
| 0.1899 | 15 | 0.1117 | - | - |
| 0.2532 | 20 | 0.0869 | 0.0750 | 0.6907 |
| 0.3165 | 25 | 0.0651 | - | - |
| 0.3797 | 30 | 0.0590 | - | - |
| 0.4430 | 35 | 0.0580 | - | - |
| 0.5063 | 40 | 0.0698 | 0.1141 | 0.5602 |
| 0.5696 | 45 | 0.1079 | - | - |
| 0.6329 | 50 | 0.0932 | - | - |
| 0.6962 | 55 | 0.0762 | - | - |
| 0.7595 | 60 | 0.0938 | 0.0637 | 0.7089 |
| 0.8228 | 65 | 0.1259 | - | - |
| 0.8861 | 70 | 0.0735 | - | - |
| 0.9494 | 75 | 0.0276 | - | - |
| 1.0127 | 80 | 0.0551 | 0.0607 | 0.7692 |
| 1.0759 | 85 | 0.0788 | - | - |
| 1.1392 | 90 | 0.0807 | - | - |
| 1.2025 | 95 | 0.0334 | - | - |
| 1.2658 | 100 | 0.0508 | 0.0687 | 0.7471 |
| 1.3291 | 105 | 0.0719 | - | - |
| 1.3924 | 110 | 0.0404 | - | - |
| 1.4557 | 115 | 0.0143 | - | - |
| 1.5190 | 120 | 0.0740 | 0.0630 | 0.7372 |
| 1.5823 | 125 | 0.0410 | - | - |
| 1.6456 | 130 | 0.0483 | - | - |
| 1.7089 | 135 | 0.0629 | - | - |
| 1.7722 | 140 | 0.0513 | 0.0483 | 0.7610 |
| 1.8354 | 145 | 0.0175 | - | - |
| 1.8987 | 150 | 0.0397 | - | - |
| 1.9620 | 155 | 0.0341 | - | - |
| 2.0253 | 160 | 0.0223 | 0.0478 | 0.7755 |
| 2.0886 | 165 | 0.0167 | - | - |
| 2.1519 | 170 | 0.0230 | - | - |
| 2.2152 | 175 | 0.0600 | - | - |
| 2.2785 | 180 | 0.0357 | 0.0412 | 0.8031 |
| 2.3418 | 185 | 0.0479 | - | - |
| 2.4051 | 190 | 0.0172 | - | - |
| 2.4684 | 195 | 0.0183 | - | - |
| 2.5316 | 200 | 0.0213 | 0.0399 | 0.8162 |
| 2.5949 | 205 | 0.0115 | - | - |
| 2.6582 | 210 | 0.0305 | - | - |
| 2.7215 | 215 | 0.0101 | - | - |
| 2.7848 | 220 | 0.0189 | 0.0388 | 0.8229 |
| 2.8481 | 225 | 0.0249 | - | - |
| 2.9114 | 230 | 0.0104 | - | - |
| 2.9747 | 235 | 0.0099 | - | - |
| 3.0 | 237 | - | 0.0391 | 0.8192 |
Training Time
- Training: 46.3 minutes
Framework Versions
- Python: 3.12.13
- Sentence Transformers: 5.4.1
- Transformers: 5.7.0
- PyTorch: 2.10.0+cu128
- Accelerate: 1.13.0
- Datasets: 4.8.5
- Tokenizers: 0.22.2
Citation
BibTeX
Sentence Transformers
@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",
}