Sentence Similarity
sentence-transformers
Safetensors
English
modernbert
feature-extraction
dense
Generated from Trainer
dataset_size:2637346
loss:CachedMultipleNegativesSymmetricRankingLoss
loss:CachedMultipleNegativesRankingLoss
loss:CoSENTLoss
Eval Results (legacy)
text-embeddings-inference
Instructions to use johnnyboycurtis/ModernBERT-small-1.5-sts with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use johnnyboycurtis/ModernBERT-small-1.5-sts with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("johnnyboycurtis/ModernBERT-small-1.5-sts") sentences = [ "A modern bathtub in a bathroom is displayed.", "Different types of tiles are on the walls, floor and tub.", "A man sitting on a park bench looking towards a fountain and sculpture.", "A bathroom with a shower and his and her sinks." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Download config.json from johnnyboycurtis/ModernBERT-small-1.5-sts: direct link, hf CLI and curl.
- Browser
- Download file 1.11 kB
-
https://huggingface.co/johnnyboycurtis/ModernBERT-small-1.5-sts/resolve/main/config.json
- Command line
-
hf download hf://johnnyboycurtis/ModernBERT-small-1.5-sts/config.json
-
curl -L -o config.json https://huggingface.co/johnnyboycurtis/ModernBERT-small-1.5-sts/resolve/main/config.json
1.11 kB
| { | |
| "architectures": [ | |
| "ModernBertModel" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 50281, | |
| "classifier_activation": "gelu", | |
| "classifier_bias": false, | |
| "classifier_dropout": 0.0, | |
| "classifier_pooling": "cls", | |
| "cls_token_id": 50281, | |
| "decoder_bias": true, | |
| "deterministic_flash_attn": false, | |
| "embedding_dropout": 0.0, | |
| "eos_token_id": 50282, | |
| "global_attn_every_n_layers": 3, | |
| "global_rope_theta": 160000.0, | |
| "hidden_activation": "gelu", | |
| "hidden_size": 384, | |
| "initializer_cutoff_factor": 2.0, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 576, | |
| "local_attention": 128, | |
| "local_rope_theta": 10000.0, | |
| "max_position_embeddings": 1024, | |
| "mlp_bias": false, | |
| "mlp_dropout": 0.0, | |
| "model_type": "modernbert", | |
| "norm_bias": false, | |
| "norm_eps": 1e-05, | |
| "num_attention_heads": 6, | |
| "num_hidden_layers": 6, | |
| "pad_token_id": 50283, | |
| "repad_logits_with_grad": false, | |
| "sep_token_id": 50282, | |
| "sparse_pred_ignore_index": -100, | |
| "sparse_prediction": false, | |
| "torch_dtype": "bfloat16", | |
| "transformers_version": "4.53.1", | |
| "vocab_size": 50368 | |
| } | |