Sentence Similarity
sentence-transformers
Safetensors
English
modernbert
feature-extraction
Eval Results (legacy)
text-embeddings-inference
Instructions to use Shuu12121/CodeSearch-ModernBERT-Owl with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Shuu12121/CodeSearch-ModernBERT-Owl with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Shuu12121/CodeSearch-ModernBERT-Owl") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
| { | |
| "architectures": [ | |
| "ModernBertModel" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "attention_probs_dropout_prob": 0.1, | |
| "bos_token_id": 50000, | |
| "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": 50001, | |
| "global_attn_every_n_layers": 3, | |
| "global_rope_theta": 160000.0, | |
| "hidden_activation": "gelu", | |
| "hidden_dropout_prob": 0.1, | |
| "hidden_size": 768, | |
| "initializer_cutoff_factor": 2.0, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 3072, | |
| "local_attention": 128, | |
| "local_attention_rope_theta": 10000, | |
| "local_attention_window": 128, | |
| "local_rope_theta": 10000.0, | |
| "max_position_embeddings": 2048, | |
| "mlp_bias": false, | |
| "mlp_dropout": 0.0, | |
| "model_type": "modernbert", | |
| "norm_bias": false, | |
| "norm_eps": 1e-05, | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 12, | |
| "pad_token_id": 0, | |
| "reference_compile": true, | |
| "repad_logits_with_grad": false, | |
| "rope_theta": 160000, | |
| "sep_token_id": 50282, | |
| "sparse_pred_ignore_index": -100, | |
| "sparse_prediction": false, | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.50.0", | |
| "type_vocab_size": 2, | |
| "vocab_size": 50004 | |
| } | |