Jrine's picture
first
aa13d59 verified
|
Raw
History Blame Contribute Delete
20.1 kB
metadata
tags:
  - sentence-transformers
  - sentence-similarity
  - feature-extraction
  - dense
  - generated_from_trainer
  - dataset_size:52
  - loss:CosineSimilarityLoss
widget:
  - source_sentence: >-
      Students will be able to analyse and evaluate moderate or severe food
      insecurity in the population in the context of end hunger, achieve food
      security and improved nutrition and promote sustainable agriculture
    sentences:
      - >-
        SDG 2 - Zero Hunger: End hunger, achieve food security and improved
        nutrition and promote sustainable agriculture. Target 2.1: By 2030, end
        hunger and ensure access by all people to safe, nutritious and
        sufficient food all year round. Indicator 2.1.2: Prevalence of moderate
        or severe food insecurity in the population
      - >-
        SDG 3 - Good Health and Well-Being: Ensure healthy lives and promote
        well-being for all at all ages. Target 3.8: Achieve universal health
        coverage, including financial risk protection, access to quality
        essential health-care services and access to safe effective medicines
        and vaccines for all. Indicator 3.8.1: Coverage of essential health
        services
      - >-
        SDG 17 - Partnerships for the Goals: Strengthen the means of
        implementation and revitalize the Global Partnership for Sustainable
        Development. Target 17.8: Fully operationalize the technology bank and
        science technology and innovation capacity-building mechanism for least
        developed countries. Indicator 17.8.1: Proportion of individuals using
        the Internet
  - source_sentence: >-
      Students will apply nutrition science principles to design diet plans for
      maternal and child health
    sentences:
      - >-
        SDG 6 - Clean Water and Sanitation: Ensure availability and sustainable
        management of water and sanitation for all. Target 6.2: By 2030, achieve
        access to adequate and equitable sanitation and hygiene for all and end
        open defecation. Indicator 6.2.1: Proportion of population using safely
        managed sanitation services and a hand-washing facility with soap and
        water
      - >-
        SDG 3 - Good Health and Well-Being: Ensure healthy lives and promote
        well-being for all at all ages. Target 3.3: By 2030, end the epidemics
        of AIDS, tuberculosis, malaria and neglected tropical diseases and
        combat hepatitis and other communicable diseases. Indicator 3.3.1:
        Number of new HIV infections per 1,000 uninfected population
      - >-
        SDG 5 - Gender Equality: Achieve gender equality and empower all women
        and girls. Target 5.1: End all forms of discrimination against all women
        and girls everywhere. Indicator 5.1.1: Whether or not legal frameworks
        are in place to promote enforce and monitor equality and
        non-discrimination on the basis of sex
  - source_sentence: >-
      Students will be able to analyse and evaluate direct economic loss
      attributed to disasters in relation to global gross domestic product in
      the context of end poverty in all its forms everywhere
    sentences:
      - >-
        SDG 15 - Life on Land: Protect restore and promote sustainable use of
        terrestrial ecosystems sustainably manage forests combat desertification
        and halt biodiversity loss. Target 15.5: Take urgent and significant
        action to reduce the degradation of natural habitats halt the loss of
        biodiversity and protect and prevent the extinction of threatened
        species. Indicator 15.5.1: Red List Index
      - >-
        SDG 15 - Life on Land: Protect restore and promote sustainable use of
        terrestrial ecosystems sustainably manage forests combat desertification
        and halt biodiversity loss. Target 15.1: By 2020, ensure the
        conservation restoration and sustainable use of terrestrial and inland
        freshwater ecosystems including forests wetlands mountains and drylands.
        Indicator 15.1.2: Proportion of important sites for terrestrial and
        freshwater biodiversity that are covered by protected areas
      - >-
        SDG 4 - Quality Education: Ensure inclusive and equitable quality
        education and promote lifelong learning opportunities for all. Target
        4.1: By 2030, ensure that all girls and boys complete free equitable and
        quality primary and secondary education leading to relevant and
        effective learning outcomes. Indicator 4.1.1: Proportion of children and
        young people achieving at least a minimum proficiency level in reading
        and mathematics
  - source_sentence: >-
      Students will evaluate the effectiveness of renewable energy policies in
      reducing carbon emissions
    sentences:
      - >-
        SDG 3 - Good Health and Well-Being: Ensure healthy lives and promote
        well-being for all at all ages. Target 3.3: By 2030, end the epidemics
        of AIDS, tuberculosis, malaria and neglected tropical diseases and
        combat hepatitis and other communicable diseases. Indicator 3.3.3:
        Malaria incidence per 1,000 population
      - >-
        SDG 4 - Quality Education: Ensure inclusive and equitable quality
        education and promote lifelong learning opportunities for all. Target
        4.1: By 2030, ensure that all girls and boys complete free equitable and
        quality primary and secondary education leading to relevant and
        effective learning outcomes. Indicator 4.1.2: Completion rate in primary
        education, lower secondary education, upper secondary education
      - >-
        SDG 13 - Climate Action: Take urgent action to combat climate change and
        its impacts. Target 13.2: Integrate climate change measures into
        national policies strategies and planning. Indicator 13.2.1: Number of
        countries with nationally determined contributions long-term strategies
        national adaptation plans
  - source_sentence: >-
      Students will be able to analyse and evaluate red list index in the
      context of protect restore and promote sustainable use of terrestrial
      ecosystems sustainably manage forests combat desertification and halt
      biodiversity loss
    sentences:
      - >-
        SDG 8 - Decent Work and Economic Growth: Promote sustained, inclusive
        and sustainable economic growth, full and productive employment and
        decent work for all. Target 8.8: Protect labour rights and promote safe
        and secure working environments for all workers including migrant
        workers. Indicator 8.8.2: Level of national compliance with labour
        rights including freedom of association and collective bargaining
      - >-
        SDG 15 - Life on Land: Protect restore and promote sustainable use of
        terrestrial ecosystems sustainably manage forests combat desertification
        and halt biodiversity loss. Target 15.1: By 2020, ensure the
        conservation restoration and sustainable use of terrestrial and inland
        freshwater ecosystems including forests wetlands mountains and drylands.
        Indicator 15.1.1: Forest area as a proportion of total land area
      - >-
        SDG 5 - Gender Equality: Achieve gender equality and empower all women
        and girls. Target 5.b: Enhance the use of enabling technology in
        particular information and communications technology to promote the
        empowerment of women. Indicator 5.b.1: Proportion of individuals who own
        a mobile telephone, by sex
pipeline_tag: sentence-similarity
library_name: sentence-transformers

SentenceTransformer

This is a sentence-transformers model trained. 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
  • Maximum Sequence Length: 384 tokens
  • Output Dimensionality: 768 dimensions
  • Similarity Function: Cosine Similarity

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 384, 'do_lower_case': False, 'architecture': 'MPNetModel'})
  (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): 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("sentence_transformers_model_id")
# Run inference
sentences = [
    'Students will be able to analyse and evaluate red list index in the context of protect restore and promote sustainable use of terrestrial ecosystems sustainably manage forests combat desertification and halt biodiversity loss',
    'SDG 5 - Gender Equality: Achieve gender equality and empower all women and girls. Target 5.b: Enhance the use of enabling technology in particular information and communications technology to promote the empowerment of women. Indicator 5.b.1: Proportion of individuals who own a mobile telephone, by sex',
    'SDG 15 - Life on Land: Protect restore and promote sustainable use of terrestrial ecosystems sustainably manage forests combat desertification and halt biodiversity loss. Target 15.1: By 2020, ensure the conservation restoration and sustainable use of terrestrial and inland freshwater ecosystems including forests wetlands mountains and drylands. Indicator 15.1.1: Forest area as a proportion of total land area',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[ 1.0000, -0.0038,  0.6881],
#         [-0.0038,  1.0000,  0.0142],
#         [ 0.6881,  0.0142,  1.0000]])

Training Details

Training Dataset

Unnamed Dataset

  • Size: 52 training samples
  • Columns: sentence_0, sentence_1, and label
  • Approximate statistics based on the first 52 samples:
    sentence_0 sentence_1 label
    type string string float
    details
    • min: 15 tokens
    • mean: 32.27 tokens
    • max: 51 tokens
    • min: 51 tokens
    • mean: 71.71 tokens
    • max: 88 tokens
    • min: 0.0
    • mean: 0.42
    • max: 1.0
  • Samples:
    sentence_0 sentence_1 label
    Students will be able to analyse and evaluate informal employment in total employment, by sector and sex in the context of promote sustained, inclusive and sustainable economic growth, full and productive employment and decent work for all SDG 8 - Decent Work and Economic Growth: Promote sustained, inclusive and sustainable economic growth, full and productive employment and decent work for all. Target 8.3: Promote development-oriented policies that support productive activities, decent job creation, entrepreneurship, creativity and innovation. Indicator 8.3.1: Proportion of informal employment in total employment, by sector and sex 1.0
    Students will design sustainable urban drainage systems to manage stormwater in cities SDG 11 - Sustainable Cities and Communities: Make cities and human settlements inclusive, safe, resilient and sustainable. Target 11.2: By 2030, provide access to safe affordable accessible and sustainable transport systems for all improving road safety notably by expanding public transport. Indicator 11.2.1: Proportion of population that has convenient access to public transport 1.0
    Students will evaluate the effectiveness of renewable energy policies in reducing carbon emissions SDG 13 - Climate Action: Take urgent action to combat climate change and its impacts. Target 13.1: Strengthen resilience and adaptive capacity to climate-related hazards and natural disasters in all countries. Indicator 13.1.2: Number of countries that adopt and implement national disaster risk reduction strategies 1.0
  • Loss: CosineSimilarityLoss with these parameters:
    {
        "loss_fct": "torch.nn.modules.loss.MSELoss"
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • num_train_epochs: 2
  • multi_dataset_batch_sampler: round_robin

All Hyperparameters

Click to expand
  • do_predict: False
  • eval_strategy: no
  • prediction_loss_only: True
  • per_device_train_batch_size: 8
  • per_device_eval_batch_size: 8
  • gradient_accumulation_steps: 1
  • eval_accumulation_steps: None
  • torch_empty_cache_steps: None
  • learning_rate: 5e-05
  • weight_decay: 0.0
  • adam_beta1: 0.9
  • adam_beta2: 0.999
  • adam_epsilon: 1e-08
  • max_grad_norm: 1
  • num_train_epochs: 2
  • max_steps: -1
  • lr_scheduler_type: linear
  • lr_scheduler_kwargs: None
  • warmup_ratio: None
  • warmup_steps: 0
  • log_level: passive
  • log_level_replica: warning
  • log_on_each_node: True
  • logging_nan_inf_filter: True
  • enable_jit_checkpoint: False
  • save_on_each_node: False
  • save_only_model: False
  • restore_callback_states_from_checkpoint: False
  • use_cpu: False
  • seed: 42
  • data_seed: None
  • bf16: False
  • fp16: False
  • bf16_full_eval: False
  • fp16_full_eval: False
  • tf32: None
  • local_rank: -1
  • ddp_backend: None
  • debug: []
  • dataloader_drop_last: False
  • dataloader_num_workers: 0
  • dataloader_prefetch_factor: None
  • disable_tqdm: False
  • remove_unused_columns: True
  • label_names: None
  • load_best_model_at_end: False
  • ignore_data_skip: False
  • fsdp: []
  • fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
  • 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
  • group_by_length: False
  • length_column_name: length
  • project: huggingface
  • trackio_space_id: trackio
  • 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
  • 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_for_metrics: []
  • eval_do_concat_batches: True
  • auto_find_batch_size: False
  • full_determinism: False
  • ddp_timeout: 1800
  • torch_compile: False
  • torch_compile_backend: None
  • torch_compile_mode: None
  • include_num_input_tokens_seen: no
  • 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: True
  • use_cache: False
  • prompts: None
  • batch_sampler: batch_sampler
  • multi_dataset_batch_sampler: round_robin
  • router_mapping: {}
  • learning_rate_mapping: {}

Framework Versions

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