SentenceTransformer based on Almawave/Velvet-2B
This is a sentence-transformers model finetuned from Almawave/Velvet-2B. It maps sentences & paragraphs to a 2048-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: Almawave/Velvet-2B
- Maximum Sequence Length: 32768 tokens
- Output Dimensionality: 2048 dimensions
- Similarity Function: Cosine Similarity
Model Sources
- Documentation: Sentence Transformers Documentation
- Repository: Sentence Transformers on GitHub
- Hugging Face: Sentence Transformers on Hugging Face
Full Model Architecture
SentenceTransformer(
(0): Transformer({'max_seq_length': 32768, 'do_lower_case': False}) with Transformer model: MistralModel
(1): Pooling({'word_embedding_dimension': 2048, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': True, '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("ancc/Velvet-2B-embedding-news")
# Run inference
sentences = [
"NBA, dopo l’addio a Schroeder i Nets promuovono Simmons in quintetto: l'idea è correre",
'Italia Viva e +Europa non parteciperanno alle elezioni regionali in Liguria',
'Achille Costacurta rivela: «Sono stato rinchiuso per un anno e sette mesi in un centro penale',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 2048]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
Evaluation
Metrics
Paraphrase Mining
- Evaluated with
ParaphraseMiningEvaluator
Metric | Value |
---|---|
average_precision | 0.5284 |
f1 | 0.5502 |
precision | 0.5568 |
recall | 0.5439 |
threshold | 0.931 |
Training Details
Training Dataset
Unnamed Dataset
- Size: 152,913 training samples
- Columns:
sentence
andlabel
- Approximate statistics based on the first 1000 samples:
sentence label type string int details - min: 3 tokens
- mean: 19.14 tokens
- max: 47 tokens
- 0: ~0.50%
- 1: ~0.50%
- 2: ~0.50%
- 3: ~0.50%
- 4: ~0.50%
- 5: ~0.20%
- 6: ~0.50%
- 7: ~0.50%
- 8: ~0.20%
- 9: ~0.50%
- 11: ~0.50%
- 12: ~0.50%
- 13: ~0.50%
- 15: ~0.50%
- 16: ~0.20%
- 17: ~0.30%
- 18: ~0.50%
- 19: ~0.40%
- 20: ~0.50%
- 21: ~0.50%
- 22: ~0.30%
- 23: ~0.50%
- 24: ~0.50%
- 25: ~0.50%
- 26: ~0.50%
- 27: ~0.50%
- 28: ~0.40%
- 29: ~0.50%
- 30: ~0.20%
- 31: ~0.30%
- 32: ~0.40%
- 33: ~0.50%
- 34: ~0.50%
- 36: ~0.50%
- 38: ~0.50%
- 39: ~0.50%
- 40: ~0.30%
- 41: ~0.20%
- 43: ~0.50%
- 44: ~0.50%
- 45: ~0.50%
- 46: ~0.40%
- 47: ~0.30%
- 48: ~0.30%
- 49: ~0.50%
- 50: ~0.30%
- 51: ~0.50%
- 52: ~0.50%
- 53: ~0.50%
- 54: ~0.50%
- 55: ~0.20%
- 56: ~0.50%
- 57: ~0.50%
- 59: ~0.50%
- 60: ~0.40%
- 62: ~0.50%
- 63: ~0.20%
- 64: ~0.50%
- 65: ~0.40%
- 66: ~0.50%
- 67: ~0.40%
- 68: ~0.50%
- 69: ~0.50%
- 70: ~0.50%
- 71: ~0.20%
- 72: ~0.50%
- 73: ~0.20%
- 74: ~0.50%
- 75: ~0.50%
- 77: ~0.50%
- 78: ~0.30%
- 79: ~0.50%
- 80: ~0.40%
- 81: ~0.30%
- 82: ~0.20%
- 83: ~0.40%
- 84: ~0.30%
- 85: ~0.50%
- 87: ~0.50%
- 88: ~0.20%
- 90: ~0.50%
- 91: ~0.20%
- 92: ~0.50%
- 93: ~0.40%
- 94: ~0.50%
- 95: ~0.50%
- 97: ~0.50%
- 98: ~0.40%
- 99: ~0.50%
- 100: ~0.30%
- 101: ~0.50%
- 103: ~0.20%
- 104: ~0.50%
- 106: ~0.40%
- 107: ~0.20%
- 108: ~0.40%
- 109: ~0.30%
- 110: ~0.50%
- 111: ~0.40%
- 112: ~0.50%
- 113: ~0.30%
- 115: ~0.30%
- 116: ~0.50%
- 117: ~0.50%
- 118: ~0.30%
- 120: ~0.30%
- 121: ~0.50%
- 122: ~0.20%
- 123: ~0.40%
- 124: ~0.30%
- 125: ~0.40%
- 126: ~0.50%
- 127: ~0.50%
- 128: ~0.50%
- 129: ~0.50%
- 130: ~0.50%
- 131: ~0.50%
- 132: ~0.40%
- 133: ~0.50%
- 134: ~0.30%
- 135: ~0.50%
- 136: ~0.30%
- 137: ~0.30%
- 138: ~0.50%
- 139: ~0.50%
- 140: ~0.20%
- 141: ~0.50%
- 142: ~0.50%
- 143: ~0.50%
- 144: ~0.30%
- 145: ~0.30%
- 146: ~0.30%
- 147: ~0.50%
- 148: ~0.30%
- 149: ~0.20%
- 150: ~0.50%
- 151: ~0.30%
- 152: ~0.20%
- 153: ~0.50%
- 154: ~0.50%
- 155: ~0.40%
- 156: ~0.20%
- 158: ~0.50%
- 159: ~0.50%
- 160: ~0.50%
- 161: ~0.40%
- 162: ~0.20%
- 163: ~0.40%
- 164: ~0.20%
- 165: ~0.50%
- 166: ~0.50%
- 167: ~0.50%
- 168: ~0.20%
- 169: ~0.50%
- 170: ~0.50%
- 171: ~0.20%
- 172: ~0.50%
- 173: ~0.50%
- 174: ~0.40%
- 175: ~0.50%
- 176: ~0.30%
- 178: ~0.50%
- 180: ~0.20%
- 182: ~0.50%
- 183: ~0.50%
- 184: ~0.30%
- 185: ~0.50%
- 187: ~0.20%
- 188: ~0.50%
- 189: ~0.50%
- 191: ~0.50%
- 192: ~0.50%
- 193: ~0.50%
- 194: ~0.20%
- 195: ~0.30%
- 196: ~0.50%
- 197: ~0.50%
- 199: ~0.50%
- 200: ~0.50%
- 201: ~0.20%
- 202: ~0.50%
- 203: ~0.50%
- 204: ~0.30%
- 205: ~0.50%
- 206: ~0.20%
- 207: ~0.40%
- 208: ~0.50%
- 209: ~0.30%
- 210: ~0.30%
- 211: ~0.50%
- 212: ~0.20%
- 213: ~0.50%
- 214: ~0.50%
- 215: ~0.40%
- 216: ~0.50%
- 217: ~0.40%
- 218: ~0.50%
- 219: ~0.50%
- 220: ~0.20%
- 221: ~0.50%
- 222: ~0.40%
- 223: ~0.50%
- 224: ~0.30%
- 225: ~0.40%
- 227: ~0.20%
- 228: ~0.30%
- 230: ~0.40%
- 231: ~0.40%
- 232: ~0.50%
- 233: ~0.50%
- 234: ~0.50%
- 235: ~0.50%
- 236: ~0.40%
- 237: ~0.50%
- 238: ~0.40%
- 239: ~0.50%
- 240: ~0.50%
- 241: ~0.50%
- 242: ~0.30%
- 243: ~0.50%
- 244: ~0.50%
- 245: ~0.50%
- 246: ~0.50%
- 247: ~0.20%
- 248: ~0.50%
- 249: ~0.50%
- 250: ~0.50%
- 251: ~0.50%
- 252: ~0.20%
- 253: ~0.50%
- 254: ~0.50%
- 255: ~0.30%
- 256: ~0.50%
- 257: ~0.50%
- 258: ~0.20%
- 259: ~0.50%
- 260: ~0.30%
- 261: ~0.50%
- 262: ~0.50%
- 263: ~0.20%
- 264: ~0.50%
- 265: ~0.20%
- Samples:
sentence label MERCATO LBA - Treviso, Giofrè: "Mercato in continua osservazione, vedremo..."
0
Ky Bowman: Non sono soddisfatto delle mie performance
0
LBA - Treviso, Giofrè: "Sabato la Reggiana, dobbiamo vincere. Punto"
0
- Loss:
BatchAllTripletLoss
Evaluation Dataset
Unnamed Dataset
- Size: 9,310 evaluation samples
- Columns:
sentence
andlabel
- Approximate statistics based on the first 1000 samples:
sentence label type string int details - min: 4 tokens
- mean: 19.04 tokens
- max: 78 tokens
- 0: ~0.50%
- 1: ~0.30%
- 2: ~0.50%
- 4: ~0.50%
- 5: ~0.20%
- 6: ~0.30%
- 7: ~0.50%
- 8: ~0.50%
- 9: ~0.50%
- 10: ~0.50%
- 12: ~0.40%
- 13: ~0.30%
- 14: ~0.30%
- 15: ~0.40%
- 16: ~0.20%
- 17: ~0.50%
- 18: ~0.40%
- 19: ~0.40%
- 20: ~0.50%
- 21: ~0.50%
- 22: ~0.50%
- 23: ~0.50%
- 24: ~0.20%
- 25: ~0.20%
- 26: ~0.50%
- 27: ~0.50%
- 28: ~0.50%
- 30: ~0.50%
- 31: ~0.20%
- 32: ~0.30%
- 33: ~0.50%
- 34: ~0.20%
- 35: ~0.50%
- 37: ~0.50%
- 38: ~0.20%
- 39: ~0.50%
- 40: ~0.50%
- 41: ~0.20%
- 42: ~0.30%
- 43: ~0.30%
- 44: ~0.50%
- 45: ~0.30%
- 46: ~0.50%
- 47: ~0.50%
- 48: ~0.30%
- 49: ~0.40%
- 50: ~0.30%
- 51: ~0.20%
- 52: ~0.50%
- 53: ~0.20%
- 54: ~0.30%
- 55: ~0.50%
- 56: ~0.50%
- 57: ~0.20%
- 58: ~0.50%
- 59: ~0.50%
- 60: ~0.50%
- 61: ~0.30%
- 62: ~0.30%
- 63: ~0.20%
- 65: ~0.50%
- 67: ~0.40%
- 68: ~0.50%
- 69: ~0.50%
- 70: ~0.20%
- 71: ~0.40%
- 72: ~0.50%
- 73: ~0.50%
- 74: ~0.30%
- 77: ~0.20%
- 78: ~0.50%
- 79: ~0.50%
- 80: ~0.20%
- 81: ~0.50%
- 82: ~0.20%
- 83: ~0.50%
- 84: ~0.50%
- 85: ~0.50%
- 89: ~0.20%
- 90: ~0.50%
- 91: ~0.50%
- 92: ~0.30%
- 93: ~0.40%
- 94: ~0.50%
- 95: ~0.30%
- 96: ~0.20%
- 97: ~0.50%
- 98: ~0.20%
- 99: ~0.50%
- 100: ~0.50%
- 101: ~0.50%
- 102: ~0.50%
- 103: ~0.30%
- 104: ~0.50%
- 105: ~0.50%
- 106: ~0.50%
- 107: ~0.50%
- 108: ~0.50%
- 109: ~0.50%
- 110: ~0.20%
- 111: ~0.50%
- 112: ~0.50%
- 113: ~0.20%
- 114: ~0.50%
- 115: ~0.40%
- 116: ~0.50%
- 117: ~0.20%
- 118: ~0.50%
- 120: ~0.50%
- 121: ~0.30%
- 122: ~0.50%
- 123: ~0.40%
- 124: ~0.20%
- 125: ~0.50%
- 126: ~0.20%
- 129: ~0.50%
- 130: ~0.30%
- 131: ~0.50%
- 132: ~0.40%
- 133: ~0.50%
- 134: ~0.50%
- 135: ~0.50%
- 136: ~0.20%
- 137: ~0.30%
- 138: ~0.50%
- 140: ~0.30%
- 141: ~0.30%
- 142: ~0.50%
- 143: ~0.40%
- 144: ~0.50%
- 145: ~0.50%
- 146: ~0.30%
- 147: ~0.20%
- 148: ~0.50%
- 149: ~0.40%
- 150: ~0.50%
- 151: ~0.20%
- 152: ~0.50%
- 154: ~0.20%
- 155: ~0.20%
- 156: ~0.50%
- 157: ~0.50%
- 158: ~0.50%
- 159: ~0.50%
- 160: ~0.20%
- 162: ~0.50%
- 163: ~0.20%
- 164: ~0.20%
- 165: ~0.20%
- 166: ~0.20%
- 167: ~0.30%
- 168: ~0.50%
- 169: ~0.50%
- 170: ~0.50%
- 171: ~0.40%
- 172: ~0.30%
- 173: ~0.50%
- 174: ~0.50%
- 175: ~0.30%
- 176: ~0.50%
- 178: ~0.50%
- 179: ~0.20%
- 180: ~0.50%
- 181: ~0.50%
- 182: ~0.30%
- 183: ~0.40%
- 184: ~0.20%
- 185: ~0.50%
- 186: ~0.50%
- 187: ~0.50%
- 188: ~0.20%
- 189: ~0.50%
- 191: ~0.20%
- 192: ~0.50%
- 193: ~0.20%
- 194: ~0.20%
- 195: ~0.40%
- 196: ~0.20%
- 197: ~0.20%
- 198: ~0.50%
- 199: ~0.40%
- 200: ~0.50%
- 201: ~0.50%
- 202: ~0.50%
- 203: ~0.40%
- 205: ~0.50%
- 206: ~0.50%
- 207: ~0.50%
- 208: ~0.50%
- 209: ~0.50%
- 210: ~0.50%
- 211: ~0.40%
- 212: ~0.50%
- 213: ~0.50%
- 214: ~0.20%
- 215: ~0.20%
- 216: ~0.50%
- 217: ~0.50%
- 218: ~0.50%
- 219: ~0.30%
- 220: ~0.50%
- 221: ~0.50%
- 223: ~0.50%
- 224: ~0.50%
- 225: ~0.50%
- 227: ~0.20%
- 228: ~0.50%
- 230: ~0.20%
- 231: ~0.50%
- 232: ~0.50%
- 234: ~0.30%
- 235: ~0.40%
- 236: ~0.50%
- 237: ~0.50%
- 238: ~0.20%
- 239: ~0.50%
- 240: ~0.20%
- 241: ~0.50%
- 242: ~0.20%
- 243: ~0.20%
- 244: ~0.20%
- 246: ~0.50%
- 247: ~0.20%
- 248: ~0.50%
- 249: ~0.50%
- 250: ~0.40%
- 251: ~0.50%
- 252: ~0.50%
- 253: ~0.20%
- 254: ~0.50%
- 255: ~0.50%
- 256: ~0.50%
- 257: ~0.50%
- 258: ~0.20%
- 259: ~0.20%
- 260: ~0.50%
- 261: ~0.50%
- 262: ~0.20%
- 263: ~0.40%
- 264: ~0.50%
- 265: ~0.50%
- 266: ~0.50%
- 267: ~0.50%
- 268: ~0.20%
- 269: ~0.20%
- 270: ~0.40%
- 272: ~0.30%
- 273: ~0.20%
- 274: ~0.50%
- 275: ~0.50%
- 276: ~0.40%
- 277: ~0.30%
- 278: ~0.30%
- Samples:
sentence label Supplenze: come funzionano i contratti fino al 31 dicembre 2024 e il calcolo del punteggio?
0
Docente non abilitato assunto a tempo determinato da concorso PNRR1: in quale scuola "andrò a finire" se nella mia si perde un posto?
0
Docenti non abilitati nominati dopo il 31 agosto da graduatorie pubblicate prima: otterranno sede di titolarità all’esito delle operazioni di mobilità [Chiarimenti]
0
- Loss:
BatchAllTripletLoss
Training Hyperparameters
Non-Default Hyperparameters
per_device_train_batch_size
: 32num_train_epochs
: 4lr_scheduler_type
: cosinewarmup_ratio
: 0.25seed
: 17data_seed
: 17bf16
: Truebatch_sampler
: group_by_label
All Hyperparameters
Click to expand
overwrite_output_dir
: Falsedo_predict
: Falseeval_strategy
: noprediction_loss_only
: Trueper_device_train_batch_size
: 32per_device_eval_batch_size
: 8per_gpu_train_batch_size
: Noneper_gpu_eval_batch_size
: Nonegradient_accumulation_steps
: 1eval_accumulation_steps
: Nonetorch_empty_cache_steps
: Nonelearning_rate
: 5e-05weight_decay
: 0.0adam_beta1
: 0.9adam_beta2
: 0.999adam_epsilon
: 1e-08max_grad_norm
: 1.0num_train_epochs
: 4max_steps
: -1lr_scheduler_type
: cosinelr_scheduler_kwargs
: {}warmup_ratio
: 0.25warmup_steps
: 0log_level
: passivelog_level_replica
: warninglog_on_each_node
: Truelogging_nan_inf_filter
: Truesave_safetensors
: Truesave_on_each_node
: Falsesave_only_model
: Falserestore_callback_states_from_checkpoint
: Falseno_cuda
: Falseuse_cpu
: Falseuse_mps_device
: Falseseed
: 17data_seed
: 17jit_mode_eval
: Falseuse_ipex
: Falsebf16
: Truefp16
: Falsefp16_opt_level
: O1half_precision_backend
: autobf16_full_eval
: Falsefp16_full_eval
: Falsetf32
: Nonelocal_rank
: 0ddp_backend
: Nonetpu_num_cores
: Nonetpu_metrics_debug
: Falsedebug
: []dataloader_drop_last
: Falsedataloader_num_workers
: 0dataloader_prefetch_factor
: Nonepast_index
: -1disable_tqdm
: Falseremove_unused_columns
: Truelabel_names
: Noneload_best_model_at_end
: Falseignore_data_skip
: Falsefsdp
: []fsdp_min_num_params
: 0fsdp_config
: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}fsdp_transformer_layer_cls_to_wrap
: Noneaccelerator_config
: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}deepspeed
: Nonelabel_smoothing_factor
: 0.0optim
: adamw_torchoptim_args
: Noneadafactor
: Falsegroup_by_length
: Falselength_column_name
: lengthddp_find_unused_parameters
: Noneddp_bucket_cap_mb
: Noneddp_broadcast_buffers
: Falsedataloader_pin_memory
: Truedataloader_persistent_workers
: Falseskip_memory_metrics
: Trueuse_legacy_prediction_loop
: Falsepush_to_hub
: Falseresume_from_checkpoint
: Nonehub_model_id
: Nonehub_strategy
: every_savehub_private_repo
: Nonehub_always_push
: Falsegradient_checkpointing
: Falsegradient_checkpointing_kwargs
: Noneinclude_inputs_for_metrics
: Falseinclude_for_metrics
: []eval_do_concat_batches
: Truefp16_backend
: autopush_to_hub_model_id
: Nonepush_to_hub_organization
: Nonemp_parameters
:auto_find_batch_size
: Falsefull_determinism
: Falsetorchdynamo
: Noneray_scope
: lastddp_timeout
: 1800torch_compile
: Falsetorch_compile_backend
: Nonetorch_compile_mode
: Nonedispatch_batches
: Nonesplit_batches
: Noneinclude_tokens_per_second
: Falseinclude_num_input_tokens_seen
: Falseneftune_noise_alpha
: Noneoptim_target_modules
: Nonebatch_eval_metrics
: Falseeval_on_start
: Falseuse_liger_kernel
: Falseeval_use_gather_object
: Falseaverage_tokens_across_devices
: Falseprompts
: Nonebatch_sampler
: group_by_labelmulti_dataset_batch_sampler
: proportional
Training Logs
Epoch | Step | Training Loss | Validation Loss | average_precision |
---|---|---|---|---|
0.0002 | 1 | 0.0521 | - | - |
0.8002 | 3824 | 0.0195 | - | - |
1.7732 | 7648 | 0.0071 | - | - |
2.7462 | 11472 | 0.0052 | - | - |
3.7192 | 15296 | 0.0046 | - | - |
3.8272 | 15812 | - | 0.0011 | 0.5284 |
Framework Versions
- Python: 3.12.8
- Sentence Transformers: 3.4.1
- Transformers: 4.48.3
- PyTorch: 2.6.0+cu124
- Accelerate: 1.3.0
- Datasets: 3.2.0
- Tokenizers: 0.21.0
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",
}
BatchAllTripletLoss
@misc{hermans2017defense,
title={In Defense of the Triplet Loss for Person Re-Identification},
author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
year={2017},
eprint={1703.07737},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
- Downloads last month
- 128
Inference Providers
NEW
This model is not currently available via any of the supported Inference Providers.
Model tree for ancc/Velvet-2B-embedding-news
Base model
Almawave/Velvet-2BEvaluation results
- Average Precision on Unknownself-reported0.528
- F1 on Unknownself-reported0.550
- Precision on Unknownself-reported0.557
- Recall on Unknownself-reported0.544
- Threshold on Unknownself-reported0.931