CoolFace
Modelpublic

woodman231/minilm-l6-monster-sanctuary

sourceHugging Faceapache-2.0updated 10mo agoView on Hugging Face
0likes75downloads
Model Card

Monster Sanctuary Domain Embedding Model

This is a sentence-transformers model finetuned from sentence-transformers/all-MiniLM-L6-v2 on the monster-sanctuary-conversations dataset. It maps sentences & paragraphs to a 384-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: sentence-transformers/all-MiniLM-L6-v2 <!-- at revision c9745ed1d9f207416be6d2e6f8de32d1f16199bf -->
  • —Maximum Sequence Length: 256 tokens
  • —Output Dimensionality: 384 dimensions
  • —Similarity Function: Cosine Similarity
  • —Training Dataset:
  • —monster-sanctuary-conversations
  • —Language: en
  • —License: apache-2.0

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 256, 'do_lower_case': False, 'architecture': 'BertModel'})
  (1): Pooling({'word_embedding_dimension': 384, '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:

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("woodman231/minilm-l6-monster-sanctuary")
# Run inference
sentences = [
    'Which monster can be hatched from the item Mega Potion?',
    'The item Mega Potion does not hatch into any monster.',
    'The cost of Ocarina+3 is 3500 gold.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[ 1.0000,  0.9527, -0.0061],
#         [ 0.9527,  1.0000, -0.0173],
#         [-0.0061, -0.0173,  1.0000]])

<!--

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. -->

<!--

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

monster-sanctuary-conversations
  • —Dataset: monster-sanctuary-conversations at fb621dc
  • —Size: 9,103 training samples
  • —Columns: <code>anchor</code> and <code>positive</code>
  • —Approximate statistics based on the first 1000 samples: | | anchor | positive | |:--------|:----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------| | type | string | string | | details | <ul><li>min: 8 tokens</li><li>mean: 12.92 tokens</li><li>max: 18 tokens</li></ul> | <ul><li>min: 9 tokens</li><li>mean: 26.31 tokens</li><li>max: 256 tokens</li></ul> |
  • —Samples: | anchor | positive | |:---------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------| | <code>Which monster can be hatched from the item Fan+3?</code> | <code>The item Fan+3 does not hatch into any monster.</code> | | <code>Which items can Infinity Flame+2 be upgraded to?</code> | <code>The item Infinity Flame+2 can be upgraded to: Infinity Flame+3. It requires the following materials: 1 x Crimson Gem, 1 x Azure Gem, 1 x Verdant Gem.</code> | | <code>Which monsters drop the item Lucky Clover?</code> | <code>The item Lucky Clover is not dropped by any monsters.</code> |
  • —Loss: <code>MultipleNegativesRankingLoss</code> with these parameters:
json
  {
      "scale": 20.0,
      "similarity_fct": "cos_sim",
      "gather_across_devices": false
  }

Evaluation Dataset

monster-sanctuary-conversations
  • —Dataset: monster-sanctuary-conversations at fb621dc
  • —Size: 1,012 evaluation samples
  • —Columns: <code>anchor</code> and <code>positive</code>
  • —Approximate statistics based on the first 1000 samples: | | anchor | positive | |:--------|:----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------| | type | string | string | | details | <ul><li>min: 8 tokens</li><li>mean: 12.95 tokens</li><li>max: 18 tokens</li></ul> | <ul><li>min: 10 tokens</li><li>mean: 29.16 tokens</li><li>max: 256 tokens</li></ul> |
  • —Samples: | anchor | positive | |:--------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | <code>What Magical Damage Elements does Toxiquus deal?</code> | <code>The magical damage elements dealt by Toxiquus are:<br>- Wind<br>- Earth.</code> | | <code>What is the cost of the item Cestus+2?</code> | <code>The cost of Cestus+2 is 850 gold.</code> | | <code>What item can Steel be used to upgrade?</code> | <code>The item Steel can be used to upgrade the following items:<br>- Abyssal Sword+3 (requires 1)<br>- Abyssal Sword+4 (requires 3)<br>- Belt+3 (requires 2)<br>- Belt+4 (requires 2)<br>- Bow+3 (requires 2)<br>- Bracelet+3 (requires 2)<br>- Bracelet+4 (requires 4)<br>- Bracer+3 (requires 2)<br>- Bracer+4 (requires 4)<br>- Buckler+3 (requires 2)<br>- Cauldron+3 (requires 2)<br>- Cestus+3 (requires 2)<br>- Cestus+4 (requires 4)<br>- Charging Sphere+3 (requires 4)<br>- Claws+3 (requires 2)<br>- Claws+4 (requires 4)<br>- Dumbbell+3 (requires 2)<br>- Dumbbell+4 (requires 2)<br>- Fang+3 (requires 1)<br>- Fang+4 (requires 2)<br>- Gauntlet+3 (requires 2)<br>- Gauntlet+4 (requires 4)<br>- Hammer+3 (requires 2)<br>- Hammer+4 (requires 4)<br>- Heavy Mace+3 (requires 2)<br>- Heavy Mace+4 (requires 4)<br>- Helmet+3 (requires 2)<br>- Helmet+4 (requires 3)<br>- Hourglass+3 (requires 1)<br>- Hourglass+4 (requires 2)<br>- Katana+3 (requires 1)<br>- Katana+4 (requires 2)<br>- Katar+3 (requires 2)<br>- Katar+4 (requires 4)<br>- Kunai+3 (requires 2)<br>- Kunai+4 (requires 4)<br>- Large Shield+3 (requires 1)<br>- Large Shie...</code> |
  • —Loss: <code>MultipleNegativesRankingLoss</code> with these parameters:
json
  {
      "scale": 20.0,
      "similarity_fct": "cos_sim",
      "gather_across_devices": false
  }

Training Hyperparameters

Non-Default Hyperparameters
  • —eval_strategy: epoch
  • —per_device_train_batch_size: 32
  • —per_device_eval_batch_size: 32
  • —learning_rate: 2e-05
  • —num_train_epochs: 5
  • —warmup_ratio: 0.1
  • —fp16: True
  • —batch_sampler: no_duplicates
All Hyperparameters

<details><summary>Click to expand</summary>

  • —overwrite_output_dir: False
  • —do_predict: False
  • —eval_strategy: epoch
  • —prediction_loss_only: True
  • —per_device_train_batch_size: 32
  • —per_device_eval_batch_size: 32
  • —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
  • —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: {'minnumparams': 0, 'xla': False, 'xlafsdpv2': False, 'xlafsdpgrad_ckpt': False}
  • —fsdp_transformer_layer_cls_to_wrap: None
  • —accelerator_config: {'splitbatches': False, 'dispatchbatches': None, 'evenbatches': True, 'useseedablesampler': True, 'nonblocking': False, 'gradientaccumulationkwargs': None}
  • —parallelism_config: None
  • —deepspeed: None
  • —label_smoothing_factor: 0.0
  • —optim: adamwtorchfused
  • —optim_args: None
  • —adafactor: False
  • —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
  • —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: 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
  • —prompts: None
  • —batch_sampler: no_duplicates
  • —multi_dataset_batch_sampler: proportional
  • —router_mapping: {}
  • —learning_rate_mapping: {}

</details>

Training Logs

EpochStepTraining LossValidation Loss
0.1754500.0223-
0.35091000.007-
0.52631500.0037-
0.70182000.0028-
0.87722500.0024-
1.0285-0.0012
1.05263000.0029-
1.22813500.0011-
1.40354000.0018-
1.57894500.0008-
1.75445000.0013-
1.92985500.0007-
2.0570-0.0007
2.10536000.0011-
2.28076500.0011-
2.45617000.0011-
2.63167500.0009-
2.80708000.0008-
2.98258500.0008-
3.0855-0.0004
3.15799000.0009-
3.33339500.0017-
3.508810000.0014-
3.684210500.0008-
3.859611000.0007-
4.01140-0.0004
4.035111500.002-
4.210512000.0008-
4.386012500.0009-
4.561413000.0011-
4.736813500.0005-
4.912314000.0008-
5.01425-0.0004

Framework Versions

  • —Python: 3.10.12
  • —Sentence Transformers: 5.1.2
  • —Transformers: 4.57.1
  • —PyTorch: 2.9.1+cu128
  • —Accelerate: 1.11.0
  • —Datasets: 4.4.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",
}
MultipleNegativesRankingLoss
bibtex
@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}
}

<!--

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. -->