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 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
  • Maximum Sequence Length: 2048 tokens
  • Output Dimensionality: 768 dimensions
  • Similarity Function: Cosine Similarity

Model Sources

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:

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("Netizine/icis_commodity_embedding")
# Run inference
queries = [
    "Any new import inspections, permits, or customs delays affecting inbound post-consumer black HDPE bales into Vietnam this quarter?",
]
documents = [
    'Market sources said Vietnam has maintained tighter inspection rates and documentation checks on inbound post-consumer black HDPE bales this quarter, extending customs clearance to roughly 10-15 working days in some cases, but without a major new permit requirement.',
    'Deals and discussions for spot imports of HDPE have taken place at $960-970/tonne CFR (cost & freight) Vietnam, compared with the $1,030-1,050/tonne CFR Vietnam assessment range in the week ended 15 September.',
    'Container freight indications from Ningbo to Hamburg were heard at roughly $2,000-2,300 per 40ft this week (about $80-100/t), adding to CIF Europe ideas for imported white rHDPE blow moulding pellets even as netbacks stayed steady.',
]
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.9667, 0.0020, 0.0885]])

Training Details

Training Dataset

Unnamed Dataset

  • Size: 42,280 training samples
  • Columns: anchor, positive, and negative
  • Approximate statistics based on the first 1000 samples:
    anchor positive negative
    type string string string
    details
    • min: 18 tokens
    • mean: 30.35 tokens
    • max: 50 tokens
    • min: 33 tokens
    • mean: 57.04 tokens
    • max: 255 tokens
    • min: 10 tokens
    • mean: 33.34 tokens
    • max: 96 tokens
  • Samples:
    anchor positive negative
    Can you give the latest ICIS range for rLDPE pellets, post-consumer, colourless, FCA Rotterdam/Antwerp? ICIS assessed post-consumer colourless rLDPE pellets at €1,070-1,170/t FCA Rotterdam/Antwerp in the week to 21 February 2026. ICIS began pricing R-HDPE natural blow-moulding pellets in May 2020.
    What are traders paying this week for PCR LDPE colourless pellets (post-consumer) delivered to Lombardy, Italy (DDP)? This week, post-consumer colourless PCR LDPE pellet business was heard around €1,180-1,280/t DDP Lombardy, with better-filtered, low-odour lots at the top of the range. Colourless (C) polyethylene terephthalate (PET) post-consumer bottle bale prices have increased in Italy in the latest monthly auction, adding upwards pressure to both recycled PET (R-PET) C flake and food-grade pellet (FGP) prices in the country, which reflects a common theme for January being felt across the wider European market.
    How did the weekly assessment for post-consumer colourless rLDPE pellets in NWE change versus last week? The ICIS weekly assessment for post-consumer colourless rLDPE pellets FCA Rotterdam/Antwerp fell by €20/t week on week to €1,070-1,170/t as buyers resisted higher offers. Consumption of flexible R-LDPE pellets has increased in April in NWE, although this remains counterbalanced by high stock levels.
  • Loss: MultipleNegativesRankingLoss with these parameters:
    {
        "scale": 20.0,
        "similarity_fct": "cos_sim",
        "gather_across_devices": false
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • per_device_train_batch_size: 16
  • learning_rate: 2e-05
  • num_train_epochs: 5
  • warmup_ratio: 0.1
  • prompts: {'anchor': 'task: search result | query: ', 'positive': 'title: none | text: ', 'negative': 'title: none | text: '}

All Hyperparameters

Click to expand
  • overwrite_output_dir: False
  • do_predict: False
  • eval_strategy: no
  • prediction_loss_only: True
  • per_device_train_batch_size: 16
  • per_device_eval_batch_size: 8
  • per_gpu_train_batch_size: None
  • per_gpu_eval_batch_size: None
  • gradient_accumulation_steps: 1
  • 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.1
  • 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: False
  • 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_fused
  • 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: {'anchor': 'task: search result | query: ', 'positive': 'title: none | text: ', 'negative': 'title: none | text: '}
  • batch_sampler: batch_sampler
  • multi_dataset_batch_sampler: proportional
  • router_mapping: {}
  • learning_rate_mapping: {}

Training Logs

Click to expand
Epoch Step Training Loss
0.0378 100 0.0336
0.0757 200 0.0013
0.1135 300 0.0009
0.1513 400 0.0015
0.1892 500 0.0019
0.2270 600 0.0013
0.2649 700 0.0034
0.3027 800 0.0046
0.3405 900 0.0007
0.3784 1000 0.0009
0.4162 1100 0.0022
0.4540 1200 0.0107
0.4919 1300 0.0081
0.5297 1400 0.0111
0.5675 1500 0.0052
0.6054 1600 0.0013
0.6432 1700 0.0108
0.6810 1800 0.0055
0.7189 1900 0.0042
0.7567 2000 0.0056
0.7946 2100 0.0034
0.8324 2200 0.0051
0.8702 2300 0.0021
0.9081 2400 0.0022
0.9459 2500 0.0089
0.9837 2600 0.0036
1.0216 2700 0.0013
1.0594 2800 0.0019
1.0972 2900 0.0015
1.1351 3000 0.0008
1.1729 3100 0.001
1.2107 3200 0.003
1.2486 3300 0.0013
1.2864 3400 0.0017
1.3243 3500 0.0008
1.3621 3600 0.0004
1.3999 3700 0.0012
1.4378 3800 0.0022
1.4756 3900 0.0032
1.5134 4000 0.0011
1.5513 4100 0.0016
1.5891 4200 0.0014
1.6269 4300 0.0024
1.6648 4400 0.0038
1.7026 4500 0.0015
1.7404 4600 0.0008
1.7783 4700 0.001
1.8161 4800 0.0006
1.8540 4900 0.0011
1.8918 5000 0.001
1.9296 5100 0.001
1.9675 5200 0.0013
2.0053 5300 0.0011
2.0431 5400 0.0005
2.0810 5500 0.0004
2.1188 5600 0.0009
2.1566 5700 0.001
2.1945 5800 0.0005
2.2323 5900 0.0012
2.2701 6000 0.0024
2.3080 6100 0.0006
2.3458 6200 0.0002
2.3837 6300 0.0005
2.4215 6400 0.0003
2.4593 6500 0.0004
2.4972 6600 0.0003
2.5350 6700 0.0006
2.5728 6800 0.0005
2.6107 6900 0.0005
2.6485 7000 0.0004
2.6863 7100 0.0007
2.7242 7200 0.0005
2.7620 7300 0.0003
2.7998 7400 0.0005
2.8377 7500 0.0007
2.8755 7600 0.0009
2.9134 7700 0.0002
2.9512 7800 0.0001
2.9890 7900 0.0012
3.0269 8000 0.0004
3.0647 8100 0.0014
3.1025 8200 0.0003
3.1404 8300 0.0004
3.1782 8400 0.0003
3.2160 8500 0.0002
3.2539 8600 0.0003
3.2917 8700 0.0002
3.3295 8800 0.0001
3.3674 8900 0.0003
3.4052 9000 0.0002
3.4431 9100 0.0001
3.4809 9200 0.0001
3.5187 9300 0.0003
3.5566 9400 0.0006
3.5944 9500 0.0002
3.6322 9600 0.0001
3.6701 9700 0.0002
3.7079 9800 0.0007
3.7457 9900 0.0001
3.7836 10000 0.0001
3.8214 10100 0.0002
3.8593 10200 0.0003
3.8971 10300 0.0001
3.9349 10400 0.0002
3.9728 10500 0.0001
4.0106 10600 0.0002
4.0484 10700 0.0002
4.0863 10800 0.0001
4.1241 10900 0.0003
4.1619 11000 0.0001
4.1998 11100 0.0001
4.2376 11200 0.0002
4.2754 11300 0.0004
4.3133 11400 0.0003
4.3511 11500 0.0001
4.3890 11600 0.0001
4.4268 11700 0.0001
4.4646 11800 0.0001
4.5025 11900 0.0005
4.5403 12000 0.0004
4.5781 12100 0.0001
4.6160 12200 0.0002
4.6538 12300 0.0001
4.6916 12400 0.0001
4.7295 12500 0.0001
4.7673 12600 0.0001
4.8051 12700 0.0
4.8430 12800 0.0001
4.8808 12900 0.0007
4.9187 13000 0.0001
4.9565 13100 0.0008
4.9943 13200 0.0001

Framework Versions

  • Python: 3.12.12
  • Sentence Transformers: 5.2.3
  • Transformers: 4.57.0.dev0
  • PyTorch: 2.10.0+cu128
  • Accelerate: 1.12.0
  • Datasets: 4.5.0
  • 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",
}

MultipleNegativesRankingLoss

@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}
}
Downloads last month
33
Safetensors
Model size
0.3B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Netizine/icis_commodity_embedding

Finetuned
(264)
this model

Papers for Netizine/icis_commodity_embedding